<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-4046984248821087870</atom:id><lastBuildDate>Wed, 21 Oct 2009 07:20:52 +0000</lastBuildDate><title>Penetration Testing</title><description>Learn about "Ethical Hacking", attack analyzing and defending</description><link>http://haymanezzeldin.blogspot.com/</link><managingEditor>noreply@blogger.com (Hayman Ezzeldin)</managingEditor><generator>Blogger</generator><openSearch:totalResults>20</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/PenetrationTesting" type="application/rss+xml" /><feedburner:emailServiceId>PenetrationTesting</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.feedburner.com%2FPenetrationTesting" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2FPenetrationTesting" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare href="http://feeds.my.aol.com/add.jsp?url=http%3A%2F%2Ffeeds.feedburner.com%2FPenetrationTesting" src="http://o.aolcdn.com/favorites.my.aol.com/webmaster/ffclient/webroot/locale/en-US/images/myAOLButtonSmall.gif">Subscribe with My AOL</feedburner:feedFlare><feedburner:feedFlare href="http://www.bloglines.com/sub/http://feeds.feedburner.com/PenetrationTesting" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Ffeeds.feedburner.com%2FPenetrationTesting" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2FPenetrationTesting" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2FPenetrationTesting" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4046984248821087870.post-6148531396893495778</guid><pubDate>Wed, 05 Mar 2008 11:44:00 +0000</pubDate><atom:updated>2008-03-05T13:21:40.630+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Labs</category><category domain="http://www.blogger.com/atom/ns#">4- Scanning</category><title>NMAP Detection and Countermeasures</title><description>Who is still enjoying the freedom? :)&lt;br /&gt;Good, it seems like my lessons didn’t work yet :)&lt;br /&gt;Just kidding. I want you always to be safe, you heard that?&lt;br /&gt;&lt;br /&gt;We dived into the scanning phase by learning &lt;a href="http://haymanezzeldin.blogspot.com/2008/02/scanning-using-nmap-part-1.html"&gt;nmap scans&lt;/a&gt; techniques, and today we’ll see how these scans can be detected using the filters on Wireshark and what the countermeasures are.&lt;br /&gt;&lt;br /&gt;For this article I created a lab with 2 PCs; 1 XP machines and 1 BackTrack beta 3.0&lt;br /&gt;I also ran the wireshark for 1 hour and 10 minutes of capturing traffic, this traffic included Web browsing and NMAP Scans.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_hJ8mrxrtvaI/R86IDu5Zo0I/AAAAAAAABN0/CehvFuwPuPA/s1600-h/NMAP-LAB.jpg"&gt;&lt;img style="cursor: pointer;" src="http://bp3.blogger.com/_hJ8mrxrtvaI/R86IDu5Zo0I/AAAAAAAABN0/CehvFuwPuPA/s320/NMAP-LAB.jpg" alt="" id="BLOGGER_PHOTO_ID_5174222619605050178" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_hJ8mrxrtvaI/R86ID-5Zo1I/AAAAAAAABN8/9KrRYot2sN8/s1600-h/Wireshark-nofilter.png"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_hJ8mrxrtvaI/R86ID-5Zo1I/AAAAAAAABN8/9KrRYot2sN8/s320/Wireshark-nofilter.png" alt="" id="BLOGGER_PHOTO_ID_5174222623900017490" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;As you can see, Wireshark captured 213633 Packets in 4354 seconds. But on a real functional network these numbers are very humble; the real numbers will be scary. You have to try it yourself.&lt;br /&gt;&lt;br /&gt;So imagine with me that you put Wireshark on your network which consists of 50 PCs all connected to the Internet, all of them are online all of the time, and your network has been scanned by a bad guy, how can you check that using Wireshark (assuming you don’t have an Intrusion Detection installed and assuming you don’t know what type of scan the bad guy used)?&lt;br /&gt;&lt;br /&gt;Before we start, there are just 2 things I want to clarify:&lt;br /&gt;1- Each protocol has a number assigned to it, these numbers are assigned by an organization called &lt;a href="http://en.wikipedia.org/wiki/Internet_Assigned_Numbers_Authority"&gt;IANA (Internet Assigned Numbers Authority)&lt;/a&gt;, IANA is responsible for the global coordination of the DNS Root, IP addressing, and other Internet protocol resources.&lt;br /&gt;For example TCP is assigned the decimal number 6; UDP is assigned the decimal number 17, while IP is assigned the decimal number 4, and so on.&lt;br /&gt;For the whole list of the Assigned Internet Protocol Number, please visit the IANA website &lt;a href="http://www.iana.org/assignments/protocol-numbers"&gt;http://www.iana.org/assignments/protocol-numbers&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;2- Remember, in the &lt;a href="http://haymanezzeldin.blogspot.com/2008/01/whois.html"&gt;Whois article&lt;/a&gt; we talked about the TCP flags, and that there are 8 flags; FIN, SYN, RST, PSH, ACK, URG, ECE, CWR&lt;br /&gt;These flags have decimal numbers as well assigned to them:&lt;br /&gt;FIN = 1&lt;br /&gt;SYN = 2&lt;br /&gt;RST = 4&lt;br /&gt;PSH = 8&lt;br /&gt;ACK = 16&lt;br /&gt;URG = 32&lt;br /&gt;ECE = 64&lt;br /&gt;CWR = 128&lt;br /&gt;&lt;br /&gt;So for example, if we want the SYN/ACK flag decimal value, we add 2 (which is the decimal value of the SYN flag) to 16 (which is the decimal value of the ACK flag), so the result would be 18.&lt;br /&gt;What about the XMAS scan? From the article “&lt;a href="http://haymanezzeldin.blogspot.com/2008/02/scanning-using-nmap-part-1.html"&gt;Scanning using Nmap - Part 1&lt;/a&gt;” we learned that the XMAS scan sets the FIN, PSH and URG flags, so if we add 1 + 8 + 32, then the decimal values of the flags is 41.&lt;br /&gt;&lt;br /&gt;Don’t worry about these numbers; we will understand them as soon as we start analyzing the traffic.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;TCP Connect Scan (Plain Vanilla)&lt;/span&gt;&lt;br /&gt;“TCP Connect Scan” or “Plain Vanilla” attempts to complete the whole 3-Way handshake with each target host.&lt;br /&gt;The attacker sends a SYN to the target, if the target’s port is open and it responded with a SYN/ACK, and then the attacker will send the last ACK and tear down the connection using the RST.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Threshold:&lt;/span&gt;&lt;br /&gt;The TCP 3-Way handshake is very normal to see a lot on your network’s traffic, but if this kind of traffic is explosive and the number of them is extremely high per second on the network, then you have to investigate it and check the IP responsible for these scans.&lt;br /&gt;You are the only one who can specify this threshold, because you are the only one who knows your network’s traffic.&lt;br /&gt;&lt;br /&gt;Keep Wireshark running for a whole working day, this will give you an average idea about the traffic on your network, and I said average because one day the network users might be busy working :) so the traffic gets less, or the opposite.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Filter:&lt;/span&gt;&lt;br /&gt;The filter we are going to apply to check if a TCP Connect Scan occurred on our network is:&lt;br /&gt;&lt;span style="font-style: italic;font-family:courier new;" &gt;ip.proto == 6 and tcp.flags == 18&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;We chose 6 for the ip.proto because this is the Assigned Internet Protocol Number for the TCP protocol, and we chose 18 for the tcp.flags because 18 represents the decimal value of the SYN/ACK flag&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;TCP Connect Scan on Wireshark:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_hJ8mrxrtvaI/R86I5u5Zo2I/AAAAAAAABOE/CFkVlZ4qiOo/s1600-h/TCP-Connect-filter.png"&gt;&lt;img style="cursor: pointer;" src="http://bp3.blogger.com/_hJ8mrxrtvaI/R86I5u5Zo2I/AAAAAAAABOE/CFkVlZ4qiOo/s320/TCP-Connect-filter.png" alt="" id="BLOGGER_PHOTO_ID_5174223547317986146" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Because my lab is small compared to a real network, the filter is not so obvious, but as you can that the target (192.168.2.64) sends responses back within (1 second) to the attacker (192.168.2.68) telling him what ports are open.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;TCP SYN Scan (Half Open)&lt;/span&gt;&lt;br /&gt;TCP SYN scan is a little bit stealthier than the previous scan, because it uses a different technique. The attacker sends a SYN to the targets, if the target’s port is open and it responded with a SYN/ACK, then the attacker will immediately tear down the connection using the RST.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Threshold:&lt;/span&gt;&lt;br /&gt;As we know, SYN Scan starts as the 3-Way handshake, but instead of completing the handshake, it terminates the connection with a RST flag. So this kind of traffic might appear to be normal, but you have to notice the number of the Half Open connections, if the SYN packets are greater than the SYN/ACK packets, then there is something wrong.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Filter:&lt;/span&gt;&lt;br /&gt;The filter we are going to apply to check if a TCP SYN Scan occurred on our network is:&lt;br /&gt;&lt;span style="font-style: italic;font-family:courier new;" &gt;ip.proto == 6 and tcp.flags == 2&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;We chose 6 for the ip.proto because this is the Assigned Internet Protocol Number for the TCP protocol, and we chose 2 for the tcp.flags because 2 represents the decimal value of the SYN flag.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;TCP SYN Scan on Wireshark:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_hJ8mrxrtvaI/R86JRO5Zo3I/AAAAAAAABOM/mOMnVDkhRVE/s1600-h/TCP-SYN-filter.png"&gt;&lt;img style="cursor: pointer;" src="http://bp1.blogger.com/_hJ8mrxrtvaI/R86JRO5Zo3I/AAAAAAAABOM/mOMnVDkhRVE/s320/TCP-SYN-filter.png" alt="" id="BLOGGER_PHOTO_ID_5174223951044911986" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The attacker here is 192.168.2.64, and he is sending the target 192.168.2.68 a lot of SYN packets in a very small time zone, this for sure indicates a SYN Scan.&lt;br /&gt;&lt;br /&gt;Let’s compare the number of SYN flagged packets to the SYN/ACK flagged ones.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_hJ8mrxrtvaI/R86Kcu5Zo4I/AAAAAAAABOU/xZu1jC7nExA/s1600-h/SYN-Filter.png"&gt;&lt;img style="cursor: pointer;" src="http://bp3.blogger.com/_hJ8mrxrtvaI/R86Kcu5Zo4I/AAAAAAAABOU/xZu1jC7nExA/s320/SYN-Filter.png" alt="" id="BLOGGER_PHOTO_ID_5174225248125035394" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_hJ8mrxrtvaI/R86Kc-5Zo5I/AAAAAAAABOc/yepwTMVlL_Q/s1600-h/SYNACK-Filter.png"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_hJ8mrxrtvaI/R86Kc-5Zo5I/AAAAAAAABOc/yepwTMVlL_Q/s320/SYNACK-Filter.png" alt="" id="BLOGGER_PHOTO_ID_5174225252420002706" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Wow, did you see that? When I applied the SYN flag filter, Wireshark displayed 63018 packets.&lt;br /&gt;While when I applied the SYN/ACK flag filter, Wireshark displayed 542 packets. There is a huge difference between both numbers, this difference indicates the huge amount of Half Open connections.&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;br /&gt;TCP FIN Scan&lt;/span&gt;&lt;br /&gt;The FIN Scan breaks the rule of TCP connection establishment because it sends an unexpected packet at the start of the connection, which is the FIN flag.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Threshold:&lt;/span&gt;&lt;br /&gt;FIN flags are part of any communication between 2 hosts, because this communication has to be ended at a moment, but if you see an explosive number of FIN flagged packets without a previous established connection, then take care of that.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Filter:&lt;/span&gt;&lt;br /&gt;The filter we are going to apply to check if a TCP FIN Scan occurred on our network is:&lt;br /&gt;&lt;span style="font-style: italic;font-family:courier new;" &gt;ip.proto == 6 and tcp.flags == 1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;We chose 6 for the ip.proto because this is the Assigned Internet Protocol Number for the TCP protocol, and we chose 1 for the tcp.flags because 1 represents the decimal value of the SYN flag.&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;br /&gt;TCP FIN Scan on Wireshark:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_hJ8mrxrtvaI/R86K6-5Zo6I/AAAAAAAABOk/CqvMK4qb1H8/s1600-h/TCP-FIN-filter.png"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_hJ8mrxrtvaI/R86K6-5Zo6I/AAAAAAAABOk/CqvMK4qb1H8/s320/TCP-FIN-filter.png" alt="" id="BLOGGER_PHOTO_ID_5174225767816078242" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The attacker here is 192.168.2.64, and he is sending the target 192.168.2.68 a lot of FIN packets in a very small time zone, this for sure indicates a FIN Scan.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;TCP XMAS Scan&lt;/span&gt;&lt;br /&gt;The XMAS Scan breaks the rule of TCP connection establishment because it sends an unexpected packet at the start of the connection, by setting the FIN, PSH and URG flags.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Threshold:&lt;/span&gt;&lt;br /&gt;XMAS packets should never be seen on your network, so if you see a single XMAS flagged packet, then someone is scanning your network.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Filter:&lt;/span&gt;&lt;br /&gt;The filter we are going to apply to check if a TCP XMAS Scan occurred on our network is:&lt;br /&gt;&lt;span style="font-style: italic;font-family:courier new;" &gt;ip.proto == 6 and tcp.flags == 41&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;We chose 6 for the ip.proto because this is the Assigned Internet Protocol Number for the TCP protocol, and we chose 41 for the tcp.flags because 41 represents the decimal value of the (FIN + PSH + URG flags).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;TCP XMAS Scan on Wireshark:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_hJ8mrxrtvaI/R86LRe5Zo7I/AAAAAAAABOs/j0Cs-AQfsYc/s1600-h/TCP-XMAS-filter.png"&gt;&lt;img style="cursor: pointer;" src="http://bp2.blogger.com/_hJ8mrxrtvaI/R86LRe5Zo7I/AAAAAAAABOs/j0Cs-AQfsYc/s320/TCP-XMAS-filter.png" alt="" id="BLOGGER_PHOTO_ID_5174226154363134898" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;As we said, you should never ever see an XMAS packet on your network for any reason, and as you can see in the picture the attacker 192.168.2.64 is doing an XMAS Scan against 192.168.2.68.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;TCP NULL Scan&lt;/span&gt;&lt;br /&gt;The NULL Scan breaks the rule of TCP connection establishment because it sends an unexpected packet at the start of the connection, by all flags from the packets.&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;br /&gt;Threshold:&lt;/span&gt;&lt;br /&gt;NULL packets should never be seen on your network, so if you see a single NULL flagged packet, then someone is scanning your network.&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;br /&gt;Filter:&lt;/span&gt;&lt;br /&gt;The filter we are going to apply to check if a TCP XMAS Scan occurred on our network is:&lt;br /&gt;&lt;span style="font-style: italic;font-family:courier new;" &gt;ip.proto == 6 and tcp.flags == 0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;We chose 6 for the ip.proto because this is the Assigned Internet Protocol Number for the TCP protocol, and we chose 0 for the tcp.flags because 0 means that all flags are removed.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;TCP NULL Scan on Wireshark:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_hJ8mrxrtvaI/R86LkO5Zo8I/AAAAAAAABO0/D1WEIR7Xjdo/s1600-h/TCP-NULL-filter.png"&gt;&lt;img style="cursor: pointer;" src="http://bp1.blogger.com/_hJ8mrxrtvaI/R86LkO5Zo8I/AAAAAAAABO0/D1WEIR7Xjdo/s320/TCP-NULL-filter.png" alt="" id="BLOGGER_PHOTO_ID_5174226476485682114" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;As we said, you should never ever see an NULL packet on your network for any reason, and as you can see in the picture the attacker 192.168.2.64 is doing an NULL Scan against 192.168.2.68.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;TCP ACK Scan &lt;/span&gt;&lt;br /&gt;The idea behind the TCP ACK scan is very simple and very smart; I will give you an analogy to get how it is working.&lt;br /&gt;We don’t know each other, right?&lt;br /&gt;Imagine I met you once in the street, and suddenly I went to you and said “hey man, where have you been all of this time? Not even a single mail, shame on you?” :)&lt;br /&gt;What will you think? You will say “This man knows me for sure, but probably I don’t remember him”, and then you will start answering me “Oh, I’m fine, and sorry for not sending you mails but I was very busy the last few weeks. I got a baby and…” and you will start talking friendly.&lt;br /&gt;&lt;br /&gt;TCP ACK Scan almost works the same, it sends an ACK to the target’s ports, the target will think “it seems like I started a connection with this computer before, let’s answer him”&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Threshold:&lt;/span&gt;&lt;br /&gt;As we know, ACK is the last packet in the 3-Way handshake, thus seeing ACK packet on the network is normal, but if you see an extreme high number of them, then an ACK scan is occurring.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Filter:&lt;/span&gt;&lt;br /&gt;The filter we are going to apply to check if a TCP SYN Scan occurred on our network is:&lt;br /&gt;&lt;span style="font-style: italic;font-family:courier new;" &gt;ip.proto == 6 and tcp.flags == 16&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;We chose 6 for the ip.proto because this is the Assigned Internet Protocol Number for the TCP protocol, and we chose 16 for the tcp.flags because 16 represents the decimal value of the ACK flag.&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;br /&gt;TCP ACK Scan on Wireshark:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_hJ8mrxrtvaI/R86MDu5Zo-I/AAAAAAAABPE/zfrkbFcBatk/s1600-h/TCP-ACK-filter.png"&gt;&lt;img style="cursor: pointer;" src="http://bp3.blogger.com/_hJ8mrxrtvaI/R86MDu5Zo-I/AAAAAAAABPE/zfrkbFcBatk/s320/TCP-ACK-filter.png" alt="" id="BLOGGER_PHOTO_ID_5174227017651561442" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The attacker here is 192.168.2.64, and he is sending the target 192.168.2.68 a lot of ACK packets in a very small time zone, this for sure indicates an ACK Scan.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;UDP Scan &lt;/span&gt;&lt;br /&gt;Because UDP is simpler than TCP; no 3-Way handshaking, no Flags, no Sequence numbers, so the UDP scan is very simplified.&lt;br /&gt;The attacker sends a UDP packet to each port on the Target. There might be here 3 responses; an ICMP Port Unreachable (which indicates a closed port), no response (which means the port might be open or filtered by firewall), or a UDP response&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Threshold:&lt;/span&gt;&lt;br /&gt;These packets are not supposed to be seen on the network, so whenever you see them, they mean something bad.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Filter:&lt;/span&gt;&lt;br /&gt;The filter we are going to apply to check if a TCP SYN Scan occurred on our network is:&lt;br /&gt;&lt;span style="font-style: italic;font-family:courier new;" &gt;ip.proto == 17 and ip.len = 28&lt;/span&gt;&lt;br /&gt;Or you can change the equal sign to “Greater Than”, the reason is that some scans can add junk data after the UDP packet, instead of sending an IP datagram with no data.&lt;br /&gt;&lt;br /&gt;We chose 17 for the ip.proto because this is the Assigned Internet Protocol Number for the UDP protocol, and an IP Total Length (Specifies the length, in bytes, of the entire IP packet, including the data and header) equal or greater than 28, and we chose 28 because the length of the IP header is 20 bytes and the length of the UDP header is 8 bytes, so 20+8=28.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;TCP UDP Scan on Wireshark:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_hJ8mrxrtvaI/R86Mb-5Zo_I/AAAAAAAABPM/-dFG_jK_Gfs/s1600-h/TCP-UDPeq-filter.png"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_hJ8mrxrtvaI/R86Mb-5Zo_I/AAAAAAAABPM/-dFG_jK_Gfs/s320/TCP-UDPeq-filter.png" alt="" id="BLOGGER_PHOTO_ID_5174227434263389170" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_hJ8mrxrtvaI/R86McO5ZpAI/AAAAAAAABPU/Mo0trWtLOrM/s1600-h/TCP-UDPgt-filter.png"&gt;&lt;img style="cursor: pointer;" src="http://bp1.blogger.com/_hJ8mrxrtvaI/R86McO5ZpAI/AAAAAAAABPU/Mo0trWtLOrM/s320/TCP-UDPgt-filter.png" alt="" id="BLOGGER_PHOTO_ID_5174227438558356482" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The attacker here is 192.168.2.64, and he is sending the target 192.168.2.68 a lot of UDP packets in a very small time zone, this for sure indicates an UDP Scan.&lt;br /&gt;And the target 192.168.2.68 kept responding with an ICMP message “Destination Unreachable – Port Unreachable” which indicates a closed port.&lt;br /&gt;&lt;br /&gt;After we learned how to detect a Scan, we have to know how can we defend or avoid these kind of attacks.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Port Scanning Countermeasures:&lt;/span&gt;&lt;br /&gt;1- The first and most obvious countermeasure is to close all of the unwanted ports, most of the administrators (whether Sysadmins or Netadmins) install by default, this type of installation is popular because it’s the easiest, why should I bother myself by trying to find the open ports? How to close these ports? What if closing a port causes me problems with the big boss because something suddenly stopped? And a lot of these excuses.&lt;br /&gt;&lt;br /&gt;First, we have to detect the open ports, and to do that:&lt;br /&gt;For Windows users, I like to use &lt;a href="http://www.foundstone.com/us/resources/proddesc/fport.htm"&gt;Fport &lt;/a&gt;(ex Foundstone, McAfee recently) and &lt;a href="http://technet.microsoft.com/en-us/sysinternals/bb897437.aspx"&gt;TCPview &lt;/a&gt;(ex Sysinternals, Microsoft recently)&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_hJ8mrxrtvaI/R86M5u5ZpBI/AAAAAAAABPc/ofQNi7I7ceU/s1600-h/Fport.png"&gt;&lt;img style="cursor: pointer;" src="http://bp3.blogger.com/_hJ8mrxrtvaI/R86M5u5ZpBI/AAAAAAAABPc/ofQNi7I7ceU/s320/Fport.png" alt="" id="BLOGGER_PHOTO_ID_5174227945364497426" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;For Linux users, I like the command line &lt;span style="font-style: italic;font-family:courier new;" &gt;lsof &lt;/span&gt;“List Open Files”&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_hJ8mrxrtvaI/R86NEO5ZpCI/AAAAAAAABPk/CSPIPhGaHoY/s1600-h/lsof.png"&gt;&lt;img style="cursor: pointer;" src="http://bp1.blogger.com/_hJ8mrxrtvaI/R86NEO5ZpCI/AAAAAAAABPk/CSPIPhGaHoY/s320/lsof.png" alt="" id="BLOGGER_PHOTO_ID_5174228125753123874" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;After finding the unwanted ports, now it’s time to close the process which is using this port (if the process or service not needed).&lt;br /&gt;On Windows, you can use &lt;a href="http://technet.microsoft.com/en-us/sysinternals/bb896683.aspx"&gt;Pskill &lt;/a&gt;(ex Sysinternals, Microsoft recently), the command line &lt;span style="font-style: italic;font-family:courier new;" &gt;kill &lt;/span&gt;or &lt;span style="font-style: italic;font-family:courier new;" &gt;taskkill&lt;/span&gt;, or use “Services” management console from the “Administrative Tools” in the “Control Panel”&lt;br /&gt;On Linux, you can use the &lt;span style="font-style: italic;font-family:courier new;" &gt;kill &lt;/span&gt;command line with the specified PID (Process ID), this command line is exactly like the Windows taskkill command, used to kill the chosen process till the next restart.&lt;br /&gt;If you want to close the process permanently, then use the “Services” management console on Windows or edit the /etc/xinited.d/[service] on Linux and include this line &lt;span style="font-style: italic;font-family:courier new;" &gt;disable = yes&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_hJ8mrxrtvaI/R86Nd-5ZpDI/AAAAAAAABPs/EGh_NsYAYAI/s1600-h/kill-process-temp.png"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_hJ8mrxrtvaI/R86Nd-5ZpDI/AAAAAAAABPs/EGh_NsYAYAI/s320/kill-process-temp.png" alt="" id="BLOGGER_PHOTO_ID_5174228568134755378" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_hJ8mrxrtvaI/R86NeO5ZpEI/AAAAAAAABP0/JqtSK__JHcI/s1600-h/kill-process-perm.png"&gt;&lt;img style="cursor: pointer;" src="http://bp1.blogger.com/_hJ8mrxrtvaI/R86NeO5ZpEI/AAAAAAAABP0/JqtSK__JHcI/s320/kill-process-perm.png" alt="" id="BLOGGER_PHOTO_ID_5174228572429722690" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;2- The second way that will help you defend yourself is to attack yourself before the hacker does. What I mean here is to try using the scanning tools yourself against your network, this way you will be able to see in reality how your network is reacting towards attacks.&lt;br /&gt;BUT, 2 things you have to notice before doing that:&lt;br /&gt;The first is to make sure that you have an approval for doing that, your boss might not be as kind as my boss :)&lt;br /&gt;The second thing to notice, is that scanning tools are creating extra traffic on your network, because they are sending and receiving packets, this will eat from your traffic bandwidth, thus slowing down your network performance. So for that, just monitor your network performance while you are scanning.&lt;br /&gt;&lt;br /&gt;3- Use Stateful Packet filter and Proxy devices&lt;br /&gt;Normally, there are 3 types of filtering devices: Static Packet filter, Stateful Packet filter, and Proxy.&lt;br /&gt;The Static Packet firewalls (such as Cisco Routers) are used to block simple traffic depending on simple filters, such as filtering according to the IP address.&lt;br /&gt;&lt;br /&gt;While Stateful (such as Cisco PIX Firewall and Checkpoint Firewall) and Proxies keep records of earlier packets, for example if I’m sending you an ACK flagged packet, the Stateful filter device will check the records of the already-opened connections, if it finds that the ACK packet doesn’t belong to a previous communication, then this packet will be dropped.&lt;br /&gt;&lt;br /&gt;I hope that you are still enjoying our long journey in Penetration Testing.&lt;br /&gt;Till next article&lt;br /&gt;Take care.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4046984248821087870-6148531396893495778?l=haymanezzeldin.blogspot.com'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/PenetrationTesting?a=FysShZ68YQw:ZdHE5cp0-2A:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PenetrationTesting?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/PenetrationTesting?a=FysShZ68YQw:ZdHE5cp0-2A:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PenetrationTesting?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PenetrationTesting/~4/FysShZ68YQw" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/PenetrationTesting/~3/FysShZ68YQw/nmap-detection-and-countermeasures.html</link><author>noreply@blogger.com (Hayman Ezzeldin)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://bp3.blogger.com/_hJ8mrxrtvaI/R86IDu5Zo0I/AAAAAAAABN0/CehvFuwPuPA/s72-c/NMAP-LAB.jpg" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://haymanezzeldin.blogspot.com/2008/03/nmap-detection-and-countermeasures.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4046984248821087870.post-5578186045651946715</guid><pubDate>Wed, 27 Feb 2008 06:37:00 +0000</pubDate><atom:updated>2008-02-27T07:38:47.758+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Labs</category><title>Installing VMware Server on Linux</title><description>For the Linux lovers – whom I belong to :)&lt;br /&gt;It’s our turn today to learn the steps for installing VMware Server on a Linux OS&lt;br /&gt;&lt;br /&gt;Note: I’m going to copy parts from my previous article “&lt;a href="http://haymanezzeldin.blogspot.com/2008/02/installing-vmware-server-on-windows.html"&gt;Installing VMware Server on Windows&lt;/a&gt;”; it’s the parts that should be common&lt;br /&gt;&lt;br /&gt;Because we don’t want to be sent to jail, or lose our jobs – because you might get the idea of testing your knowledge against live networks, right? :) And because we want to practice our hacking techniques, so we have to start with creating a VIRTUAL lab :)&lt;br /&gt;&lt;br /&gt;First we’ll create a virtual machine using VMware Server, which is free software that can be downloaded from here &lt;a href="http://www.vmware.com/download/server/"&gt;http://www.vmware.com/download/server/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;A virtual machine is a simulated computer that runs on a real physical computer but acts as if it is a separate computer, so you can have your PC or laptop that has one of the Linux distributions installed and at the same time you can run various Operating systems without the need to format or dual boot.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_hJ8mrxrtvaI/R7-wbEaLNjI/AAAAAAAABHM/8zBjHFF74XE/s1600-h/VMware.png"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_hJ8mrxrtvaI/R7-wbEaLNjI/AAAAAAAABHM/8zBjHFF74XE/s320/VMware.png" alt="" id="BLOGGER_PHOTO_ID_5170044876331103794" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Here for example, my computer is running Windows, but I was able by using VMware to create a Virtual Machine that has various operating systems installed like Apple, Solaris, and Linux…&lt;br /&gt;Almost any operating system can be installed&lt;br /&gt;&lt;br /&gt;In this lab we will learn how to install VMware server on a &lt;a href="http://fedoraproject.org/"&gt;Linux Fedora&lt;/a&gt; Core 8, which is the latest version at the moment of typing :)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Prerequisites:&lt;/span&gt;&lt;br /&gt;But before we start downloading and installing VMware, there are some prerequisites needed:&lt;br /&gt;1- Development Libraries&lt;br /&gt;2- Development Tools&lt;br /&gt;3- Kernel-Devel&lt;br /&gt;4- Xinetd&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_hJ8mrxrtvaI/R8KPUkaLOAI/AAAAAAAABK0/e6hkmBTf6wY/s1600-h/AddRemove.png"&gt;&lt;img style="cursor: pointer;" src="http://bp1.blogger.com/_hJ8mrxrtvaI/R8KPUkaLOAI/AAAAAAAABK0/e6hkmBTf6wY/s320/AddRemove.png" alt="" id="BLOGGER_PHOTO_ID_5170852905708369922" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;1- The 4 packages needed can be installed in one step which is through the “Add/Remove Software”, but I will do it in more steps using the “Add/Remove Software” and the “Terminal” (for the Terminals lovers) :)&lt;br /&gt;Go to “Applications”, and then from the menu choose the “Add/Remove Software”&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_hJ8mrxrtvaI/R8KPrEaLOBI/AAAAAAAABK8/5N5ZZvbhJFY/s1600-h/PassPrompt.png"&gt;&lt;img style="cursor: pointer;" src="http://bp3.blogger.com/_hJ8mrxrtvaI/R8KPrEaLOBI/AAAAAAAABK8/5N5ZZvbhJFY/s320/PassPrompt.png" alt="" id="BLOGGER_PHOTO_ID_5170853292255426578" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;2- To install these packages you need to have the ROOT privilege (it’s like ADMINISTRATOR for Windows users)&lt;br /&gt;So, if you are logged as a normal user, you will be prompted to enter a “root” password, but if you are logged already as a “root” then you will go directly to the “Package Manager”&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_hJ8mrxrtvaI/R8KP-EaLOCI/AAAAAAAABLE/GTu0WeJ8L7M/s1600-h/PackageMGR.png"&gt;&lt;img style="cursor: pointer;" src="http://bp3.blogger.com/_hJ8mrxrtvaI/R8KP-EaLOCI/AAAAAAAABLE/GTu0WeJ8L7M/s320/PackageMGR.png" alt="" id="BLOGGER_PHOTO_ID_5170853618672941090" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;3- In the “Package Manager”, from the “Browse” tab, highlight “Development” and choose from the listed packages:&lt;br /&gt;a- Development Libraries&lt;br /&gt;b- Development Tools&lt;br /&gt;&lt;br /&gt;These development packages are required because we’ll need to compile few pieces of the VMware Server package.&lt;br /&gt;Click “Apply” to complete installing the packages.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;4- To install the Kernel-Devel and the Xinetd, we need to open a Terminal and type the following commands&lt;br /&gt;a- &lt;span style="font-style: italic; font-family: courier new;"&gt;su&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;(This su command is required if you are logged in as a normal user and not a root, and you will be prompted afterwards to enter the “root” password)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_hJ8mrxrtvaI/R8KSnUaLODI/AAAAAAAABLM/Ol1ssT-BS8E/s1600-h/su.png"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_hJ8mrxrtvaI/R8KSnUaLODI/AAAAAAAABLM/Ol1ssT-BS8E/s320/su.png" alt="" id="BLOGGER_PHOTO_ID_5170856526365800498" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;b- &lt;span style="font-style: italic;font-family:courier new;"&gt;yum install kernel-devel&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;(“yum” is an automatic updater and package installer and it stand for “Yellowdog Updater Modified”)&lt;/span&gt;&lt;br /&gt;Kernel-devel is required because it includes of the compatible C language headers needed for compiling few pieces of the VMware server package&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_hJ8mrxrtvaI/R8KSnkaLOEI/AAAAAAAABLU/Jm4dgaQU674/s1600-h/Kernel.png"&gt;&lt;img style="cursor: pointer;" src="http://bp1.blogger.com/_hJ8mrxrtvaI/R8KSnkaLOEI/AAAAAAAABLU/Jm4dgaQU674/s320/Kernel.png" alt="" id="BLOGGER_PHOTO_ID_5170856530660767810" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;c- &lt;span style="font-style: italic;font-family:courier new;"&gt;yum install xinetd&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;(“xinetd” is an eXtended Internet service Daemon, and it’s needed to be able to deal with running network services)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_hJ8mrxrtvaI/R8KSnkaLOFI/AAAAAAAABLc/k9jck63dtvs/s1600-h/Xinetd.png"&gt;&lt;img style="cursor: pointer;" src="http://bp1.blogger.com/_hJ8mrxrtvaI/R8KSnkaLOFI/AAAAAAAABLc/k9jck63dtvs/s320/Xinetd.png" alt="" id="BLOGGER_PHOTO_ID_5170856530660767826" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Now we are ready for starting the VMware server installation process.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_hJ8mrxrtvaI/R7-xCEaLNkI/AAAAAAAABHU/ufoiwLJD4e4/s1600-h/Screen01.png"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_hJ8mrxrtvaI/R7-xCEaLNkI/AAAAAAAABHU/ufoiwLJD4e4/s320/Screen01.png" alt="" id="BLOGGER_PHOTO_ID_5170045546346001986" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;1- On the &lt;a href="http://www.vmware.com/download/server/"&gt;Download page of VMware Server&lt;/a&gt;, click the “Download Now” button, this will take you to the “End User License Agreement” or EULA.&lt;br /&gt;EULA is very important to read because it gives you a general idea about the software you are about to download or install, it also includes your rights and your responsibilities; it tells what you are allowed to do with this piece of software and what you are not allowed to do.&lt;br /&gt;And I’m sorry, but if you want to download or install VMware Server on your machine, then you have to accept the EULA (Take it or leave it)&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_hJ8mrxrtvaI/R8KTa0aLOGI/AAAAAAAABLk/28bnzgMQR7w/s1600-h/Screen02.png"&gt;&lt;img style="cursor: pointer;" src="http://bp2.blogger.com/_hJ8mrxrtvaI/R8KTa0aLOGI/AAAAAAAABLk/28bnzgMQR7w/s320/Screen02.png" alt="" id="BLOGGER_PHOTO_ID_5170857411129063522" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;2- At the bottom of the EULA page, you will see 2 buttons; “Yes” and “No”, to be taken to the download links you have to click the “Yes” button&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_hJ8mrxrtvaI/R8KTq0aLOHI/AAAAAAAABLs/6UZAVcwPuiE/s1600-h/Screen03.png"&gt;&lt;img style="cursor: pointer;" src="http://bp2.blogger.com/_hJ8mrxrtvaI/R8KTq0aLOHI/AAAAAAAABLs/6UZAVcwPuiE/s320/Screen03.png" alt="" id="BLOGGER_PHOTO_ID_5170857686006970482" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;3- We can see 2 binaries for the Linux OS; “.tar.gz” and “.rpm”&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/Tar_%28file_format%29"&gt;TAR &lt;/a&gt;stands for “Tape Archive”, &lt;a href="http://en.wikipedia.org/wiki/Gzip"&gt;GZ &lt;/a&gt;stands for “GNU Zip”, while &lt;a href="http://en.wikipedia.org/wiki/RPM_Package_Manager"&gt;RPM &lt;/a&gt;stands for “Redhat Package Manager”&lt;br /&gt;Both the “tar gz” and the “rpm” are package management systems for Linux, windows users can consider it as a zipped exe (it’s not exactly like that, but it’s the closest to make it clear for windows users)&lt;br /&gt;&lt;br /&gt;I’m going to choose the “.tar.gz”, because this is compatible with all Linux distros and Unix OS&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_hJ8mrxrtvaI/R8KUEUaLOII/AAAAAAAABL0/7zyd4-ZHk2M/s1600-h/Screen04.png"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_hJ8mrxrtvaI/R8KUEUaLOII/AAAAAAAABL0/7zyd4-ZHk2M/s320/Screen04.png" alt="" id="BLOGGER_PHOTO_ID_5170858124093634690" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;4- You will be prompted for the download location, save the file wherever you like.&lt;br /&gt;&lt;br /&gt;5- Write the commands as follow:&lt;br /&gt;a- &lt;span style="font-style: italic;font-family:courier new;"&gt;su&lt;/span&gt;&lt;br /&gt;b- &lt;span style="font-style: italic;font-family:courier new;"&gt;tar xvfz ‘xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx’&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;(Where the multi X line represents the path of the “.tar.gz” file)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;tar&lt;/span&gt; is the command used to extract or zip&lt;br /&gt;The &lt;span style="font-style: italic;font-family:courier new;"&gt;x&lt;/span&gt; option is to “extract”&lt;br /&gt;The &lt;span style="font-style: italic;font-family:courier new;"&gt;v&lt;/span&gt; option is to verbose; to output the name of each file extracted&lt;br /&gt;The &lt;span style="font-style: italic;"&gt;&lt;span style="font-family:courier new;"&gt;f&lt;/span&gt; &lt;/span&gt;option is to specify the name of the file&lt;br /&gt;The &lt;span style="font-style: italic;font-family:courier new;"&gt;z&lt;/span&gt; option is used when you are extracting gzip files&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_hJ8mrxrtvaI/R8KUSUaLOJI/AAAAAAAABL8/Y7id1nULJEE/s1600-h/Screen05.png"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_hJ8mrxrtvaI/R8KUSUaLOJI/AAAAAAAABL8/Y7id1nULJEE/s320/Screen05.png" alt="" id="BLOGGER_PHOTO_ID_5170858364611803282" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;c- &lt;span style="font-style: italic;font-family:courier new;"&gt;ls&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;(this command is just to list the contents of a directory, and I just typed it to check the name of the extracted folder)&lt;/span&gt;&lt;br /&gt;d- &lt;span style="font-style: italic;font-family:courier new;"&gt;cd vmware-server-distrib&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;(cd stands for “Change Directory”)&lt;/span&gt;&lt;br /&gt;e- &lt;span style="font-style: italic;font-family:courier new;"&gt;ls&lt;/span&gt;&lt;br /&gt;f- &lt;span style="font-style: italic;font-family:courier new;"&gt;./vmware-install.pl&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;(this is the command that will start the VMware Server installation)&lt;/span&gt;&lt;br /&gt;The installer will ask a lot of questions; choose the defaults always by hitting the “Enter” button.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_hJ8mrxrtvaI/R8KV80aLOKI/AAAAAAAABME/VOPBCplz0vw/s1600-h/Screen06.png"&gt;&lt;img style="cursor: pointer;" src="http://bp2.blogger.com/_hJ8mrxrtvaI/R8KV80aLOKI/AAAAAAAABME/VOPBCplz0vw/s320/Screen06.png" alt="" id="BLOGGER_PHOTO_ID_5170860194267871394" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Because at this moment, VMware Server is not ready for the latest Linux Kernel (the kernel I’m doing my lab is 2.6.1-42.fc8), you might get this error when it comes to the part of building the vmmon module:&lt;br /&gt;“Unable to build the vmmon module”&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_hJ8mrxrtvaI/R8KWK0aLOLI/AAAAAAAABMM/SAO2LoGSaow/s1600-h/Screen07.png"&gt;&lt;img style="cursor: pointer;" src="http://bp2.blogger.com/_hJ8mrxrtvaI/R8KWK0aLOLI/AAAAAAAABMM/SAO2LoGSaow/s320/Screen07.png" alt="" id="BLOGGER_PHOTO_ID_5170860434786039986" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Now, we need to solve this problem by installing a patch file.&lt;br /&gt;&lt;br /&gt;5- The patch file is called vmware-any-any-updatexxx, where xxx is 115 at the moment. This file can be downloaded from &lt;a href="http://knihovny.cvut.cz/ftp/pub/vmware/vmware-any-any-update115.tar.gz"&gt;http://knihovny.cvut.cz/ftp/pub/vmware/vmware-any-any-update115.tar.gz&lt;/a&gt;&lt;br /&gt;The command used is:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-style: italic;"&gt;Wget http://knihovny.cvut.cz/ftp/pub/vmware/vmware-any-any-update115.tar.gz&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_hJ8mrxrtvaI/R8KWwUaLOMI/AAAAAAAABMU/688AQZRcATw/s1600-h/Screen08.png"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_hJ8mrxrtvaI/R8KWwUaLOMI/AAAAAAAABMU/688AQZRcATw/s320/Screen08.png" alt="" id="BLOGGER_PHOTO_ID_5170861079031134402" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;6- We’ll use the tar command to extract the zipped file&lt;br /&gt;&lt;span style="font-style: italic;font-family:courier new;"&gt;tar xvfz vmware-any-any-update115.tar.gz&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_hJ8mrxrtvaI/R8KXi0aLONI/AAAAAAAABMc/t08mY4FqLkQ/s1600-h/Screen09.png"&gt;&lt;img style="cursor: pointer;" src="http://bp2.blogger.com/_hJ8mrxrtvaI/R8KXi0aLONI/AAAAAAAABMc/t08mY4FqLkQ/s320/Screen09.png" alt="" id="BLOGGER_PHOTO_ID_5170861946614528210" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;f- Change directory to the vmware-any-any-update115 and run the runme.pl file&lt;br /&gt;a- &lt;span style="font-style: italic;font-family:courier new;"&gt;cd vmware-any-any-update115&lt;/span&gt;&lt;br /&gt;b- &lt;span style="font-style: italic;font-family:courier new;"&gt;./runme.pl&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_hJ8mrxrtvaI/R8KYK0aLOOI/AAAAAAAABMk/f5j5UCV-sdg/s1600-h/Screen10.png"&gt;&lt;img style="cursor: pointer;" src="http://bp2.blogger.com/_hJ8mrxrtvaI/R8KYK0aLOOI/AAAAAAAABMk/f5j5UCV-sdg/s320/Screen10.png" alt="" id="BLOGGER_PHOTO_ID_5170862633809295586" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The patch will start updating the non compatible VMware modules.&lt;br /&gt;Then it will start the process of completing the VMware Server installation which failed before. You will get a lot of questions; all you have to do is accept the defaults by hitting the “Enter” button&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_hJ8mrxrtvaI/R8KYcEaLOPI/AAAAAAAABMs/kP7DZ5Nu6j8/s1600-h/Screen11.png"&gt;&lt;img style="cursor: pointer;" src="http://bp3.blogger.com/_hJ8mrxrtvaI/R8KYcEaLOPI/AAAAAAAABMs/kP7DZ5Nu6j8/s320/Screen11.png" alt="" id="BLOGGER_PHOTO_ID_5170862930162039026" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_hJ8mrxrtvaI/R8KY-UaLOQI/AAAAAAAABM0/TBtyzykd1qs/s1600-h/Screen12.png"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_hJ8mrxrtvaI/R8KY-UaLOQI/AAAAAAAABM0/TBtyzykd1qs/s320/Screen12.png" alt="" id="BLOGGER_PHOTO_ID_5170863518572558594" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_hJ8mrxrtvaI/R8KY-UaLORI/AAAAAAAABM8/do_1FwBRq_c/s1600-h/Screen13.png"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_hJ8mrxrtvaI/R8KY-UaLORI/AAAAAAAABM8/do_1FwBRq_c/s320/Screen13.png" alt="" id="BLOGGER_PHOTO_ID_5170863518572558610" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_hJ8mrxrtvaI/R8KY-0aLOSI/AAAAAAAABNE/SXrkuPvfftA/s1600-h/Screen14.png"&gt;&lt;img style="cursor: pointer;" src="http://bp2.blogger.com/_hJ8mrxrtvaI/R8KY-0aLOSI/AAAAAAAABNE/SXrkuPvfftA/s320/Screen14.png" alt="" id="BLOGGER_PHOTO_ID_5170863527162493218" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_hJ8mrxrtvaI/R8KY_EaLOTI/AAAAAAAABNM/QoiS9syptoc/s1600-h/Screen15.png"&gt;&lt;img style="cursor: pointer;" src="http://bp3.blogger.com/_hJ8mrxrtvaI/R8KY_EaLOTI/AAAAAAAABNM/QoiS9syptoc/s320/Screen15.png" alt="" id="BLOGGER_PHOTO_ID_5170863531457460530" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_hJ8mrxrtvaI/R8KY_EaLOUI/AAAAAAAABNU/yxwd8iaFwLk/s1600-h/Screen16.png"&gt;&lt;img style="cursor: pointer;" src="http://bp3.blogger.com/_hJ8mrxrtvaI/R8KY_EaLOUI/AAAAAAAABNU/yxwd8iaFwLk/s320/Screen16.png" alt="" id="BLOGGER_PHOTO_ID_5170863531457460546" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Now we are done successfully :) and VMware is installed successfully as well.&lt;br /&gt;To start your VMware console, go to “Applications”, “Other”, and from the submenu select “VMware Server Console”&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_hJ8mrxrtvaI/R8KaMEaLOVI/AAAAAAAABNc/_lXyv77mqug/s1600-h/Screen17.png"&gt;&lt;img style="cursor: pointer;" src="http://bp3.blogger.com/_hJ8mrxrtvaI/R8KaMEaLOVI/AAAAAAAABNc/_lXyv77mqug/s320/Screen17.png" alt="" id="BLOGGER_PHOTO_ID_5170864854307387730" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_hJ8mrxrtvaI/R8KaMEaLOWI/AAAAAAAABNk/U3o99bwPXxo/s1600-h/Screen18.png"&gt;&lt;img style="cursor: pointer;" src="http://bp3.blogger.com/_hJ8mrxrtvaI/R8KaMEaLOWI/AAAAAAAABNk/U3o99bwPXxo/s320/Screen18.png" alt="" id="BLOGGER_PHOTO_ID_5170864854307387746" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_hJ8mrxrtvaI/R8KaMUaLOXI/AAAAAAAABNs/mWQqWkPcAuE/s1600-h/Screen19.png"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_hJ8mrxrtvaI/R8KaMUaLOXI/AAAAAAAABNs/mWQqWkPcAuE/s320/Screen19.png" alt="" id="BLOGGER_PHOTO_ID_5170864858602355058" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;And to start creating your first virtual machine, all you have to do is to read another article :)&lt;br /&gt;The article is “&lt;a href="http://haymanezzeldin.blogspot.com/2008/02/creating-first-virtual-machine.html"&gt;Creating you first virtual machine&lt;/a&gt;”&lt;br /&gt;&lt;br /&gt;I hope I made the steps in an easy way that everyone can follow, and please if you have any recommendations or comments don’t hesitate to contact me.&lt;br /&gt;Also don’t forget to update us all if anything is changed :)&lt;br /&gt;&lt;br /&gt;Till next article,&lt;br /&gt;Take care.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4046984248821087870-5578186045651946715?l=haymanezzeldin.blogspot.com'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/PenetrationTesting?a=VtR98El8f8A:tufqI5pM_Vs:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PenetrationTesting?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/PenetrationTesting?a=VtR98El8f8A:tufqI5pM_Vs:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PenetrationTesting?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PenetrationTesting/~4/VtR98El8f8A" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/PenetrationTesting/~3/VtR98El8f8A/installing-vmware-server-on-linux.html</link><author>noreply@blogger.com (Hayman Ezzeldin)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://bp0.blogger.com/_hJ8mrxrtvaI/R7-wbEaLNjI/AAAAAAAABHM/8zBjHFF74XE/s72-c/VMware.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://haymanezzeldin.blogspot.com/2008/02/installing-vmware-server-on-linux.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4046984248821087870.post-6633962733308733518</guid><pubDate>Sat, 23 Feb 2008 07:35:00 +0000</pubDate><atom:updated>2008-02-23T09:05:27.730+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Labs</category><title>Creating the first virtual machine</title><description>By &lt;a href="http://haymanezzeldin.blogspot.com/2008/02/installing-vmware-server-on-windows.html"&gt;installing VMware&lt;/a&gt;, we are finished with the first step. Our second step is to create our first virtual machine in our lab. The choice of the operating system depends on you and the way you want to design your lab, and the steps to create a virtual machine are the same for every operating system.&lt;br /&gt;&lt;br /&gt;For our blog’s lab, this will vary according to the attack we are practicing. For example, in the &lt;a href="http://haymanezzeldin.blogspot.com/2008/02/scanning-using-nmap-part-2.html"&gt;Scanning using Nmap - Part 2&lt;/a&gt;, we discussed a scanning technique called “Idle Scan”, in this scan we were in need for 3 machines; Attacker, Target, and a Zombie&lt;br /&gt;You can choose to have the 3 machines with Windows OS or Linux or whatever operating system you feel comfort with; you can even make a mix of operating systems; 1 Windows, 1 Linux, 1 Live CD…&lt;br /&gt;It’s all your choice.&lt;br /&gt;&lt;br /&gt;Now, to the steps of creating our first machine in our lab.&lt;br /&gt;After installing VMware on your computer, you should see this icon on your desktop&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_hJ8mrxrtvaI/R7_NBEaLNxI/AAAAAAAABI8/vXigOsXgGt4/s1600-h/Icon.png"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_hJ8mrxrtvaI/R7_NBEaLNxI/AAAAAAAABI8/vXigOsXgGt4/s320/Icon.png" alt="" id="BLOGGER_PHOTO_ID_5170076315491710738" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;1- Double click this icon to start your “VMware Server Console”&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_hJ8mrxrtvaI/R7_NMUaLNyI/AAAAAAAABJE/WgyoMduxuws/s1600-h/Screen01.png"&gt;&lt;img style="cursor: pointer;" src="http://bp1.blogger.com/_hJ8mrxrtvaI/R7_NMUaLNyI/AAAAAAAABJE/WgyoMduxuws/s320/Screen01.png" alt="" id="BLOGGER_PHOTO_ID_5170076508765239074" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;2- The first screen asks you if you want to use the VMware Console that is installed locally, or do you have another console that is installed on another computer and you would like to use it remotely?&lt;br /&gt;Because this is our first and the only VMware Server Console that we will need and use, then we will keep the default choice “Local host” radio button, and click “OK”&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_hJ8mrxrtvaI/R7_NYEaLNzI/AAAAAAAABJM/wQsm24NG3xY/s1600-h/Screen02.png"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_hJ8mrxrtvaI/R7_NYEaLNzI/AAAAAAAABJM/wQsm24NG3xY/s320/Screen02.png" alt="" id="BLOGGER_PHOTO_ID_5170076710628702002" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;3- This is the main window which you will see all the time when you are dealing with your virtual machines.&lt;br /&gt;For creating any new machines, we have to click the “New Virtual machine” link, this will lead you to the “New Virtual machine Wizard”&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_hJ8mrxrtvaI/R7_NmEaLN0I/AAAAAAAABJU/IkHGaUHMh2Y/s1600-h/Screen03.png"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_hJ8mrxrtvaI/R7_NmEaLN0I/AAAAAAAABJU/IkHGaUHMh2Y/s320/Screen03.png" alt="" id="BLOGGER_PHOTO_ID_5170076951146870594" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;4- Click “Next &gt;”&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_hJ8mrxrtvaI/R7_NxkaLN1I/AAAAAAAABJc/BZWbmO8yRyc/s1600-h/Screen04.png"&gt;&lt;img style="cursor: pointer;" src="http://bp2.blogger.com/_hJ8mrxrtvaI/R7_NxkaLN1I/AAAAAAAABJc/BZWbmO8yRyc/s320/Screen04.png" alt="" id="BLOGGER_PHOTO_ID_5170077148715366226" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;5- Now we are going to configure the virtual machine we want to create, there are 2 options here; “Typical” and “Custom”&lt;br /&gt;With “Typical” configuration, you are going to create a machine with the default components (such as a Floppy Disk, Hard Disk, Network Card, 1 Processor…), while with “Custom” configuration you create your machine with additional devices and settings according to your needs (such as number of processors required, size of memory, Type of hard disk IDE or SCSi…)&lt;br /&gt;By the way, all of these settings can be changed later. For example if you created a machine using the “Typical” configuration, you still can change the number of processors, the amount of memory, and the type of hard disk… Everything.&lt;br /&gt;So don’t worry about your choice here.&lt;br /&gt;For our first machine, we will choose the “Typical” radio button, and click “Next &gt;”&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_hJ8mrxrtvaI/R7_N8kaLN2I/AAAAAAAABJk/JRWlsEJjgwo/s1600-h/Screen05.png"&gt;&lt;img style="cursor: pointer;" src="http://bp2.blogger.com/_hJ8mrxrtvaI/R7_N8kaLN2I/AAAAAAAABJk/JRWlsEJjgwo/s320/Screen05.png" alt="" id="BLOGGER_PHOTO_ID_5170077337693927266" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;6- In the “Select a Guest Operating System” windows, you will be able to choose the operating system that you will install on your virtual machine.&lt;br /&gt;For every operating system vendor you will see a list of the supported virtual machines. For example, in the Linux vendor, you will see Redhat, SuSe, Novell, Mandrake (Mandriva), TurboLinux, Ubuntu, and Others.&lt;br /&gt;Let’s say you are a Gentoo Linux fan, does this mean that you can’t install Gentoo as a virtual machine?&lt;br /&gt;Definitely you can, you can install almost any operating system. For example, Apple Mac is not mentioned here, but you still can choose the “Other” Radio button and start the process of installation (but with little tricks), Open BSD is not mentioned here but again it can be installed with little tricks.&lt;br /&gt;&lt;br /&gt;VMware is always updating the list of supported operating systems, and it’s few times when you want to install an operating system and it’s not supported by VMware.&lt;br /&gt;&lt;br /&gt;I chose “Windows XP Professional” as the first OS, you choose the virtual machine operating system you prefer and click “Next &gt;”&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_hJ8mrxrtvaI/R7_OJ0aLN3I/AAAAAAAABJs/0ucV4_8UYQI/s1600-h/Screen06.png"&gt;&lt;img style="cursor: pointer;" src="http://bp3.blogger.com/_hJ8mrxrtvaI/R7_OJ0aLN3I/AAAAAAAABJs/0ucV4_8UYQI/s320/Screen06.png" alt="" id="BLOGGER_PHOTO_ID_5170077565327193970" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;7- Give a name and a location for your virtual machine, this name will be the folder name of your machine that includes all of the files and settings.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_hJ8mrxrtvaI/R7_OeEaLN4I/AAAAAAAABJ0/5qdIuBZrcL8/s1600-h/Screen07.png"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_hJ8mrxrtvaI/R7_OeEaLN4I/AAAAAAAABJ0/5qdIuBZrcL8/s320/Screen07.png" alt="" id="BLOGGER_PHOTO_ID_5170077913219544962" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;8- Choose the type of the Network you need:&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Use bridged networking&lt;/span&gt;: If you use bridged networking, the virtual machine is a full participant in the network. It has access to other machines on the network and can be contacted by other machines on the network as if it were a physical computer on the network.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Use network address translation (NAT)&lt;/span&gt;: If you use NAT, your virtual machine does not have its own IP address on the external network. Instead, a separate private network is set up on the host computer. Your virtual machine gets an address on that network from the VMware virtual DHCP server. The VMware NAT device passes network data between one or more virtual machines and the external network. It identifies incoming data packets intended for each virtual machine and sends them to the correct destination.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Use host-only networking&lt;/span&gt;: If you use host-only networking, your virtual machine and the host virtual adapter are connected to a private Ethernet network. Addresses on this network are provided by the VMware DHCP server.&lt;br /&gt;&lt;br /&gt;These settings can be changed later as well according to your needs.&lt;br /&gt;For our Lab we’ll select “Use host-only networking”, because you might be connected at the moment to an operational network, and I don’t want you to mess up with this network.&lt;br /&gt;Click “Next &gt;”&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_hJ8mrxrtvaI/R7_OyUaLN5I/AAAAAAAABJ8/2PdYe1nYTXM/s1600-h/Screen08.png"&gt;&lt;img style="cursor: pointer;" src="http://bp1.blogger.com/_hJ8mrxrtvaI/R7_OyUaLN5I/AAAAAAAABJ8/2PdYe1nYTXM/s320/Screen08.png" alt="" id="BLOGGER_PHOTO_ID_5170078261111895954" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;9- What is the size of the hard disk of the virtual machine you are creating now? This depends on 2 things:&lt;br /&gt;a- The size of your real hard disk, because it doesn’t make sense if your hard disk is 10GB and you are creating a virtual hard disk with size 8GB&lt;br /&gt;b- What is the virtual machine going to be used for? What are the applications that will be installed on this machine?&lt;br /&gt;For example, if you are just installing a Windows OS, this will be about 2GB maximum, while it might reach 8GB if you are installing Linux, it all depends on the OS and the applications installed.&lt;br /&gt;&lt;br /&gt;Decide the size yourself and click “Finish”&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_hJ8mrxrtvaI/R7_PCUaLN6I/AAAAAAAABKE/neFT8BI5c6c/s1600-h/Screen09.png"&gt;&lt;img style="cursor: pointer;" src="http://bp1.blogger.com/_hJ8mrxrtvaI/R7_PCUaLN6I/AAAAAAAABKE/neFT8BI5c6c/s320/Screen09.png" alt="" id="BLOGGER_PHOTO_ID_5170078535989802914" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;10- Here we can see the first empty virtual machine, I say empty because we didn’t install the operating system yet :)&lt;br /&gt;Let’s examine the settings we configured first, and then I will leave you alone with your virtual machine :)&lt;br /&gt;To view or edit the virtual machine settings, click the “Edit virtual machine settings” link&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_hJ8mrxrtvaI/R7_PPkaLN7I/AAAAAAAABKM/FQKOSTLVwBw/s1600-h/Screen10.png"&gt;&lt;img style="cursor: pointer;" src="http://bp2.blogger.com/_hJ8mrxrtvaI/R7_PPkaLN7I/AAAAAAAABKM/FQKOSTLVwBw/s320/Screen10.png" alt="" id="BLOGGER_PHOTO_ID_5170078763623069618" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;11- Now if you want you can change the memory size, the CD drive, number of processors, add or remove hardware components…&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_hJ8mrxrtvaI/R7_PhEaLN8I/AAAAAAAABKU/w3dUx6awDhg/s1600-h/Screen11.png"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_hJ8mrxrtvaI/R7_PhEaLN8I/AAAAAAAABKU/w3dUx6awDhg/s320/Screen11.png" alt="" id="BLOGGER_PHOTO_ID_5170079064270780354" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_hJ8mrxrtvaI/R7_PhEaLN9I/AAAAAAAABKc/lnWbZovMri8/s1600-h/Screen12.png"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_hJ8mrxrtvaI/R7_PhEaLN9I/AAAAAAAABKc/lnWbZovMri8/s320/Screen12.png" alt="" id="BLOGGER_PHOTO_ID_5170079064270780370" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;12- If you feel that everything is fine with the settings, then let’s start our OS installation process.&lt;br /&gt;Click “Ok” to go back to the main window “VMware Server Console”.&lt;br /&gt;&lt;br /&gt;If you are going to install your operating system from a CD, then put the CD in the CD drive and make sure that you choose the right CD driver in the virtual machine settings&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_hJ8mrxrtvaI/R7_PwEaLN-I/AAAAAAAABKk/nd58fYfrguI/s1600-h/Screen13.png"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_hJ8mrxrtvaI/R7_PwEaLN-I/AAAAAAAABKk/nd58fYfrguI/s320/Screen13.png" alt="" id="BLOGGER_PHOTO_ID_5170079321968818146" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;If you are installing from an ISO image, then choose the “Use ISO image” radio button, and click the “Browse…” button to direct it to the ISO file. Click “OK” to go back to the “VMware Server Console”&lt;br /&gt;&lt;br /&gt;13- Click the “Start this virtual machine” link to start installing your OS on your first virtual machine&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_hJ8mrxrtvaI/R7_P50aLN_I/AAAAAAAABKs/5A8XhJmz2JQ/s1600-h/Screen14.png"&gt;&lt;img style="cursor: pointer;" src="http://bp3.blogger.com/_hJ8mrxrtvaI/R7_P50aLN_I/AAAAAAAABKs/5A8XhJmz2JQ/s320/Screen14.png" alt="" id="BLOGGER_PHOTO_ID_5170079489472542706" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;You can follow the same steps before in installing any OS you need.&lt;br /&gt;Have fun :)&lt;br /&gt;&lt;br /&gt;Till next article&lt;br /&gt;Take care&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4046984248821087870-6633962733308733518?l=haymanezzeldin.blogspot.com'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/PenetrationTesting?a=JVJSEt9HXuc:2x42PhjA4ZU:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PenetrationTesting?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/PenetrationTesting?a=JVJSEt9HXuc:2x42PhjA4ZU:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PenetrationTesting?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PenetrationTesting/~4/JVJSEt9HXuc" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/PenetrationTesting/~3/JVJSEt9HXuc/creating-first-virtual-machine.html</link><author>noreply@blogger.com (Hayman Ezzeldin)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://bp0.blogger.com/_hJ8mrxrtvaI/R7_NBEaLNxI/AAAAAAAABI8/vXigOsXgGt4/s72-c/Icon.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><feedburner:origLink>http://haymanezzeldin.blogspot.com/2008/02/creating-first-virtual-machine.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4046984248821087870.post-9219595147860651572</guid><pubDate>Sat, 23 Feb 2008 05:30:00 +0000</pubDate><atom:updated>2008-02-25T06:44:09.491+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Labs</category><title>Installing VMware Server on Windows</title><description>Because we don’t want to be sent to jail, or lose our jobs – because you might get the idea of testing your knowledge against live networks, right? :) And because we want to practice our hacking techniques, so we have to start with creating a VIRTUAL lab :)&lt;br /&gt;&lt;br /&gt;First we’ll create a virtual machine using VMware Server, which is free software that can be downloaded from here &lt;a href="http://www.vmware.com/download/server/"&gt;http://www.vmware.com/download/server/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;A virtual machine is a simulated computer that runs on a real physical computer but acts as if it is a separate computer, so you can have your PC or laptop that has Windows operating system installed by default and at the same time you can run various Operating systems without the need to format or dual boot.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_hJ8mrxrtvaI/R7-wbEaLNjI/AAAAAAAABHM/8zBjHFF74XE/s1600-h/VMware.png"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_hJ8mrxrtvaI/R7-wbEaLNjI/AAAAAAAABHM/8zBjHFF74XE/s320/VMware.png" alt="" id="BLOGGER_PHOTO_ID_5170044876331103794" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Here for example, my computer is running Windows, but I was able by using VMware to create a Virtual Machine that has various operating systems installed like Apple, Solaris, and Linux…&lt;br /&gt;Almost any operating system can be installed&lt;br /&gt;&lt;br /&gt;So let’s go ahead and install VMware Server (Free)&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_hJ8mrxrtvaI/R7-xCEaLNkI/AAAAAAAABHU/ufoiwLJD4e4/s1600-h/Screen01.png"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_hJ8mrxrtvaI/R7-xCEaLNkI/AAAAAAAABHU/ufoiwLJD4e4/s320/Screen01.png" alt="" id="BLOGGER_PHOTO_ID_5170045546346001986" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;1- Download VMware Server from the VMware web site &lt;a href="http://www.vmware.com/download/server/"&gt;http://www.vmware.com/download/server/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_hJ8mrxrtvaI/R7-xO0aLNlI/AAAAAAAABHc/UoX9lEPcDkU/s1600-h/Screen02.png"&gt;&lt;img style="cursor: pointer;" src="http://bp3.blogger.com/_hJ8mrxrtvaI/R7-xO0aLNlI/AAAAAAAABHc/UoX9lEPcDkU/s320/Screen02.png" alt="" id="BLOGGER_PHOTO_ID_5170045765389334098" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;2- You will be prompted for the download location, save the file wherever you like.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_hJ8mrxrtvaI/R7-xiUaLNmI/AAAAAAAABHk/w_B1febOG6Y/s1600-h/Screen03.png"&gt;&lt;img style="cursor: pointer;" src="http://bp1.blogger.com/_hJ8mrxrtvaI/R7-xiUaLNmI/AAAAAAAABHk/w_B1febOG6Y/s320/Screen03.png" alt="" id="BLOGGER_PHOTO_ID_5170046100396783202" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;3- Double click the exe file downloaded to start the installation process. First, the VMware splash screen appears, then the installation wizard screens.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_hJ8mrxrtvaI/R7-xukaLNnI/AAAAAAAABHs/ULCX0v8zfP8/s1600-h/Screen04.png"&gt;&lt;img style="cursor: pointer;" src="http://bp2.blogger.com/_hJ8mrxrtvaI/R7-xukaLNnI/AAAAAAAABHs/ULCX0v8zfP8/s320/Screen04.png" alt="" id="BLOGGER_PHOTO_ID_5170046310850180722" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;4- Here starts the installation wizard, telling you the software you are installing, and a warning that this software is owned by the company created it and that it’s copyrighted.&lt;br /&gt;Click “Next &gt;”&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_hJ8mrxrtvaI/R7-yAUaLNoI/AAAAAAAABH0/eRvaGf7rQxM/s1600-h/Screen05.png"&gt;&lt;img style="cursor: pointer;" src="http://bp1.blogger.com/_hJ8mrxrtvaI/R7-yAUaLNoI/AAAAAAAABH0/eRvaGf7rQxM/s320/Screen05.png" alt="" id="BLOGGER_PHOTO_ID_5170046615792858754" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;5- This is the End User License Agreement or EULA for abbreviation, the EULA is very important to read because it gives you a general idea about the software you are about to install, it also includes your rights and your responsibilities; it tells what you are allowed to do with this piece of software and what you are not allowed to do.&lt;br /&gt;And I’m sorry, but if you want to install VMware Server on your machine, then you have to accept the EULA (Take it or leave it)&lt;br /&gt;So if you want to install the software, select “I accept the terms in the license agreement” radio button and click “Next &gt;”&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_hJ8mrxrtvaI/R7-yp0aLNpI/AAAAAAAABH8/77DNsbJ3S-s/s1600-h/Screen06.png"&gt;&lt;img style="cursor: pointer;" src="http://bp3.blogger.com/_hJ8mrxrtvaI/R7-yp0aLNpI/AAAAAAAABH8/77DNsbJ3S-s/s320/Screen06.png" alt="" id="BLOGGER_PHOTO_ID_5170047328757429906" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_hJ8mrxrtvaI/R7-yqEaLNqI/AAAAAAAABIE/pnJgqnsfla4/s1600-h/Screen06-A.png"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_hJ8mrxrtvaI/R7-yqEaLNqI/AAAAAAAABIE/pnJgqnsfla4/s320/Screen06-A.png" alt="" id="BLOGGER_PHOTO_ID_5170047333052397218" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;6- These are the components that are included in the package:&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;VMware Server&lt;/span&gt;: This is the core of the software, without it you don’t have functionality.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;VMware Management Interface&lt;/span&gt;: This is a web based management tool that allows you to connect to, manage and monitor your hosts from a web browser, this is very beneficial if you would like to manage your hosts remotely (IIS is required to be installed)&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;VMware VmCOM &amp;amp; VmPerl Scripting APIs&lt;/span&gt;: VMware Server includes two scripting modules, these scripting modules can be used for task automation (such as start, stop, suspend or reset a host), properties configurations (such as amount of memory dedicated for each machine, number of processors…)&lt;br /&gt;VmCOM is an interface for programming languages such as Visual Basic, Visual C++, VBScript, and because it’s Microsoft related so it can only be installed on a Windows operating system.&lt;br /&gt;VmPerl on the other side uses Perl as a programming language, thus it can be installed on Windows and Linux.&lt;br /&gt;&lt;br /&gt;If you care for programming or scripting, you will enjoy this link &lt;a href="http://www.vmware.com/support/pubs/sdk_pubs.html"&gt;http://www.vmware.com/support/pubs/sdk_pubs.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;VMware Diskmount Utility&lt;/span&gt;: With the VMware DiskMount utility, a VMware virtual disk file can be mounted as a Windows drive letter for read/write access to the files it contains.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_hJ8mrxrtvaI/R7-zUUaLNrI/AAAAAAAABIM/vmWU-nJoVio/s1600-h/Screen07.png"&gt;&lt;img style="cursor: pointer;" src="http://bp1.blogger.com/_hJ8mrxrtvaI/R7-zUUaLNrI/AAAAAAAABIM/vmWU-nJoVio/s320/Screen07.png" alt="" id="BLOGGER_PHOTO_ID_5170048058901870258" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;7- Usually, when you put a CD in your CD Drive, it loads automatically. This will bother you if you work with virtual machines a lot, because whenever you load any CD or ISO image on your virtual host it will load as well on the physical computer.&lt;br /&gt;So it would be better if you disable it.&lt;br /&gt;And there is another point here, security wise it’s better to disable autorun, you know why?&lt;br /&gt;What if you got an autorun CD and the autorun file runs a virus or a Trojan on your machine as soon as the CD is loaded.&lt;br /&gt;For more information &lt;a href="http://antivirus.about.com/od/securitytips/ht/autorun.htm"&gt;http://antivirus.about.com/od/securitytips/ht/autorun.htm&lt;/a&gt;&lt;br /&gt;If you would like to disable autorun, check the “Yes disable autorun” checkbox, and then click “Next &gt;”&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_hJ8mrxrtvaI/R7-zyUaLNsI/AAAAAAAABIU/UO_OUzRkGPI/s1600-h/Screen08.png"&gt;&lt;img style="cursor: pointer;" src="http://bp1.blogger.com/_hJ8mrxrtvaI/R7-zyUaLNsI/AAAAAAAABIU/UO_OUzRkGPI/s320/Screen08.png" alt="" id="BLOGGER_PHOTO_ID_5170048574297945794" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;8- To start the process of installing the files, click “Install”&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_hJ8mrxrtvaI/R7-0F0aLNtI/AAAAAAAABIc/YgY5qXv_4f4/s1600-h/Screen09.png"&gt;&lt;img style="cursor: pointer;" src="http://bp3.blogger.com/_hJ8mrxrtvaI/R7-0F0aLNtI/AAAAAAAABIc/YgY5qXv_4f4/s320/Screen09.png" alt="" id="BLOGGER_PHOTO_ID_5170048909305394898" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_hJ8mrxrtvaI/R7-0GEaLNuI/AAAAAAAABIk/03q2M1UpHVs/s1600-h/Screen10.png"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_hJ8mrxrtvaI/R7-0GEaLNuI/AAAAAAAABIk/03q2M1UpHVs/s320/Screen10.png" alt="" id="BLOGGER_PHOTO_ID_5170048913600362210" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_hJ8mrxrtvaI/R7-0GEaLNvI/AAAAAAAABIs/jpAp3xujRPI/s1600-h/Screen11.png"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_hJ8mrxrtvaI/R7-0GEaLNvI/AAAAAAAABIs/jpAp3xujRPI/s320/Screen11.png" alt="" id="BLOGGER_PHOTO_ID_5170048913600362226" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;9- Type in your name and the name of the organization, these 2 fields can be filled in with any data you like.&lt;br /&gt;To get the serial number, you have to register yourself first. If you want to register, on the page of VMware Server &lt;a href="http://www.vmware.com/download/server/"&gt;http://www.vmware.com/download/server/&lt;/a&gt; there is a link that says “register for your free serial number(s)”, click this link and follow the steps there. The serial numbers you requested will be emailed to you immediately.&lt;br /&gt;After filling in all of the information required, click “Enter &gt;”&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_hJ8mrxrtvaI/R7-0GUaLNwI/AAAAAAAABI0/CkIlIDkycZA/s1600-h/Screen12.png"&gt;&lt;img style="cursor: pointer;" src="http://bp1.blogger.com/_hJ8mrxrtvaI/R7-0GUaLNwI/AAAAAAAABI0/CkIlIDkycZA/s320/Screen12.png" alt="" id="BLOGGER_PHOTO_ID_5170048917895329538" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;By now, we have finished installing VMware; the next step for you is to start creating your virtual machines, and installing any operating system you would like to have.&lt;br /&gt;&lt;br /&gt;Till next article&lt;br /&gt;Take care&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4046984248821087870-9219595147860651572?l=haymanezzeldin.blogspot.com'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/PenetrationTesting?a=lfoBwg4pfhA:kxu_ytbtuXA:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PenetrationTesting?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/PenetrationTesting?a=lfoBwg4pfhA:kxu_ytbtuXA:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PenetrationTesting?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PenetrationTesting/~4/lfoBwg4pfhA" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/PenetrationTesting/~3/lfoBwg4pfhA/installing-vmware-server-on-windows.html</link><author>noreply@blogger.com (Hayman Ezzeldin)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://bp0.blogger.com/_hJ8mrxrtvaI/R7-wbEaLNjI/AAAAAAAABHM/8zBjHFF74XE/s72-c/VMware.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><feedburner:origLink>http://haymanezzeldin.blogspot.com/2008/02/installing-vmware-server-on-windows.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4046984248821087870.post-6742474461262991435</guid><pubDate>Sat, 23 Feb 2008 03:48:00 +0000</pubDate><atom:updated>2008-02-23T06:54:47.290+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Labs</category><title>Labs Introduction</title><description>Ed Macauley is a basketball player, I don’t know him because of basketball, I know him because of a quote he said once, and I would like to share it with you.&lt;br /&gt;Ed Macauley said “&lt;span style="font-weight: bold;"&gt;When you are not practicing, remember, someone somewhere is practicing, and when you meet him he will win&lt;/span&gt;”&lt;br /&gt;&lt;br /&gt;This quote touched me immediately, because we are learning new things every day in life, we know a lot of values that we should all apply, but we don’t practice them, we don’t apply them to life, we don’t enjoy the truth of seeing this knowledge comes true.&lt;br /&gt;&lt;br /&gt;One of the Blog friends caught my attention when he talked about practicing and applying what we are learning here, and because of that I will add updated labs all the time for all of us to practice.&lt;br /&gt;&lt;br /&gt;We will create a FREE virtual lab with FREE software and tools, so I will start today with a step by step installation process for Windows users followed by Linux users – only because as Linux users, we can use a Live CD that has almost everything we need, this Live CD is called &lt;a href="http://www.remote-exploit.org/backtrack.html"&gt;Backtrack&lt;/a&gt;, and then it will be according to our needs.&lt;br /&gt;&lt;br /&gt;So let's do it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4046984248821087870-6742474461262991435?l=haymanezzeldin.blogspot.com'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/PenetrationTesting?a=ye6pzuPc86Q:ZjbCvSelaK4:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PenetrationTesting?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/PenetrationTesting?a=ye6pzuPc86Q:ZjbCvSelaK4:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PenetrationTesting?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PenetrationTesting/~4/ye6pzuPc86Q" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/PenetrationTesting/~3/ye6pzuPc86Q/labs-introduction.html</link><author>noreply@blogger.com (Hayman Ezzeldin)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://haymanezzeldin.blogspot.com/2008/02/labs-introduction.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4046984248821087870.post-1066476724528276103</guid><pubDate>Tue, 19 Feb 2008 09:47:00 +0000</pubDate><atom:updated>2008-02-19T11:05:46.092+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">4- Scanning</category><title>Scanning using Nmap - Part 2</title><description>Hi guys,&lt;br /&gt;How were you first scanning attacks? :)&lt;br /&gt;I hope you all enjoyed getting your hands dirty.&lt;br /&gt;&lt;br /&gt;Today, we are going to complete what we started in the &lt;a href="http://haymanezzeldin.blogspot.com/2008/02/scanning-using-nmap-part-1.html"&gt;last article&lt;/a&gt;, where we started talking about the steps of "Scanning and Enumeration", and our first step were to find the live hosts on our target's network, and then we started the second step which was port scanning.&lt;br /&gt;Our main tool was Nmap, and because this tool is full of features so I found that 1 article won't be enough at all to cover the basics of Nmap. That's why we are here again to complete what we started.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;TCP ACK Scan:&lt;/span&gt;&lt;br /&gt;The idea behind the TCP ACK scan is very simple and very smart; I will give you an analogy to get how it is working.&lt;br /&gt;We don’t know each other, right?&lt;br /&gt;Imagine I met you once in the street, and suddenly I went to you and said “hey man, where have you been all of this time? not even a single mail, shame on you?” :)&lt;br /&gt;What will you think? You will say “This man knows me for sure, but probably I don’t remember him”, and then you will start answering me “Oh, I’m fine, and sorry for not sending you mails but I was very busy the last few weeks. I got a baby and…” and you will start talking friendly.&lt;br /&gt;&lt;br /&gt;TCP ACK Scan almost works the same, it sends an ACK to the target’s ports, the target will think “it seems like I started a connection with this computer before, let’s answer him”&lt;br /&gt;The targeted port – if open – will check if there is an existing connection already with this computer, if there is no existing connection already (which is our case here) then the answer will be a RST, and if the port is closed then no responses will be sent back.&lt;br /&gt;&lt;br /&gt;And because this scan type is just used to check Packet Filtering, so the response to nmap would be “Filtered” or “Unfiltered”&lt;br /&gt;Filtered indicates that there is a Packet Filtering device (may be a firewall) that filters these type of packets, while unfiltered indicates that there is no Packet Filtering devices and that this port might be open or closed.&lt;br /&gt;So the purpose of this scan is not to find open ports on our targets but to audit the rules of Packet Filtering.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_hJ8mrxrtvaI/R7qnE0aLNYI/AAAAAAAABF0/WuUkxfCxQVE/s1600-h/TCP-ACK.jpg"&gt;&lt;img style="cursor: pointer;" src="http://bp2.blogger.com/_hJ8mrxrtvaI/R7qnE0aLNYI/AAAAAAAABF0/WuUkxfCxQVE/s320/TCP-ACK.jpg" alt="" id="BLOGGER_PHOTO_ID_5168627223590811010" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_hJ8mrxrtvaI/R7qnFEaLNZI/AAAAAAAABF8/VLDARR8KYIM/s1600-h/TCP-ACK-cmd.png"&gt;&lt;img style="cursor: pointer;" src="http://bp3.blogger.com/_hJ8mrxrtvaI/R7qnFEaLNZI/AAAAAAAABF8/VLDARR8KYIM/s320/TCP-ACK-cmd.png" alt="" id="BLOGGER_PHOTO_ID_5168627227885778322" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The command used is&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;nmap –sA 192.168.2.31&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_hJ8mrxrtvaI/R7qnFUaLNaI/AAAAAAAABGE/6Pgywr1HEyo/s1600-h/TCP-ACK-Wireshark.png"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_hJ8mrxrtvaI/R7qnFUaLNaI/AAAAAAAABGE/6Pgywr1HEyo/s320/TCP-ACK-Wireshark.png" alt="" id="BLOGGER_PHOTO_ID_5168627232180745634" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;IDLE Scan:&lt;/span&gt;&lt;br /&gt;What was the main disadvantage of all the previous scans?&lt;br /&gt;Whenever they are detected, they will lead to us, because our IP address will be logged, right?&lt;br /&gt;&lt;br /&gt;So how can we avoid something like that? IDLE Scan is the ingenious solution for this problem.&lt;br /&gt;IDLE Scan uses another machine (zombie) as an attacker, and spoofs its IP address whenever it communicates with the Target&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_hJ8mrxrtvaI/R7qm60aLNRI/AAAAAAAABE8/GVf6w7MDEs8/s1600-h/Idle.jpg"&gt;&lt;img style="cursor: pointer;" src="http://bp2.blogger.com/_hJ8mrxrtvaI/R7qm60aLNRI/AAAAAAAABE8/GVf6w7MDEs8/s320/Idle.jpg" alt="" id="BLOGGER_PHOTO_ID_5168627051792119058" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;* First, I choose a machine that will be the Scapegoat or Pivot Point for our attack. This machine has to be an IDLE machine, which means no active traffic on this machine.&lt;br /&gt;Note – &lt;span style="color: rgb(255, 0, 0);"&gt;Every IP packet on the Internet has a "fragment identification" number or IPID. Many operating systems simply increment this number for every packet they send. So probing for this number can tell an attacker how many packets have been sent since the last probe.&lt;/span&gt;&lt;br /&gt;* I will send the Zombie a SYN/ACK, the zombie will see that there is no existing connection established between itself and my machine, so it will send a RST (this RST will include the IPID number)&lt;br /&gt;* I will send a forged packet (spoofed) from my computer to the target (it will appear to the target as if it came from the zombie)&lt;br /&gt;* &lt;span style="color: rgb(255, 0, 0);"&gt;Please concentrate here very well.&lt;/span&gt; If the port on the Target is closed, the target will send the zombie a RST. And the zombie will not send further packets, so its IPID will remain as it is.&lt;br /&gt;If the port on the Target is open, the target will send the zombie a SYN/ACK.&lt;br /&gt;The zombie will find that there is no existing connection with the Target machine, so it will send the Target a RST (remember here that because the zombie is idle, so the IPID will be equal to the previous IPID plus 1.&lt;br /&gt;* Now, it’s my turn again. I will send the zombie a SYN/ACK; the zombie will find that there is no existing connection established between itself and my machine, so it will send a RST.&lt;br /&gt;If the IPID in this RST packet is increased by 1, then it means that the zombie didn’t send any packets back to the Target (which means that the port scanned is closed)&lt;br /&gt;If the IPID in this RST packet is increased by 2, then it means that the zombie sent 1 packet back to the Target (which indicates an open port)&lt;br /&gt;&lt;br /&gt;Let’s analyze the nmap command and the output on Wireshark&lt;br /&gt;But before we start, I want you to notice the MAC Address for the machines I’m using&lt;br /&gt;&lt;br /&gt;The Attacker’s IP is 192.168.2.47 – 00:0C:29:B0:BC:EF (Backtrack OS)&lt;br /&gt;The Zombie’s IP is 192.168.2.45 – 00:0C:29:68:5A:DD (Windows OS)&lt;br /&gt;The Target’s IP is 192.168.2.31 – 00:0C:29:C6:21:DC (OpenSuSe OS)&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_hJ8mrxrtvaI/R7qm7kaLNVI/AAAAAAAABFc/oYJj2gaHwfo/s1600-h/Idle-MAC47.png"&gt;&lt;img style="cursor: pointer;" src="http://bp1.blogger.com/_hJ8mrxrtvaI/R7qm7kaLNVI/AAAAAAAABFc/oYJj2gaHwfo/s320/Idle-MAC47.png" alt="" id="BLOGGER_PHOTO_ID_5168627064677021010" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_hJ8mrxrtvaI/R7qm7kaLNUI/AAAAAAAABFU/qimYKEf0XMY/s1600-h/Idle-MAC45.png"&gt;&lt;img style="cursor: pointer;" src="http://bp1.blogger.com/_hJ8mrxrtvaI/R7qm7kaLNUI/AAAAAAAABFU/qimYKEf0XMY/s320/Idle-MAC45.png" alt="" id="BLOGGER_PHOTO_ID_5168627064677020994" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_hJ8mrxrtvaI/R7qm7UaLNTI/AAAAAAAABFM/QM5AyKcEReg/s1600-h/Idle-MAC31.png"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_hJ8mrxrtvaI/R7qm7UaLNTI/AAAAAAAABFM/QM5AyKcEReg/s320/Idle-MAC31.png" alt="" id="BLOGGER_PHOTO_ID_5168627060382053682" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_hJ8mrxrtvaI/R7qm7EaLNSI/AAAAAAAABFE/-8CkuUh0NzE/s1600-h/Idle-cmd.png"&gt;&lt;img style="cursor: pointer;" src="http://bp3.blogger.com/_hJ8mrxrtvaI/R7qm7EaLNSI/AAAAAAAABFE/-8CkuUh0NzE/s320/Idle-cmd.png" alt="" id="BLOGGER_PHOTO_ID_5168627056087086370" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The command used is:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Nmap –sI 192.168.2.45 192.168.2.31&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_hJ8mrxrtvaI/R7qnEUaLNWI/AAAAAAAABFk/y127S-_Ijt0/s1600-h/Idle-Wireshark.png"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_hJ8mrxrtvaI/R7qnEUaLNWI/AAAAAAAABFk/y127S-_Ijt0/s320/Idle-Wireshark.png" alt="" id="BLOGGER_PHOTO_ID_5168627215000876386" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Here we will notice that there is not a single packet that shows “My Computer” talking to “My Target”; all the communication is between 192.168.2.45 (the zombie) and 192.168.2.31 (the target)&lt;br /&gt;&lt;br /&gt;Let’s analyze one of these packets, to see what the truth is.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_hJ8mrxrtvaI/R7qnEkaLNXI/AAAAAAAABFs/vj5X7Nm0k3c/s1600-h/Idle-Wireshark-analyze.png"&gt;&lt;img style="cursor: pointer;" src="http://bp1.blogger.com/_hJ8mrxrtvaI/R7qnEkaLNXI/AAAAAAAABFs/vj5X7Nm0k3c/s320/Idle-Wireshark-analyze.png" alt="" id="BLOGGER_PHOTO_ID_5168627219295843698" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Aha, though the connection appeared to be from the zombie to the target, but the MAC address shows the truth, it shows that the MAC address of the source is 00:0C:29:B0:BC:EF (which is the MAC address for My Computer)&lt;br /&gt;&lt;br /&gt;I liked this one :)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;UDP Scan:&lt;/span&gt;&lt;br /&gt;Let’s not forget other protocols as well :)&lt;br /&gt;Because UDP is simpler than TCP; no 3-Way handshaking, no Flags, no Sequence numbers, so the UDP scan is very simplified.&lt;br /&gt;The attacker sends a UDP packet to each port on the Target. There might be here 3 responses; an ICMP Port Unreachable (which indicates a closed port), no response (which means the port might be open or filtered by firewall), or a UDP response&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_hJ8mrxrtvaI/R7qnPEaLNbI/AAAAAAAABGM/OVG1y6qjAew/s1600-h/UDP.jpg"&gt;&lt;img style="cursor: pointer;" src="http://bp3.blogger.com/_hJ8mrxrtvaI/R7qnPEaLNbI/AAAAAAAABGM/OVG1y6qjAew/s320/UDP.jpg" alt="" id="BLOGGER_PHOTO_ID_5168627399684470194" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Let’s see what we can get from Nmap:&lt;br /&gt;The command used is&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;nmap –sU 192.168.2.45&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_hJ8mrxrtvaI/R7qnPUaLNcI/AAAAAAAABGU/PJ9lxjocOf0/s1600-h/UDP-cmd.png"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_hJ8mrxrtvaI/R7qnPUaLNcI/AAAAAAAABGU/PJ9lxjocOf0/s320/UDP-cmd.png" alt="" id="BLOGGER_PHOTO_ID_5168627403979437506" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style=""&gt;Note – &lt;span style="color: rgb(255, 0, 0);"&gt;if your target is a Linux, be aware that your scan might take 18 hours or even more because on Linux when Nmap doesn’t receive a response for a UDP Scanning from the Target, Nmap keeps trying till it times out, then it tries to resend the UDP packets again in case of a lost connection. Another reason is that Linux is by design limiting Destination Unreachable messages to a message per second (which is a very long time), so imagine how long it would take to scan 65,536 ports on just 1 machine if every message takes 1 second.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_hJ8mrxrtvaI/R7qnPkaLNdI/AAAAAAAABGc/rqdisJSuBFc/s1600-h/UDP-Wireshark.png"&gt;&lt;img style="cursor: pointer;" src="http://bp1.blogger.com/_hJ8mrxrtvaI/R7qnPkaLNdI/AAAAAAAABGc/rqdisJSuBFc/s320/UDP-Wireshark.png" alt="" id="BLOGGER_PHOTO_ID_5168627408274404818" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;From “Wireshark”, we can see that the attacker is sending a UDP packet to different random ports on our target (The cyan blue lines), and the target is responding with an ICMP Destination Port Unreachable if the port is closed (The black lines)&lt;br /&gt;Note – &lt;span style="color: rgb(255, 0, 0);"&gt;if you would like to see that the open|filtered ports didn’t respond, just add a filter to your Wireshark such as udp.port==123 (as in our case here). This will show only the NTP packets, and you will see no responses from the port (which indicates either open or filtered)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_hJ8mrxrtvaI/R7qnPkaLNeI/AAAAAAAABGk/Gmf9c9TvA98/s1600-h/UDP-Wireshark-filter.png"&gt;&lt;img style="cursor: pointer;" src="http://bp1.blogger.com/_hJ8mrxrtvaI/R7qnPkaLNeI/AAAAAAAABGk/Gmf9c9TvA98/s320/UDP-Wireshark-filter.png" alt="" id="BLOGGER_PHOTO_ID_5168627408274404834" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Version Scanning:&lt;/span&gt;&lt;br /&gt;Do you think it would make any difference in your attack if your target’s web server is hosted on an Apache Server 2.2.8 or on Apache Server 2.0.0?&lt;br /&gt;Sure there is a difference, a great difference, Apache 2.2.8 is one of the latest versions which means that it covered all of the bugs and vulnerabilities found in previous versions, while 2.0.0 means that it’s still includes all of the bugs and vulnerabilities found between version 2.2.8 and 2.0.0.&lt;br /&gt;So it means a lot for an attacker to know what software versions is the target running. And here comes the Version Scanning.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_hJ8mrxrtvaI/R7qnP0aLNfI/AAAAAAAABGs/4PFarxnbVUo/s1600-h/Version.jpg"&gt;&lt;img style="cursor: pointer;" src="http://bp2.blogger.com/_hJ8mrxrtvaI/R7qnP0aLNfI/AAAAAAAABGs/4PFarxnbVUo/s320/Version.jpg" alt="" id="BLOGGER_PHOTO_ID_5168627412569372146" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;First of all, Nmap installation folder contains a file called “nmap-services-probes”, if you open this file with WordPad (on Windows) or KWrite (on Linux) you will be able to see a series of software services and the expected responses. If there is a software service that is not listed there, then Nmap will not be able to support you in detecting the version of this software.&lt;br /&gt;&lt;br /&gt;Version detection on nmap has to be accompanied with any of the port scans (TCP SYN scan, TCP FIN scan…), and if no scan type is mentioned in the command line then the default will be a TCP SYN scan.&lt;br /&gt;&lt;br /&gt;When the attacker uses the Version detection scan, Nmap starts with a TCP SYN scan and gathers all of the open ports on the target, then it sends some probing traffic to the port trying to identify the service listening on this port. Each port will operate differently according to the service listening on this port.&lt;br /&gt;&lt;br /&gt;Let’s see what we can get from Nmap:&lt;br /&gt;The command used is&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;nmap –sV 192.168.2.31&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_hJ8mrxrtvaI/R7qnWUaLNgI/AAAAAAAABG0/QJjmAuZmHkE/s1600-h/Version-cmd.png"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_hJ8mrxrtvaI/R7qnWUaLNgI/AAAAAAAABG0/QJjmAuZmHkE/s320/Version-cmd.png" alt="" id="BLOGGER_PHOTO_ID_5168627524238521858" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_hJ8mrxrtvaI/R7qnWkaLNhI/AAAAAAAABG8/NBdinv9HyIw/s1600-h/Version-Wireshark.png"&gt;&lt;img style="cursor: pointer;" src="http://bp1.blogger.com/_hJ8mrxrtvaI/R7qnWkaLNhI/AAAAAAAABG8/NBdinv9HyIw/s320/Version-Wireshark.png" alt="" id="BLOGGER_PHOTO_ID_5168627528533489170" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_hJ8mrxrtvaI/R7qnW0aLNiI/AAAAAAAABHE/jNcU9xKLxkI/s1600-h/Version-Wireshark-filter.png"&gt;&lt;img style="cursor: pointer;" src="http://bp2.blogger.com/_hJ8mrxrtvaI/R7qnW0aLNiI/AAAAAAAABHE/jNcU9xKLxkI/s320/Version-Wireshark-filter.png" alt="" id="BLOGGER_PHOTO_ID_5168627532828456482" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;From “Wireshark”, we can see that the attacker is sending a SYN to different random ports on our target (The grey lines), and the target is responding with RST if the port is closed (The red lines).&lt;br /&gt;If the port is open, then the attacker completes the 3-Way handshake, then it starts generating some traffic to gather more information about the service running on this port.&lt;br /&gt;&lt;br /&gt;In our example here, Nmap connects to the SSH service, completes the SSL handshake negotiation and then runs the detection scan to find that the real service behind the SSH is OpenSSH version 4.6.&lt;br /&gt;&lt;br /&gt;Guys, what I mentioned in these 2 articles are few of the great options of Nmap; I can’t mention them all otherwise I will end up with a book :).&lt;br /&gt;What I recommend at this moment is to go through a manual page for nmap extracted from a Unix/Linux machine, and start reading and applying what you are reading immediately.&lt;br /&gt;&lt;br /&gt;I’m sure we are not finished with Nmap and its great capabilities, but all will come in time.&lt;br /&gt;&lt;br /&gt;Till next article,&lt;br /&gt;Take care.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4046984248821087870-1066476724528276103?l=haymanezzeldin.blogspot.com'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/PenetrationTesting?a=iFTiabG5o3w:8Lf0mIP67NE:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PenetrationTesting?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/PenetrationTesting?a=iFTiabG5o3w:8Lf0mIP67NE:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PenetrationTesting?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PenetrationTesting/~4/iFTiabG5o3w" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/PenetrationTesting/~3/iFTiabG5o3w/scanning-using-nmap-part-2.html</link><author>noreply@blogger.com (Hayman Ezzeldin)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://bp2.blogger.com/_hJ8mrxrtvaI/R7qnE0aLNYI/AAAAAAAABF0/WuUkxfCxQVE/s72-c/TCP-ACK.jpg" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><feedburner:origLink>http://haymanezzeldin.blogspot.com/2008/02/scanning-using-nmap-part-2.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4046984248821087870.post-8237597750645219952</guid><pubDate>Fri, 15 Feb 2008 09:51:00 +0000</pubDate><atom:updated>2008-02-19T10:38:42.260+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">4- Scanning</category><title>Scanning using Nmap - Part 1</title><description>A thief wanted to rob a bank; he started watching the bank since a week now, and he started to take notes about when the employees come, when they leave, when there is big cash in the bank, when this cash is gone, and he decided to rob the bank on the X day.&lt;br /&gt;What do you think is missing here?&lt;br /&gt;&lt;br /&gt;The thief has gathered his information from the outside, but he missed the inside part. He didn’t report where the entrances and exits are, where the guards are located, where the monitoring cameras are, and how to disable or evade them; he didn’t see where cash is, what kind of vault they have, how he will escape, what Plan B is…&lt;br /&gt;&lt;br /&gt;Wow, this guy missed so many things, and this is what hackers try to avoid. And this is what we call “Scanning and Enumeration”.&lt;br /&gt;In “Scanning and Enumeration” we are trying to gather more information – but this time by a partial delving into our target and grabbing the information that will help us prepare our attack.&lt;br /&gt;&lt;br /&gt;From the previous phase, we were able to gather general information about our target, this time we will scan our system to find out:&lt;br /&gt;1- Live systems&lt;br /&gt;2- Open ports&lt;br /&gt;3- Services running&lt;br /&gt;4- Operating systems used&lt;br /&gt;5- Vulnerabilities&lt;br /&gt;&lt;br /&gt;Any “Penetration Testing” scanning starts with defining the live systems and drawing a network topology for your target, our mission here is to find host, routers, firewalls…&lt;br /&gt;Both requirements can be achieved using some methods like “Tracerouting” – which we already discussed in a &lt;a href="http://haymanezzeldin.blogspot.com/2008/01/tracerouting-and-lesson.html"&gt;previous article&lt;/a&gt;; another method is “Ping Sweeping” – which is technique used by attackers where you send ICMP Echo Request to multiple hosts, trying to find who of these hosts are alive.&lt;br /&gt;Some of the tools that can accomplish “Ping Sweeping” are Nmap, Hping3, netenum, Fping…&lt;br /&gt;&lt;br /&gt;Let’s see what we can get from Nmap:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_hJ8mrxrtvaI/R7p0XkaLL8I/AAAAAAAAAtc/iba72dWhwuo/s1600-h/Ping-sweep-cmd.png"&gt;&lt;img style="cursor: pointer;" src="http://bp1.blogger.com/_hJ8mrxrtvaI/R7p0XkaLL8I/AAAAAAAAAtc/iba72dWhwuo/s320/Ping-sweep-cmd.png" alt="" id="BLOGGER_PHOTO_ID_5168571470620340162" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;As we have seen, the command used was&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;nmap –sP 207.x.x.0/24&lt;/span&gt;&lt;br /&gt;Or&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;nmap –sP 207.x.x.1-255&lt;/span&gt;&lt;br /&gt;Both commands are the same, but in the first we used CIDR or &lt;a href="http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing"&gt;Classless Inter-Domain Routing&lt;/a&gt;, while in the second we added manually the range we want to scan.&lt;br /&gt;&lt;br /&gt;Let’s see the result in the Protocol Analyzer “Wireshark”&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_hJ8mrxrtvaI/R7qgokaLNCI/AAAAAAAAA60/TtOevWMZ1WM/s1600-h/Ping-sweep-Wireshark.png"&gt;&lt;img style="cursor: pointer;" src="http://bp1.blogger.com/_hJ8mrxrtvaI/R7qgokaLNCI/AAAAAAAAA60/TtOevWMZ1WM/s320/Ping-sweep-Wireshark.png" alt="" id="BLOGGER_PHOTO_ID_5168620141189739554" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;At the end of the Nmap command, you will see the result of the Ping Sweeping&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_hJ8mrxrtvaI/R7qgoUaLNBI/AAAAAAAAA6s/bOjFJZqMTZU/s1600-h/Ping-sweep-result.png"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_hJ8mrxrtvaI/R7qgoUaLNBI/AAAAAAAAA6s/bOjFJZqMTZU/s320/Ping-sweep-result.png" alt="" id="BLOGGER_PHOTO_ID_5168620136894772242" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The good thing about “Ping Sweeping” is:&lt;br /&gt;* You will be able to detect all the live hosts (if ICMP Echo requests are allowed)&lt;br /&gt;* You can run the ICMP scanning in parallel, which means you can scan so many hosts at the same time. And this will be very helpful if you are scanning an entire network&lt;br /&gt;&lt;br /&gt;The bad thing about “Ping Sweeping” is:&lt;br /&gt;* This technique is detectable; either by IDS or awaken administrators :), because of the huge amount of ICMP Echo Requests against so many machines at a small time range.&lt;br /&gt;Would you like to know how to avoid that?&lt;br /&gt;Search for “Nmap Timing Options” and enjoy reading :)&lt;br /&gt;&lt;br /&gt;* If ICMP Echo Requests are blocked at the perimeter zone, then you are stuck, because Ping Sweeping using ICMP won’t work then.&lt;br /&gt;Note – &lt;span style="color: rgb(255, 0, 0);"&gt;In this case, we will use a TCP Ping Sweep to scan our target’s network. What happens is that we send an ACK to the targets, and the live ones should respond with a RST.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;For example with Nmap, the command will be:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);font-family:courier new;" &gt;nmap –sP –PT 207.x.x.0/24&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;Or&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;span style="font-family:courier new;"&gt;nmap –sP –PT80 207.x.x.0/24&lt;/span&gt; (where 80 here is a port number that is allowable through the firewall, and it doesn’t mean that this port should be opened on the scanned machines)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now after we were able to see the live hosts on the target network, let’s see which of these systems have open doors for our entry, and what services might be running on these systems.&lt;br /&gt;&lt;br /&gt;I will tell you the types of scans, and with each scan I will describe how it is accomplished and what’s going on behind the scenes.&lt;br /&gt;&lt;br /&gt;But before that, I would like to talk remind you about TCP connections.&lt;br /&gt;We said before that all TCP connections are established using a 3 way handshake SYN, SYN / ACK and finally ACK. And we said that TCP is a Transport Protocol that is responsible for transferring data from one system to another, and it divides the data into pieces and label them with sequence numbers for proper order upon delivery.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_hJ8mrxrtvaI/R7qhDEaLNJI/AAAAAAAAA7s/ARrXYMV25e4/s1600-h/TCP-handshake.jpg"&gt;&lt;img style="cursor: pointer;" src="http://bp3.blogger.com/_hJ8mrxrtvaI/R7qhDEaLNJI/AAAAAAAAA7s/ARrXYMV25e4/s320/TCP-handshake.jpg" alt="" id="BLOGGER_PHOTO_ID_5168620596456273042" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;“My Computer” sends a packet with Initial Sequence Number or ISN (Let’s call it A) and the SYN flag is set to 1.&lt;br /&gt;“My Target” will respond with a packet that has both the SYN and ACK flags set to 1. The Acknowledgment will add 1 to the sequence it got from “My Computer”, and will create another ISN special for responses (Let’s call it B).&lt;br /&gt;“My Computer” will establish now the 3-Way handshake by sending an ACK, using the ISN of “My Target and adding 1 to it.&lt;br /&gt;From now on, whenever “My Computer” sends any packet to “My Target”, it will be based on the ISN(A)+1. While whenever “My Target” send any packet to “My Computer”, it will be based on the ISN(B)+1.&lt;br /&gt;&lt;br /&gt;Now to the scan types :)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;TCP Connect Scan (Plain Vanilla):&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_hJ8mrxrtvaI/R7qg10aLNDI/AAAAAAAAA68/Of_72KpEfII/s1600-h/TCP-Connect.jpg"&gt;&lt;img style="cursor: pointer;" src="http://bp2.blogger.com/_hJ8mrxrtvaI/R7qg10aLNDI/AAAAAAAAA68/Of_72KpEfII/s320/TCP-Connect.jpg" alt="" id="BLOGGER_PHOTO_ID_5168620368823006258" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;“TCP Connect Scan” or “Plain Vanilla” attempts to complete the whole 3-Way handshake with each target host.&lt;br /&gt;The attacker sends a SYN to the target, if the target’s port is open and it responded with a SYN/ACK, then the attacker will send the last ACK and tear down the connection using the RST.&lt;br /&gt;&lt;br /&gt;As we said previously, that this scan can be detected easily, because it will generate a huge amount of scan targeting all of the ports on our Target, trying to detect what the opened ports are.&lt;br /&gt;&lt;br /&gt;Let’s see what we can get from Nmap:&lt;br /&gt;The command used is&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;nmap –sT 192.168.2.31&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_hJ8mrxrtvaI/R7qg10aLNEI/AAAAAAAAA7E/umEpy9dYXsA/s1600-h/TCP-Connect-cmd.png"&gt;&lt;img style="cursor: pointer;" src="http://bp2.blogger.com/_hJ8mrxrtvaI/R7qg10aLNEI/AAAAAAAAA7E/umEpy9dYXsA/s320/TCP-Connect-cmd.png" alt="" id="BLOGGER_PHOTO_ID_5168620368823006274" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_hJ8mrxrtvaI/R7qg3UaLNFI/AAAAAAAAA7M/zdYyPPt9VuU/s1600-h/TCP-Connect-Wireshark.png"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_hJ8mrxrtvaI/R7qg3UaLNFI/AAAAAAAAA7M/zdYyPPt9VuU/s320/TCP-Connect-Wireshark.png" alt="" id="BLOGGER_PHOTO_ID_5168620394592810066" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;From “Wireshark”, we can see that the attacker is sending a SYN to different random ports on our target (The yellow lines), and the target is responding with RST if the port is closed (The red lines), while it responds with a SYN/ACK if the port is opened (The green line)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;TCP SYN Scan (Half Open):&lt;/span&gt;&lt;br /&gt;TCP SYN scan is a little bit stealthier than the previous scan, because it uses a different technique.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_hJ8mrxrtvaI/R7qhDUaLNKI/AAAAAAAAA70/Q8GQJIP0QIw/s1600-h/TCP-SYN.jpg"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_hJ8mrxrtvaI/R7qhDUaLNKI/AAAAAAAAA70/Q8GQJIP0QIw/s320/TCP-SYN.jpg" alt="" id="BLOGGER_PHOTO_ID_5168620600751240354" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The attacker sends a SYN to the targets, if the target’s port is open and it responded with a SYN/ACK, then the attacker will immediately tear down the connection using the RST.&lt;br /&gt;&lt;br /&gt;The good thing about TCP SYN scan is:&lt;br /&gt;* It doesn’t establish a connection (as it sends an immediate RST before the connection is established), therefore these scans are not logged&lt;br /&gt;Note – &lt;span style="color: rgb(255, 0, 0);"&gt;Though the target itself doesn’t log these types of scans, the perimeter devices has the ability to report such scans, so be aware of that&lt;/span&gt;&lt;br /&gt;* Speed, because it sends fewer packets than the previous scan.&lt;br /&gt;Let’s see what we can get from Nmap:&lt;br /&gt;The command used is&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;nmap –sS 192.168.2.31&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_hJ8mrxrtvaI/R7qhDkaLNLI/AAAAAAAAA78/ucHvpxtQEXA/s1600-h/TCP-SYN-cmd.png"&gt;&lt;img style="cursor: pointer;" src="http://bp1.blogger.com/_hJ8mrxrtvaI/R7qhDkaLNLI/AAAAAAAAA78/ucHvpxtQEXA/s320/TCP-SYN-cmd.png" alt="" id="BLOGGER_PHOTO_ID_5168620605046207666" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_hJ8mrxrtvaI/R7qhD0aLNMI/AAAAAAAAA8E/1ylwCVSo6QE/s1600-h/TCP-SYN-Wireshark.png"&gt;&lt;img style="cursor: pointer;" src="http://bp2.blogger.com/_hJ8mrxrtvaI/R7qhD0aLNMI/AAAAAAAAA8E/1ylwCVSo6QE/s320/TCP-SYN-Wireshark.png" alt="" id="BLOGGER_PHOTO_ID_5168620609341174978" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;From “Wireshark”, we can see that the attacker is sending a SYN to different random ports on our target (The yellow lines), and the target is responding with RST if the port is closed (The red lines), while it responds with a SYN/ACK if the port is opened (The green line).&lt;br /&gt;Notice the Red line directly after the Green line; you will notice that the attacker sends an immediate RST after the SYN/ACK of the target.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;TCP FIN, XMAS, NULL Scans (Stealth):&lt;/span&gt;&lt;br /&gt;I decided to gather these 3 scans together because they are really working in the same manner; they break the rule of TCP connection establishment.&lt;br /&gt;We have seen that the normal TCP connection establishment starts with a SYN, and then goes further, whether you complete the connection establishment (TCP Connect Scan) or terminate it (TCP SYN Scan).&lt;br /&gt;But these 3 scans (FIN, XMAS, NULL), are acting totally in a different manner; they send an unexpected packet at the start of the connection.&lt;br /&gt;The FIN Scan starts with a FIN packet, the XMAS Scan starts with a packet that has the Flags URG, ACK and PSH set to 1, while the NULL Scan starts with a packet that has all the Flags set to 0.&lt;br /&gt;But why are they doing that? The reason is to confuse the targets, because each target expects a SYN packet for connection establishment. When the target receives a FIN packet (which indicates a normal TCP Connection termination), it will take it because it will think that it’s coming from a previous established connection. While the other 2 (XMAS and NULL) are violating the rules of flag settings, because the target is expecting a 1 flag packet which indicates 1 thing. So when the target receives a packet with all flags set, or all flags removed, then this is confusing.&lt;br /&gt;&lt;br /&gt;Note – &lt;span style="color: rgb(255, 0, 0);"&gt;One important thing you have to know here, these scans are not going to work if your target is a WINDOS based.&lt;/span&gt;&lt;br /&gt;Remember in the &lt;a href="http://haymanezzeldin.blogspot.com/2008/02/scanning-basics.html"&gt;last article&lt;/a&gt;, our homework was to read the &lt;a href="http://www.faqs.org/rfcs/rfc793.html"&gt;RFC793&lt;/a&gt;. In this RFC it is indicated that when a port is closed, then a RST is sent back. And no response is sent when the port is open.&lt;br /&gt;Unfortunately, Microsoft doesn’t follow this RFC :) and whenever they receive any of these scans, the response is always RST. That’s why these scans will not work against Windows based systems.&lt;br /&gt;&lt;br /&gt;Let’s start with the TCP FIN Scan:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_hJ8mrxrtvaI/R7qg30aLNGI/AAAAAAAAA7U/5y2xLSE6r3Y/s1600-h/TCP-FIN.jpg"&gt;&lt;img style="cursor: pointer;" src="http://bp2.blogger.com/_hJ8mrxrtvaI/R7qg30aLNGI/AAAAAAAAA7U/5y2xLSE6r3Y/s320/TCP-FIN.jpg" alt="" id="BLOGGER_PHOTO_ID_5168620403182744674" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_hJ8mrxrtvaI/R7qg4EaLNHI/AAAAAAAAA7c/rGYmlmHp-0E/s1600-h/TCP-FIN-cmd.png"&gt;&lt;img style="cursor: pointer;" src="http://bp3.blogger.com/_hJ8mrxrtvaI/R7qg4EaLNHI/AAAAAAAAA7c/rGYmlmHp-0E/s320/TCP-FIN-cmd.png" alt="" id="BLOGGER_PHOTO_ID_5168620407477711986" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The command used is&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;nmap –sF 192.168.2.31&lt;/span&gt;&lt;br /&gt;Notice that the result indicates Open|Filtered, do you know why?&lt;br /&gt;The reason is that some Firewalls (such as &lt;a href="http://en.wikipedia.org/wiki/Stateful_firewall"&gt;Stateful Firewalls&lt;/a&gt;) can drop this kind of packets without sending a response back (so the port might be open, or it might be filtered by the firewall)&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_hJ8mrxrtvaI/R7qhDEaLNII/AAAAAAAAA7k/oH5x4Qm7w4M/s1600-h/TCP-FIN-Wireshark.png"&gt;&lt;img style="cursor: pointer;" src="http://bp3.blogger.com/_hJ8mrxrtvaI/R7qhDEaLNII/AAAAAAAAA7k/oH5x4Qm7w4M/s320/TCP-FIN-Wireshark.png" alt="" id="BLOGGER_PHOTO_ID_5168620596456273026" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;From “Wireshark”, we can see that the attacker is sending a FIN to different random ports on our target (The White lines), and the target is responding with RST if the port is closed (The red lines), while it sends no response if the port is open or filtered (by Firewall).&lt;br /&gt;Note – &lt;span style="color: rgb(255, 0, 0);"&gt;if you would like to see that the open|filtered ports didn’t respond, just add a filter to your Wireshark such as tcp.port==22 (as in our case here). This will show only the SSH packets, and you will see no responses from the port (which indicates either open or filtered)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now, let’s examine the XMAS Scan&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_hJ8mrxrtvaI/R7qhLUaLNNI/AAAAAAAAA8M/oWUqD_k6G9k/s1600-h/XMAS.jpg"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_hJ8mrxrtvaI/R7qhLUaLNNI/AAAAAAAAA8M/oWUqD_k6G9k/s320/XMAS.jpg" alt="" id="BLOGGER_PHOTO_ID_5168620738190193874" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_hJ8mrxrtvaI/R7qhLkaLNOI/AAAAAAAAA8U/wS5M6lWKa5I/s1600-h/Xmas-cmd.png"&gt;&lt;img style="cursor: pointer;" src="http://bp1.blogger.com/_hJ8mrxrtvaI/R7qhLkaLNOI/AAAAAAAAA8U/wS5M6lWKa5I/s320/Xmas-cmd.png" alt="" id="BLOGGER_PHOTO_ID_5168620742485161186" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The command used is&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;nmap –sX 192.168.2.31&lt;/span&gt;&lt;br /&gt;Notice that result indicates open|filtered, I’m sure you know why :)&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_hJ8mrxrtvaI/R7qhLkaLNPI/AAAAAAAAA8c/ui0_GSNY8y4/s1600-h/Xmas-Wireshark.png"&gt;&lt;img style="cursor: pointer;" src="http://bp1.blogger.com/_hJ8mrxrtvaI/R7qhLkaLNPI/AAAAAAAAA8c/ui0_GSNY8y4/s320/Xmas-Wireshark.png" alt="" id="BLOGGER_PHOTO_ID_5168620742485161202" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;From “Wireshark”, we can see that the attacker is sending a packet with all Flags set (FIN, PSH, URG) to different random ports on our target (The White lines), and the target is responding with RST if the port is closed (The red lines), while it sends no response if the port is open or filtered (by Firewall).&lt;br /&gt;Note – &lt;span style="color: rgb(255, 0, 0);"&gt;if you would like to see that the open|filtered ports didn’t respond, just add a filter to your Wireshark such as tcp.port==22 (as in our case here). This will show only the SSH packets, and you will see no responses from the port (which indicates either open or filtered)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_hJ8mrxrtvaI/R7qhL0aLNQI/AAAAAAAAA8k/IzGNqph6qa0/s1600-h/Xmas-Wireshark-filter.png"&gt;&lt;img style="cursor: pointer;" src="http://bp2.blogger.com/_hJ8mrxrtvaI/R7qhL0aLNQI/AAAAAAAAA8k/IzGNqph6qa0/s320/Xmas-Wireshark-filter.png" alt="" id="BLOGGER_PHOTO_ID_5168620746780128514" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Now let’s examine the NULL Scan&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_hJ8mrxrtvaI/R7qgn0aLM-I/AAAAAAAAA6U/cQA2OjtYdSw/s1600-h/Null.jpg"&gt;&lt;img style="cursor: pointer;" src="http://bp2.blogger.com/_hJ8mrxrtvaI/R7qgn0aLM-I/AAAAAAAAA6U/cQA2OjtYdSw/s320/Null.jpg" alt="" id="BLOGGER_PHOTO_ID_5168620128304837602" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_hJ8mrxrtvaI/R7qgoEaLM_I/AAAAAAAAA6c/hHWwYiYmGrk/s1600-h/Null-cmd.png"&gt;&lt;img style="cursor: pointer;" src="http://bp3.blogger.com/_hJ8mrxrtvaI/R7qgoEaLM_I/AAAAAAAAA6c/hHWwYiYmGrk/s320/Null-cmd.png" alt="" id="BLOGGER_PHOTO_ID_5168620132599804914" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The command used is&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;nmap –sN 192.168.2.31&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_hJ8mrxrtvaI/R7qgoEaLNAI/AAAAAAAAA6k/feIjVQfQyzE/s1600-h/Null-Wireshark.png"&gt;&lt;img style="cursor: pointer;" src="http://bp3.blogger.com/_hJ8mrxrtvaI/R7qgoEaLNAI/AAAAAAAAA6k/feIjVQfQyzE/s320/Null-Wireshark.png" alt="" id="BLOGGER_PHOTO_ID_5168620132599804930" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;From “Wireshark”, we can see that the attacker is sending a packet with no Flags set (can you see the 2 empty brackets []) to different random ports on our target (The White lines), and the target is responding with RST if the port is closed (The red lines), while it sends no response if the port is open or filtered (by Firewall).&lt;br /&gt;Note – &lt;span style="color: rgb(255, 0, 0);"&gt;if you would like to see that the open|filtered ports didn’t respond, just add a filter to your Wireshark such as tcp.port==22 (as in our case here). This will show only the SSH packets, and you will see no responses from the port (which indicates either open or filtered)&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Now I'm tired and need a break :)&lt;br /&gt;Don't worry, our talking about Nmap is not finished. But you have to wait till Part 2 :)&lt;br /&gt;&lt;br /&gt;Take care guys.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4046984248821087870-8237597750645219952?l=haymanezzeldin.blogspot.com'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/PenetrationTesting?a=RK1wTQJNAL4:oRgVxH_ih_o:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PenetrationTesting?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/PenetrationTesting?a=RK1wTQJNAL4:oRgVxH_ih_o:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PenetrationTesting?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PenetrationTesting/~4/RK1wTQJNAL4" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/PenetrationTesting/~3/RK1wTQJNAL4/scanning-using-nmap-part-1.html</link><author>noreply@blogger.com (Hayman Ezzeldin)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://bp1.blogger.com/_hJ8mrxrtvaI/R7p0XkaLL8I/AAAAAAAAAtc/iba72dWhwuo/s72-c/Ping-sweep-cmd.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://haymanezzeldin.blogspot.com/2008/02/scanning-using-nmap-part-1.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4046984248821087870.post-9113724669285123427</guid><pubDate>Mon, 11 Feb 2008 13:47:00 +0000</pubDate><atom:updated>2008-02-19T10:12:41.507+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">2- Basics</category><category domain="http://www.blogger.com/atom/ns#">4- Scanning</category><title>Scanning Basics</title><description>Guys, did you study well?&lt;br /&gt;I really mean it, if you didn’t study the previous lessons by heart, then please go back immediately and do it. Otherwise everything will be messed up!!&lt;br /&gt;&lt;br /&gt;Today we are going to start the second phase in “Ethical Hacking”; this phase is called “Scanning and Enumeration”. “Scanning” is the phase where we have a direct contact with our target; because as we have seen before in the “Reconnaissance” phase that we never dealt direct with the target. All what we did was to gather information without our target knowing about it.&lt;br /&gt;&lt;br /&gt;But as usual, before we start delving into our new phase, we have to learn some basics; our lesson today is about TCP/IP. And because TCP/IP is a huge subject that deserves encyclopedias to be written about, so I will just simplify few terms that will help us in this phase. And at the same time I will refer you to other links for more reference.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Basics:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;1- Layering&lt;/span&gt;&lt;br /&gt;Networking – from the design point of view would look like this:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_hJ8mrxrtvaI/R7qcEkaLM4I/AAAAAAAAA5E/YEpovpdswG0/s1600-h/Net-Design.jpg"&gt;&lt;img style="cursor: pointer;" src="http://bp1.blogger.com/_hJ8mrxrtvaI/R7qcEkaLM4I/AAAAAAAAA5E/YEpovpdswG0/s320/Net-Design.jpg" alt="" id="BLOGGER_PHOTO_ID_5168615124667937666" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The same network – from the telecommunication point of view would look like that:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_hJ8mrxrtvaI/R7qcEkaLM5I/AAAAAAAAA5M/MewTBDYO44Q/s1600-h/Net-Telecomm.jpg"&gt;&lt;img style="cursor: pointer;" src="http://bp1.blogger.com/_hJ8mrxrtvaI/R7qcEkaLM5I/AAAAAAAAA5M/MewTBDYO44Q/s320/Net-Telecomm.jpg" alt="" id="BLOGGER_PHOTO_ID_5168615124667937682" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;When 2 computers are communication with each other, data enters so many processes till it goes from one computer to the other. These processes take part in imaginary network layers; each layer is responsible for a process or more.&lt;br /&gt;&lt;br /&gt;Let’s take a practical example so that we understand it better.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Layer 7 = Application Layer&lt;/span&gt;&lt;br /&gt;You open your Internet browser and type in the name of the website of your target which you want to visit.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Layer 6 = Presentation Layer&lt;/span&gt;&lt;br /&gt;Your browser knows how to show pictures from different format, such as JPG, PNG…&lt;br /&gt;Your browser knows how to handle different file types, for example if the target’s web site is created using HTML or ASP, your browser know how to open these file types.&lt;br /&gt;Also if the web page is encrypted, and you have the authority to open this page, then your browser will know how decrypt the page and show a readable format.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Layer 5 = Session Layer&lt;/span&gt;&lt;br /&gt;This is the first step of networking, where your browser establishes a session between your computer and the Web Server, and terminates the session at the end.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Layer 4 = Transport Layer&lt;/span&gt;&lt;br /&gt;The web page you requested needs to be divided into small chunks to be transferred, and arranged in order to be sent through the network.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Layer 3 = Network Layer&lt;/span&gt;&lt;br /&gt;Now, the page is ready, but it doesn’t know how to reach you because your address is xxx.xxx.xxx.xxx, which is wired for the web server because it doesn’t know where this address is located, so in this step Addressing occurs and data is sent to the Network Card.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Layer 2 = Data Link Layer&lt;/span&gt;&lt;br /&gt;Now, the data is ready to be transferred out of the computer, so the Data Link Layer starts packaging the data + the address of delivery&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Layer 1 = Physical layer&lt;/span&gt;&lt;br /&gt;This is the step when data is transferred into electrical signals that is understood by the network cables and devices&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_hJ8mrxrtvaI/R7qcE0aLM6I/AAAAAAAAA5U/2CnSZwJHrDo/s1600-h/OSI-Analogy.JPG"&gt;&lt;img style="cursor: pointer;" src="http://bp2.blogger.com/_hJ8mrxrtvaI/R7qcE0aLM6I/AAAAAAAAA5U/2CnSZwJHrDo/s320/OSI-Analogy.JPG" alt="" id="BLOGGER_PHOTO_ID_5168615128962904994" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I think with this diagram, you have no excuse :) right?&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;2- Protocols&lt;/span&gt;&lt;br /&gt;Each layer contains Protocols or/and Services that are responsible for performing its role; let’s see an example of these protocols and services&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Layer 7&lt;/span&gt; = Protocols such as HTTP (HyperText Transfer Protocol), FTP (File Transfer Protocol), POP3 (Post Office Protocol), SMTP (Simple Mail Transfer Protocol)…&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Layer 6&lt;/span&gt; = Standards such as ASCII (American Standard Code for Information Interchange), JPEG (Joint Photographic Experts Group), MIDI (Musical Instrument Digital Interface)…&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Layer 5&lt;/span&gt; = APIs such as SQL (Structured Query language), RPC (Remote Procedure Call), NetBIOS (Network Basic Input/Output System)…&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Layer 4&lt;/span&gt; = Protocols such as TCP (Transmission Control Protocol), UDP (User Datagram Protocol), SPX (Sequenced Packet Exchange)…&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Layer 3&lt;/span&gt; = Protocols such as IP (Internet Protocol), ICMP (Internet Control Message Protocol), IPX (Novel Internetwork Packet Exchange)…&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Layer 2&lt;/span&gt; = Protocols such as ARP (Address Resolution Protocol), PPP (Point to Point Protocol)…&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Layer 1&lt;/span&gt; = Standards such as 10Base-T, T1…&lt;br /&gt;&lt;br /&gt;Don’t worry; we won’t be talking about all of these :)&lt;br /&gt;We will choose 4 of these, because that’s what we will need in this phase, at least :)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;3- Definitions&lt;/span&gt;&lt;br /&gt;Header = Protocols messages are build of a Header (which is a piece of information that is needed for the protocol to do its work) followed by data. Each layer’s protocol adds a piece of header to the payload (data) coming from the higher layer.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_hJ8mrxrtvaI/R7qcMEaLM7I/AAAAAAAAA5c/J3-4I66jTX4/s1600-h/Protocol-header.jpg"&gt;&lt;img style="cursor: pointer;" src="http://bp3.blogger.com/_hJ8mrxrtvaI/R7qcMEaLM7I/AAAAAAAAA5c/J3-4I66jTX4/s320/Protocol-header.jpg" alt="" id="BLOGGER_PHOTO_ID_5168615253516956594" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Transport Protocols&lt;/span&gt; = these are protocols that have the ability to transfer data from one computer to the other.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Port&lt;/span&gt; = check the &lt;a href="http://haymanezzeldin.blogspot.com/2008/01/whois.html"&gt;Whois &lt;/a&gt;lesson&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Flag&lt;/span&gt; = check the &lt;a href="http://haymanezzeldin.blogspot.com/2008/01/whois.html"&gt;Whois &lt;/a&gt;lesson&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Reliable Delivery&lt;/span&gt; = what will happen if you send a postcard to a friend and it didn’t arrive? Well, it’s not a big deal because my friend wouldn’t be upset, and he doesn’t care himself :)&lt;br /&gt;What if you are sending money to someone through the post? Then, will you care or not? :)&lt;br /&gt;Of course you will, delivery at this moment is so important, it’s money, right?&lt;br /&gt;Some transport protocols uses this method, they make sure that the message arrived to the right recipient&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Connection Oriented&lt;/span&gt; = how would you feel if you are dialing a phone number of a friend, and your friend picked up the phone and didn’t say a word? And you keep talking to him, but he is just listening without a single word. Would you stay cool or would you jump and hit him through the phone line? :)&lt;br /&gt;Some transport protocols are connection oriented, they make sure that the recipient is speaking the same language, hearing well, got every single word said, correct what was misunderstood, or undelivered.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;TCP:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_hJ8mrxrtvaI/R7qcMUaLM8I/AAAAAAAAA5k/C1nbBjhJfJo/s1600-h/TCP-Header.JPG"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_hJ8mrxrtvaI/R7qcMUaLM8I/AAAAAAAAA5k/C1nbBjhJfJo/s320/TCP-Header.JPG" alt="" id="BLOGGER_PHOTO_ID_5168615257811923906" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;* TCP or “Transmission Control Protocol” is a connection oriented protocol, which means that handshaking between the 2 machines occurs before any data is sent. If the handshake is successful, then a virtual connection is established between the 2 machines.&lt;br /&gt;* TCP is a reliable protocol in delivery, which means it ensures that the data reached the destination as soon as it receives the ACK flag from the destination (for more information, reread the &lt;a href="http://haymanezzeldin.blogspot.com/2008/01/whois.html"&gt;Whois &lt;/a&gt;lesson)&lt;br /&gt;* We said before that one of the Transport Protocol roles is to divide data into chunks and arrange the chunks in order and numbers to make sure of right delivery, this step is called sequencing.&lt;br /&gt;* If I’m talking to you very quickly, you would tell me “please, slow down, I can’t follow what you are saying”, this process is called “Congestion control”. And when TCP is used as the transport protocol, it can control the amount of data to be sent according to the limits of the destination.&lt;br /&gt;* TCP is a slow protocol for 2 reasons:&lt;br /&gt;The long process of handshaking, and waiting for the ACK flag whenever data is received, and sometimes the resend of data when loss&lt;br /&gt;TCP uses a big amount of resources in establishing a lot of connections for the handshaking and the reliable delivery.&lt;br /&gt;&lt;br /&gt;Homework: Read &lt;a href="http://www.faqs.org/rfcs/rfc793.html"&gt;RFC number 973&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;UDP:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_hJ8mrxrtvaI/R7qcMUaLM9I/AAAAAAAAA5s/ACmPfRXNpo0/s1600-h/UDP-Header.jpg"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_hJ8mrxrtvaI/R7qcMUaLM9I/AAAAAAAAA5s/ACmPfRXNpo0/s320/UDP-Header.jpg" alt="" id="BLOGGER_PHOTO_ID_5168615257811923922" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;* UDP or “User Datagram Protocol” is a connectionless oriented protocol, which is the opposite of what the TCP does. UDP doesn’t use the handshake method, thus it doesn’t set up a virtual connection.&lt;br /&gt;* UDP is an unreliable protocol, which means that it sends that data without any care or guarantee if the data reached the destination safely or not.&lt;br /&gt;* As UDP doesn’t care for reliable delivery, then sequencing here would make no sense, because of that UDP doesn’t use sequencing.&lt;br /&gt;* Once again, UDP doesn’t care if the destination got the data or not, it can understand it or not. Thus, there is no congestion control.&lt;br /&gt;* UDP is a very quick protocol, because few resources are used in transferring data and no reliable delivery.&lt;br /&gt;&lt;br /&gt;Homework: Read &lt;a href="http://www.ietf.org/rfc/rfc768.txt"&gt;RFC number 768&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;ICMP:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_hJ8mrxrtvaI/R7qcEEaLM2I/AAAAAAAAA40/sjyBtlwFiu8/s1600-h/ICMP-Header.jpg"&gt;&lt;img style="cursor: pointer;" src="http://bp3.blogger.com/_hJ8mrxrtvaI/R7qcEEaLM2I/AAAAAAAAA40/sjyBtlwFiu8/s320/ICMP-Header.jpg" alt="" id="BLOGGER_PHOTO_ID_5168615116078003042" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;We talked about ICMP before, so no need to repeat what we said. For more information read the article of &lt;a href="http://haymanezzeldin.blogspot.com/2008/01/tracerouting-and-lesson.html"&gt;Tracerouting&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Homework: Read &lt;a href="http://www.ietf.org/rfc/rfc792.txt"&gt;RFC number 792&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;IP:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_hJ8mrxrtvaI/R7qcEUaLM3I/AAAAAAAAA48/0xAqQnxP07c/s1600-h/IP-Header.JPG"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_hJ8mrxrtvaI/R7qcEUaLM3I/AAAAAAAAA48/0xAqQnxP07c/s320/IP-Header.JPG" alt="" id="BLOGGER_PHOTO_ID_5168615120372970354" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;IP or “Internet Protocol” is a connectionless protocol that is responsible for the addressing and routing of data. We always use the postal system as an analogy for the IP message, when you write a letter to someone and put this letter in an envelope and send it to the post office. The letter here is the data to be sent through the network, and the IP is the address you wrote on the envelope, while the post office is the network where data is transferred through.&lt;br /&gt;&lt;br /&gt;Homework: Read &lt;a href="http://www.ietf.org/rfc/rfc791.txt"&gt;RFC number 791&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Guys, this part is very critical and it is a prerequisite for being a great hacker. Master it.&lt;br /&gt;2 great books I would recommend you to read if you have a gap in Networking concepts and terms:&lt;br /&gt;&lt;a href="http://www.amazon.com/Computer-Networks-Internet-Protocols-Action/dp/0471661864/ref=sr_11_1?ie=UTF8&amp;amp;qid=1202739207&amp;amp;sr=11-1"&gt;Computer Networks: Internet Protocols in Action&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.amazon.com/Interconnections-Internetworking-Protocols-Addison-Wesley-Professional/dp/0201634481/ref=sr_11_1?ie=UTF8&amp;amp;qid=1202738837&amp;amp;sr=11-1"&gt;Interconnections: Bridges, Routers, Switches, and Internetworking Protocols (2nd Edition)&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Till next article,&lt;br /&gt;Please take care&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4046984248821087870-9113724669285123427?l=haymanezzeldin.blogspot.com'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/PenetrationTesting?a=y5QE8Ez4WPA:j75VgJCLwio:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PenetrationTesting?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/PenetrationTesting?a=y5QE8Ez4WPA:j75VgJCLwio:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PenetrationTesting?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PenetrationTesting/~4/y5QE8Ez4WPA" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/PenetrationTesting/~3/y5QE8Ez4WPA/scanning-basics.html</link><author>noreply@blogger.com (Hayman Ezzeldin)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://bp1.blogger.com/_hJ8mrxrtvaI/R7qcEkaLM4I/AAAAAAAAA5E/YEpovpdswG0/s72-c/Net-Design.jpg" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">5</thr:total><feedburner:origLink>http://haymanezzeldin.blogspot.com/2008/02/scanning-basics.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4046984248821087870.post-2921367586671721328</guid><pubDate>Sat, 02 Feb 2008 16:11:00 +0000</pubDate><atom:updated>2008-02-19T10:02:26.651+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">3- Data Gathering</category><title>Reconnaissance Countermeasures</title><description>Because we are the good guys – hopefully – so our role is not to hack, but to prevent and defend, so today we are not going to study the attacks themselves as before, but the countermeasures.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;Search Engines’ countermeasures:&lt;/span&gt;&lt;br /&gt;We talked &lt;a href="http://haymanezzeldin.blogspot.com/2008/01/search-engines-behind-scenes.html"&gt;before &lt;/a&gt;about search engines, what they are and how they work, and in our discussions we talked about robots or web crawlers, and how they crawl all over our website gathering every single page and every single link.&lt;br /&gt;&lt;br /&gt;First of all, &lt;span style="font-weight: bold;"&gt;how can we detect crawlers&lt;/span&gt; when they are accessing our website?&lt;br /&gt;If you are monitoring your website’s log file, almost daily you would see entries similar to these ones&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_hJ8mrxrtvaI/R7qaG0aLMyI/AAAAAAAAA34/wOSfQQDNkxg/s1600-h/Reading-Log.png"&gt;&lt;img style="cursor: pointer;" src="http://bp2.blogger.com/_hJ8mrxrtvaI/R7qaG0aLMyI/AAAAAAAAA34/wOSfQQDNkxg/s320/Reading-Log.png" alt="" id="BLOGGER_PHOTO_ID_5168612964299387682" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Let’s analyze what the log file says:&lt;br /&gt;1- This is the IP Address of the machine that tried to access our website (by using the technique &lt;a href="http://haymanezzeldin.blogspot.com/2008/01/whois.html"&gt;Whois&lt;/a&gt;, we can know to whom this IP Address belongs to)&lt;br /&gt;2- The date and time when this entry was created.&lt;br /&gt;3- The command issued (in our case, the command was to GET the webpage “search-engines-behind-scenes.htm”)&lt;br /&gt;4- The protocol used and its version (in our case, the protocol used was &lt;a href="http://en.wikipedia.org/wiki/HTTP"&gt;HTTP&lt;/a&gt;)&lt;br /&gt;5- The result status code, normally every request has a result, it might be successful, it might be failure, and it might be a lot of results. “200” here means “Success”, meaning that the HTTP request was fulfilled successfully. For more details about the “Result Status Codes” please visit &lt;a href="http://en.wikipedia.org/wiki/List_of_HTTP_status_codes"&gt;here&lt;/a&gt;&lt;br /&gt;6- This is the number of BYTES transferred, which is in our case 16056 BYTES. So, the page size is 16 kilobytes was transferred to the requester.&lt;br /&gt;7- The “User Agent” or the software used by the requester to visit our site, in our case here it is Mozilla or a browser that is compatible with Mozilla.&lt;br /&gt;8- This is the page the requester was on when he tried to access our site&lt;br /&gt;&lt;br /&gt;To view a list of most popular or well known robots, please visit &lt;a href="http://www.robotstxt.org/db.html"&gt;here&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Now, how can we stop these crawlers from accessing our site?&lt;br /&gt;There are 3 ways at the moment to do that:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;1- Through robots.txt file:&lt;/span&gt;&lt;br /&gt;Normally, before any Robot visits your website, it searches for a file on your web root called “robots.txt”; this file gives instructions to the robots about which pages the robot is allowed to access and which pages not.&lt;br /&gt;Let’s examine a sample&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_hJ8mrxrtvaI/R7qaHEaLMzI/AAAAAAAAA4A/kxluMTJjsS8/s1600-h/Robot-txt.png"&gt;&lt;img style="cursor: pointer;" src="http://bp3.blogger.com/_hJ8mrxrtvaI/R7qaHEaLMzI/AAAAAAAAA4A/kxluMTJjsS8/s320/Robot-txt.png" alt="" id="BLOGGER_PHOTO_ID_5168612968594354994" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In the sample above, the asterisk “*” means that the rule “Disallow” will apply to all robots&lt;br /&gt;So, this means that all robots will not be allowed to access the 4 folders and the 2 files mentioned.&lt;br /&gt;&lt;br /&gt;Let’s look at another example:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_hJ8mrxrtvaI/R7qaMkaLM0I/AAAAAAAAA4I/MpD3SoYdtnM/s1600-h/Robot-txt-Exp.png"&gt;&lt;img style="cursor: pointer;" src="http://bp1.blogger.com/_hJ8mrxrtvaI/R7qaMkaLM0I/AAAAAAAAA4I/MpD3SoYdtnM/s320/Robot-txt-Exp.png" alt="" id="BLOGGER_PHOTO_ID_5168613063083635522" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The first part, we are telling the bots, if you are “Googlebot” or “Msnbot” then you are allowed to access every page&lt;br /&gt;While the second part, tells the bots, if you are anything else, then you are not allowed to access these 4 folders and the 2 files.&lt;br /&gt;&lt;br /&gt;Did you get the idea? If you want to read more about robots.txt file, please visit &lt;a href="http://www.robotstxt.org/robotstxt.html"&gt;here&lt;/a&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;br /&gt;2- Through META tags&lt;/span&gt;&lt;br /&gt;META tags are special HTML tags that you add in the HEAD section of every HTML page you have, these tags have so many functions; one function is to instruct robots whether to ignore the page or not.&lt;br /&gt;Concerning robots, there are 6 META tags:&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;INDEX:&lt;/span&gt; Instructs the robots to include this page in the Index created&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;NOINDEX:&lt;/span&gt; Instructs the robots NOT to include this page in the Index created, but just browse.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;FOLLOW:&lt;/span&gt; Instructs the robots to follow every link in the page&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;NOFOLLOW:&lt;/span&gt; Instructs the robots NOT to follow any link in the page.&lt;br /&gt;&lt;br /&gt;Let’s see an example:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_hJ8mrxrtvaI/R7qaGkaLMwI/AAAAAAAAA3o/20Msje1rqGA/s1600-h/Meta-tag.png"&gt;&lt;img style="cursor: pointer;" src="http://bp1.blogger.com/_hJ8mrxrtvaI/R7qaGkaLMwI/AAAAAAAAA3o/20Msje1rqGA/s320/Meta-tag.png" alt="" id="BLOGGER_PHOTO_ID_5168612960004420354" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In the example above, we are instructing all ROBOTS not to index our page and not to follow any link.&lt;br /&gt;And if we want to allow some robots, then we have to put the allowed ones first, as in the following example&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_hJ8mrxrtvaI/R7qaG0aLMxI/AAAAAAAAA3w/BR1QVkrCNao/s1600-h/Meta-tag-Exp.png"&gt;&lt;img style="cursor: pointer;" src="http://bp2.blogger.com/_hJ8mrxrtvaI/R7qaG0aLMxI/AAAAAAAAA3w/BR1QVkrCNao/s320/Meta-tag-Exp.png" alt="" id="BLOGGER_PHOTO_ID_5168612964299387666" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Here, we are allowing the Google bot to index and follow all of the links, while we are prohibiting all of the others.&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;br /&gt;3- Through Robot Traps&lt;/span&gt;&lt;br /&gt;You might ask a question now; are all of the robots kind enough to follow either the robots.txt or the META tags?&lt;br /&gt;Of course not, we are human beings, there are good ones, and there are bad ones, there are the ones who obey orders, and there are the ones who are looking for rules just to disobey them.&lt;br /&gt;Robots are the same as well, there are the good ones that follow the rules such as “Googlebot”, and there are the bad ones that look for what’s inside the robots.txt just to access what’s inside.&lt;br /&gt;For these bad ones, we are going to create a trap.&lt;br /&gt;The idea behind the trap is create a folder that has nothing but a single page which is going to be our trap, and add this page in the robots.txt as disallowed.&lt;br /&gt;What will happen when a bad robot accesses the robots.txt? He is curious enough to access what you disallowed, and the moment he accesses the page, an entry is created in a special report telling you &lt;span style="font-weight: bold;"&gt;WHO &lt;/span&gt;accessed &lt;span style="font-weight: bold;"&gt;WHAT &lt;/span&gt;and &lt;span style="font-weight: bold;"&gt;WHEN&lt;/span&gt;, then you can block this WHO from accessing your website completely.&lt;br /&gt;Did you get the idea?&lt;br /&gt;For more reading, search Google for (Robots traps)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;Google Hacking Countermeasures:&lt;/span&gt;&lt;br /&gt;Remember when we were discussing “&lt;a href="http://haymanezzeldin.blogspot.com/2008/01/google-hacking.html"&gt;Google Hacking&lt;/a&gt;” and how much information we can retrieve from Google using special operators such as “intitle:”, “inurl:”, and others&lt;br /&gt;It’s very difficult for Google Hacking to be detected or defended, because the attacker is not actually attacking us, he is innocent, and he is just using a search engine, which is legal, and he is not affecting your network in anyway.&lt;br /&gt;&lt;br /&gt;But, we still have few things that if we follow, we will be safer:&lt;br /&gt;1- First of all, you have to make sure that your website has no sensitive information that is viewable to others, start removing all of the sensitive information such as: employees contact information, credit card numbers…&lt;br /&gt;2- Although we have updated our website and removed all of the sensitive data, but some Search Engines have the capability to have cached version of your website.&lt;br /&gt;Remember in the article “&lt;a href="http://haymanezzeldin.blogspot.com/2008/01/hacking-terminology.html"&gt;Hacking – The Terminology&lt;/a&gt;” I gave you 2 links for a page, &lt;a href="http://www.sans.org/resources/glossary.php"&gt;the first is recent&lt;/a&gt;, and &lt;a href="http://web.archive.org/web/20030210130738/www.sans.org/resources/glossary.php"&gt;the second is 4 years old&lt;/a&gt;, this is shocking, because it means that though you updated your website and it’s so clean now, but there is a chance that one of the Search Engines still has a cached version for your site, right?&lt;br /&gt;The solution here is to contact this Search Engine and follow their instruction to remove old Cached versions of your site&lt;br /&gt;For example, to remove your cached version from Google, follow this &lt;a href="http://www.google.com/support/webmasters/bin/topic.py?topic=8456"&gt;link&lt;/a&gt;&lt;br /&gt;While to remove your cached version from Archive.org, check the &lt;a href="http://www.archive.org/about/faqs.php"&gt;FAQ&lt;/a&gt;&lt;br /&gt;BUT, you have to apply that for every single Search Engine that includes a cached version of your website, because hackers don’t just depend on Google’s engine. So take care.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;Whois Countermeasures:&lt;/span&gt;&lt;br /&gt;We talked about &lt;a href="http://haymanezzeldin.blogspot.com/2008/01/whois.html"&gt;Whois &lt;/a&gt;as a protocol and a tool that gives the hacker a lot of information that can be considered the first step in hacking us.&lt;br /&gt;You might say that when I register my website, when I buy a domain name I will give the Registrar fake information, I will give them wrong email address, wrong telephone number, everything will be wrong, so this way hackers will be mislead.&lt;br /&gt;Although, you can really do that, but it’s not recommended at all, because these contact details are required for either the Registrars or any other important person that needs to deliver you an important message. So faking this information is not the right way.&lt;br /&gt;But, there are few steps that we can follow to make sure we are on the safe side:&lt;br /&gt;1- Make sure you are registering your domain with one of the Registrars who offer Anonymous Registration such as &lt;a href="http://www.networksolutions.com/domain-name-registration/private.jsp"&gt;Network Solution&lt;/a&gt;, for extra 9$ you can hide your contact information from others, because Network Solutions will enter their contact information instead of yours.&lt;br /&gt;Although you have protected your contact information from others, you have protected the good guys from reaching you quickly.&lt;br /&gt;2- If you prefer not to hide your contact information, then at least try to put a telephone number that is similar to the “800 toll-free phone numbers” so that you don’t put a phone number that belongs to your real pool, and an email address that doesn’t show a naming pattern (firstname.lastname@mycompany.com shows a pattern for example) and is not an administrator account :)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;DNS Zone Transfers Countermeasures:&lt;/span&gt;&lt;br /&gt;1- First of all, make sure your &lt;a href="http://haymanezzeldin.blogspot.com/2008/01/dns-and-tools.html"&gt;Zone Transfer&lt;/a&gt; is restricted to the appropriate servers&lt;br /&gt;For Windows, this can be managed from the DNS Manager&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_hJ8mrxrtvaI/R7qaGUaLMvI/AAAAAAAAA3g/WXMC2xZxkBA/s1600-h/DNS-Zone-transfer.png"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_hJ8mrxrtvaI/R7qaGUaLMvI/AAAAAAAAA3g/WXMC2xZxkBA/s320/DNS-Zone-transfer.png" alt="" id="BLOGGER_PHOTO_ID_5168612955709453042" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;For BIND Servers, make sure that the “xfernets directive” in the file “etc/named.boot” for example is set to the right IP Address&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;xfernets 192.168.2.20&amp;amp;255.255.255.255 192.168.2.30&amp;amp;255.255.255.255&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This command says that Zone Transfer is allowed from the host 192.168.2.20 to 192.168.2.30&lt;br /&gt;2- Second, make sure that your firewall is blocking any unauthorized inbound connection to TCP port 53, TCP because DNS Zone Transfer uses TCP as a Transport protocol and Port 53 because this is the port of DNS communications.&lt;br /&gt;3- Third, we can use a technique called “Split DNS”, let’s look at a figure to imagine how it is then we can describe it.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_hJ8mrxrtvaI/R7qaNEaLM1I/AAAAAAAAA4Q/_54ojGopofc/s1600-h/Split-DNS.jpg"&gt;&lt;img style="cursor: pointer;" src="http://bp3.blogger.com/_hJ8mrxrtvaI/R7qaNEaLM1I/AAAAAAAAA4Q/_54ojGopofc/s320/Split-DNS.jpg" alt="" id="BLOGGER_PHOTO_ID_5168613071673570130" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Here we create 2 Primary DNS servers, 1 external and 1 internal; on the external DNS server we just add the information for the Public Servers such as the Web Server, while on the internal one we add all of the information for the internal hosts.&lt;br /&gt;So, if an attacker wants to make a Zone Transfer, he won’t be able to get any information about the internal network; he will only be allowed to access the public servers.&lt;br /&gt;For more information about creating a Split DNS, please visit &lt;a href="http://www.isaserver.org/tutorials/You_Need_to_Create_a_Split_DNS.html"&gt;here&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;Tracerouting Countermeasures:&lt;/span&gt;&lt;br /&gt;As we have seen in our &lt;a href="http://haymanezzeldin.blogspot.com/2008/01/tracerouting-and-lesson.html"&gt;Tracerouting &lt;/a&gt;lesson, that it was almost impossible to stop us from tracerouting our target, because we used different techniques&lt;br /&gt;For example, in the beginning we used “tracert” and “Traceroute” which used ICMP messages, and our target was able to block these packets through filtering the ICMP Time Exceeded messages on the firewall&lt;br /&gt;But when we tried to send TCP Packets (by using TCPtraceroute) instead of UDP and ICMP Echo, we were able to go through, because almost every computer on the network needs TCP ports to be opened for communication.&lt;br /&gt;1- So our countermeasures for Tracerouting is to filter or block ICMP Time Exceeded messages (by this we will be able to block all traditional tracerouting tools that use ICMP”&lt;br /&gt;2- Make sure that only required ports are opened on your clients, at least any attacker trying to traceroute or map your network will be able to reach only the external part.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;Social Engineering Countermeasures:&lt;/span&gt;&lt;br /&gt;I know that this is the most difficult part :) because none of us can control the users, right?&lt;br /&gt;In fact it all depends on your Organization’s Management; if they do care for security then you are minimizing the risks so much. But if they are like “C’mon, we have a firewall”, then you are in great danger.&lt;br /&gt;There is nothing technical you can do here, all you can do is considered soft defenses:&lt;br /&gt;1- Security Policy, that addresses the behavior of all employees, partners and whoever falls under the authority of the organization, this policy dictates what actions are acceptable. This security policy must be available anytime to every person in your organization, it must be forced, there shouldn’t be any exceptions in applying the policy, and the policy should be signed annually by your employees.&lt;br /&gt;2- We have seen through the examples in the &lt;a href="http://haymanezzeldin.blogspot.com/2008/01/abandoned-art-social-engineering.html"&gt;Social Engineering&lt;/a&gt; article that users innocently can give sensitive information to attackers, just because they acted trustworthy. Users get confused, should I give my password or not, should I say my email address or not?&lt;br /&gt;This behavior should change; users should feel the importance of security in their life and mostly in their business. Users should learn how to respond to security breaches. Users should practice scenarios to know more about hackers and what they can do.&lt;br /&gt;This can never be known to nontechnical employees unless it’s delivered through a special training called “Security Awareness”&lt;br /&gt;To read more about Security Awareness programs and what should be included in the program, please visit &lt;a href="http://csrc.nist.gov/publications/nistpubs/800-50/NIST-SP800-50.pdf"&gt;here&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Now, we are finished with the first phase “Reconnaissance” or “Data Gathering”.&lt;br /&gt;No, No, your role is not yet finished, you have to do your homework :)&lt;br /&gt;All I’m asking at the moment is to reread the articles again, slowly, and with a lot of concentration. And if there is a point that you don’t understand, don’t say “It will come later”. NO, it has to come now; you have time and you have to understand it now. Search, search, and search for what you don’t understand.&lt;br /&gt;&lt;br /&gt;Till next phase,&lt;br /&gt;Please Take care&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4046984248821087870-2921367586671721328?l=haymanezzeldin.blogspot.com'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/PenetrationTesting?a=OKEzJY_aRPI:qKyvAHLunLY:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PenetrationTesting?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/PenetrationTesting?a=OKEzJY_aRPI:qKyvAHLunLY:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PenetrationTesting?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PenetrationTesting/~4/OKEzJY_aRPI" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/PenetrationTesting/~3/OKEzJY_aRPI/reconnaissance-countermeasures.html</link><author>noreply@blogger.com (Hayman Ezzeldin)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://bp2.blogger.com/_hJ8mrxrtvaI/R7qaG0aLMyI/AAAAAAAAA34/wOSfQQDNkxg/s72-c/Reading-Log.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://haymanezzeldin.blogspot.com/2008/02/reconnaissance-countermeasures.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4046984248821087870.post-8727560423448733852</guid><pubDate>Sat, 26 Jan 2008 12:35:00 +0000</pubDate><atom:updated>2008-01-28T08:08:24.402+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">3- Data Gathering</category><title>The Abandoned Art (Social Engineering)</title><description>I’m sure that there was at least one time when you received these kind of emails which tell you about Mr. X who died somewhere and left a LOT of MONEY, and the lawyer or the family need your help and you will get MILLIONS of DOLLARS for your simple help.&lt;br /&gt;Does it ring a bell? I’m sure it does. At least for me :)&lt;br /&gt;&lt;br /&gt;Today’s lesson is about an art, an abandoned art in hacking. It’s the art of Social Engineering.&lt;br /&gt;&lt;br /&gt;We all have hearts, we all have feelings, and there are a lot of moments when our feelings drive us. Our role as hackers is to pick and use the moments when others have feelings, to get the information we need out of them.&lt;br /&gt;&lt;br /&gt;Do you remember our target, the company XYZ, who hired you to analyze their system? They spent millions of dollars to buy the latest technologies in everything and the most secure products at the moment, they have the best employees, the best administrators, everything we dream of.&lt;br /&gt;C’mon, we have a firewall, intrusion prevention, VPN, our servers are the brand …, what else do we need, we are an arsenal?&lt;br /&gt;The company ignored a very large vulnerability; the company ignored the “Human Factor”.&lt;br /&gt;A mistake of one employee might cause the arsenal a lot.&lt;br /&gt;&lt;br /&gt;I always liked stories, to read or to listen to. I hope you do too, coz I want to tell you 2 scenarios that were mentioned in the great book of social engineering “The Art of Deception”, written by the great social engineer “Kevin Mitnick”, so let’s see&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Scenario 1: A LITTLE HELP FOR THE NEW GAL&lt;/span&gt;&lt;br /&gt;New employees are a ripe target for attackers. They don't know many people yet, they don't know the procedures or the dos and don'ts of the company. And, in the name of making a good first impression, they're eager show how cooperative and quick to respond they can be.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Helpful Andrea&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;HR:&lt;/span&gt; "Human Resources, Andrea Calhoun."&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Hacker:&lt;/span&gt; "Andrea, hi, this is Alex, with Corporate Security." &lt;span style="color: rgb(153, 0, 0);"&gt;(He started the conversation with a friendly tone)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;HR:&lt;/span&gt; "Yes?"&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Hacker:&lt;/span&gt; "How're you doing today?"&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;HR:&lt;/span&gt; "Okay. What can I help you with?"&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Hacker:&lt;/span&gt; "Listen, we're developing a security seminar for new employees and we need to round up some people to try it out on. I want to get the name and phone number of all the new hires in the past month. Can you help me with that?" &lt;span style="color: rgb(153, 0, 0);"&gt;(The request of help always makes the requested person feel happy, coz it shows him how important he is and how valuable his help would be)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;HR:&lt;/span&gt; "I won't be able to get to it 'til this afternoon. Is that okay? What's your extension?"&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Hacker:&lt;/span&gt; "Sure, okay, it's 52 . . . oh, uh, but I'll be in meetings most of today. I'll call you when I'm back in my office, probably after four." &lt;span style="color: rgb(153, 0, 0);"&gt;(He started giving imaginary numbers just to make the HR believe that he was going to give it to her, but suddenly he remembered the meeting)&lt;/span&gt;&lt;br /&gt;When Alex called about 4:30, Andrea had the list ready, and read him the names and extensions.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A Message for Rosemary&lt;/span&gt;&lt;br /&gt;Rosemary Morgan was &lt;span style="font-style: italic;"&gt;delighted&lt;/span&gt; with her new job. She had never worked for a magazine before and was finding the people much &lt;span style="font-style: italic;"&gt;friendlier &lt;/span&gt;than she expected, a surprise because of the never-ending pressure most of the staff was always under to get yet another issue finished by the monthly deadline. The call she received one Thursday morning reconfirmed that impression of &lt;span style="font-style: italic;"&gt;friendliness&lt;/span&gt;.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Hacker:&lt;/span&gt; "Is that Rosemary Morgan?"&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;New Employee:&lt;/span&gt; "Yes."&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Hacker:&lt;/span&gt; "Hi, Rosemary. This is Bill Jorday, with the Information Security group."&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;New Employee:&lt;/span&gt; "Yes?"&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Hacker:&lt;/span&gt; "Has anyone from our department discussed best security practices with you?"&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;New Employee:&lt;/span&gt; "I don't think so."&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Hacker:&lt;/span&gt; "Well, let's see. For starters, we don't allow anybody to install software brought in from outside the company. That's because we don't want any liability for unlicensed use of software. And to avoid any problems with software that might have a worm or a virus." &lt;span style="color: rgb(153, 0, 0);"&gt;(Have you noticed that the hacker is always saying facts?)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;New Employee:&lt;/span&gt; "Okay."&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Hacker:&lt;/span&gt; "Are you aware of our email policies?" &lt;span style="color: rgb(153, 0, 0);"&gt;(And between the facts he gets to what he looks for)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;New Employee:&lt;/span&gt; "No."&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Hacker:&lt;/span&gt; "What's your current email address?"&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;New Employee:&lt;/span&gt; "Rosemary@ttrzine.net." &lt;span style="color: rgb(153, 0, 0);"&gt;(He got an email address)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Hacker:&lt;/span&gt; "Do you sign in under the username Rosemary?"&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;New Employee:&lt;/span&gt; "No, it's R underscore Morgan." &lt;span style="color: rgb(153, 0, 0);"&gt;(He got a username)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Hacker:&lt;/span&gt; "Right. We like to make all our new employees aware that it can be dangerous to open any email attachment you aren't expecting. Lots of viruses and worms get sent around and they come in emails that seem to be from people you know. So if you get an email with an attachment you weren't expecting you should always check to be sure the person listed as sender really did send you the message. You understand?" &lt;span style="color: rgb(153, 0, 0);"&gt;(He says facts again)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;New Employee:&lt;/span&gt; "Yes, I've heard about that."&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Hacker:&lt;/span&gt; "Good. And our policy is that you change your password every ninety days.&lt;br /&gt;When did you last change your password?"&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;New Employee:&lt;/span&gt; "I've only been here three weeks; I'm still using the one I first set."&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Hacker:&lt;/span&gt; "Okay, that's fine. You can wait the rest of the ninety days. But we need to be sure people are using passwords that aren't too easy to guess. Are you using a password that consists of both letters and numbers?"&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;New Employee:&lt;/span&gt; "No."&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Hacker:&lt;/span&gt; “We need to fix that. What password are you using now?" &lt;span style="color: rgb(153, 0, 0);"&gt;(See how friendly he is, he is trying to fix a mistake she did, so he is offering help)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;New Employee:&lt;/span&gt; "It's my daughter's name - Annette."&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Hacker:&lt;/span&gt; "That's really not a secure password. You should never choose a password that's based on family information. Well, let's see.., you could do the same thing I do.&lt;br /&gt;It's okay to use what you're using now as the first part of the password, but then each time you change it, add a number for the current month." &lt;span style="color: rgb(153, 0, 0);"&gt;(He is offering her a secure, easy to apply solution, no complications for new comers)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;New Employee:&lt;/span&gt; "So if I did that now, for March, would I use three, or oh-three."&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Hacker:&lt;/span&gt; "That's up to you. Which would you be more comfortable with?" &lt;span style="color: rgb(153, 0, 0);"&gt;(He cares for her comfort, not just giving orders like all Security Administrators)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;New Employee:&lt;/span&gt; "I guess Annette-three."&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Hacker:&lt;/span&gt; "Fine. Do you want me to walk you through how to make the change?" &lt;span style="color: rgb(153, 0, 0);"&gt;(Now, you might say, he should end the call, coz he got what he wants, but this is not right for 2 reasons: The New Employee might really not know how to change the password, so she might go to the IT department and tell them that the friendly security guy called her and she should change the password!!! The second reason is that Social Engineering attacks might fall coz of any suspicious feelings)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;New Employee:&lt;/span&gt; "No, I know how."&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Hacker:&lt;/span&gt; "Good. And one more thing we need to talk about. You have anti-virus software on your computer and it's important to keep it up to date. You should never disable the automatic update even if your computer slows down every once in a while. Okay?"&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;New Employee:&lt;/span&gt; "Sure."&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Hacker:&lt;/span&gt; "Very good. And do you have our phone number over here, so you can call us if you have any computer problems?"&lt;br /&gt;She didn't. He gave her the number, she wrote it down carefully, and went back to work, once again, pleased at how well taken care of she felt.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Scenario 2: MESSAGE FROM A FRIEND&lt;/span&gt;&lt;br /&gt;Remember our lesson last week about &lt;a href="http://haymanezzeldin.blogspot.com/2008/01/email-and-tracking.html"&gt;Email forging&lt;/a&gt;. Imagine: You've decided not to take any chances. You will no longer download any files except from secure sites that you know and trust, such as SecurityFocus.com or Amazon.com. You no longer click on links in email from unknown sources. You no longer open attachments in any email that you were not expecting. And you check your browser page to make sure there is a secure site symbol on every site you visit for e-commerce transactions or to exchange confidential information.&lt;br /&gt;And then one day you get an email from a friend or business associate that carries an attachment. Couldn't be anything malicious if it comes from someone you know well, right? Especially since you would know who to blame if your computer data were damaged.&lt;br /&gt;You open the attachment, and... BOOM! You just got hit with a worm or Trojan Horse. Why would someone you know do this to you? Because some things are not as they appear. You've read about this: the worm that gets onto someone's computer, and then emails itself to everyone in that person's address book. Each of those people gets an email from someone he knows and trusts, and each of those trusted emails contains the worm, which propagates itself like the ripples from a stone thrown into a still pond.&lt;br /&gt;The reason this technique is so effective is that it follows the theory of killing two birds with one stone: The ability to propagate to other unsuspecting victims, and the appearance that it originated from a trusted person.&lt;br /&gt;&lt;br /&gt;Have you seen how easy was it to be inside your target without touching a tool?&lt;br /&gt;But, what is this “Social Engineering” which will get us all the information we need, even without touching a tool?&lt;br /&gt;Social Engineering is “&lt;span style="font-style: italic;"&gt;A form of hacking that relies upon influence, deception and/or psychological manipulation to persuade unwitting people to comply with a request&lt;/span&gt;”&lt;br /&gt;As you have seen in the previous 2 scenarios, how the way you influence people would get you into. With just &lt;span style="font-weight: bold;"&gt;some emotions&lt;/span&gt; that appear to the surface you was able to delve into your target, in &lt;span style="font-weight: bold;"&gt;5 minutes&lt;/span&gt; or less, &lt;span style="font-weight: bold;"&gt;without paying&lt;/span&gt; a penny (unless you are bothered of paying the phone call), &lt;span style="font-weight: bold;"&gt;low risky&lt;/span&gt; (coz even if somebody knew that you are trying to social engineer them, all they can do is hang up), &lt;span style="font-weight: bold;"&gt;no log files&lt;/span&gt; show your attacks, and finally your attack would work &lt;span style="font-weight: bold;"&gt;no matter what Operating System or software is used&lt;/span&gt;. This is Social Engineering, don’t you think we should add it to our attacking arsenal?&lt;br /&gt;&lt;br /&gt;You might say, Uhhh but I’m not a social person, I’m shy, I’m confident when I’m alone, but when it comes to phones and meeting people whom I don’t know, I’m sure I will mess up.&lt;br /&gt;You know what is the answer to your dilemma?&lt;br /&gt;It’s a word you heard so many times and you will keep hearing all the time: &lt;span style="font-weight: bold;"&gt;Practice, Practice, Practice&lt;/span&gt;, even if you are practicing “Social Engineering”&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;First&lt;/span&gt; start practicing with your relatives, brothers, sisters, parents, any family partner, talk about hobbies, talk about what you saw in the news, something you read, try to let them talk a lot (People make mistakes when they talk a lot), try to gather information you are not in need for (pets, birthdays, hobbies…).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Then&lt;/span&gt;, go to your friends, colleagues, whoever you meet. Failure in such situations won’t cost you anything. Sooner or later, you will notice that talents are not to be born with. Talents are to be developed.&lt;br /&gt;&lt;br /&gt;Let’s now talk about the tactics used to Social Engineer someone:&lt;br /&gt;1- &lt;span style="font-weight: bold;"&gt;Trust:&lt;/span&gt; People always are in need to find a trustworthy person; we all need someone to share our secrets, our feelings.&lt;br /&gt;To create Trust for Social Engineering usage, don’t ask suspicious questions; don’t ask direct questions about secret information, don’t be in a rush to get the information you need coz it might take 2 or 3 or even more times.&lt;br /&gt;&lt;br /&gt;2- &lt;span style="font-weight: bold;"&gt;Authority:&lt;/span&gt; “Boss” is always a scary word; employees are always in a competition to satisfy bosses, right? :)&lt;br /&gt;Bosses’ orders always have the priority, for that it is very important to have the “Self Confident” to ACT like a boss when you do your Social Engineering.&lt;br /&gt;&lt;br /&gt;3- &lt;span style="font-weight: bold;"&gt;Help:&lt;/span&gt; This is the tender heart we all have, we like to help others, and we feel proud when others need our help and feel prouder when we are able to help others&lt;br /&gt;This technique is called “Reverse Social Engineering” because here you are the one who is pretending to “Offer Help”, though it’s not the case.&lt;br /&gt;Remember, when I was talking about this kind of spams we get in our mailboxes all the time about Mr. X who has millions of dollars, and his family needs your help to get the money out of the country for political reasons or so?&lt;br /&gt;Your tender heart will say, c’mon, this people need my help, and I won’t lose anything, and beside that I will get a lot of money, let’s do it. They got you!!&lt;br /&gt;&lt;br /&gt;4- &lt;span style="font-weight: bold;"&gt;Gaining physical access:&lt;/span&gt; There is a very interesting book, called “No Tech Hacking” written by Johnny Long and Kevin Mitnick, there is a very interesting scenario there; where the hacker enters a company by acting like an employee and being friendly and talking about yesterday’s match and how it ended up. Employees thought he is one of them and they let him in, he got the drawings he wanted and left without anybody noticing him.&lt;br /&gt;&lt;br /&gt;5- &lt;span style="font-weight: bold;"&gt;Dumpster diving:&lt;/span&gt; Although, Dumpster Diving is not a "Social Engineering" technique, but it is a great help because you can't imagine how much information you would get from what companies throw in their trash. I’m sure a lot of you are laughing now, garbage? What will I get from garbage?&lt;br /&gt;Just read that: &lt;a href="http://www.news.com/Oracle-chief-defends-Microsoft-snooping/2100-1001_3-242560.html"&gt;http://www.news.com/Oracle-chief-defends-Microsoft-snooping/2100-1001_3-242560.html&lt;/a&gt;&lt;br /&gt;In the year 2000, there was this big case of Microsoft in court, Oracle hired a detective agency to buy Microsoft’s garbage, trying to expose what Microsoft is doing. Interesting :)&lt;br /&gt;&lt;br /&gt;Talking about Social Engineering deserves books, 2 of the greatest books that are talking about this amazing technique are:&lt;br /&gt;&lt;a href="http://www.amazon.com/Art-Deception-Controlling-Element-Security/dp/076454280X/ref=sr_11_1?ie=UTF8&amp;amp;qid=1201339704&amp;amp;sr=11-1"&gt;The Art of Deception&lt;/a&gt;, Authored by Kevin Mitnick&lt;br /&gt;&lt;a href="http://www.amazon.com/No-Tech-Hacking-Engineering-Dumpster/dp/1597492159/ref=sr_11_1?ie=UTF8&amp;amp;qid=1201339759&amp;amp;sr=11-1"&gt;No Tech Hacking&lt;/a&gt;, Authored by Johnny Long and Kevin Mitnick&lt;br /&gt;Try to get both books, they are full of scenarios and technique, for sure some will work for you.&lt;br /&gt;&lt;br /&gt;Our next article is going to be the last in the “Data Gathering” or “Reconnaissance” phase, we will discuss the countermeasures of all of the attacks happened in this phase,&lt;br /&gt;So stay with us :)&lt;br /&gt;&lt;br /&gt;Till next article,&lt;br /&gt;Take care.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4046984248821087870-8727560423448733852?l=haymanezzeldin.blogspot.com'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/PenetrationTesting?a=DeJhep5k5Bw:TXDCmwpbnQA:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PenetrationTesting?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/PenetrationTesting?a=DeJhep5k5Bw:TXDCmwpbnQA:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PenetrationTesting?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PenetrationTesting/~4/DeJhep5k5Bw" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/PenetrationTesting/~3/DeJhep5k5Bw/abandoned-art-social-engineering.html</link><author>noreply@blogger.com (Hayman Ezzeldin)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://haymanezzeldin.blogspot.com/2008/01/abandoned-art-social-engineering.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4046984248821087870.post-4922501816183115424</guid><pubDate>Thu, 24 Jan 2008 07:08:00 +0000</pubDate><atom:updated>2008-02-19T09:55:16.315+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">3- Data Gathering</category><title>Email and Tracking</title><description>“You have got Mail”&lt;br /&gt;Have you ever heard this sentence?&lt;br /&gt;Right, it’s the American romantic comedy of Tom Hanks and Meg Ryan :)&lt;br /&gt;Just kidding.&lt;br /&gt;&lt;br /&gt;No, really what I mean here is the email system and the email message itself. We all receive emails every day, but have we ever thought about how it worked, what data is hidden in the emails, how the spammer knew about my email address, how he can forge his details all the time!!&lt;br /&gt;&lt;br /&gt;This is our lesson today.&lt;br /&gt;&lt;br /&gt;But first, let me ask you a question, why would we need to know this information?&lt;br /&gt;An Email is a digital message that is stored on digital media (hard disks, flash memories…). An Email is the most common way of communication among people. An Email is the shuttle that transports almost all malwares to our computers. An Email is involved in a lot of high-tech crimes. Sometimes an Email is the only way to trace bad guys. For all of that; an Email means a lot in security.&lt;br /&gt;&lt;br /&gt;For all of us, email is very simple; you just open your mail client (Outlook, Emacs…), type your message and click “send”, and BAM, “your email is gone”, another BAM, “and your email arrived to the recipient” :) right?&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_hJ8mrxrtvaI/R7qYv0aLMrI/AAAAAAAAA2s/qQGsTjubbTc/s1600-h/Email_4_People.jpg"&gt;&lt;img style="cursor: pointer;" src="http://bp2.blogger.com/_hJ8mrxrtvaI/R7qYv0aLMrI/AAAAAAAAA2s/qQGsTjubbTc/s320/Email_4_People.jpg" alt="" id="BLOGGER_PHOTO_ID_5168611469650768562" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In real, this is not the case; it’s a little bit complicated, so let’s look at the real steps that happen starting from you typing your email, till it reaches its destination.&lt;br /&gt;&lt;br /&gt;1- First you create an Email (which you want to send to xyz@xyz.com) in the MUA “Mail User Agent” (which is the email client or application where you send and read your emails, such as: Outlook, Thunderbird…), and click send.&lt;br /&gt;&lt;br /&gt;2- Your message gets transferred to the MTA “Mail Transfer Agent” (which is the application that is responsible for &lt;span style="font-weight: bold;"&gt;transferring &lt;/span&gt;emails from one computer to another, normally we know that as Mail Server, such as: Microsoft Exchange Server, Postfix…)&lt;br /&gt;Note1: For my computer to talk to the Mail Server about sending a message, they use a protocol called SMTP “Simple Mail Transfer Protocol” with port 25 opened on the Mail Server.&lt;br /&gt;&lt;br /&gt;3- Now, the Mail Server holds the message but doesn’t know where to take it. So it starts asking the DNS Server about the MTA “Mail Transfer Agent” (which is the application that is responsible for receiving &lt;span style="font-weight: bold;"&gt;incoming &lt;/span&gt;emails) of the domain name (xyz.com). If available, then the DNS Server provides the Mail Server with the IP of the MTA of the destination (xyz.com).&lt;br /&gt;&lt;br /&gt;4- The SMTP Server at your domain starts talking to the SMTP Server of the destined Domain (xyz.com) on port 25, and delivers the message.&lt;br /&gt;Note1: The 2 Mail Servers communicate using the SMTP protocol on port 25&lt;br /&gt;&lt;br /&gt;5- Now the message is at the Mail Server of the destined Domain (xyz.com), it delivers the message to another interface using either a POP3 Protocol (Post Office Protocol) or IMAP (Internet Message Access Protocol). These 2 protocols act exactly like the post office; they start filtering the emails and deliver each email to the accurate Mailbox.&lt;br /&gt;&lt;br /&gt;6- For the recipient to read the Email he has to open his MUA (email client) and press “get mail” or “send and receive” or whatever the option called in your application.&lt;br /&gt;&lt;br /&gt;7- The MUA starts talking to the Mail Server using either POP3 or IMAP, who retrieves immediately the Emails stored in the mailbox.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_hJ8mrxrtvaI/R7qYv0aLMsI/AAAAAAAAA20/FFwhm6c2L1k/s1600-h/Email_4_Real.jpg"&gt;&lt;img style="cursor: pointer;" src="http://bp2.blogger.com/_hJ8mrxrtvaI/R7qYv0aLMsI/AAAAAAAAA20/FFwhm6c2L1k/s320/Email_4_Real.jpg" alt="" id="BLOGGER_PHOTO_ID_5168611469650768578" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;These are the steps that show how the email works. Let’s now dissect an Email.&lt;br /&gt;An Email consists of 2 parts:&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Header:&lt;/span&gt; And this part is mostly hidden from eyes of the user.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Body:&lt;/span&gt; And this is the message itself, and it’s the part which you see.&lt;br /&gt;&lt;br /&gt;Let’s look at this email&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_hJ8mrxrtvaI/R7qYvkaLMqI/AAAAAAAAA2k/ATxQrcGHUTA/s1600-h/Email.png"&gt;&lt;img style="cursor: pointer;" src="http://bp1.blogger.com/_hJ8mrxrtvaI/R7qYvkaLMqI/AAAAAAAAA2k/ATxQrcGHUTA/s320/Email.png" alt="" id="BLOGGER_PHOTO_ID_5168611465355801250" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Here we can see few fields and the body, but this information we all know about. And anyway, where is the header you talked about, and what is a header?&lt;br /&gt;The &lt;span style="font-weight: bold;"&gt;Email Header&lt;/span&gt; is a piece of data contains several lines that are added by the email client to the email as it travels from the sender’s computer till it reaches its destination.&lt;br /&gt;Remember in the figure which describes the email journey, we showed that the email passes through servers, routers, Internet, till it reaches its destination. Each server the mail passes through, stamps the email with its IP Address, date, time and more. This is what creates the Email Header.&lt;br /&gt;&lt;br /&gt;Let’s have a look at an Email Header:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_hJ8mrxrtvaI/R7qYwEaLMtI/AAAAAAAAA28/zSkJUWQRoDc/s1600-h/Email_Header.png"&gt;&lt;img style="cursor: pointer;" src="http://bp3.blogger.com/_hJ8mrxrtvaI/R7qYwEaLMtI/AAAAAAAAA28/zSkJUWQRoDc/s320/Email_Header.png" alt="" id="BLOGGER_PHOTO_ID_5168611473945735890" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;As you can see, it’s a lot of lines, with weird titles :)&lt;br /&gt;Don’t worry, everything will be clear now.&lt;br /&gt;&lt;br /&gt;1- &lt;span style="font-weight: bold;"&gt;Delivered-to:&lt;/span&gt; The Email address the message will be delivered to, if the sender for example is sending to mailinglist@xyz.com, then this field will include the Email mailinglist@xyz.com and not the every single user in the mailing list&lt;br /&gt;&lt;br /&gt;2- &lt;span style="font-weight: bold;"&gt;Received:&lt;/span&gt; A received field is added to the header for each step of the mail delivery process. In our example you see the Received field 4 times&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Can you guess which IP Address was the originator of the Email?&lt;/span&gt;&lt;br /&gt;Hint: Received field is read from bottom to top&lt;br /&gt;I deleted the IP address, but you can tell from the time stamp of the received field which shows “12:59:40 -0800”. The Received fields higher represent the hops the message had till it reached the destination.&lt;br /&gt;The received field format differs from server to server, but generally you will see the IP address of the sending system, the host name of the system (if the host name doesn’t match the IP in real, then the message is forged), and the time stamp of the message sending.&lt;br /&gt;&lt;br /&gt;The Received filed format and sequence is like that:&lt;br /&gt;Received: From Machine 3 ([xxx.xxx.xxx.xxx]) by Machine 4&lt;br /&gt;Received: From Machine 2 ([xxx.xxx.xxx.xxx]) by Machine 3&lt;br /&gt;Received: From Machine 1 ([&lt;span style="font-weight: bold;"&gt;xxx.xxx.xxx.xxx&lt;/span&gt;]) by Machine 2 (the Last “Received” is the originator)&lt;br /&gt;&lt;br /&gt;3- &lt;span style="font-weight: bold;"&gt;Return-Path:&lt;/span&gt; The Email address that should be used in case of any error occurred while the email is being sent and also it’s the Email you will use to send back a reply.&lt;br /&gt;&lt;br /&gt;4- &lt;span style="font-weight: bold;"&gt;Received-SPF&lt;/span&gt;: SPF stand for “Sender Policy Framework”, it’s a feature that can be added to SMTP to discourage spammers from forging the “From” field. The administrator of an Internet domain can specify which machines are allowed to transmit emails from this domain by creating an SPF record in the DNS. When a spammer forge the “From” field of my domain, the SPF client queries my DNS to see if this email was really authorized through my Mail Server or not.&lt;br /&gt;There are 7 results for this query, Pass (as in the header above), Fail, SoftFail, Neutral, None, Permerror, and Temperror.&lt;br /&gt;&lt;br /&gt;5- &lt;span style="font-weight: bold;"&gt;Authentication-Results:&lt;/span&gt; There is an Email verification system called DomainKeys, is used to prevent forging email addresses. DomainKeys uses  the concept of Public and Private Keys, let’s give an example for that. I have 2 encryption keys, 1 public and 1 private, the private is used to encrypt the messages, while the public is used by others to decrypt the messages. When the receiving Mail Server sees that the message is signed with my key, he will retrieve the public key from my DNS records, and decrypt the message. If the message is decrypted successfully, then the mail is valid. And if the public key wasn’t able to decrypt the message, then the message is forged or tampered.&lt;br /&gt;The Authentication-Result is result of decrypting the message using the public key. And as you can see the result is “Pass”&lt;br /&gt;&lt;br /&gt;6- &lt;span style="font-weight: bold;"&gt;Message-ID:&lt;/span&gt; This is a unique ID for the message that can never be duplicated, and is created by the mail system when the mail is created. The Message-ID can be used by administrator to locate the Email in a Log.&lt;br /&gt;This field can be forged as well, but this can be detected by comparing the ID format to legitimate messages from the same site.&lt;br /&gt;For example:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;BAY125-W13FF6F07F710DD5CEBCE83D2440@phx.gbl&lt;/span&gt; (this is from the figure above)&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;BAY125-W42351024FF11B0771400CBEE860@phx.gbl&lt;/span&gt; (this is from another email)&lt;br /&gt;The Message-ID format is UniqueID@SiteName&lt;br /&gt;&lt;br /&gt;7- &lt;span style="font-weight: bold;"&gt;Content-Type:&lt;/span&gt; This field describes the data contained in the body of the message, so that the receiving application can choose the appropriate way to read the data (like Plain-Text, HTML…)&lt;br /&gt;There are 7 types: Text, Multipart (like the figure above), Message, Image, Audio, Video, and Application&lt;br /&gt;&lt;br /&gt;8- &lt;span style="font-weight: bold;"&gt;X-Originating-IP:&lt;/span&gt; This field tells you the IP address of the computer which the Email was sent from.&lt;br /&gt;&lt;br /&gt;9- &lt;span style="font-weight: bold;"&gt;References:&lt;/span&gt; This field contains a list of Message-IDs, listing the Parent, Grandparent, Great-Grandparent… of the message, older first. The purpose of this field is to allow messages to be grouped into conversations by the user’s program. This is very helpful field if you are using Newsgroups for example, you might be involved in a conversation discussing something, and finally you want to close this discussion, this filed will be used in closing the discussion because it contains all of the parents involved.&lt;br /&gt;&lt;br /&gt;10- &lt;span style="font-weight: bold;"&gt;MIME-Version:&lt;/span&gt; This shows the version of the standard MIME “Multipurpose Internet Mail Extension”, which is the standard that describes the format of Attachments and how they would be sent over the Internet.&lt;br /&gt;&lt;br /&gt;11- &lt;span style="font-weight: bold;"&gt;X-OriginalArrivalTime:&lt;/span&gt; This is the time the message was submitted to the 1st Mail Server (Usually like the time stamp listed in the lowest “Received” field).&lt;br /&gt;&lt;br /&gt;Note1: When you check your mail header, it's not a must you would find all of the fields mentioned above, it might be less, it might be more.&lt;br /&gt;&lt;br /&gt;So now to points that will allow us to trace Spammers:&lt;br /&gt;1- Don’t forget to use the tools we already learned in previous articles (DNS Lookup, Whois, Traceroute) they will be very helpful catching spammers.&lt;br /&gt;2- Always start reading the header bottom first, coz headers are always added on top. So the first header is the one at the bottom.&lt;br /&gt;3- Now you have the spammer’s IP address, by using Whois you can query the IP and get all the details required about the spammer’s ISP, or a company whom the spammer is using their mail server to send these spams.&lt;br /&gt;4- Now you have to send an email to the ISP or the Company, providing them with the Email Header and the message that shows the spam.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Anyway, we didn’t talk today about this to start complaining :)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;But to understand.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If you are bothered from reading and analyzing these headers, you can use a Web Site that provide the service of “Spam Locator”, and example is here &lt;a href="http://www.geobytes.com/SpamLocator.htm"&gt;http://www.geobytes.com/SpamLocator.htm&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Now, how can these spammers forge their emails?&lt;br /&gt;There are 2 important ways for doing that&lt;br /&gt;1- Through &lt;span style="font-weight: bold;"&gt;Mail Relaying&lt;/span&gt;&lt;br /&gt;Mail Relaying is an old interesting technique, due to the creation of high security products now, this technique is somehow obsolete (Not totally)&lt;br /&gt;But, I would like to discuss coz for sure we will learn something from it.&lt;br /&gt;&lt;br /&gt;2- The second way is through software that we use to call &lt;span style="font-weight: bold;"&gt;Bulk Mail&lt;/span&gt; or &lt;span style="font-weight: bold;"&gt;Mass Mail&lt;/span&gt;. And by the way, spammers call this software &lt;span style="font-weight: bold;"&gt;Bulk Marketing&lt;/span&gt; :)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;Mail Relaying&lt;/span&gt;&lt;br /&gt;Let’s discuss first Mail Relaying, and then check a piece of the Bulk Mail&lt;br /&gt;Imagine you are sitting in the bus; a guy got on and sat on the seat behind you. He got money out of his pocket for the ticket and handled it to you to handle it yourself to the driver (because you are a kind person, and your bad luck put you behind the driver :))&lt;br /&gt;What will happen is that you will take the money and give it to the driver, who will give you back the ticket, and then you will give it back to the guy sitting behind you.&lt;br /&gt;Mail Relaying is exactly the step when you took the money from the guy and handled it to the driver (the driver didn’t take the money from the guy directly, but you)&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_hJ8mrxrtvaI/R7qYwUaLMuI/AAAAAAAAA3E/osAH8c604u4/s1600-h/Mail_Relaying.jpg"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_hJ8mrxrtvaI/R7qYwUaLMuI/AAAAAAAAA3E/osAH8c604u4/s320/Mail_Relaying.jpg" alt="" id="BLOGGER_PHOTO_ID_5168611478240703202" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Let’s look at this scenario and see how the bad guy (badguy@badguy.com) can send his target (mytargetuser@mytargetdomain.com) an email through using the SMTP or MTA of the domain innocentdomain.com as an “Open Relay”&lt;br /&gt;The bad guy opens his command shell (“Command Prompt” for Windows users and “Konsole” for Linux users), and types the following:&lt;br /&gt;1- First step, he will try to find the MX record responsible for the domain innocentdomain.com by using the nslookup command and query the MX record (remember the lesson)&lt;br /&gt;&lt;span style="font-style: italic;font-family:courier new;" &gt;nslookup&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;font-family:courier new;" &gt;set type=mx&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;font-family:courier new;" &gt;innocentdomain.com&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;2- After you figured out which mail server is published, we can start to use another command called telnet (this command will allow us to establish a connection on a remote server), and we will try to establish this connection on port 25 (the port responsible for SMTP communication)&lt;br /&gt;&lt;span style="font-style: italic;font-family:courier new;" &gt;telnet mx.innocentdomain.com 25&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;3- Now, the telnet DOS-Like window opens, welcoming you with a Banner (we will see in another lessons how these Banners can be beneficial)&lt;br /&gt;I will write the command, and between brackets will describe what is happening)&lt;br /&gt;&lt;span style="font-style: italic;font-family:courier new;" &gt;Helo anythingwrittenhere&lt;/span&gt; (command helo is used like an introduction to yourself, and of course this can be fake, you can write anything)&lt;br /&gt;&lt;span style="font-style: italic;font-family:courier new;" &gt;Mail from: &lt;fakename@fakedomain.com&gt;&lt;/fakename@fakedomain.com&gt;&lt;/span&gt; (Now you start typing in what fake email you want to appear to your target)&lt;br /&gt;&lt;span style="font-style: italic;font-family:courier new;" &gt;Rcpt to: &lt;mytargetuser@mytargetdomain.com&gt;&lt;/mytargetuser@mytargetdomain.com&gt;&lt;/span&gt; (This is the email of your target, and of course no need to fake it, right?)&lt;br /&gt;&lt;span style="font-style: italic;font-family:courier new;" &gt;Any message to be typed here&lt;/span&gt; (Here you start typing the message you want to deliver, it can be a single line or a multi line field)&lt;br /&gt;&lt;span style="font-style: italic;font-family:courier new;" &gt;Any second line if you want&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;font-family:courier new;" &gt;.&lt;/span&gt; (don’t forget the (.), coz simply it means that your message is finished)&lt;br /&gt;&lt;br /&gt;Although open relays are not popularly used anymore since sometime, and are not used anymore by Bulk Marketing.&lt;br /&gt;I just mentioned Mail Relaying for 2 reasons:&lt;br /&gt;The first is that it was used for a long time, and it worked fine. And we need to think how the bad guys are looking for any mistakes in our systems, just to get use of it.&lt;br /&gt;The second reason is that there are still people who believe in “Open relay” but from the Freedom point of view. There is a guy called &lt;a href="http://en.wikipedia.org/wiki/John_Gilmore_%28activist%29"&gt;John Gilmore&lt;/a&gt;, he argues that running an open relay is a free speech issue. And although his “Open Relay” server is blacklisted by antispammers, he is still running projects like this defending speech freedom.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;Bulk Marketing&lt;/span&gt;&lt;br /&gt;Spammers or Marketers use “Mail Crawlers” (do you remember the term &lt;a href="http://haymanezzeldin.blogspot.com/2008/01/search-engines-behind-scenes.html"&gt;Crawler&lt;/a&gt;) to gather emails from websites to be used in their spamming.&lt;br /&gt;They do that in 4 simple steps:&lt;br /&gt;1- Email Extraction, and this is the step where they start sending crawlers all over the web to gather all email address they can (did you notice now that some websites have changed their email addresses to the format “&lt;span style="font-style: italic;"&gt;myname [at] mycompany [dot] com&lt;/span&gt;”?) they changed it to this format because crawlers were always looking for the sign “@”. By the way, some crawlers now know to search even if the @ sign is removed)&lt;br /&gt;2- Emails List Creation, after they gather the emails, they start arranging these emails into lists according to their spamming aim (by alphabetical order, by industry…)&lt;br /&gt;3- Emails List Maintenance, this step is the one of keeping the alive emails updated, and removing the non-existent emails.&lt;br /&gt;4- Bulk Emails, this is the bothering step for us :) coz this is when we get these into our Junk box.&lt;br /&gt;&lt;br /&gt;There is a third way of sending fake emails, which is using a software such as: “Email Forger” or “Phasma” or using a Web Site that offer these kind of services such as “&lt;a href="http://www.elitec0ders.net/afteranonimousmail.htm"&gt;Elitc0ders.net&lt;/a&gt;”&lt;br /&gt;&lt;br /&gt;For the 100 Million times, this information is just for learning, and it’s not intended in any way to be taught for the reason of harming others, so please learn with attention and care for yourself and for others.&lt;br /&gt;&lt;br /&gt;Till next article,&lt;br /&gt;Take care.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4046984248821087870-4922501816183115424?l=haymanezzeldin.blogspot.com'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/PenetrationTesting?a=YJvQ-JJI6QM:4AfmlMITzzE:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PenetrationTesting?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/PenetrationTesting?a=YJvQ-JJI6QM:4AfmlMITzzE:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PenetrationTesting?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PenetrationTesting/~4/YJvQ-JJI6QM" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/PenetrationTesting/~3/YJvQ-JJI6QM/email-and-tracking.html</link><author>noreply@blogger.com (Hayman Ezzeldin)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://bp2.blogger.com/_hJ8mrxrtvaI/R7qYv0aLMrI/AAAAAAAAA2s/qQGsTjubbTc/s72-c/Email_4_People.jpg" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://haymanezzeldin.blogspot.com/2008/01/email-and-tracking.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4046984248821087870.post-7964024662157959746</guid><pubDate>Sun, 20 Jan 2008 11:31:00 +0000</pubDate><atom:updated>2008-02-19T09:47:19.591+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">3- Data Gathering</category><title>Tracerouting and Lesson</title><description>Today’s lesson is extremely important for me, and hopefully for you. Coz through this lesson, I want to send a message to every wannabe hacker. Although the lesson itself is easy, the message is so serious, so please follow me.&lt;br /&gt;&lt;br /&gt;Our technique today is called “Tracerouting”!&lt;br /&gt;Bing Bing, this “Tracerouting” is ringing a bell in my head, Oh ya, isn’t it the tool which is called “tracert” on windows and “traceroute” on Linux? I know it, I know it, it’s this tool which shows a list of routers between 2 systems, the first is my computer and the other is the target.&lt;br /&gt;&lt;br /&gt;:) Well, you are right this time again “in a way” :)&lt;br /&gt;&lt;br /&gt;Let’s discuss some terms as usual before we hop into “Tracerouting”&lt;br /&gt;1- &lt;span style="font-weight: bold;"&gt;TTL (Time To Live):&lt;/span&gt; “If this guy didn’t give you his wallet in 6 seconds, KILL him”, “Man, your time to live is decreasing now, 6, 5, 4, 3, 2, 1, BANG” and the guy is dead. “TTL” in computers works almost the same, TTL for packets determine the time that the packet can stay alive, if the TTL for the packet reaches zero then it is discarded.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_hJ8mrxrtvaI/R7qVJUaLMnI/AAAAAAAAA1U/_H0Vxn0aAxU/s1600-h/TTL.jpg"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_hJ8mrxrtvaI/R7qVJUaLMnI/AAAAAAAAA1U/_H0Vxn0aAxU/s320/TTL.jpg" alt="" id="BLOGGER_PHOTO_ID_5168607509690921586" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;As you can see from the previous figure, the TTL is decreased by 1 on every router, the first hop went from “My computer” to the first router where the TTL is decreased by 1, and then the second hop went to the second router where the TTL reached 0, which means “Time Exceeded” or “This packet cannot live anymore, and it must die”.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Normally, when a packet leaves the host, the system by default gives it a TTL count that is high enough for the packet to reach its destination&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;2- &lt;span style="font-weight: bold;"&gt;ICMP (Internet Control Message Protocol):&lt;/span&gt; ICMP is a supportive protocol; it helps the IP protocol in maintaining communication between hosts, the ICMP main job is to send messages reporting errors that occurred to packets. There are so many types of ICMP messages&lt;br /&gt;Let’s see an example:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_hJ8mrxrtvaI/R7qUx0aLMfI/AAAAAAAAA0U/UMbOpNKiuh4/s1600-h/Ping.png"&gt;&lt;img style="cursor: pointer;" src="http://bp2.blogger.com/_hJ8mrxrtvaI/R7qUx0aLMfI/AAAAAAAAA0U/UMbOpNKiuh4/s320/Ping.png" alt="" id="BLOGGER_PHOTO_ID_5168607105963995634" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;We all know the command “Ping”, what we see here is a successful ping from my computer to my router. But let’s see how it appeared on the Wireshark:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_hJ8mrxrtvaI/R7qUxkaLMeI/AAAAAAAAA0M/n4TFOgTVWwQ/s1600-h/ICMP_Type8_Code0.png"&gt;&lt;img style="cursor: pointer;" src="http://bp1.blogger.com/_hJ8mrxrtvaI/R7qUxkaLMeI/AAAAAAAAA0M/n4TFOgTVWwQ/s320/ICMP_Type8_Code0.png" alt="" id="BLOGGER_PHOTO_ID_5168607101669028322" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In the top pane, we can see 4 “Echo requests” and 4 “Echo reply”. While in the bottom pane, we can see an “Internet Control Message Protocol” with “Type 8” and “Code 0”.&lt;br /&gt;What is “Type 8”? And what is “Code 0”? And are there any more types or codes more than this?&lt;br /&gt;There are 256 “ICMP Message types” starting from “Type 0” till “Type 255”, many of these types have codes, let’s see an example with “Type 8” which we just saw&lt;br /&gt;&lt;br /&gt;Type 8, means an “Echo Message” or a request, and “Type 8” has no codes, that’s why we can see that the code here is “Code 0”&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_hJ8mrxrtvaI/R7qUxEaLMcI/AAAAAAAAAz8/B4ArmanjNa0/s1600-h/ICMP_Type0_Code0.png"&gt;&lt;img style="cursor: pointer;" src="http://bp3.blogger.com/_hJ8mrxrtvaI/R7qUxEaLMcI/AAAAAAAAAz8/B4ArmanjNa0/s320/ICMP_Type0_Code0.png" alt="" id="BLOGGER_PHOTO_ID_5168607093079093698" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;While in the reply, we can see “Type 0” and “Code 0”&lt;br /&gt;Type 0, means an “Echo Reply”, and “Type 0” as well has no codes related to it, that’s why we see “Code 0”&lt;br /&gt;&lt;br /&gt;Let’s try a ping that gives us an error, maybe we can see a different Type or Code&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_hJ8mrxrtvaI/R7qUyEaLMgI/AAAAAAAAA0c/MM7GMZYfFCs/s1600-h/Ping_Unreachable.png"&gt;&lt;img style="cursor: pointer;" src="http://bp3.blogger.com/_hJ8mrxrtvaI/R7qUyEaLMgI/AAAAAAAAA0c/MM7GMZYfFCs/s320/Ping_Unreachable.png" alt="" id="BLOGGER_PHOTO_ID_5168607110258962946" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Here I disabled on the router the Interface that leads to the LAN 172.16.0.0, so the Router replied to my machine 10.0.0.10 that the host 172.16.0.10 is unreachable&lt;br /&gt;Let’s see what ICMP message types and codes are generated here:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_hJ8mrxrtvaI/R7qUxUaLMdI/AAAAAAAAA0E/1T5GKDS2LHk/s1600-h/ICMP_Type3_Code1.png"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_hJ8mrxrtvaI/R7qUxUaLMdI/AAAAAAAAA0E/1T5GKDS2LHk/s320/ICMP_Type3_Code1.png" alt="" id="BLOGGER_PHOTO_ID_5168607097374061010" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Here we can see ICMP message “Type 3” which means “Destination Unreachable”, but let me ask you something, what was our destination? Was it a computer? Was it a network? Was it a port?&lt;br /&gt;This is what the code will indicate&lt;br /&gt;As we can see “Code 1”, means “HOST unreachable”, there are more codes for ICMP message “Type 3”:&lt;br /&gt;Code 0 = Net Unreachable&lt;br /&gt;Code 1 = Host Unreachable&lt;br /&gt;Code 2 = Protocol Unreachable&lt;br /&gt;Code 3 = Port Unreachable and so on…&lt;br /&gt;&lt;br /&gt;To see a list of all Types and all Codes, you can visit &lt;a href="http://www.iana.org/assignments/icmp-parameters"&gt;http://www.iana.org/assignments/icmp-parameters&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;NOW, we can start talking about our technique for today, Tracerouting, what is it? Why would I need it in hacking? How is it working?&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;What it Tracerouting?&lt;/span&gt;&lt;br /&gt;Tracerouting is the operation of sending packets with low TTL starting from TTL=1 and increasing by 1, till it reaches the required target. Chinese, huh? :)&lt;br /&gt;Let’s clarify that:&lt;br /&gt;Remember, I said that as soon as the TTL reaches zero, the packet is discarded. Let’s follow these steps:&lt;br /&gt;&lt;br /&gt;1- So, if “My computer” sends a packet with TTL=1, what will happen? The packet will make 1 hop to “router 01”, who will find that the TTL reached ZERO already, so the packet must be discarded at the first router and “My computer” will get an ICMP message “Type 11” which means “Time Exceeded”&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_hJ8mrxrtvaI/R7qVJkaLMoI/AAAAAAAAA1c/kU_QFTiLMV4/s1600-h/TTL%3D1.jpg"&gt;&lt;img style="cursor: pointer;" src="http://bp1.blogger.com/_hJ8mrxrtvaI/R7qVJkaLMoI/AAAAAAAAA1c/kU_QFTiLMV4/s320/TTL%3D1.jpg" alt="" id="BLOGGER_PHOTO_ID_5168607513985888898" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;2- Now, “My computer” will send another packet with TTL=2. What will happen is that the packet will hop to “router 01”, and then “router 02”, who will discard the packet because its TTL reached ZERO, and will send me the “Time Exceeded” message.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_hJ8mrxrtvaI/R7qVJUaLMnI/AAAAAAAAA1U/_H0Vxn0aAxU/s1600-h/TTL.jpg"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_hJ8mrxrtvaI/R7qVJUaLMnI/AAAAAAAAA1U/_H0Vxn0aAxU/s320/TTL.jpg" alt="" id="BLOGGER_PHOTO_ID_5168607509690921586" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;3- The same scenario will happen again and again till the packet reaches the destined computer “My Target”, who will finally reply to my request&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_hJ8mrxrtvaI/R7qVJkaLMpI/AAAAAAAAA1k/duR1Ypd7VT8/s1600-h/TTL%3D4.jpg"&gt;&lt;img style="cursor: pointer;" src="http://bp1.blogger.com/_hJ8mrxrtvaI/R7qVJkaLMpI/AAAAAAAAA1k/duR1Ypd7VT8/s320/TTL%3D4.jpg" alt="" id="BLOGGER_PHOTO_ID_5168607513985888914" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Now, I know now that I will keep sending packets to routers, and receiving “Time Exceeded” messages from these routers, till I finally reach the Target&lt;br /&gt;&lt;br /&gt;But, what will I gain from that? &lt;span style="font-weight: bold;"&gt;Why would a hacker need to use this technique?&lt;/span&gt;&lt;br /&gt;For attackers; Tracerouting is very useful in learning the network topology of the target, because you know what the routes that lead to it are, which router leads your target to the internet, besides being a device that can be attacked.&lt;br /&gt;For white hackers; Tracerouting can be used to track the attackers, know their location, and allow you to know which ISPs they use (in case you want to involve Law Enforcement)&lt;br /&gt;&lt;br /&gt;Now, it’s the Tools time :)&lt;br /&gt;There are 3 types of tools here:&lt;br /&gt;1- &lt;span style="font-weight: bold;"&gt;DOS-Like interfaces&lt;/span&gt; such as Tracert (for Windows users) and Traceroute (for Linux users)&lt;br /&gt;2- &lt;span style="font-weight: bold;"&gt;Graphical Interfaces&lt;/span&gt; such as VisualRoute (for Windows and Linux users) and GTrace (for Linux users)&lt;br /&gt;3- &lt;span style="font-weight: bold;"&gt;Web Sites&lt;/span&gt; that provide the service of Tracerouting, such as &lt;a href="http://member.dnsstuff.com/pages/tools.php"&gt;DNSStuff.com&lt;/a&gt; and &lt;a href="http://centralops.net/"&gt;CentralOps.net&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;From the Command prompt (using Tracert)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_hJ8mrxrtvaI/R7qU_UaLMlI/AAAAAAAAA1E/ksZaJq59rvE/s1600-h/Tracert.png"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_hJ8mrxrtvaI/R7qU_UaLMlI/AAAAAAAAA1E/ksZaJq59rvE/s320/Tracert.png" alt="" id="BLOGGER_PHOTO_ID_5168607337892229714" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;From the Linux Konsole (using Traceroute)&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_hJ8mrxrtvaI/R7qU-0aLMjI/AAAAAAAAA00/aL2gwM7SoeE/s1600-h/Traceroute.png"&gt;&lt;img style="cursor: pointer;" src="http://bp2.blogger.com/_hJ8mrxrtvaI/R7qU-0aLMjI/AAAAAAAAA00/aL2gwM7SoeE/s320/Traceroute.png" alt="" id="BLOGGER_PHOTO_ID_5168607329302295090" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;So, what’s happening now? We gained nothing from using either Tracert or Traceroute, because there is a router that is blocking the ICMP Time exceeded messages&lt;br /&gt;Before we start complaining, let’s Wireshark both of the command to see what is happening behind the scene&lt;br /&gt;&lt;br /&gt;This is the result of Tracert&lt;/span&gt;&lt;span&gt;:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_hJ8mrxrtvaI/R7qVJUaLMmI/AAAAAAAAA1M/sGs0B8rmkfU/s1600-h/Tracert_Wireshark.png"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_hJ8mrxrtvaI/R7qVJUaLMmI/AAAAAAAAA1M/sGs0B8rmkfU/s320/Tracert_Wireshark.png" alt="" id="BLOGGER_PHOTO_ID_5168607509690921570" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;While this is the result from Traceroute:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_hJ8mrxrtvaI/R7qU_EaLMkI/AAAAAAAAA08/iMyoZkBs9f0/s1600-h/Traceroute_Wireshark.png"&gt;&lt;img style="cursor: pointer;" src="http://bp3.blogger.com/_hJ8mrxrtvaI/R7qU_EaLMkI/AAAAAAAAA08/iMyoZkBs9f0/s320/Traceroute_Wireshark.png" alt="" id="BLOGGER_PHOTO_ID_5168607333597262402" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Tracert uses the ICMP protocol, and most of the Security Engineers know that ping and Tracert are 2 of the most important tools for hackers that are depending so much on the ICMP protocol, that’s why it is one of the first steps they do is to block ICMP messaging.&lt;br /&gt;While, Traceroute uses UDP plus random high port number in sending its Tracerouting packet. The reason for that is to avoid any ICMP filtering.&lt;br /&gt;&lt;br /&gt;But, what can we do, if our target is filtering both UDP and ICMP?&lt;br /&gt;Then I will quit hacking and find another job :)&lt;br /&gt;&lt;br /&gt;C’mon, let’s think a little bit, ICMP is blocked, and UDP is blocked as well.&lt;br /&gt;What is the other protocol that we can use for sending our Tracerouting packet?&lt;br /&gt;It’s TCP&lt;br /&gt;Yes, we can use TCP instead of UDP, because in most cases these firewalls which blocked the ICMP and UDP packets are permitting inbound TCP packets on specific ports, right? By sending out TCP SYN packets instead of UDP or ICMP ECHO packets, &lt;a href="http://michael.toren.net/code/tcptraceroute/"&gt;TCPtraceroute &lt;/a&gt;is able to bypass the most common firewall filters. Let’s try and see:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_hJ8mrxrtvaI/R7qU-kaLMhI/AAAAAAAAA0k/N0r0NkplVik/s1600-h/TCPtraceroute.png"&gt;&lt;img style="cursor: pointer;" src="http://bp1.blogger.com/_hJ8mrxrtvaI/R7qU-kaLMhI/AAAAAAAAA0k/N0r0NkplVik/s320/TCPtraceroute.png" alt="" id="BLOGGER_PHOTO_ID_5168607325007327762" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_hJ8mrxrtvaI/R7qU-0aLMiI/AAAAAAAAA0s/dNGQXX26PSc/s1600-h/TCPtraceroute_Wireshark.png"&gt;&lt;img style="cursor: pointer;" src="http://bp2.blogger.com/_hJ8mrxrtvaI/R7qU-0aLMiI/AAAAAAAAA0s/dNGQXX26PSc/s320/TCPtraceroute_Wireshark.png" alt="" id="BLOGGER_PHOTO_ID_5168607329302295074" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;WOW, did you see that? It worked! That is amazing.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The Lesson:&lt;/span&gt;&lt;br /&gt;Guys, do you remember when I said in the beginning of the article that there is an important lesson I want you to learn? Tracerouting was just 1 part of the lesson.&lt;br /&gt;Now it’s time to talk about the second part.&lt;br /&gt;Have you seen how are the hackers thinking?&lt;br /&gt;They found that the Security Engineers started to block ICMP Echo requests, so they &lt;span style="font-weight: bold;"&gt;thought &lt;/span&gt;and &lt;span style="font-weight: bold;"&gt;figured out&lt;/span&gt; a way to make it UDP based.&lt;br /&gt;And when they found that both are blocked now, they &lt;span style="font-weight: bold;"&gt;thought &lt;/span&gt;and &lt;span style="font-weight: bold;"&gt;developed &lt;/span&gt;a tool that uses TCP instead.&lt;br /&gt;What would have happened if this tool TCPtraceroute doesn’t exist, will we wait till somebody creates it for us? Will we wait till somebody thinks for us?&lt;br /&gt;Remember, my first article “&lt;a href="http://haymanezzeldin.blogspot.com/2008/01/hacking-mindset.html"&gt;Hacking – The Mindset&lt;/a&gt;”, I put a link there for an amazing article called “&lt;a href="http://www.catb.org/%7Eesr/faqs/hacker-howto.html"&gt;How to become a Hacker&lt;/a&gt;”. In this article, Eric Raymond said that the first basic skill for hackers is “&lt;a href="http://www.catb.org/%7Eesr/faqs/hacker-howto.html#skills1"&gt;Learn how to program&lt;/a&gt;”. Did you follow that? Did you start already? Or are you still a &lt;a href="http://en.wikipedia.org/wiki/Script_kiddie"&gt;Script Kiddies&lt;/a&gt;?&lt;br /&gt;&lt;br /&gt;Till next article,&lt;br /&gt;Please take care.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4046984248821087870-7964024662157959746?l=haymanezzeldin.blogspot.com'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/PenetrationTesting?a=_68rwtujxL8:VfVTEoSdFCY:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PenetrationTesting?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/PenetrationTesting?a=_68rwtujxL8:VfVTEoSdFCY:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PenetrationTesting?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PenetrationTesting/~4/_68rwtujxL8" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/PenetrationTesting/~3/_68rwtujxL8/tracerouting-and-lesson.html</link><author>noreply@blogger.com (Hayman Ezzeldin)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://bp0.blogger.com/_hJ8mrxrtvaI/R7qVJUaLMnI/AAAAAAAAA1U/_H0Vxn0aAxU/s72-c/TTL.jpg" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://haymanezzeldin.blogspot.com/2008/01/tracerouting-and-lesson.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4046984248821087870.post-5916821626824082671</guid><pubDate>Mon, 14 Jan 2008 10:35:00 +0000</pubDate><atom:updated>2008-02-19T09:29:26.979+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">3- Data Gathering</category><title>DNS and Tools</title><description>Do you have a good memory or a bad memory?&lt;br /&gt;If you have a bad one like me, then you will need this lesson, coz it will make life easier.&lt;br /&gt;And if you have a good one like me :), then you will need this lesson, to appreciate having one :).&lt;br /&gt;&lt;br /&gt;Which is easier to remember, 207.46.193.254 or www.microsoft.com?&lt;br /&gt;For sure it’s the second one, because human beings are comfort dealing and memorizing words other than digits.&lt;br /&gt;&lt;br /&gt;Which is easier to write in your Internet browser, 198.133.219.25 or www.cisco.com?&lt;br /&gt;Still the second, coz you still can remember few easy words more than remembering this long number, right?&lt;br /&gt;&lt;br /&gt;On the Internet, every machine has its unique IP Address (acts like an ID), and to access any resources that belong to this machine, you have to request it using the IP Address. And as I said, because it’s difficult for humans to remember a lot of long numbers and it is easier to remember names, the idea of “Naming Servers” was the solution. The simple concept behind “Naming Servers” is to have a list (like a database) that relates the resources physical addresses (IP Address) to the name of this resource.&lt;br /&gt;For example:&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Microsoft.com&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;www                      207.46.193.254&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;technet               207.46.16.252&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;support              64.4.52.254&lt;/span&gt;&lt;br /&gt;And so on…&lt;br /&gt;&lt;br /&gt;Open your Internet browser and instead of typing &lt;a href="http://technet.microsoft.com/"&gt;http://technet.microsoft.com&lt;/a&gt;, type &lt;a href="http://207.46.16.252/"&gt;http://207.46.16.252&lt;/a&gt;, you will find that both links direct you to the same link.&lt;br /&gt;&lt;br /&gt;Before we talk about how this translation happens, let’s discuss few things.&lt;br /&gt;1- You know these sites? (It’s not a must to know them; I’m just giving an example of the domains org, edu, gov, us…)&lt;br /&gt;www.unesco.org&lt;br /&gt;www.harvard.edu&lt;br /&gt;www.whitehouse.gov&lt;br /&gt;www.eccuni.us/&lt;br /&gt;2- You know trees, it is a root in the ground, out of the root there is a trunk that has a lot of branches and out of the branches there are more branches, and out of the branches you find leaves -may be not in the lower tree :).&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_hJ8mrxrtvaI/R7qQ_UaLMaI/AAAAAAAAAy0/oO8oJMwd79s/s1600-h/Tree_right.jpg"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_hJ8mrxrtvaI/R7qQ_UaLMaI/AAAAAAAAAy0/oO8oJMwd79s/s320/Tree_right.jpg" alt="" id="BLOGGER_PHOTO_ID_5168602939845718434" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Let’s put this tree upside down (Just keep it upside down for now :))&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_hJ8mrxrtvaI/R7qQ_kaLMbI/AAAAAAAAAy8/5GvQ37Rs_90/s1600-h/Tree_upside.JPG"&gt;&lt;img style="cursor: pointer;" src="http://bp1.blogger.com/_hJ8mrxrtvaI/R7qQ_kaLMbI/AAAAAAAAAy8/5GvQ37Rs_90/s320/Tree_upside.JPG" alt="" id="BLOGGER_PHOTO_ID_5168602944140685746" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;3- Name Servers or Domain Name Servers have a tree structure (hierarchy), at the top of the tree you find the “Root”, out of the root there are “&lt;span style="font-weight: bold;"&gt;Top Level Domains&lt;/span&gt; or &lt;span style="font-weight: bold;"&gt;TLD&lt;/span&gt;”, then out of the TLDs there are “&lt;span style="font-weight: bold;"&gt;Second Level Domains&lt;/span&gt; or &lt;span style="font-weight: bold;"&gt;SLD&lt;/span&gt;”&lt;br /&gt;The TLD is 2 types: &lt;span style="font-weight: bold;"&gt;gTLD&lt;/span&gt; which stand for “&lt;span style="font-weight: bold;"&gt;generic Top Level Domains&lt;/span&gt;”, and these are the domains .com (commercial), .edu (education), .gov (government), and so on. The second type is &lt;span style="font-weight: bold;"&gt;ccTLD&lt;/span&gt; which stand for “&lt;span style="font-weight: bold;"&gt;country code Top Level Domains&lt;/span&gt;”, and these are the domains that represents countries such as .de (Deutschland or Germany), .eg (Egypt), .us (USA), and so on.&lt;br /&gt;I’m sure after looking at the following figure, you will understand what I mean:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_hJ8mrxrtvaI/R7qQmEaLMSI/AAAAAAAAAx0/S2EYma_rwl0/s1600-h/DNS_Hierarchy.jpg"&gt;&lt;img style="cursor: pointer;" src="http://bp3.blogger.com/_hJ8mrxrtvaI/R7qQmEaLMSI/AAAAAAAAAx0/S2EYma_rwl0/s320/DNS_Hierarchy.jpg" alt="" id="BLOGGER_PHOTO_ID_5168602506054021410" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;As you can see in the previous figure, at the top of the hierarchy are the Root DNS Servers, they contain information about the next lower level which is TLD, there are 13 organization responsible for 13 Root DNS Servers around the world responsible for maintaining the DNS databases. To see the full list, visit the link &lt;a href="http://www.root-servers.org/"&gt;http://www.root-servers.org/&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The second level in the hierarchy is the TLD, which represents the DNS servers for the .com, .edu, .gov, .de, .eg, .us, …&lt;br /&gt;These servers contain information about the next lower level which is the SLD, such as microsoft, cisco, google, and so on. These SLDs are responsible themselves for maintaing their own DNS.&lt;br /&gt;&lt;br /&gt;Let’s take an example of a simple query to understand how is the process of “Name resolving” occurs:&lt;br /&gt;You are sitting at your computer in your office browsing the internet, when suddenly you got the idea to check what are the latest news of Microsoft. So you opened your browser and typed www.microsoft.com, here are the steps of what’s happening:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_hJ8mrxrtvaI/R7qQ1UaLMTI/AAAAAAAAAx8/_pWYpsF9JBQ/s1600-h/DNS_Query.jpg"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_hJ8mrxrtvaI/R7qQ1UaLMTI/AAAAAAAAAx8/_pWYpsF9JBQ/s320/DNS_Query.jpg" alt="" id="BLOGGER_PHOTO_ID_5168602768047026482" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;1- After you type “www.microsoft.com” in your web browser, your computer checks the local configuration file and the local cache to see if your machine already knows the IP address for the “www.microsoft.com”. If no information found, then your computer send a DNS request to the local DNS Server, asking “do you have the IP address for the machine “www.microsoft.com”? If the answer is “YES”, then we go immediately to step 8. If not, then step 2.&lt;br /&gt;2- The local DNS server already knows the 13 “Root DNS Servers” we talked about before, so he send his request to the “Root DNS Server”, asking the same question “do you have the IP address for the machine “www.microsoft.com”?&lt;br /&gt;3- If the “Root DNS Server” doesn’t have the information required, it sends a “Referral” to the next lower level (TLD) which in our case is the “com DNS Servers)&lt;br /&gt;4- The local DNS server sends the request to the “Referral” asking “do you have the IP address for the domain “microsoft.com”? There are 2 possibilities here; either the domain name exist or it doesn’t. If it doesn’t exist (as if there is no daomain at all called microsoft.com), then it sends the reply “Non-Existent Domain”. If the domain exist, then proceed to step 5&lt;br /&gt;5- If the “com DNS Server” doesn’t have the exact IP related to the request, it refers the local DNS server to the secondary level domain (which is microsoft.com).&lt;br /&gt;6- Now we are at the latest request, when your local DNS Server asks “microsoft.com” the same question “do you have the IP address for the machine “www.microsoft.com”?&lt;br /&gt;7- If the machine “www” exists in the DNS of Microsoft.com, then it immdeiately sends the IP resolution, and if this host doesn’t exist then it sends the reply “Non-Existent Domain”&lt;br /&gt;8- Whatever the response was in the 7th step, the local DNS sends it to your computer.&lt;br /&gt;&lt;br /&gt;OK, but how can this be beneficial for the hackers? What are they going to gain when they know the name resolving technique?&lt;br /&gt;Well, we said that the DNS is like a database (let’s call it &lt;span style="font-weight: bold;"&gt;ZONE&lt;/span&gt;) that hold a lot of records (let’s call it &lt;span style="font-weight: bold;"&gt;Resource Records&lt;/span&gt;) such as hosts (names and IPs) and services (ftp, www…), imagine this information fell into the hands of the bad guys, a bad guy who has the names and the IPs of all my machines in my domain, and all of the services that are connected to the Internet :)&lt;br /&gt;I think any hacker would burn to get such data.&lt;br /&gt;&lt;br /&gt;Let’s look at these records closely:&lt;br /&gt;1- &lt;span style="font-weight: bold;"&gt;SOA&lt;/span&gt; (&lt;span style="font-weight: bold;"&gt;Start Of Authority&lt;/span&gt;): This is a manadatory record that must exist in every zone. It tells you which server is the “Primary Server”, how do the “Secondary Servers” get updated, your contact information, and the default “Time To Live” for your DNS records.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_hJ8mrxrtvaI/R7qQ_EaLMZI/AAAAAAAAAys/lzSwpO0lrtA/s1600-h/SOA.png"&gt;&lt;img style="cursor: pointer;" src="http://bp3.blogger.com/_hJ8mrxrtvaI/R7qQ_EaLMZI/AAAAAAAAAys/lzSwpO0lrtA/s320/SOA.png" alt="" id="BLOGGER_PHOTO_ID_5168602935550751122" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;2- &lt;span style="font-weight: bold;"&gt;NS&lt;/span&gt; (&lt;span style="font-weight: bold;"&gt;Name Server&lt;/span&gt;): These are the servers that contain a complete copy of the domain’s zone (Authoritative Servers)&lt;br /&gt;3- &lt;span style="font-weight: bold;"&gt;MX&lt;/span&gt; (&lt;span style="font-weight: bold;"&gt;Mail eXvhange&lt;/span&gt;): These are the mail servers in the zone&lt;br /&gt;4- &lt;span style="font-weight: bold;"&gt;A&lt;/span&gt; (&lt;span style="font-weight: bold;"&gt;Address&lt;/span&gt;): These are the records that represent the hosts in the zone and their related IP addresses.&lt;br /&gt;5- &lt;span style="font-weight: bold;"&gt;AAAA&lt;/span&gt; (&lt;span style="font-weight: bold;"&gt;Quad A&lt;/span&gt;): These are the records that represent the hosts in the zone that use IPv6&lt;br /&gt;6- &lt;span style="font-weight: bold;"&gt;CNAME&lt;/span&gt; (&lt;span style="font-weight: bold;"&gt;Canonical Name&lt;/span&gt;): DNS database can hold the real name of the host, or an alias (Canonical Name), for example you might have a host on your domain that is called in real WEB01.mydomain.com (this is the A record for example), this host holds the webpage of your company and you don’t want the people outside your company to access the website by typing web01.mydomain.com, you want them to access by typing www.mydomain.com. So in this case, your DNS holds web01 as an A record, and www as an alias (CNAME) for web01.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_hJ8mrxrtvaI/R7qQ-0aLMYI/AAAAAAAAAyk/cxuZeJEv8Uw/s1600-h/RR.png"&gt;&lt;img style="cursor: pointer;" src="http://bp2.blogger.com/_hJ8mrxrtvaI/R7qQ-0aLMYI/AAAAAAAAAyk/cxuZeJEv8Uw/s320/RR.png" alt="" id="BLOGGER_PHOTO_ID_5168602931255783810" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Now, how do we attack the DNS server of our target to resolve this information (or as it’s called “&lt;span style="font-weight: bold;"&gt;Zone Transfer&lt;/span&gt;”), which is so valuable for us?&lt;br /&gt;Do you remember the last lesson (&lt;a href="http://haymanezzeldin.blogspot.com/2008/01/whois.html"&gt;Whois&lt;/a&gt;), we were able to get the IP addresses of the DNS servers for any target (Primary and Secondary), right? So this is how we are going to start resolving the DNS records&lt;br /&gt;&lt;br /&gt;2 of the common tools in this area are &lt;span style="font-weight: bold;"&gt;NSLookup&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;DIG&lt;/span&gt; (both can be used the same way on Windows and Linux), although DIG is not packaged with the Windows OS, but there is a workaround to have it on a Windows box.&lt;br /&gt;&lt;br /&gt;Here’s an NSLookup output:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_hJ8mrxrtvaI/R7qQ1kaLMUI/AAAAAAAAAyE/UJ7txVBYKH0/s1600-h/NSLookup.png"&gt;&lt;img style="cursor: pointer;" src="http://bp1.blogger.com/_hJ8mrxrtvaI/R7qQ1kaLMUI/AAAAAAAAAyE/UJ7txVBYKH0/s320/NSLookup.png" alt="" id="BLOGGER_PHOTO_ID_5168602772341993794" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;And the output in Wireshark (Protocol Analyzer) would be the following:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_hJ8mrxrtvaI/R7qQ2EaLMXI/AAAAAAAAAyc/ANx21h07SiY/s1600-h/NSLookup_Query.png"&gt;&lt;img style="cursor: pointer;" src="http://bp3.blogger.com/_hJ8mrxrtvaI/R7qQ2EaLMXI/AAAAAAAAAyc/ANx21h07SiY/s320/NSLookup_Query.png" alt="" id="BLOGGER_PHOTO_ID_5168602780931928434" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The first line represent the “Query”&lt;br /&gt;Let’s look at it:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_hJ8mrxrtvaI/R7qQ10aLMVI/AAAAAAAAAyM/rinNozulKBk/s1600-h/NSLookup_DNS_Query.png"&gt;&lt;img style="cursor: pointer;" src="http://bp2.blogger.com/_hJ8mrxrtvaI/R7qQ10aLMVI/AAAAAAAAAyM/rinNozulKBk/s320/NSLookup_DNS_Query.png" alt="" id="BLOGGER_PHOTO_ID_5168602776636961106" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The second line represents the “Answer” of the query&lt;br /&gt;Let’s look at it as well:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_hJ8mrxrtvaI/R7qQ2EaLMWI/AAAAAAAAAyU/xsyp53N90-U/s1600-h/NSLookup_DNS_Response.png"&gt;&lt;img style="cursor: pointer;" src="http://bp3.blogger.com/_hJ8mrxrtvaI/R7qQ2EaLMWI/AAAAAAAAAyU/xsyp53N90-U/s320/NSLookup_DNS_Response.png" alt="" id="BLOGGER_PHOTO_ID_5168602780931928418" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Here’s a DIG output:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_hJ8mrxrtvaI/R7qQlkaLMOI/AAAAAAAAAxU/nfeYlkSPiao/s1600-h/DIG.png"&gt;&lt;img style="cursor: pointer;" src="http://bp1.blogger.com/_hJ8mrxrtvaI/R7qQlkaLMOI/AAAAAAAAAxU/nfeYlkSPiao/s320/DIG.png" alt="" id="BLOGGER_PHOTO_ID_5168602497464086754" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;And the output in Wireshark (Protocol Analyzer) would be the following:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_hJ8mrxrtvaI/R7qQmEaLMRI/AAAAAAAAAxs/30AfkgLAa1g/s1600-h/DIG_Query.png"&gt;&lt;img style="cursor: pointer;" src="http://bp3.blogger.com/_hJ8mrxrtvaI/R7qQmEaLMRI/AAAAAAAAAxs/30AfkgLAa1g/s320/DIG_Query.png" alt="" id="BLOGGER_PHOTO_ID_5168602506054021394" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The first line represent the “Query”&lt;br /&gt;Let’s look at it:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_hJ8mrxrtvaI/R7qQl0aLMPI/AAAAAAAAAxc/Qhm2NpoSXZw/s1600-h/DIG_DNS_Query.png"&gt;&lt;img style="cursor: pointer;" src="http://bp2.blogger.com/_hJ8mrxrtvaI/R7qQl0aLMPI/AAAAAAAAAxc/Qhm2NpoSXZw/s320/DIG_DNS_Query.png" alt="" id="BLOGGER_PHOTO_ID_5168602501759054066" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The second line represents the “Answer” of the query&lt;br /&gt;Let’s look at it as well:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_hJ8mrxrtvaI/R7qQl0aLMQI/AAAAAAAAAxk/FYiOspxtrKg/s1600-h/DIG_DNS_Response.png"&gt;&lt;img style="cursor: pointer;" src="http://bp2.blogger.com/_hJ8mrxrtvaI/R7qQl0aLMQI/AAAAAAAAAxk/FYiOspxtrKg/s320/DIG_DNS_Response.png" alt="" id="BLOGGER_PHOTO_ID_5168602501759054082" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I know, it’s a lot of outputs that need to be analyzed, but believe me, all you need is to practice it yourself and compare results, then you will be able to understand what is going behind the scenes.&lt;br /&gt;&lt;br /&gt;2 things I would like to do after reading this article:&lt;br /&gt;The first thing is to understand the first part (where I’m discussing how DNS works and the process of name resolving) of this article perfectly.&lt;br /&gt;Second, try to understand the syntax of both command “&lt;a href="http://www.kloth.net/services/nslookup-man.php"&gt;NSLookup&lt;/a&gt;” and “&lt;a href="http://www.kloth.net/services/dig-man.php"&gt;DIG&lt;/a&gt;”, and try all the options till you master the 2 command (I would prefer if you master the “DIG” more than mastering “NSLookup”)&lt;br /&gt;&lt;br /&gt;I created 1 video, that represents the usage of NSLookup and DIG (as a DNS zone transfer tools) and Wireshark (as a protocol analyzing tool) to see in details what happens behind the scenes&lt;br /&gt;&lt;br /&gt;Download an AVI version here: &lt;a href="http://www.megaupload.com/?d=K8B45DWD"&gt;&lt;span style="font-weight: bold;"&gt;http://www.megaupload.com/&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;Download a Flash version here: &lt;a style="font-weight: bold;" href="http://www.4shared.com/file/34895994/24d9f574/DNS_Lookup.html"&gt;http://www.4shared.com/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;DIG on Windows:&lt;/span&gt;&lt;br /&gt;Because “DIG” is not included in the Windows OS, so we have to do it ourselves, and here are the steps to have “DIG” on your Windows OS:&lt;br /&gt;1- Download the BIND Package (this is equal to the Windows DNS Software, but originally is for Linux) which is called “&lt;span style="font-style: italic;"&gt;Windows 2000/XP/2003 Binary Kit&lt;/span&gt;” from the location &lt;a href="http://www.isc.org/index.pl?/sw/bind/index.php"&gt;http://www.isc.org/index.pl?/sw/bind/index.php&lt;/a&gt;&lt;br /&gt;2- Create a Folder on your C:\ Drive and let’s name it “DIG”&lt;br /&gt;3- Extract these 7 files from the package downloaded into the folder created in the previous step:&lt;br /&gt;a- dig.exe&lt;br /&gt;b- libbind9.dll&lt;br /&gt;c- libdns.dll&lt;br /&gt;d- libeay32.dll&lt;br /&gt;e- libisc.dll&lt;br /&gt;f- libisccfg.dll&lt;br /&gt;g- liblwres.dll&lt;br /&gt;&lt;br /&gt;4- Open your command prompt and change your directory to the Folder created in step 2, so that your command is “C:\DIG”&lt;br /&gt;5- Type “dig –help” and start playing with the options.&lt;br /&gt;&lt;br /&gt;Till next article,&lt;br /&gt;Please take care.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4046984248821087870-5916821626824082671?l=haymanezzeldin.blogspot.com'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/PenetrationTesting?a=Yf3oTMX3tZc:ViJKq9pcWn4:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PenetrationTesting?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/PenetrationTesting?a=Yf3oTMX3tZc:ViJKq9pcWn4:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PenetrationTesting?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PenetrationTesting/~4/Yf3oTMX3tZc" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/PenetrationTesting/~3/Yf3oTMX3tZc/dns-and-tools.html</link><author>noreply@blogger.com (Hayman Ezzeldin)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://bp0.blogger.com/_hJ8mrxrtvaI/R7qQ_UaLMaI/AAAAAAAAAy0/oO8oJMwd79s/s72-c/Tree_right.jpg" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://haymanezzeldin.blogspot.com/2008/01/dns-and-tools.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4046984248821087870.post-294525566937525345</guid><pubDate>Thu, 10 Jan 2008 08:56:00 +0000</pubDate><atom:updated>2008-02-19T09:12:05.005+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">3- Data Gathering</category><title>Whois</title><description>We all know now how to find the website for any hacking target; for example if I said “can you find the website for Microsoft?” :)&lt;br /&gt;I’m sure you will be laughing and saying “HAHAHA, hey man, that’s a piece of cake, I’m the best penetration tester, remember?” :)&lt;br /&gt;&lt;br /&gt;Now, we are going to get some more information that is so much valuable for any tester, it is information the target put it himself on the internet for you to use!!!&lt;br /&gt;Can you believe that? Yes, the target put this information himself.&lt;br /&gt;&lt;br /&gt;But, what kind of information is it? It might not be that important. Let’s see, and I will let you judge it yourself.&lt;br /&gt;&lt;br /&gt;Our tool (or let’s call it Protocol) is &lt;span style="font-weight: bold;"&gt;Whois&lt;/span&gt;!!&lt;br /&gt;You would say: “Oh ya, I heard about this tool before, I think there are websites that has a service called “Whois”, where you type the name of the target, and you get some information about it, right?”&lt;br /&gt;So I would answer: “Ok, your answer includes a right part, but it’s not all right, let’s see why”&lt;br /&gt;&lt;br /&gt;First, we will see what “Whois” exactly is :), and then analyze how it works, and then we can see one of these sites that afford the “Whois” service.&lt;br /&gt;“Whois” is a &lt;span style="font-weight: bold;"&gt;TCP-based protocol&lt;/span&gt; that uses the &lt;span style="font-weight: bold;"&gt;Server/Client&lt;/span&gt; model, and this “Whois” is used to query databases to get us information about our target (Domain, IP, Networks, etc.)&lt;br /&gt;I know that some of what I said is Chinese :), so let’s translate it.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Protocol:&lt;/span&gt; Originated from the Greek word “Protocollon” and this is a leaf of paper that is glued to a manuscript that describes its contents. So, for computers to communicate with each other they need a way to talk, this way of talking is described by the “Protocollon” which tells us what the rules that enable them to communicate and talk are.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;TCP-based protocol:&lt;/span&gt; TCP is one of the protocols that provide reliable communication between computers. For example, imagine that you and I are computers, I want to teach you hacking, so I use a way of communication that makes me SURE that you understood what I am saying.&lt;br /&gt;So I would say: “Hey you, here’s the lesson of today, it’s about Whois. Did you get it?&lt;br /&gt;You would answer: “Yes, I did get it, it’s easy.”&lt;br /&gt;So I would say: “Are you sure you understood it ALL?&lt;br /&gt;If you say “Yes”, that I made SURE that my lesson got to you and that you have no problems, but if you said “NO” then I have to teach you again the missing part. This is how TCP (in an extremely simple way) works.&lt;br /&gt;So, did you get my definition? :)&lt;br /&gt;Are you sure? :)&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Port:&lt;/span&gt; I will give you an analogy first, and then we will say the technical definition for port.&lt;br /&gt;If I want to tell you something, how can I tell you? Phone, Email, Letter, Meeting you...&lt;br /&gt;There are so many ways to reach you, but if I want to send you a letter, then the only way to send it is through the mail system that will deliver it to your mailbox (in this case, your mailbox acts like a port), but if I want to hear your voice then I would call you by phone (in this case, your phone acts like a port), but is it possible to hear you voice in a mail that will be delivered to your mailbox? NO, because the phone port is special for voice communication, while the mail system is used for writing communication.&lt;br /&gt;&lt;br /&gt;This is the same with computers, if they want to communicate; they have to choose the right port for their communication, for example if my website located on a web server that is designed to let people access the website through port 80. Can you say “No, I want to access this website through port 81”? No you can’t, coz at this moment the server will not get your request. Got it?&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Flag:&lt;/span&gt; Do you the “Punctuations” we use in writing? Yes, the “Commas”, “Fullstops”, “Question marks”…&lt;br /&gt;If I want to “START” a sentence, I start with capital letters&lt;br /&gt;If I want to add a small pause, I will put a comma, and then I will complete talking&lt;br /&gt;If I want to finish my sentence, I will put a fullstop.&lt;br /&gt;Flags are like that exactly, for computers to communicate, how does your computer know when my computer wants to transfer you a file? How does your computer know if my computer finished sending the file? Through flags, let’s look at this figure to understand how a TCP connection starts and ends&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_hJ8mrxrtvaI/R7qN5UaLMNI/AAAAAAAAAws/dyIl3UmAxfQ/s1600-h/WhoisComm.jpg"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_hJ8mrxrtvaI/R7qN5UaLMNI/AAAAAAAAAws/dyIl3UmAxfQ/s320/WhoisComm.jpg" alt="" id="BLOGGER_PHOTO_ID_5168599538231619794" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Here, we are discussing how the “Whois client” communicates with the “Whois server” to ask about a domain called “Cisco.com”.&lt;br /&gt;1- My computer (Whois client) send a message from &lt;span style="font-weight: bold;"&gt;RANDOM PORT NUMBER&lt;/span&gt; flagged “SYN” or “Synchronize” to &lt;span style="font-weight: bold;"&gt;PORT 43&lt;/span&gt; meaning “I want to &lt;span style="font-weight: bold;"&gt;Start a communication&lt;/span&gt; with you”&lt;br /&gt;2- The (Whois server) replies from &lt;span style="font-weight: bold;"&gt;PORT 43&lt;/span&gt; with a message flagged “SYN / ACK” or “Synchronize / Acknowledgment” meaning “OK, I &lt;span style="font-weight: bold;"&gt;Got&lt;/span&gt; your message. And I would like to make a communication with you as well on the &lt;span style="font-weight: bold;"&gt;RANDOM PORT&lt;/span&gt; you chose”&lt;br /&gt;3- My machine (Whois client) send a message flagged “ACK” meaning “OK, I &lt;span style="font-weight: bold;"&gt;Got&lt;/span&gt; your approval”&lt;br /&gt;At this moment, the &lt;span style="font-weight: bold;"&gt;TCP connection between the client and the server is established&lt;/span&gt;&lt;br /&gt;4- My computer “Whois client” pushes its request flagged “PSH” or “Push” meaning “I have a question that is high &lt;span style="font-weight: bold;"&gt;Priority&lt;/span&gt; and deserves care”&lt;br /&gt;5- The (Whois server) replies with an “ACK” confirming the receiving.&lt;br /&gt;6- Then it starts pushing the answer of my request “PSH”, and using the PSH flag to show me priority.&lt;br /&gt;7- After the (Whois server) finishes sending the answer, there is no need to keep the connection opened, so it sends a “FIN” flag meaning “I finished now, and I want to &lt;span style="font-weight: bold;"&gt;END&lt;/span&gt;”&lt;br /&gt;8- My computer agrees for the termination in 2 steps, 1st is an “ACK” saying “OK, I got your request for terminating”, then the 2nd “FIN / ACK” says “I would like to terminate as well”&lt;br /&gt;9- The “Whois server” confirms &lt;span style="font-weight: bold;"&gt;terminating the connection&lt;/span&gt; through an “ACK” flag.&lt;br /&gt;&lt;br /&gt;By now, we know exactly what is going behind the scenes when we use the “Whois” query.&lt;br /&gt;&lt;br /&gt;Now, let’s talk a little bit about something else; you decided to have your own company, and you want to have your own domain my-own-company.com, what are the steps to do that?&lt;br /&gt;1- First, you have to see if this name is available or not, as it might be registered already for someone else&lt;br /&gt;2- If you find it available, then you start the registration process, by paying the annual fees and registering your personal details (in case of any communication between you and the &lt;a href="http://en.wikipedia.org/wiki/Regional_Internet_Registries"&gt;registries&lt;/a&gt;) with the registry you belong to, there are 5 international registries, and each one of them is responsible for IP Regions:&lt;br /&gt;- &lt;span style="font-weight: bold;"&gt;American Registry for Internet Numbers&lt;/span&gt; (&lt;a href="http://www.arin.net/"&gt;ARIN&lt;/a&gt;) – responsible for the North America region&lt;br /&gt;- &lt;span style="font-weight: bold;"&gt;Réseaux IP Européens Network Coordination Centre&lt;/span&gt; (&lt;a href="http://www.ripe.net/"&gt;RIPE NCC&lt;/a&gt;) – responsible for the EMEA and Central Asia region&lt;br /&gt;- &lt;span style="font-weight: bold;"&gt;Asia-Pacific Network Information Centre&lt;/span&gt; (&lt;a href="http://www.apnic.net/"&gt;APNIC&lt;/a&gt;) – responsible for Asia and Pacific region&lt;br /&gt;- &lt;span style="font-weight: bold;"&gt;Latin American and Caribbean Internet Addresses Registry&lt;/span&gt; (&lt;a href="http://www.lacnic.net/"&gt;LACNIC&lt;/a&gt;) – responsible for Latin America and Caribbean region&lt;br /&gt;- &lt;span style="font-weight: bold;"&gt;African Network Information Centre&lt;/span&gt; (&lt;a href="http://www.afrinic.net/"&gt;AfriNIC&lt;/a&gt;) – responsible for Africa region.&lt;br /&gt;3- Now, you get your domain name and you can start using it, while the registry adds your info to a database (exactly, this is what we extract when we use Whois)&lt;br /&gt;&lt;br /&gt;I know, I know, you are burning to start playing with the tools, right?&lt;br /&gt;OK, Whois tools are 3 types:&lt;br /&gt;1- &lt;span style="font-weight: bold;"&gt;DOS-Like interfaces&lt;/span&gt; (for Windows users), or Konsole (for Linux users)&lt;br /&gt;2- &lt;span style="font-weight: bold;"&gt;Graphical interfaces&lt;/span&gt; (such as Smart Whois, or Sam Spade)&lt;br /&gt;3- &lt;span style="font-weight: bold;"&gt;Web sites&lt;/span&gt; that provide the online Whois service (my favorite is “Domaintools.com”)&lt;br /&gt;&lt;br /&gt;Let’s see the results of each one&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;From the command prompt (using the Whois tool from &lt;a href="http://www.microsoft.com/technet/sysinternals/utilities/Whois.mspx"&gt;Sysinternals&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_hJ8mrxrtvaI/R7qNxEaLMJI/AAAAAAAAAwM/2QKKjf-Akh8/s1600-h/Whois_DOS.png"&gt;&lt;img style="cursor: pointer;" src="http://bp3.blogger.com/_hJ8mrxrtvaI/R7qNxEaLMJI/AAAAAAAAAwM/2QKKjf-Akh8/s320/Whois_DOS.png" alt="" id="BLOGGER_PHOTO_ID_5168599396497698962" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;From the GUI of “&lt;a href="http://www.tamos.com/products/smartwhois/"&gt;Smart Whois&lt;/a&gt;”&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_hJ8mrxrtvaI/R7qN5EaLMMI/AAAAAAAAAwk/Gyolng67Y_U/s1600-h/Whois_SmartWhois.png"&gt;&lt;img style="cursor: pointer;" src="http://bp3.blogger.com/_hJ8mrxrtvaI/R7qN5EaLMMI/AAAAAAAAAwk/Gyolng67Y_U/s320/Whois_SmartWhois.png" alt="" id="BLOGGER_PHOTO_ID_5168599533936652482" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Note1: When I was installing “Smart Whois” I got this message:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_hJ8mrxrtvaI/R7qNwUaLMHI/AAAAAAAAAv8/ji_6AxsK0Ig/s1600-h/SmartWhois_Port.png"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_hJ8mrxrtvaI/R7qNwUaLMHI/AAAAAAAAAv8/ji_6AxsK0Ig/s320/SmartWhois_Port.png" alt="" id="BLOGGER_PHOTO_ID_5168599383612797042" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Have you noticed that the port used is TCP 43?&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;From the Web Site “&lt;a href="http://www.domaintools.com/"&gt;domaintools&lt;/a&gt;”&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_hJ8mrxrtvaI/R7qNw0aLMII/AAAAAAAAAwE/5nVbnzM3f4Q/s1600-h/Whois_domaintools.png"&gt;&lt;img style="cursor: pointer;" src="http://bp2.blogger.com/_hJ8mrxrtvaI/R7qNw0aLMII/AAAAAAAAAwE/5nVbnzM3f4Q/s320/Whois_domaintools.png" alt="" id="BLOGGER_PHOTO_ID_5168599392202731650" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;From the Linux Konsole&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_hJ8mrxrtvaI/R7qNxEaLMKI/AAAAAAAAAwU/acjx03DeqUw/s1600-h/Whois_Linux01.png"&gt;&lt;img style="cursor: pointer;" src="http://bp3.blogger.com/_hJ8mrxrtvaI/R7qNxEaLMKI/AAAAAAAAAwU/acjx03DeqUw/s320/Whois_Linux01.png" alt="" id="BLOGGER_PHOTO_ID_5168599396497698978" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_hJ8mrxrtvaI/R7qNxUaLMLI/AAAAAAAAAwc/5DC9ABP8xb0/s1600-h/Whois_Linux02.png"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_hJ8mrxrtvaI/R7qNxUaLMLI/AAAAAAAAAwc/5DC9ABP8xb0/s320/Whois_Linux02.png" alt="" id="BLOGGER_PHOTO_ID_5168599400792666290" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Please compare the results, to see how much important we can get from just 1 tool (Whois)&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;IP addresses&lt;/span&gt; (can be used in almost every attack)&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Email addresses&lt;/span&gt; (can be used for example in Social Engineering attacks, delivering viruses or Rootkits…)&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Phone and Fax Numbers&lt;/span&gt; (can be used for example in Social Engineering attacks, Wardriving…)&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Contact persons&lt;/span&gt; (can be used in Social Engineering, retrieving username naming methodology&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Location Address&lt;/span&gt; (can be used for example in Physical Attacks, dumpster diving, Social Engineering…)&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Naming Servers&lt;/span&gt; (can be used for example in DNS Flooding, IP Attacks…)&lt;br /&gt;The more you search, the more information you would get to start the perfect attack :)&lt;br /&gt;&lt;br /&gt;I created 2 videos, that represent the usage of Whois (as a Whois query tool) and Wireshark (as a protocol analyzing tool) to see in details what happens behind the scenes&lt;br /&gt;&lt;br /&gt;For Linux users:&lt;br /&gt;&lt;br /&gt;&lt;object height="355" width="425"&gt;&lt;param name="movie" value="http://www.youtube.com/v/BirHnYdgLPU&amp;amp;rel=0&amp;amp;color1=0x006699&amp;amp;color2=0x54abd6&amp;amp;border=0"&gt;&lt;param name="wmode" value="transparent"&gt;&lt;embed src="http://www.youtube.com/v/BirHnYdgLPU&amp;amp;rel=0&amp;amp;color1=0x006699&amp;amp;color2=0x54abd6&amp;amp;border=0" type="application/x-shockwave-flash" wmode="transparent" height="355" width="425"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;Download an AVI version here: &lt;a style="font-weight: bold;" href="http://www.megaupload.com/?d=WR5835SU"&gt;http://www.megaupload.com/&lt;/a&gt;&lt;br /&gt;Download a Flash version here:&lt;span style="text-decoration: underline;"&gt; &lt;/span&gt;&lt;a style="font-weight: bold;" href="http://www.4shared.com/file/34869782/16b96463/Whois_Linux.html"&gt;http://www.4shared.com/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;For Windows users:&lt;br /&gt;&lt;br /&gt;&lt;object height="355" width="425"&gt;&lt;param name="movie" value="http://www.youtube.com/v/a9AUo-FXfBg&amp;amp;rel=0&amp;amp;color1=0x006699&amp;amp;color2=0x54abd6&amp;amp;border=0"&gt;&lt;param name="wmode" value="transparent"&gt;&lt;embed src="http://www.youtube.com/v/a9AUo-FXfBg&amp;amp;rel=0&amp;amp;color1=0x006699&amp;amp;color2=0x54abd6&amp;amp;border=0" type="application/x-shockwave-flash" wmode="transparent" height="355" width="425"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;Download an AVI version here: &lt;a href="http://www.megaupload.com/?d=QOSOD68V"&gt;&lt;span style="font-weight: bold;"&gt;http://www.megaupload.com/&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;Download a Flash version here: &lt;a style="font-weight: bold;" href="http://www.4shared.com/file/34869197/7b45dd1f/Whois_Win.html"&gt;http://www.4shared.com/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Sorry for making it a long article, but I wanted to clarify every single bit.&lt;br /&gt;Till next article,&lt;br /&gt;Please take care.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4046984248821087870-294525566937525345?l=haymanezzeldin.blogspot.com'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/PenetrationTesting?a=JN9YrF-Af_Q:S_u3lrlomKs:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PenetrationTesting?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/PenetrationTesting?a=JN9YrF-Af_Q:S_u3lrlomKs:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PenetrationTesting?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PenetrationTesting/~4/JN9YrF-Af_Q" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/PenetrationTesting/~3/JN9YrF-Af_Q/whois.html</link><author>noreply@blogger.com (Hayman Ezzeldin)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://bp0.blogger.com/_hJ8mrxrtvaI/R7qN5UaLMNI/AAAAAAAAAws/dyIl3UmAxfQ/s72-c/WhoisComm.jpg" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://haymanezzeldin.blogspot.com/2008/01/whois.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4046984248821087870.post-7440552247149741068</guid><pubDate>Mon, 07 Jan 2008 11:52:00 +0000</pubDate><atom:updated>2008-02-19T08:40:46.124+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">3- Data Gathering</category><title>Google Hacking</title><description>No, No, don’t get me wrong, the title doesn’t mean that we are going to hack Google :) We are trying to use Google.com search engine in extracting important data that would help us in hacking. Do you remember last article when we were discussing “Search Engines” and the way they create indexes for any key word that resides on any website? Today, we are going to use these indexes in looking for some important information.&lt;br /&gt;&lt;br /&gt;Normally, if you want to search for a “keyword”, all what you have to do is type the keyword in the “Search Box”; this will get us thousands and thousands of pages that include our “keyword”. The words which we typed in the “Search Box” are considered a “&lt;strong&gt;Query&lt;/strong&gt;”. To improve this search technique, we are going to use special words or “&lt;strong&gt;Operators&lt;/strong&gt;” in the “Search Box”&lt;br /&gt;&lt;br /&gt;Before we start talking about these operators and how to use them in hacking, let’s look at the Google interface.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://bp0.blogger.com/_hJ8mrxrtvaI/R7p5fUaLMBI/AAAAAAAAAuw/2UrWKxkOjbY/s1600-h/GP.png"&gt;&lt;img id="BLOGGER_PHOTO_ID_5168577101322465298" style="" alt="" src="http://bp0.blogger.com/_hJ8mrxrtvaI/R7p5fUaLMBI/AAAAAAAAAuw/2UrWKxkOjbY/s320/GP.png" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;1- &lt;span style="font-weight: bold;"&gt;Page title&lt;/span&gt;&lt;br /&gt;2- &lt;span style="font-weight: bold;"&gt;URL:&lt;/span&gt; The web address of the selected page.&lt;br /&gt;3- &lt;span style="font-weight: bold;"&gt;Search Box:&lt;/span&gt; This is where you type your query.&lt;br /&gt;4- &lt;span style="font-weight: bold;"&gt;Number Range:&lt;/span&gt; How many results to be shown per page.&lt;br /&gt;5- File Type or Extension&lt;br /&gt;6- &lt;span style="font-weight: bold;"&gt;Link to cached version of page:&lt;/span&gt; This is a clickable link that will show you the version of the web page that is saved in Google’s cache.&lt;br /&gt;7- &lt;span style="font-weight: bold;"&gt;Link to similar pages:&lt;/span&gt; These are the pages that Google thinks have a lot in common with the listed page.&lt;br /&gt;8- &lt;span style="font-weight: bold;"&gt;Text:&lt;/span&gt; This is an excerpt from the associated web page and it might be the first few lines of the text in the page.&lt;br /&gt;9- &lt;span style="font-weight: bold;"&gt;Size:&lt;/span&gt; The size in Kilobytes for the selected page&lt;br /&gt;&lt;br /&gt;Google used the previous definitions in creating some operators that would help us refining our search, the simplest format for using these operators is “Operator:Search_term”.&lt;br /&gt;&lt;br /&gt;Let’s see an example:&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;We would like to search for the web pages that discuss hacking, and at the same time the word “Tutorial” is in the page’s title&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;1- We are searching for the word “Hacking”, so the first part of the query is (&lt;a href="http://www.google.de/search?hl=en&amp;amp;q=hacking&amp;amp;meta="&gt;&lt;span style="font-family:courier new;"&gt;Hacking&lt;/span&gt;&lt;/a&gt;)&lt;br /&gt;2- Second, we want to filter our search by selecting only the pages that contain the word (Tutorial) in the page title. So the second part of the query will be (&lt;a href="http://www.google.de/search?hl=en&amp;amp;q=intitle%3Atutorial&amp;amp;meta="&gt;&lt;span style="font-family:courier new;"&gt;intitle:tutorial&lt;/span&gt;&lt;/a&gt;)&lt;br /&gt;3- Result: &lt;a href="http://www.google.de/search?hl=en&amp;amp;q=hacking+intitle%3Atutorial&amp;amp;meta="&gt;&lt;span style="font-family:courier new;"&gt;hacking intitle:tutorial&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Note1: &lt;span style="color: rgb(255, 0, 0);"&gt;Open any of the results and check, you will see that the word “Hacking” is included in the page (anywhere), while the word “Tutorial” is in the “Page Title” of every single result.&lt;/span&gt;&lt;br /&gt;Note2: &lt;span style="color: rgb(255, 0, 0);"&gt;Look at the number of results; you will see that the query refined our search result from 59,800,000 pages (the previous image) to 188,000 pages (the following image)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://bp1.blogger.com/_hJ8mrxrtvaI/R7p5fkaLMDI/AAAAAAAAAvA/-kBBD6FrJlQ/s1600-h/IR.png"&gt;&lt;img id="BLOGGER_PHOTO_ID_5168577105617432626" style="" alt="" src="http://bp1.blogger.com/_hJ8mrxrtvaI/R7p5fkaLMDI/AAAAAAAAAvA/-kBBD6FrJlQ/s320/IR.png" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Let’s take another example:&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;We want to do the same last query, plus looking for the word “Windows” in the URL of our results&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;1- We will type in the search box the same query like the previous example (&lt;a style="font-family: courier new;" href="http://www.google.de/search?hl=en&amp;amp;q=hacking+intitle%3Atutorial&amp;amp;btnG=Google+Search&amp;amp;meta="&gt;hacking intitle:tutorial&lt;/a&gt;)&lt;br /&gt;2- Now we will add the part which will refine our search by selecting only the pages that contain the word (Windows) in the page URL. So the second part of the query will be (&lt;a style="font-family: courier new;" href="http://www.google.de/search?hl=en&amp;amp;q=inurl%3Awindows&amp;amp;btnG=Google+Search&amp;amp;meta="&gt;inurl:windows&lt;/a&gt;)&lt;br /&gt;3- Result: &lt;a style="font-family: courier new;" href="http://www.google.de/search?hl=en&amp;amp;q=hacking+intitle%3Atutorial+inurl%3Awindows&amp;amp;meta="&gt;hacking intitle:tutorial inurl:windows&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Note1: &lt;span style="color: rgb(255, 0, 0);"&gt;You will notice now that the search is refined and the word “Windows” is in every URL of every single result&lt;/span&gt;&lt;br /&gt;Note2: &lt;span style="color: rgb(255, 0, 0);"&gt;Look at the number of results; you will see that the query refined our search result from 188,000 pages (the previous image) to 1,320 pages (the following image)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://bp2.blogger.com/_hJ8mrxrtvaI/R7p6C0aLMGI/AAAAAAAAAvY/9sGFkttr7is/s1600-h/IU.png"&gt;&lt;img id="BLOGGER_PHOTO_ID_5168577711207821410" style="" alt="" src="http://bp2.blogger.com/_hJ8mrxrtvaI/R7p6C0aLMGI/AAAAAAAAAvY/9sGFkttr7is/s320/IU.png" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;So what are the “Operators” used, and how can they be used in “Penetration testing”?&lt;/span&gt;&lt;br /&gt;There are a lot of “Operators”; I will try to mention the most important ones that will help us in our mission&lt;br /&gt;&lt;br /&gt;1- &lt;span style="font-weight: bold;"&gt;intitle:&lt;/span&gt; We have seen already what it means in the first example&lt;br /&gt;2- &lt;span style="font-weight: bold;"&gt;allintitle:&lt;/span&gt; The title will include ALL of the specified words – ex: &lt;a href="http://www.google.de/search?hl=en&amp;amp;q=allintitle%3Ahacking+tutorial&amp;amp;meta="&gt;&lt;span style="font-family:courier new;"&gt;allintitle:hacking tutorial&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;3- &lt;span style="font-weight: bold;"&gt;inurl:&lt;/span&gt; We have seen already what it means in the second example&lt;br /&gt;4- &lt;span style="font-weight: bold;"&gt;allinurl:&lt;/span&gt; The URL will include ALL of the specified words – ex: &lt;a href="http://www.google.de/search?hl=en&amp;amp;q=allinurl%3Ahacking+tutorial&amp;amp;meta="&gt;&lt;span style="font-family:courier new;"&gt;allinurl:hacking tutorial&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;5- site: You use this “Operator” to limit your search to a specific domain – ex: &lt;a href="http://www.google.de/search?hl=en&amp;amp;q=hacking+site%3Amicrosoft.com&amp;amp;meta="&gt;&lt;span style="font-family:courier new;"&gt;hacking site:microsoft.com&lt;/span&gt;&lt;/a&gt; (it means, I want you to search for the word “hacking” that resides on “microsoft.com” and no other domains)&lt;br /&gt;6- &lt;span style="font-weight: bold;"&gt;filetype:&lt;/span&gt; or &lt;span style="font-weight: bold;"&gt;ext:&lt;/span&gt; You use this “Operator” to limit your search to specific “File Extensions” such as .doc, .xls, .pdf, .php, .asp – ex: &lt;a href="http://www.google.de/search?hl=en&amp;amp;q=hacking+tutorial+ext%3Apdf&amp;amp;meta="&gt;&lt;span style="font-family:courier new;"&gt;hacking tutorial ext:pdf&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;7- &lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;The double quotations &lt;/span&gt;“”&lt;/span&gt;: We use the double quotation marks to limit our search for an exact phrase, for example “Penetration Testing” – ex: &lt;a href="http://www.google.de/search?hl=en&amp;amp;q=%E2%80%9CPenetration+Testing%E2%80%9D&amp;amp;meta="&gt;&lt;span style="font-family:courier new;"&gt;“Penetration Testing”&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;Compare the difference between (&lt;a href="http://www.google.de/search?hl=en&amp;amp;q=Penetration+Testing&amp;amp;meta="&gt;&lt;span style="font-family:courier new;"&gt;Penetration Testing&lt;/span&gt;&lt;/a&gt;) and (&lt;a href="http://www.google.de/search?hl=en&amp;amp;q=%E2%80%9CPenetration+Testing%E2%80%9D&amp;amp;meta="&gt;&lt;span style="font-family:courier new;"&gt;“Penetration Testing”&lt;/span&gt;&lt;/a&gt;)&lt;br /&gt;8- &lt;span style="font-weight: bold;"&gt;The plus sign + &lt;/span&gt;or &lt;span style="font-weight: bold;"&gt;The minus sign -&lt;/span&gt;: Normally Google ignores common words and character like “The”, “Where”, etc. So, if you would like your search to include any of these common words, you just have to add “+” before the specified word. Compare the difference between (&lt;a href="http://www.google.de/search?hl=en&amp;amp;q=the+%22penetration+testing%22&amp;amp;meta="&gt;&lt;span style="font-family:courier new;"&gt;the "penetration testing"&lt;/span&gt;&lt;/a&gt;) and (&lt;a href="http://www.google.de/search?hl=en&amp;amp;q=%2Bthe+%22penetration+testing%22&amp;amp;btnG=Google+Search&amp;amp;meta="&gt;&lt;span style="font-family:courier new;"&gt;+the "penetration testing"&lt;/span&gt;&lt;/a&gt;)&lt;br /&gt;And vice versa, if you want to avoid a word, for example, you want to search for “Penetration Testing” but at the same time you want the pages that don’t include the word “Windows”, so your query would be (&lt;a href="http://www.google.de/search?hl=en&amp;amp;q=%22penetration+testing%22+-windows&amp;amp;meta="&gt;&lt;span style="font-family:courier new;"&gt;"penetration testing" -windows&lt;/span&gt;&lt;/a&gt;)&lt;br /&gt;9- &lt;span style="font-weight: bold;"&gt;The pipe line |&lt;/span&gt;: This is called the “Logical OR” operator, and simply it means OR :). For example, we are looking for the pages that contain the word “Login” OR “Logon”, so our query would be (&lt;a href="http://www.google.de/search?hl=en&amp;amp;q=login+%7C+logon&amp;amp;btnG=Google+Search&amp;amp;meta="&gt;&lt;span style="font-family:courier new;"&gt;login | logon&lt;/span&gt;&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;These are the most important “Operators” for us at the moment.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;But how can we use them in our attack?&lt;/span&gt;&lt;br /&gt;I’ll give you some examples, and you can be creative and see what you can get us :)&lt;br /&gt;&lt;br /&gt;Example using the “Site:” and “-” Operators&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;We all know that websites usually start with www.xxx.yyy, right? And this www is a host on the xxx domain, what if you have hosts other than www? How would we get them?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Let’s try that &lt;span style="font-family:courier new;"&gt;(&lt;a href="http://www.google.de/search?hl=en&amp;amp;q=site%3Amicrosoft.com+-site%3Awww.microsoft.com&amp;amp;meta="&gt;site:microsoft.com -site:www.microsoft.com&lt;/a&gt;)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Note1: &lt;span style="color: rgb(255, 0, 0);"&gt;We were able to locate so many hosts on the Microsoft domain, such as “Advertising”, “Support”, “UDDI”, etc.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;a href="http://bp2.blogger.com/_hJ8mrxrtvaI/R7p5f0aLMEI/AAAAAAAAAvI/urLDcm-5JKc/s1600-h/SO.png"&gt;&lt;img id="BLOGGER_PHOTO_ID_5168577109912399938" style="" alt="" src="http://bp2.blogger.com/_hJ8mrxrtvaI/R7p5f0aLMEI/AAAAAAAAAvI/urLDcm-5JKc/s320/SO.png" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Example using the “allinurl:” and “” Operators&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;We know that there are a lot of companies are using “Microsoft Exchange Server” as their mail server, company XYZ is one of these companies, so we would like to see if we can find the logon page to try guessing the password of any user.&lt;/span&gt;&lt;br /&gt;I used to have an exchange server, and I know that the URL of the logon page for the “Microsoft Outlook Web Access” always ends up with “exchange/logon.asp”.&lt;br /&gt;&lt;br /&gt;Let’s try that (&lt;a href="http://www.google.de/search?hl=en&amp;amp;q=allinurl%3A%22exchange%2Flogon.asp%22&amp;amp;meta="&gt;&lt;span style="font-family:courier new;"&gt;allinurl:"exchange/logon.asp"&lt;/span&gt;&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;a href="http://www.google.de/search?hl=en&amp;amp;q=allinurl%3A%22exchange%2Flogon.asp%22&amp;amp;meta="&gt;&lt;/a&gt;&lt;a href="http://bp3.blogger.com/_hJ8mrxrtvaI/R7p5fEaLMAI/AAAAAAAAAuo/Z7lqwDq9bX8/s1600-h/AQ.png"&gt;&lt;img id="BLOGGER_PHOTO_ID_5168577097027497986" style="" alt="" src="http://bp3.blogger.com/_hJ8mrxrtvaI/R7p5fEaLMAI/AAAAAAAAAuo/Z7lqwDq9bX8/s320/AQ.png" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;Example using “intitle:” and “” Operators&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;There is a tool (that we will learn later how to use” called Nessus, one of the best free network vulnerability scanner available. This tool’s goal is to detect potential vulnerability in the tested system, and after every test; this tool generate a report in various formats (xml, pdf, etc.) that includes all of the vulnerabilities found.&lt;/span&gt;&lt;br /&gt;What if a bad guy find these reports on the Internet? A bad guy, who has all of the vulnerabilities for a specified system, a DISASTER.&lt;br /&gt;I know from previous experience that the report generated has a title “Nessus Scan Report” and the last line of the report generated indicates “The file was generated by Nessus”&lt;br /&gt;&lt;br /&gt;Let’s try that (&lt;a href="http://www.google.de/search?hl=en&amp;amp;q=intitle%3A%22Nessus+Scan+Report%22+%22This+file+was+generated+by+Nessus%22&amp;amp;meta="&gt;&lt;span style="font-family:courier new;"&gt;intitle:"Nessus Scan Report" "This file was generated by Nessus"&lt;/span&gt;&lt;/a&gt;)&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;a href="http://bp0.blogger.com/_hJ8mrxrtvaI/R7p5fUaLMCI/AAAAAAAAAu4/emwvYwC60hY/s1600-h/IN.png"&gt;&lt;img id="BLOGGER_PHOTO_ID_5168577101322465314" style="" alt="" src="http://bp0.blogger.com/_hJ8mrxrtvaI/R7p5fUaLMCI/AAAAAAAAAu4/emwvYwC60hY/s320/IN.png" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;&lt;br /&gt;There are millions and millions of combinations, just be creative and don’t limit your mind.&lt;br /&gt;If you want to widen your knowledge concerning Google Hacking:&lt;br /&gt;&lt;a href="http://johnny.ihackstuff.com/"&gt;http://johnny.ihackstuff.com/&lt;/a&gt;(includes a Google hacking database that phreaks me out :))&lt;br /&gt;&lt;a href="http://www.amazon.com/Google-Hacking-Penetration-Testers-1/dp/1931836361/ref=sr_11_1?ie=UTF8&amp;amp;qid=1199706409&amp;amp;sr=11-1"&gt;Google Hacking for Penetration Testers – Volume 1&lt;/a&gt; (The authors are some of the best authors who write about Hacking, Johnny Ihackstuff is one of the authors by the way)&lt;br /&gt;&lt;a href="http://www.amazon.com/Google-Hacking-Penetration-Testers-2/dp/1597491764/ref=sr_11_1?ie=UTF8&amp;amp;qid=1199706534&amp;amp;sr=11-1"&gt;Google Hacking for Penetration Testers – Volume 2&lt;/a&gt; (The second part, and it includes advanced techniques in using Google for Penetration Testing)&lt;br /&gt;&lt;br /&gt;Guys, one thing I would like to say here, we all know that Information is power, so please don’t use this power in harming others.&lt;br /&gt;We are learning these techniques to defend against the bad guys, not to be them.&lt;br /&gt;&lt;br /&gt;Till next article,&lt;br /&gt;Please take care.&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4046984248821087870-7440552247149741068?l=haymanezzeldin.blogspot.com'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/PenetrationTesting?a=6MQPMAhlW54:a2tPMr3Adl4:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PenetrationTesting?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/PenetrationTesting?a=6MQPMAhlW54:a2tPMr3Adl4:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PenetrationTesting?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PenetrationTesting/~4/6MQPMAhlW54" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/PenetrationTesting/~3/6MQPMAhlW54/google-hacking.html</link><author>noreply@blogger.com (Hayman Ezzeldin)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://bp0.blogger.com/_hJ8mrxrtvaI/R7p5fUaLMBI/AAAAAAAAAuw/2UrWKxkOjbY/s72-c/GP.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">5</thr:total><feedburner:origLink>http://haymanezzeldin.blogspot.com/2008/01/google-hacking.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4046984248821087870.post-2244167974126582485</guid><pubDate>Mon, 07 Jan 2008 07:03:00 +0000</pubDate><atom:updated>2008-02-19T07:33:30.254+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">3- Data Gathering</category><title>Search Engines - Behind The Scenes</title><description>For sure you had a time when you hear something or read something that you don’t understand, earlier you used to go to someone older to ask him/her about that, but that’s no more the case. Now, you can go to Google.com or any other &lt;a href="http://en.wikipedia.org/wiki/Search_engine"&gt;Search Engine&lt;/a&gt; and type in what you are looking for, and with one click you get thousands of result in milliseconds!!&lt;br /&gt;&lt;br /&gt;&lt;a href="http://bp3.blogger.com/_hJ8mrxrtvaI/R7p3lEaLL-I/AAAAAAAAAt0/R9WhFm6wElQ/s1600-h/GSR.png"&gt;&lt;img id="BLOGGER_PHOTO_ID_5168575001083457506" style="CURSOR: hand" alt="" src="http://bp3.blogger.com/_hJ8mrxrtvaI/R7p3lEaLL-I/AAAAAAAAAt0/R9WhFm6wElQ/s320/GSR.png" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Wow, how did it happen? How can this search engine browse the whole Internet and get me links for every page that includes the words “Hacking” for example in less than 1 second?&lt;br /&gt;&lt;br /&gt;&lt;span style="FONT-WEIGHT: bold"&gt;Behind the scenes:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Before we start any discussions, we have to know some terms and definitions that will face us soon.&lt;br /&gt;&lt;span style="FONT-WEIGHT: bold"&gt;Search Engines:&lt;/span&gt; They are web sites that provide an interface to allow users to search for information on the “World Wide Web”.&lt;br /&gt;&lt;span style="FONT-WEIGHT: bold"&gt;Crawler&lt;/span&gt;, &lt;span style="FONT-WEIGHT: bold"&gt;Spider&lt;/span&gt;, &lt;span style="FONT-WEIGHT: bold"&gt;Bot&lt;/span&gt; or &lt;span style="FONT-WEIGHT: bold"&gt;Robot:&lt;/span&gt; All terms have similar meaning, and this is a program or a script that browses the “World Wide Web” in an automated method.&lt;br /&gt;&lt;br /&gt;This is how search engines work in general:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://bp3.blogger.com/_hJ8mrxrtvaI/R7p3lEaLL_I/AAAAAAAAAt8/IELOuelb4cc/s1600-h/SEW.gif"&gt;&lt;img id="BLOGGER_PHOTO_ID_5168575001083457522" style="CURSOR: hand" alt="" src="http://bp3.blogger.com/_hJ8mrxrtvaI/R7p3lEaLL_I/AAAAAAAAAt8/IELOuelb4cc/s320/SEW.gif" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;1- The search engine has a lot of “&lt;span style="FONT-WEIGHT: bold"&gt;Crawler Servers&lt;/span&gt;”, where the “&lt;span style="FONT-WEIGHT: bold"&gt;Crawler&lt;/span&gt;” is installed, this Crawler starts walking around the Web robotically, read every page, follow links to other pages and start downloading all the contents to the servers. New web pages or changed pages are detected the same way as well.&lt;br /&gt;2- Now, these big blocks of data go to “&lt;span style="FONT-WEIGHT: bold"&gt;Index Servers&lt;/span&gt;”, where they start extracting key words and making something like a catalogue. The result is a massive database of keywords and the related documentID.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://bp2.blogger.com/_hJ8mrxrtvaI/R7p3k0aLL9I/AAAAAAAAAts/aSQQ4M5wN58/s1600-h/GQ.png"&gt;&lt;img id="BLOGGER_PHOTO_ID_5168574996788490194" style="CURSOR: hand" alt="" src="http://bp2.blogger.com/_hJ8mrxrtvaI/R7p3k0aLL9I/AAAAAAAAAts/aSQQ4M5wN58/s320/GQ.png" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;3- So when you search for the word “Hacking” for example, your request is sent to the web server as query, the web server then sends your query to the index server, where all the documentID that contains “Hacking” should be listed in its catalogue or index. The results are passed from the massive database to the web server. The web server convert the data received from the database into readable format and send it back to you as the result page.&lt;br /&gt;&lt;br /&gt;Now after knowing how search engines like Google works, it's time to see how we can benefit from Google as a "Data Gathering" Tool.&lt;br /&gt;&lt;br /&gt;Till next article,&lt;br /&gt;Please take care.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4046984248821087870-2244167974126582485?l=haymanezzeldin.blogspot.com'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/PenetrationTesting?a=c7YCegMmScw:u2KgIUaNBy8:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PenetrationTesting?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/PenetrationTesting?a=c7YCegMmScw:u2KgIUaNBy8:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PenetrationTesting?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PenetrationTesting/~4/c7YCegMmScw" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/PenetrationTesting/~3/c7YCegMmScw/search-engines-behind-scenes.html</link><author>noreply@blogger.com (Hayman Ezzeldin)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://bp3.blogger.com/_hJ8mrxrtvaI/R7p3lEaLL-I/AAAAAAAAAt0/R9WhFm6wElQ/s72-c/GSR.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://haymanezzeldin.blogspot.com/2008/01/search-engines-behind-scenes.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4046984248821087870.post-9193133990569446228</guid><pubDate>Fri, 04 Jan 2008 06:03:00 +0000</pubDate><atom:updated>2008-02-19T08:56:10.006+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">2- Basics</category><title>Hacking - The Scenario</title><description>I want you to imagine with me this scenario:&lt;br /&gt;&lt;br /&gt;You are a Penetration Tester, and there is a company “XYZ” that would like to hire your service as they would like to check how secure their system is. They said “Mr. X, we know that you are the best Penetration Tester ever, and we have paid thousands to secure our system, and we would like to see how DIFFICULT it is for a hacker to attack our system, we need your help”&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;/span&gt;Note 01: have you noticed that the word “DIFFICULT” is all uppercase? I’m sure you did.&lt;br /&gt;I did it like that to send you a message saying that there is nothing ever called “a 100% secure system”, every secure system has a leak somewhere, and your role is to find where this leak is.&lt;br /&gt;&lt;br /&gt;You got my idea? Never ever give up, be patient, be sure that there is a way to do it and be confident that you can do it.&lt;br /&gt;&lt;br /&gt;Note 02: you know nothing yet about the system “XYZ”; will the company provide you with knowledge about their system, network infrastructure and policies? OR will they leave you alone to decide what you want to do and how do you want to do?&lt;br /&gt;&lt;br /&gt;This leads us to another definition “&lt;span style="font-weight: bold;"&gt;Penetration Testing Types&lt;/span&gt;”; there are 3 types of testing. The first type assumes that you have no prior knowledge of the system or the infrastructure you are testing (hacking), so in such a testing, you have to do exactly what a cracker would do. And this type of testing is called “&lt;span style="font-weight: bold;"&gt;Black Box&lt;/span&gt;”. The second type, on the other hand, assumes that you are provided with complete knowledge of the system, infrastructure, source codes for software, etc... And this type of testing is called “&lt;span style="font-weight: bold;"&gt;White Box&lt;/span&gt;”. The third type and the last one - as you can guess - is a mix between the prior two types. Here you have partial knowledge of the system; you might know what services are running on the system, but no IP structure. You might know how the software is working, but you are not provided with the source code. This type is called “&lt;span style="font-weight: bold;"&gt;Gray Box&lt;/span&gt;”.&lt;br /&gt;&lt;br /&gt;Note 03: as we are trying to test the system against hackers; we have to think like one. So, now you are a hacker and you want to attack the company “XYZ”. Think with me about it, what are the steps we conduct to be able to do that? The first Step, we have to prepare our attack by gathering as much information as possible about the target (“XYZ” company), system, infrastructure, etc… And this step is called “&lt;span style="font-weight: bold;"&gt;Reconnaissance&lt;/span&gt;” or “&lt;span style="font-weight: bold;"&gt;Foot Printing&lt;/span&gt;”. Now we know almost everything about the target; so the next step is to find where are the leaks in the security system, what are the vulnerabilities in the target. And this step is called “&lt;span style="font-weight: bold;"&gt;Scanning and Enumeration&lt;/span&gt;”. Now, after knowing the holes, it’s time to attack, and “&lt;span style="font-weight: bold;"&gt;Attacking the System&lt;/span&gt;” is our third step. I know you hope you would like to hop into this step immediately, right? But believe me, attacking before doing the first 2 steps, is kidding and a waste of time! The fourth step is optional, because you might be in need to access the hacked system again later, or you might not. To do that, you have to “&lt;span style="font-weight: bold;"&gt;Maintain Access&lt;/span&gt;”. In this step, you can open a port for later access, plant a Trojan; install a Rootkit, etc… Don’t worry, these terms and techniques will be detailed later. Now it’s time to leave the system and go away, BUT didn’t you forget something? Did you check if your attack left any traces that would lead to you, then lead you to jail :). So, our next step is the “&lt;span style="font-weight: bold;"&gt;Covering Tracks&lt;/span&gt;”. This is exactly how an attack could be.&lt;br /&gt;&lt;br /&gt;To sum up, we learned few things:&lt;br /&gt;&lt;br /&gt;1- No system is 100% secure&lt;br /&gt;&lt;br /&gt;2- There are 3 types of Testing, “Black Box” which means “No Knowledge”, “White Box” which means “Full Knowledge”, and “Gray Box” which means “Partial Knowledge”.&lt;br /&gt;&lt;br /&gt;3- There are 5 steps to conduct an attack against any system, “Reconnaissance” which means “Data Gathering”, “Scanning” which means “Finding Vulnerabilities”, “Attacking the system” and I think there is no need to say what it means :), “Maintain Access” which means “keep a Backdoor for a later access”, and last step is “Covering Tracks” which means “remove your attack traces”&lt;br /&gt;&lt;br /&gt;Next, we will start the “&lt;span style="font-weight: bold;"&gt;bit by bit&lt;/span&gt;” section where we detail every single step to conduct an attack.&lt;br /&gt;&lt;br /&gt;Till next time, Take care&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4046984248821087870-9193133990569446228?l=haymanezzeldin.blogspot.com'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/PenetrationTesting?a=ghwTOzpRL9Q:8sxeCofnd_4:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PenetrationTesting?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/PenetrationTesting?a=ghwTOzpRL9Q:8sxeCofnd_4:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PenetrationTesting?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PenetrationTesting/~4/ghwTOzpRL9Q" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/PenetrationTesting/~3/ghwTOzpRL9Q/hacking-scenario.html</link><author>noreply@blogger.com (Hayman Ezzeldin)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://haymanezzeldin.blogspot.com/2008/01/hacking-scenario.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4046984248821087870.post-7881962435636809094</guid><pubDate>Thu, 03 Jan 2008 09:31:00 +0000</pubDate><atom:updated>2008-02-19T08:47:41.138+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">2- Basics</category><title>Hacking - The Terminology</title><description>Have you seen the “swordfish” movie?&lt;br /&gt;&lt;br /&gt;There is a scene in the movie where the hacker (Hugh Jackman) is sitting in front of a Dell laptop with a gun pointed to his head, while Shear (John Travolta) explains to him that he's heard that "the best crackers in the world can do this in 60 minutes. Unfortunately, I need it done in 60 seconds." and in 60 seconds he was able to access information that is locked inside a multibillion-dollar account safeguarded by a security system that contains mountains of government secrets - and money :)&lt;br /&gt;&lt;br /&gt;WOW, in 60 seconds, crack a system that needs 60 minutes to be cracked, get millions of dollars, and lot of secrets!!!&lt;br /&gt;&lt;br /&gt;Man, I would like to be a CRACKER :)&lt;br /&gt;&lt;br /&gt;But aside from the fantasy in the movie, why didn’t they say HACKER? why CRACKER? What is the difference between them? This will lead us to today’s lesson, Hacking Terminology according to the &lt;a href="http://www.sans.org/resources/glossary.php"&gt;NSA (National Security Agency) glossary&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Note: There are some terms that are removed since 2004 from the NSA Glossary, but to find them you can check the archive at &lt;a href="http://web.archive.org/web/20030210130738/www.sans.org/resources/glossary.php"&gt;This Link&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Hacker&lt;/span&gt;: A person who enjoys exploring the details of computers and how to stretch their capabilities. A malicious or inquisitive meddler who tries to discover information by poking around. A person who enjoys learning the details of programming systems and how to stretch their capabilities, as opposed to most users who prefer to learn on the minimum necessary.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Hacking&lt;/span&gt;: Unauthorized use, or attempts to circumvent or bypass the security mechanisms of an information system or network.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Penetration&lt;/span&gt;: Gaining unauthorized logical access to sensitive data by circumventing a system's protections.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Penetration Testing&lt;/span&gt;: Penetration testing is used to test the external perimeter security of a network or facility.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Cracker&lt;/span&gt;: One who breaks security on an Information System.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Cracking&lt;/span&gt;: The act of breaking into a computer system.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Phreak(er)&lt;/span&gt;: An individual fascinated by the telephone system. Commonly, an individual who uses his knowledge of the telephone system to make calls at the expense of another.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Phreaking&lt;/span&gt;: The art and science of cracking the phone network.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Sneaker&lt;/span&gt;: An individual hired to break into places in order to test their security; analogous to tiger team.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Tiger Team&lt;/span&gt;: Government and industry - sponsored teams of computer experts who attempt to break down the defenses of computer systems in an effort to uncover, and eventually patch, security holes.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Threat&lt;/span&gt;: A potential for violation of security, which exists when there is a circumstance, capability, action, or event that could breach security and cause harm.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Attack&lt;/span&gt;: An attempt to bypass security controls on a computer. The attack may alter, release, or deny data. Whether an attack will succeed depends on the vulnerability of the computer system and the effectiveness of existing countermeasures.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Vulnerability&lt;/span&gt;: Hardware, firmware, or software flow that leaves an Information System open for potential exploitation. A weakness in automated system security procedures, administrative controls, physical layout, internal controls, and so forth, that could be exploited by a threat to gain unauthorized access to information or disrupt critical processing.&lt;br /&gt;&lt;br /&gt;There will be other terms mentioned during the lessons, but will be defined as needed, for now, these are the most required terms you need to understand to start Hacking !!&lt;br /&gt;&lt;br /&gt;Please Take Care :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4046984248821087870-7881962435636809094?l=haymanezzeldin.blogspot.com'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/PenetrationTesting?a=Bpr9NrYExL4:Uc5fKWoZ-kU:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PenetrationTesting?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/PenetrationTesting?a=Bpr9NrYExL4:Uc5fKWoZ-kU:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PenetrationTesting?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PenetrationTesting/~4/Bpr9NrYExL4" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/PenetrationTesting/~3/Bpr9NrYExL4/hacking-terminology.html</link><author>noreply@blogger.com (Hayman Ezzeldin)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">4</thr:total><feedburner:origLink>http://haymanezzeldin.blogspot.com/2008/01/hacking-terminology.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4046984248821087870.post-7883693712906019053</guid><pubDate>Thu, 03 Jan 2008 04:24:00 +0000</pubDate><atom:updated>2008-02-19T08:44:40.440+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">2- Basics</category><title>Hacking - The Mindset</title><description>When I was a kid, my father used to tell me “Take it easy, don't be always in a rush, your journey in life starts with ONE STEP”, I'm sure everybody heard a similar phrase sometime, and I'm sure you are thinking “Ahhh basics again!!! No way, what is “hacking” in that?”.&lt;br /&gt;&lt;br /&gt;Ok, do you know how to spell the word “Hacking”?&lt;br /&gt;Sure, it's H a c k i n g, right? Man, that was easy.&lt;br /&gt;Yes, that's right, and yes it is easy, but it's easy because when you was a kid, you learned the ABCs, what are they and how to pronounce them. Without learning them, you can never understand what you are reading.&lt;br /&gt;&lt;br /&gt;So please, if you want to be a real hacker, be patient, and learn &lt;span style="font-weight: bold;"&gt;ONE STEP&lt;/span&gt; a time.&lt;br /&gt;And if you are in a hurry to know how to use the latest hacking tools without thinking, then go somewhere else.&lt;br /&gt;&lt;br /&gt;For that, our first step is to create the mindset of a hacker!&lt;br /&gt;Do you really know what a hacker is? What the hacker's attitude is? What the prerequisites for hacking are?&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/Eric_S._Raymond"&gt;Eric S. Raymond&lt;/a&gt;, the Godfather of the &lt;a href="http://en.wikipedia.org/wiki/Open_source"&gt;Open Source&lt;/a&gt;, wrote an amazing article that is a must for any hacker to master before starting to hack, this article can be found here:&lt;br /&gt;&lt;a href="http://www.catb.org/%7Eesr/faqs/hacker-howto.html"&gt;http://www.catb.org/~esr/faqs/hacker-howto.html&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Please read it, and read all the links I mention, you really need them.&lt;br /&gt;And Take Care.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4046984248821087870-7883693712906019053?l=haymanezzeldin.blogspot.com'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/PenetrationTesting?a=Tau4Un8vqIw:ESzO-GxubGw:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PenetrationTesting?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/PenetrationTesting?a=Tau4Un8vqIw:ESzO-GxubGw:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PenetrationTesting?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PenetrationTesting/~4/Tau4Un8vqIw" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/PenetrationTesting/~3/Tau4Un8vqIw/hacking-mindset.html</link><author>noreply@blogger.com (Hayman Ezzeldin)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://haymanezzeldin.blogspot.com/2008/01/hacking-mindset.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4046984248821087870.post-3748697814186185582</guid><pubDate>Mon, 31 Dec 2007 07:13:00 +0000</pubDate><atom:updated>2008-02-19T08:42:32.517+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">1- Introduction</category><title>Introduction</title><description>Hello everybody,&lt;br /&gt;and Happy New Year,&lt;br /&gt;&lt;br /&gt;Please allow me to introduce myself and the reason for creating this blog.&lt;br /&gt;&lt;br /&gt;My name is Hayman Ezzeldin, an Information Security Analyst, and that's enough for now :)&lt;br /&gt;&lt;br /&gt;The reason to start this blog:&lt;br /&gt;Teach detailed hacking attacks and analyzing them. Not to crack others, but to know how crackers think. So please don't use any of the methods taught here against others, as I won't be responsible to get you out of jail :)&lt;br /&gt;&lt;br /&gt;You might ask: why am I in need to analyze the attacks?&lt;br /&gt;The answer is very simple, have you ever heard about a &lt;a href="http://en.wikipedia.org/wiki/Script_kiddie"&gt;Script Kiddie&lt;/a&gt;?&lt;br /&gt;According to wikipedia, these are inexperienced malicious cracker who uses programs developed by others to attack computer systems, and deface websites. They lack the ability to write sophisticated hacking programs on their own, and that their objective is to try to impress their friends or gain credit in underground cracker communities.I never wanted to be a script kiddie, I always wanted to &lt;span style="font-weight: bold;"&gt;understand how are these attacks happening, and what's going on behind the scenes&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Now it's time to get this knowledge out, and teach it others.&lt;br /&gt;&lt;br /&gt;So let's START and please Take Care :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4046984248821087870-3748697814186185582?l=haymanezzeldin.blogspot.com'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/PenetrationTesting?a=QG-3s_TYa0Q:9pxCDCdJ_Uc:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PenetrationTesting?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/PenetrationTesting?a=QG-3s_TYa0Q:9pxCDCdJ_Uc:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PenetrationTesting?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PenetrationTesting/~4/QG-3s_TYa0Q" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/PenetrationTesting/~3/QG-3s_TYa0Q/introduction.html</link><author>noreply@blogger.com (Hayman Ezzeldin)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">5</thr:total><feedburner:origLink>http://haymanezzeldin.blogspot.com/2007/12/introduction.html</feedburner:origLink></item></channel></rss>
