Skip to main content

Something about NACL and Security Groups- Cloud Security

NACL and Security Groups:

Archietctre:
1. Security Groups are attached with every EC2 instance.
2. NACLs are situarted at boundary level- at subnet bounadries.

Firewall type:
1. NACLs are Stateless firewalls- meaing they don't keep track of packest going in and out. Everytime a packet leaves a boundary, the NACL checks if this packet is going to be allwed or not, and every time a packet comes inside the boundary, it checks again if the packet is allowed to enter or not. As an analogy, NACL can be condidered as Passwport Control, which even if remebers you by face, will check for your visa and passport before letting you in.
2. Security groups are stateful firewalls- meaning they remember what packet left and do not check when they come back. They keep track of ecah packet going out and in. As an analogy, they can be considered as a security guard siitng at the front gate, who remenbers who went out and let him in.

Traffic:
1. As NACL is stateles, it makes the decision to let a packet go out and In based on rles defined on paramteres- ip, port and protocol. It has separate rule sets for Inbound and Outbound traffic and evaluated independently.

2. As Secruity Groups are stateful, they only care about Inbound packets/ traffci based on rules not outgoing. By defualt, the policy is Deny All for Inbound and Allow All outbound so one has to explicitly define what traffic needs to be allowed In. Packets going out of the Secruity Groups are rememebered on basis of source address and thus are allowed in without any check.

Are NACL and Secruity Groups are redundant?
Not really, as discussed, NACL only inspects the traffic ging in and out of a boundary of a subnet. But there could be many EC2 instances within one subnet and they need to be regulated based on Secrutiy groups rules.

Comments

Popular posts from this blog

File Upload through Null Byte Injection

Sometimes, during file upload we come across situation wherein there would be check on the file extension at the client side as well as server side too. If the application does allow only .jpeg extension to be uploaded, the client side java script checks for the extension of the file before passing the request. We all know that how easily this can be defeated. Some applications, checks for the extension at the server side also. That's not easy to bypass. However there are some ways with which it still can be bypassed. Most of server side scripts are written in high level languages such as Php, Java etc who still use some C/C++ libraries to read the file name and contents. That leads to the problem. In C/C++ a line ends with /00 or which is called Null Byte. So whenever the interpreter sees a null byte at the end of the a string, it stops reading thinking it has reached at the end of the string. This can be used for the bypass. It works for many servers, specially php servers. T...

'Information Leakage-Improper Error Handling' dropped

From Owasp Top 10 2010 List, the issue 'Information Leakage-Improper Error Handling' has been dropped. But it's not the final list,its child release actually. Bu I feel it shouldn't be set aside because its still the one of the prevalent issues these days. That's why I mailed to Dave Wicher: Hi Dave, Excellent work, Congrats! Just one little query- Don't you think that Information Leakage & Improper Error Handling still deserves to be in Top 10? Dave replied: This topic is clearly a very prevalent issue that deserves attention by most organizations. However, the typical impact of such a flaw is usually very low. Therefore, the overall risk of this type of flaw is lower than the other items in the top 10, which is why it was replaced in this update with one of the 2 new items. Regarding dropping Info Leak/Error handling - It is incredibly prevalent, no question. But their impact is typically very low, so the overall risk is low, which is why it fell out of t...

jtool - an alternative to otool

jtool comes with a capability of running on Linux environment. Some ipa scanning tools are created to run on Linux environment where mac environment is not available. In such cases tools such as otool and class-dump-z will not work. So jtool can be an alternative to otool. For more information on jtool please refer to http://www.newosxbook.com/tools/jtool.html . It lists down various commands which have same output as otool or a equivalent. There are several commands mentioned in link. But for our customized requirements and basis checks I have listed down the below ones after running on many binaries. The outputs are similar or equivalent to otool and class-dump-z: Commands for checking PIE flag (ASLR) in jTool jtool -d -v -arch | grep stack ·           Automatic Reference Counting (ARC) protection: jtool -d -v -arch | grep _objc_release ·           To check if the devic...