<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Reverse Engineering Mac OS X &#187; gdb</title>
	<atom:link href="http://reverse.put.as/tag/gdb/feed/" rel="self" type="application/rss+xml" />
	<link>http://reverse.put.as</link>
	<description>Reverse Engineering and Security for fun and pleasure!</description>
	<lastBuildDate>Fri, 24 May 2013 00:38:56 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>How to compile gdb in Mountain Lion (updated)</title>
		<link>http://reverse.put.as/2013/03/20/how-to-compile-gdb-in-mountain-lion-updated/</link>
		<comments>http://reverse.put.as/2013/03/20/how-to-compile-gdb-in-mountain-lion-updated/#comments</comments>
		<pubDate>Wed, 20 Mar 2013 00:54:06 +0000</pubDate>
		<dc:creator>fG!</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[gdb]]></category>
		<category><![CDATA[patches]]></category>

		<guid isPermaLink="false">http://reverse.put.as/?p=1839</guid>
		<description><![CDATA[This is an up-to-date version of the old original post about recompiling gdb and other open source packages provided by opensource.apple.com. I&#8217;m doing it mostly because code signing is now mandatory for gdb and there&#8217;s a stupid old bug that Apple still didn&#8217;t fixed since Snow Leopard. I forgot about it on my latest reinstall [...]]]></description>
				<content:encoded><![CDATA[<p>This is an up-to-date version of the <a href="http://reverse.put.as/2009/01/14/how-to-compile-gdb-and-other-apple-open-source-packages-in-mac-os-x/">old original post</a> about recompiling gdb and other open source packages provided by <a href="http://opensource.apple.com">opensource.apple.com</a>. I&#8217;m doing it mostly because code signing is now mandatory for gdb and there&#8217;s a stupid old bug that Apple still didn&#8217;t fixed since Snow Leopard. I forgot about it on my latest reinstall and lost an afternoon <img src='http://reverse.put.as/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> . This way you and me will not make the same mistake.</p>
<p>You should have <a href="http://developer.apple.com/mac/">XCode</a> installed. Follow these steps:</p>
<p>1) Download <a href="http://darwinbuild.macosforge.org/">darwinbuild</a> from their SVN repository.<br />
1.1) Since Snow Leopard there is a svn client by default so no need to download.<br />
1.2) Follow the instructions on how to download,compile and install darwinbuild <a href="http://darwinbuild.macosforge.org/trac/wiki/Install">here</a>. Use the guide for Snow Leopard/Lion version, it&#8217;s compatible with Mountain Lion.</p>
<p>2) Compile and install darwinbuild:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666;">$ </span><span style="color: #c20cb9; font-weight: bold;">make</span> ; <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></td></tr></table></div>

<p>3) Create the DMG file and initialize darwinbuild environment (you should use at least 2 gigabytes):</p>
<p>The plists and build numbers are available at <a href="http://svn.macosforge.org/repository/darwinbuild/trunk/plists/">http://svn.macosforge.org/repository/darwinbuild/trunk/plists/</a>. Use build number 12A269 (it&#8217;s for 10.8.0 but works ok for all others).</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">$ hdiutil create <span style="color: #660033;">-size</span> 2G <span style="color: #660033;">-type</span> UDIF <span style="color: #660033;">-fs</span> HFSX <span style="color: #660033;">-volname</span> Builds <span style="color: #660033;">-uid</span> <span style="color: #000000;">0</span> <span style="color: #660033;">-gid</span> <span style="color: #000000;">0</span> <span style="color: #660033;">-attach</span> Builds.dmg
$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">sh</span>
<span style="color: #666666; font-style: italic;"># vsdbutil -a /Volumes/Builds</span>
<span style="color: #666666; font-style: italic;"># cd /Volumes/Builds</span>
<span style="color: #666666; font-style: italic;"># mkdir Build12A269</span>
<span style="color: #666666; font-style: italic;"># cd Build12A269</span>
<span style="color: #666666; font-style: italic;"># darwinbuild -init 12A269 (you need Internet connection)</span>
<span style="color: #666666; font-style: italic;"># darwinxref edit</span></pre></td></tr></table></div>

<p>In darwinxref edit you need to add the gdb package to the configuration. Go to the projects section and add the following:</p>
<p>gdb = {<br />
version = 1822;<br />
};</p>
<p>Default editor is VI. Save and quit. If you have a problem with an invalid property list, use the same tab alignment as the other entries. That should fix it.</p>
<p>4) Clone the gdb-ng repo from github if you want my patches included (you probably do!). Else skip to step 5) (darwinbuild will download the package from Apple opensource repo).</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># cd /Volumes/Builds/Build12A269/Sources</span>
<span style="color: #666666; font-style: italic;"># git clone git://github.com/gdbinit/gdb-ng.git</span>
<span style="color: #666666; font-style: italic;"># cd gdb-ng</span>
<span style="color: #666666; font-style: italic;"># bash pack.sh</span>
<span style="color: #666666; font-style: italic;"># mv gdb-1822.tar.gz .. (check version in case it changes)</span>
<span style="color: #666666; font-style: italic;"># cd /Volumes/Builds/Build12A269</span></pre></td></tr></table></div>

<p>5) Compile gdb.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666;"># </span>darwinbuild <span style="color: #660033;">-nochroot</span> <span style="color: #c20cb9; font-weight: bold;">gdb</span></pre></td></tr></table></div>

<p>The -nosource option has been added to recent darwinbuild versions. This option will allow you to patch directly into BuildRoot/SourceCache/.<br />
The first time you shouldn&#8217;t use this option so darwinbuild will download gdb package. After that you can use it if you want to patch directly gdb source files (that&#8217;s what I do with my gdb patches). It&#8217;s much easier and faster than having to patch and compress the whole gdb source. After you patch, you just issue &#8220;darwinbuild -nochroot -nosource gdb&#8221; and this will not unpack the original source but instead use whatever is at SourceCache.</p>
<p>Wait for the compilation to finish&#8230;</p>
<p>Go to Roots/gdb/gdb-1822.root*/usr/libexec/gdb. You should have a gdb-i386-apple-darwin. Backup the original and copy this one over.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># cp /usr/libexec/gdb/gdb-i386-apple-darwin /usr/libexec/gdb/gdb-i386-apple-darwin.orig</span>
<span style="color: #666666; font-style: italic;"># cp gdb-i386-apple-darwin /usr/libexec/gdb/</span></pre></td></tr></table></div>

<p>The latest step is to codesign the binary. This is because taskgated default configuration has changed and it&#8217;s not anymore sufficient to have the binary suid to procmod group. It must have entitlements and be codesigned. The process is not just creating a self-signed certificate and codesign the binary with it. There is an old bug since Snow Leopard that complicates it a little bit. Follow <a href="https://llvm.org/svn/llvm-project/lldb/trunk/docs/code-signing.txt">this guide</a> from LLDB code signing document. You can either code sign the binary you copied above to /usr/libexec/gdb or sign it at the Roots folder and copy the signed version.</p>
<p>Launch gdb and see if it works. It should ask you for your password the first time (after each reboot). If everything is ok you should be able to attach to or run the target process.</p>
<p>Now you can enjoy your next afternoon in case you want/have to compile gdb. You might also want to download and install <a href="https://github.com/gdbinit/Gdbinit">gdbinit</a> to improve gdb&#8217;s output and available commands.</p>
<p>fG!</p>
]]></content:encoded>
			<wfw:commentRss>http://reverse.put.as/2013/03/20/how-to-compile-gdb-in-mountain-lion-updated/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>How to compile GDB for iOS!</title>
		<link>http://reverse.put.as/2012/04/16/how-to-compile-gdb-for-ios/</link>
		<comments>http://reverse.put.as/2012/04/16/how-to-compile-gdb-for-ios/#comments</comments>
		<pubDate>Mon, 16 Apr 2012 01:14:38 +0000</pubDate>
		<dc:creator>fG!</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[gdb]]></category>
		<category><![CDATA[ios]]></category>

		<guid isPermaLink="false">http://reverse.put.as/?p=1410</guid>
		<description><![CDATA[One obstacle that I faced long time ago and came again into spotlight is how to recompile gdb for iOS. It is not useful to fix the arm disassembler and then not be able to compile. As far as I know there isn&#8217;t any documentation available or an easy method to accomplish this &#8211; Saurik&#8217;s [...]]]></description>
				<content:encoded><![CDATA[<p>One obstacle that I faced long time ago and came again into spotlight is how to recompile gdb for iOS. It is not useful to fix the arm disassembler and then not be able to compile. As far as I know there isn&#8217;t any documentation available or an easy method to accomplish this &#8211; Saurik&#8217;s build environment is not public (?) and Apple sources do not compile directly. Darwinbuild project works great for OS X but it&#8217;s a question mark for iOS.</p>
<p>Darwinbuild it is! After some failed hacking last Friday (progress was great and it was near completation), I decided to try to fix the loose end today. Success was finally achieved.<br />
This post contains almost all the information that you need to recompile gdb yourself. There is something that you will need to complete by trial &amp; error. Let&#8217;s start the fun!</p>
<p>The reference post on darwinbuild usage is <a href="http://reverse.put.as/2009/01/14/how-to-compile-gdb-and-other-apple-open-source-packages-in-mac-os-x/">this one</a>, written by yours truly. You should follow it and modify accordingly with the information provided here. My OS X version is still Snow Leopard but you should have no problems with Lion.<br />
The image size should be 2GB, and you should use the build # 10K540. When you execute the &#8220;darwinxref edit&#8221;, use the following information:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="text" style="font-family:monospace;">environment = {
INSTALLED_PRODUCT_ASIDES = YES;
MACOSX_DEPLOYMENT_TARGET = 10.6;
NEXT_ROOT = &quot;&quot;;
RC_ARCHS = &quot;armv7 armv6&quot;;
RC_JASPER = YES;
RC_NONARCH_CFLAGS = &quot;-pipe&quot;;
RC_OS = macos;
RC_PRIVATE = /private;
RC_RELEASE = SnowLeopard;
RC_TARGET_CONFIG = iphoneos;
RC_XBS = YES;
SEPARATE_STRIP = YES;
UNAME_RELEASE = 10.0;
UNAME_SYSNAME = Darwin;
};</pre></td></tr></table></div>

<p><span style="text-decoration: underline;">Word of caution:</span> be careful with copy &amp; pasting this because of the &#8220;&#8221; (if you get an error while saving from darwinxref edit).</p>
<p>The next step is to edit the darwinbuild database. It&#8217;s located at &#8220;.build/xref.db&#8221;, inside the Build10K540 folder you should be located at. You need to change the gdb version to the latest one, 1708 instead of 1344. Execute the following sql statement to verify it:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <span style="color: #993333; font-weight: bold;">FROM</span> properties <span style="color: #993333; font-weight: bold;">WHERE</span> project<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;gdb&quot;</span> <span style="color: #993333; font-weight: bold;">AND</span> property<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;version&quot;</span>;</pre></td></tr></table></div>

<p>and then update the field:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">UPDATE</span> properties <span style="color: #993333; font-weight: bold;">SET</span> <span style="color: #993333; font-weight: bold;">VALUE</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;1708&quot;</span> <span style="color: #993333; font-weight: bold;">WHERE</span> project<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;gdb&quot;</span> <span style="color: #993333; font-weight: bold;">AND</span> property<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;version&quot;</span>;</pre></td></tr></table></div>

<p>Start compilation with &#8220;darwinbuild -nochroot gdb&#8221;. Version 1708 will be downloaded. When configuration/compilation starts, abort it with ctrl-c.<br />
You will need to create a link (there is probably a more elegant solution to this!). Go to the usr/lib folder inside the iOS SDK. There you need to make a link from &#8220;crt1.10.6.o&#8221; to &#8220;crt1.o&#8221;.  Small example from my system:</p>
<p>lrwxr-xr-x  1 root  wheel     6 Apr 14 04:12 /Developer4/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/usr/lib/crt1.10.6.o -> crt1.o<br />
-rw-r&#8211;r&#8211;  1 root  wheel  2720 Aug 30  2011 /Developer4/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/usr/lib/crt1.3.1.o<br />
-rw-r&#8211;r&#8211;  1 root  wheel  4584 Aug 30  2011 /Developer4/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/usr/lib/crt1.o</p>
<p>Next step is to modify the file &#8220;BuildRoot/SourceCache/gdb/gdb-1708/src/gdb/macosx/macosx.defs&#8221;. Here you need to replace the import for exc.defs. Change:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="c" style="font-family:monospace;"><span style="color: #339933;">#import</span></pre></td></tr></table></div>

<p>to:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="c" style="font-family:monospace;"><span style="color: #339933;">#import &quot;/Developer4/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/usr/include/mach/exc.defs&quot;</span></pre></td></tr></table></div>

<p>(modify your path accordingly)</p>
<p>Last step for now is to modify the Makefile. We need to modify it so the ARM cross-compiling tools are used. It&#8217;s located at BuildRoot/SourceCache/gdb/gdb-1708/Makefile. To make it easier, you have my Makefile as a reference (all files at the end). I left the places that you need to modify tagged with FIXME. Your task is to change the paths.</p>
<p>Now you are ready to compile and start the trial and error process. This time, compile with &#8220;darwinbuild -nochroot -nosource gdb&#8221;. This will not unpack again the source package and will keep our previous changes.<br />
The compilation process will start and hopefully you will observe lots of output, which is a good sign! Near completation, errors regarding missing includes will start to appear. Your task is to manually copy them from OS X &#8220;/usr/include&#8221; to the iOS SDK &#8220;usr/include&#8221; folder (in my case /Developer4/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/usr/include/). The only modifications that you will need to do are to edit some files and change the import location to relative paths (or absolute if you prefer). Not elegant, but it works! When you reach the missing architecture includes, you can use the ones from i386. Sorry for not having a complete file list &#8211; I was hacking this without great hope that it would work heheheh.</p>
<p>And that&#8217;s it! After you fix the missing includes and defs, the compile should successfully finish and you have your shiny recompile gdb. You can also apply my gdb patches (recommended!). Before starting to compile everything, just go to the SourceCache folder, apply the patch and compile.<br />
Follow the steps from the reference post to copy the compiled binary, apply the necessary entitlements (<a href="http://246tnt.com/iPhone/">reference</a>), upload to your device and enjoy <img src='http://reverse.put.as/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>If you don&#8217;t feel adventurous enough then I include a fat binary (armv6 and armv7) with my patches. You just need to add the entitlements.<br />
Pancake (from Radare) created a package for this version. Add http://cydia.radare.org to your repo list and install it from there. Thanks to pancake for his work <img src='http://reverse.put.as/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Any question or problem you run into leave a comment so everyone else can benefit from the (potential) solution.</p>
<p>Have fun,<br />
fG!</p>
<p><a href="http://reverse.put.as/wp-content/uploads/2012/04/Makefile.gz">Makefile.gz</a></p>
<p><a href="http://reverse.put.as/wp-content/uploads/2012/04/gdb-arm-apple-darwin.gz">gdb-arm-apple-darwin.gz</a></p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="text" style="font-family:monospace;">-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
&nbsp;
SHA256(Makefile.gz)= 9aa69bc9b5a77a682c5bc74435440f26e839c0b216861f64a1af4f5a6432dfaf
SHA256(gdb-arm-apple-darwin.gz)= 7c3744c1be024a28c594c0ad90d75f0d187c5e53d9cb09d0183bba19b7415e6d
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
&nbsp;
iQEcBAEBAgAGBQJPkTVwAAoJEAADGo6F9Uj36RUIAJF5E3Ak7d/q6MR0tNPMIoKy
/v9lEkt9bBr0QBo/GHj0bEkcVKp58Ft3y2yE14qkk7BpxHYGalvzTLNGy9uk3TRL
xprJpwKxttpms14+N+tNKBEKu3g5iItMbyWiip60UWbhYMlmXpKQFOMxJeHQIYLy
88KlbqEfiztil4UY04q/CUjxFfV38lvQCosgjDJ2XHHMrsJNvxfLslEkMTxOrbS5
C64TNQ3lj7SWvVBgAQ9OkjrWqNcPJyULth9ScKEixhWNHzcjZmIxP9+9PmrfviAn
rckSlEVhNDtOf9tsDfBaMM2STmPG5unuhaMR2vda+VVAtNOHZ+KO1MY6k6y+Zfk=
=jUdm
-----END PGP SIGNATURE-----</pre></td></tr></table></div>

<p><span style="text-decoration: underline;"><strong>Update:</strong></span> List of added/modified include files (I forgot about the power of find :X)<br />
./_locale.h<br />
./libproc.h<br />
./mach/arm/machine_types.defs<br />
./mach/exc.defs<br />
./mach/mach_types.defs<br />
./mach/mach_vm.h<br />
./mach/machine/machine_types.defs<br />
./mach/machine/thread_state.h<br />
./mach/std_types.defs<br />
./ncurses_dll.h<br />
./net/route.h<br />
./sgtty.h<br />
./sys/dir.h<br />
./sys/ioctl_compat.h<br />
./sys/kern_control.h<br />
./sys/proc_info.h<br />
./sys/ptrace.h<br />
./sys/ttychars.h<br />
./sys/ttydev.h<br />
./termcap.h</p>
]]></content:encoded>
			<wfw:commentRss>http://reverse.put.as/2012/04/16/how-to-compile-gdb-for-ios/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Gdbinit v8.0: simultaneous support for x86/x86_64 and ARM architectures!</title>
		<link>http://reverse.put.as/2012/04/13/gdbinit-v8-0-simultaneous-support-for-x86x86_64-and-arm-architectures/</link>
		<comments>http://reverse.put.as/2012/04/13/gdbinit-v8-0-simultaneous-support-for-x86x86_64-and-arm-architectures/#comments</comments>
		<pubDate>Fri, 13 Apr 2012 13:44:39 +0000</pubDate>
		<dc:creator>fG!</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[gdb]]></category>
		<category><![CDATA[gdbinit]]></category>

		<guid isPermaLink="false">http://reverse.put.as/?p=1398</guid>
		<description><![CDATA[Here it is, a merge between the x86 and ARM versions of gdbinit. The only inconvenience is that you need to manually change the target, using the &#8220;32bits&#8221; and &#8220;64bits&#8221; commands for x86/x86_64 architectures, and &#8220;arm&#8221; for ARM. That&#8217;s a small price to pay for This version features a lot of cosmetic fixes (indentation mostly) [...]]]></description>
				<content:encoded><![CDATA[<p>Here it is, a merge between the x86 and ARM versions of gdbinit. The only inconvenience is that you need to manually change the target, using the &#8220;32bits&#8221; and &#8220;64bits&#8221; commands for x86/x86_64 architectures, and &#8220;arm&#8221; for ARM. That&#8217;s a small price to pay for <img src='http://reverse.put.as/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>This version features a lot of cosmetic fixes (indentation mostly) but also some fixes to the ARM related code, and a new command &#8211; dumpmacho. This command will dump the Mach-O header to a file. You need to supply the start address and the output filename. Only the header information is dumped &#8211; sometimes I need to dump the header and load it into otool or machoview to verify some things. Just a command to automate things!</p>
<p>The next step is to try to compile a new iOS gdb version that features my fixes. I think I will do another attempt to add the armv7 instructions to gdb so it&#8217;s not a major pain to debug these binaries. Let&#8217;s see if I can succeed this time.</p>
<p>There&#8217;s no test suite for gdbinit (&lt;xxxxxxxx&gt; testing is for chumps) ! From my tests everything is working, if not leave a msg here or at <a href="https://github.com/gdbinit/Gdbinit">github</a>.</p>
<p>Enjoy,<br />
fG!</p>
<p><a href="http://reverse.put.as/wp-content/uploads/2012/04/gdbinit8.gz">gdbinit8.gz</a><br />
SHA256(gdbinit)= fb510d812dabbad968e68ad1e4916aa85400d6375e0e404f5893946151420238</p>
]]></content:encoded>
			<wfw:commentRss>http://reverse.put.as/2012/04/13/gdbinit-v8-0-simultaneous-support-for-x86x86_64-and-arm-architectures/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Anti-debug trick #1: Abusing Mach-O to crash GDB</title>
		<link>http://reverse.put.as/2012/01/31/anti-debug-trick-1-abusing-mach-o-to-crash-gdb/</link>
		<comments>http://reverse.put.as/2012/01/31/anti-debug-trick-1-abusing-mach-o-to-crash-gdb/#comments</comments>
		<pubDate>Tue, 31 Jan 2012 21:28:22 +0000</pubDate>
		<dc:creator>fG!</dc:creator>
				<category><![CDATA[Mac Reversing]]></category>
		<category><![CDATA[anti-debug]]></category>
		<category><![CDATA[gdb]]></category>

		<guid isPermaLink="false">http://reverse.put.as/?p=1271</guid>
		<description><![CDATA[I developed this funny trick while trying to find a solution for a problem in a freelance project. It is pretty easy to implement and fun The trick consists in abusing the offset field in the dylib_command and pointing it to somewhere else. From the Mach-O File Format Reference, the command structures are: struct dylib_command [...]]]></description>
				<content:encoded><![CDATA[<p>I developed this funny trick while trying to find a solution for a problem in a freelance project. It is pretty easy to implement and fun <img src='http://reverse.put.as/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>The trick consists in abusing the offset field in the dylib_command and pointing it to somewhere else. From the <a href="http://developer.apple.com/library/mac/#documentation/developertools/conceptual/MachORuntime/Reference/reference.html">Mach-O File Format Reference</a>, the command structures are:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="c" style="font-family:monospace;"><span style="color: #993333;">struct</span> dylib_command              <span style="color: #993333;">struct</span> dylib                            <span style="color: #993333;">union</span> lc_str
<span style="color: #009900;">&#123;</span>                                 <span style="color: #009900;">&#123;</span>                                       <span style="color: #009900;">&#123;</span>
 uint_32 cmd<span style="color: #339933;">;</span>                      <span style="color: #993333;">union</span> lc_str name<span style="color: #339933;">;</span>                      <span style="color: #993333;">uint32_t</span> offset<span style="color: #339933;">;</span>
 uint_32 cmdsize<span style="color: #339933;">;</span>                  uint_32 timestamp<span style="color: #339933;">;</span>                      <span style="color: #339933;">#ifndef __LP64__</span>
 <span style="color: #993333;">struct</span> dylib dylib<span style="color: #339933;">;</span>               uint_32 current_version<span style="color: #339933;">;</span>                <span style="color: #993333;">char</span> <span style="color: #339933;">*</span>ptr<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>                                  uint_32 compatibility_version<span style="color: #339933;">;</span>          <span style="color: #339933;">#endif</span>
                                  <span style="color: #009900;">&#125;</span>                                       <span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>The definition of the offset field is:<br />
&#8220;A long integer. A byte offset from the start of the load command that contains this string to the start of the string data.&#8221;</p>
<p>Usually this field is always 0&#215;18 (24 bytes). This means that the library name string is located after the dylib_command command, whose size is 24 bytes. Right now your evil brain should be interpreting that definition as &#8220;<span style="text-decoration: underline;">an offset (anywhere) that contains the start of the string data</span>&#8220;. If not, don&#8217;t worry, <strong>evilness takes practice</strong> <img src='http://reverse.put.as/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>What happens if you put the string somewhere else and change the offset to point there? GDB crashes, otool can&#8217;t recognize the offset and so on.</p>
<p>Otool:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">Load <span style="color: #7a0874; font-weight: bold;">command</span> <span style="color: #000000;">20</span>
          cmd LC_LOAD_DYLIB
      cmdsize <span style="color: #000000;">88</span>
         name ?<span style="color: #7a0874; font-weight: bold;">&#40;</span>bad offset <span style="color: #000000;">28548</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
   <span style="color: #000000; font-weight: bold;">time</span> stamp <span style="color: #000000;">2</span> Thu Jan  <span style="color: #000000;">1</span> 01:00:02 <span style="color: #000000;">1970</span>
      current version 30.0.0
compatibility version 1.0.0</pre></td></tr></table></div>

<p>GDB:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">GNU <span style="color: #c20cb9; font-weight: bold;">gdb</span> 6.3.50-<span style="color: #000000;">20050815</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>Apple version gdb-<span style="color: #000000;">1344</span> + reverse.put.as patches v0.3<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>Mon Aug <span style="color: #000000;">22</span> 00:<span style="color: #000000;">31</span>:<span style="color: #000000;">56</span> UTC <span style="color: #000000;">2011</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
Copyright <span style="color: #000000;">2004</span> Free Software Foundation, Inc.
GDB is <span style="color: #c20cb9; font-weight: bold;">free</span> software, covered by the GNU General Public License, and you are
welcome to change it and<span style="color: #000000; font-weight: bold;">/</span>or distribute copies of it under certain conditions.
Type <span style="color: #ff0000;">&quot;show copying&quot;</span> to see the conditions.
There is absolutely no warranty <span style="color: #000000; font-weight: bold;">for</span> GDB.  Type <span style="color: #ff0000;">&quot;show warranty&quot;</span> <span style="color: #000000; font-weight: bold;">for</span> details.
This GDB was configured <span style="color: #c20cb9; font-weight: bold;">as</span> <span style="color: #ff0000;">&quot;x86_64-apple-darwin&quot;</span>...gdb-i386-apple-darwin<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">68831</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> malloc: <span style="color: #000000; font-weight: bold;">***</span> mmap<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #007800;">size</span>=<span style="color: #000000;">18446744073709506560</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> failed <span style="color: #7a0874; font-weight: bold;">&#40;</span>error <span style="color: #007800;">code</span>=<span style="color: #000000;">12</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #000000; font-weight: bold;">***</span> error: can<span style="color: #ff0000;">'t allocate region
*** set a breakpoint in malloc_error_break to debug</span></pre></td></tr></table></div>

<p>Fun stuff, right ? <img src='http://reverse.put.as/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /><br />
The problem with the debugger attach is that I assumed gdb would also crash if attached and forgot to try if it was true. It is a minor problem &#8211; the crackme is designed to resist a debugger attach.</p>
<p>The next trick is even more fun but requires some time to write the post. I didn&#8217;t took all the notes and I need to &#8220;rediscover&#8221; it to show you where the problem is.</p>
<p>Enjoy,<br />
fG!</p>
]]></content:encoded>
			<wfw:commentRss>http://reverse.put.as/2012/01/31/anti-debug-trick-1-abusing-mach-o-to-crash-gdb/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Gdbinit v7.4.4 &#8211; the skip command</title>
		<link>http://reverse.put.as/2012/01/10/gdbinit-v7-4-4-the-skip-command/</link>
		<comments>http://reverse.put.as/2012/01/10/gdbinit-v7-4-4-the-skip-command/#comments</comments>
		<pubDate>Tue, 10 Jan 2012 00:07:07 +0000</pubDate>
		<dc:creator>fG!</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[gdb]]></category>
		<category><![CDATA[gdbinit]]></category>

		<guid isPermaLink="false">http://reverse.put.as/?p=1227</guid>
		<description><![CDATA[Here is a small update to gdbinit with a new command, &#8220;skip&#8221;. This command will skip over the current instruction, without executing it. Usually I do it manually by set $pc=newvalue but this involves copy&#38;paste and mouse movements and gets boring after a while. It&#8217;s great to skip over calls while you are trying some [...]]]></description>
				<content:encoded><![CDATA[<p>Here is a small update to gdbinit with a new command, &#8220;skip&#8221;.<br />
This command will skip over the current instruction, without executing it. Usually I do it manually by set $pc=newvalue but this involves copy&amp;paste and mouse movements and gets boring after a while. It&#8217;s great to skip over calls while you are trying some stuff and analysing some program behavior.<br />
By default it will not execute the command at the new address. You can change this by modifying the configuration variable on top of gdbinit.</p>
<p>This command uses a little hack that Hopper&#8217;s author told me &#8211; the $_ variable will hold the last address, so we can disassemble 2 lines and compute the difference to retrieve the instruction size. Gdb has no command to retrieve the instruction size at a given address.<br />
I did some (incomplete) work to add a new command for this. Being an economist, I can&#8217;t avoid this dilemma &#8211; to invest or not (more) time into gdb. Gdb source is a boring mess and LLDB is improving. I am thinking to try to create an initial LLDB port of gdbinit. This should allow me to understand its true potential as reversing debugger and take a decision where to invest time &amp; resources.</p>
<p>Have fun,<br />
fG!</p>
<p><a href="http://reverse.put.as/wp-content/uploads/2012/01/gdbinit744.gz">gdbinit744.gz</a><br />
SHA256(gdbinit744.gz)= 2b223998571069f00edebd606d055c5b370ede5a8cb2b2fe69093c310e32c547</p>
]]></content:encoded>
			<wfw:commentRss>http://reverse.put.as/2012/01/10/gdbinit-v7-4-4-the-skip-command/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How gdb disables ASLR in Mac OS X Lion</title>
		<link>http://reverse.put.as/2011/08/11/how-gdb-disables-aslr-in-mac-os-x-lion/</link>
		<comments>http://reverse.put.as/2011/08/11/how-gdb-disables-aslr-in-mac-os-x-lion/#comments</comments>
		<pubDate>Thu, 11 Aug 2011 21:45:17 +0000</pubDate>
		<dc:creator>fG!</dc:creator>
				<category><![CDATA[Mac Reversing]]></category>
		<category><![CDATA[aslr]]></category>
		<category><![CDATA[gdb]]></category>
		<category><![CDATA[kernel]]></category>

		<guid isPermaLink="false">http://reverse.put.as/?p=953</guid>
		<description><![CDATA[This isn&#8217;t a rocket science post but more like some notes for future reference Lion finally introduces full ASLR and gdb has the possibility to disable that feature when analyzing target binaries. A new gdb setting was added, &#8220;disable-aslr&#8221;, which allows to enable or disable this feature. By default this feature appears to be enabled [...]]]></description>
				<content:encoded><![CDATA[<p>This isn&#8217;t a rocket science post but more like some notes for future reference <img src='http://reverse.put.as/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /><br />
Lion finally introduces full ASLR and gdb has the possibility to disable that feature when analyzing target binaries. A new gdb setting was added, &#8220;disable-aslr&#8221;, which allows to enable or disable this feature.</p>
<p>By default this feature appears to be enabled (I am just looking at gdb source code) and it&#8217;s set by the variable &#8220;disable_aslr_flag&#8221; configured at gdb/macosx/macosx-tdep.c source file. But this isn&#8217;t the place where the magic happens. That is located in gdb/fork-child.c file (well there&#8217;s a second version at macosx/macosx-nat-inferior.c).<br />
A very rough draft of gdb workflow is something like this:</p>
<ol>
<li>Fork</li>
<li>If we are the child process, drop privileges</li>
<li>If we are the child process, use ptrace to &#8220;stop&#8221; the new process</li>
<li>Exec the target</li>
<li>Use again ptrace to resume the child</li>
<li>Wait for breakpoint events</li>
</ol>
<p>Step 4 in Apple&#8217;s gdb version tries to use posix_spawn instead of exec (or any of its variants) to launch the target. This allows to set some special attributes in the new process. One of the new attributes in Lion is &#8220;_POSIX_SPAWN_DISABLE_ASLR&#8221;. The name should be explicit about its purpose <img src='http://reverse.put.as/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>The piece of code that sets it in gdb/fork-child.c is:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="c" style="font-family:monospace;"><span style="color: #009900;">&#40;</span>...<span style="color: #009900;">&#41;</span>
            <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>disable_aslr_flag<span style="color: #009900;">&#41;</span>
              ps_flags <span style="color: #339933;">|=</span> _POSIX_SPAWN_DISABLE_ASLR<span style="color: #339933;">;</span>
            retval <span style="color: #339933;">=</span> posix_spawnattr_setflags<span style="color: #009900;">&#40;</span><span style="color: #339933;">&amp;</span>attr<span style="color: #339933;">,</span> ps_flags<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#40;</span>...<span style="color: #009900;">&#41;</span></pre></td></tr></table></div>

<p>If posix_spawn fails gdb will then try to execvp the target. At the kernel side, this is dealt with in &#8220;posix_spawn()&#8221; at &#8220;bsd/kern/kern_exec.c&#8221;:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="c" style="font-family:monospace;"><span style="color: #009900;">&#40;</span>...<span style="color: #009900;">&#41;</span>
                <span style="color: #808080; font-style: italic;">/*
                 * Disable ASLR for the spawned process.
                 */</span>
                <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>px_sa.<span style="color: #202020;">psa_flags</span> <span style="color: #339933;">&amp;</span> _POSIX_SPAWN_DISABLE_ASLR<span style="color: #009900;">&#41;</span>
                        OSBitOrAtomic<span style="color: #009900;">&#40;</span>P_DISABLE_ASLR<span style="color: #339933;">,</span> <span style="color: #339933;">&amp;</span>p<span style="color: #339933;">-&gt;</span>p_flag<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #808080; font-style: italic;">/*
                 * Forcibly disallow execution from data pages for the spawned process
                 * even if it would otherwise be permitted by the architecture default.
                 */</span>
                <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>px_sa.<span style="color: #202020;">psa_flags</span> <span style="color: #339933;">&amp;</span> _POSIX_SPAWN_ALLOW_DATA_EXEC<span style="color: #009900;">&#41;</span>
                        imgp<span style="color: #339933;">-&gt;</span>ip_flags <span style="color: #339933;">|=</span> IMGPF_ALLOW_DATA_EXEC<span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
&nbsp;
        <span style="color: #808080; font-style: italic;">/*
         * Disable ASLR during image activation.  This occurs either if the
         * _POSIX_SPAWN_DISABLE_ASLR attribute was found above or if
         * P_DISABLE_ASLR was inherited from the parent process.
         */</span>
        <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>p<span style="color: #339933;">-&gt;</span>p_flag <span style="color: #339933;">&amp;</span> P_DISABLE_ASLR<span style="color: #009900;">&#41;</span>
                imgp<span style="color: #339933;">-&gt;</span>ip_flags <span style="color: #339933;">|=</span> IMGPF_DISABLE_ASLR<span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>And that&#8217;s it! A new flag added, processes spawned with that flag active and bye bye ASLR <img src='http://reverse.put.as/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /><br />
Enjoy,<br />
fG!</p>
]]></content:encoded>
			<wfw:commentRss>http://reverse.put.as/2011/08/11/how-gdb-disables-aslr-in-mac-os-x-lion/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Gdbinit v7.4.2, Github and Twitter</title>
		<link>http://reverse.put.as/2011/08/11/gdbinit-v7-4-2-github-and-twitter/</link>
		<comments>http://reverse.put.as/2011/08/11/gdbinit-v7-4-2-github-and-twitter/#comments</comments>
		<pubDate>Thu, 11 Aug 2011 13:52:06 +0000</pubDate>
		<dc:creator>fG!</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[gdb]]></category>
		<category><![CDATA[gdbinit]]></category>

		<guid isPermaLink="false">http://reverse.put.as/?p=942</guid>
		<description><![CDATA[Hello, It seems like things are very quiet and I only push gdbinit updates. Well, I have been very busy with very interesting projects, most of which can&#8217;t see yet the &#8220;light of the day&#8221;. Need to find some time to fool around with some new stuff. It seems that vmprotect is coming to OS [...]]]></description>
				<content:encoded><![CDATA[<p>Hello,</p>
<p>It seems like things are very quiet and I only push gdbinit updates. Well, I have been very busy with very interesting projects, most of which can&#8217;t see yet the &#8220;light of the day&#8221;. Need to find some time to fool around with some new stuff.<br />
It seems that vmprotect is coming to OS X and that is exciting news. I hope they finish it soon since I am curious about Mac specific implementation and tricks.</p>
<p>This is just a minor release for gdbinit. It fixes a very weird bug that is happening in FreeBSD (many thanks to Evan for reporting it) and adds the (Linux) anti-anti-ptrace command posted <a href="http://falken.tuxfamily.org/?p=171">here</a>.<br />
I finally uploaded it to Github, <a href="https://github.com/gdbinit/Gdbinit/">https://github.com/gdbinit/Gdbinit/</a>. Now I need to understand its access control (I think I must add collaborators? I hate to RTFM these days <img src='http://reverse.put.as/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> ). You can find always the latest version here and there.</p>
<p>I also have a Twitter account, @osxreverser. It is usually used in a passive way, to keep up-to-date of what&#8217;s happening &#8211; I still have some difficulties to understand Twitter. My web interests are mostly related to Economics and Management, which are topics a bit stretched for a RE audience. Anyway, I just got up some followers after giving a tip to Charllie Miller (I am spending too much time into gdb source hehehe).</p>
<p>From Blackhat US 2011 there&#8217;s a very interesting presentation from iSEC Partners regarding APT (Advanced Persistent Threat) in Macs. Original link <a href="http://www.isecpartners.com/storage/docs/presentations/iSEC_BH2011_Mac_APT.pdf">here</a>. I am pretty sure that new challenges will arise in this area for Macs (if they don&#8217;t exist already!). Macs share in the corporate is increasing and this kind of attackers will of course wanting to extract (valuable) information from those machines (top execs usually have a preference for Apple products).</p>
<p>Happy holidays and have fun,<br />
fG!</p>
<p><a href="http://reverse.put.as/wp-content/uploads/2011/08/gdbinit742.gz">gdbinit742.gz</a><br />
SHA256(gdbinit742.gz)= 058b4910320a2370bf4ca5dc10da4f7cea105e73b9a28478c6f3e8475dba1bcf</p>
<p>The latest version can always be found <a href="http://reverse.put.as/gdbinit/">here</a>.</p>
<p><span style="text-decoration: underline;"><strong>Update:</strong></span><br />
There&#8217;s a bug in Apple&#8217;s gdb implementation where you can&#8217;t have a &#8220;commands&#8221; command inside a &#8220;define&#8221; command. Additionally, the &#8220;catch syscall ptrace&#8221; doesn&#8217;t work in OS X so it will give another error. The solution for now is to comment out the &#8220;ptraceme&#8221; function. I have replaced the file with this fix. If you need to use it in Linux just uncomment it out. That&#8217;s what you get for copy &amp; paste without proper testing! My fail <img src='http://reverse.put.as/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /><br />
Meanwhile, time to track gdb change logs to find the fix for above problem.</p>
]]></content:encoded>
			<wfw:commentRss>http://reverse.put.as/2011/08/11/gdbinit-v7-4-2-github-and-twitter/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Update to gdb patches &#8211; fix for a &#8220;new&#8221; bug</title>
		<link>http://reverse.put.as/2011/02/21/update-to-gdb-patches-fix-a-new-bug/</link>
		<comments>http://reverse.put.as/2011/02/21/update-to-gdb-patches-fix-a-new-bug/#comments</comments>
		<pubDate>Mon, 21 Feb 2011 16:12:02 +0000</pubDate>
		<dc:creator>fG!</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[gdb]]></category>
		<category><![CDATA[patches]]></category>

		<guid isPermaLink="false">http://reverse.put.as/?p=796</guid>
		<description><![CDATA[I was messing around with SoftwarePassport and Amit Singh&#8217;s tiny executable to find out why gdb doesn&#8217;t breakpoint in those two executables. I thought it was due to incomplete headers, but gdb can&#8217;t also breakpoint into nicertiny, which has the segment/section added (otool/otx SoftwarePassport problems can be fixed by manually adding the missing section &#8211; [...]]]></description>
				<content:encoded><![CDATA[<p>I was messing around with SoftwarePassport and Amit Singh&#8217;s tiny executable to find out why gdb doesn&#8217;t breakpoint in those two executables. I thought it was due to incomplete headers, but gdb can&#8217;t also breakpoint into nicertiny, which has the segment/section added (otool/otx SoftwarePassport problems can be fixed by manually adding the missing section &#8211; there is enough padding space in the header to do that so its developers might want to fix that <img src='http://reverse.put.as/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> ).</p>
<p>Anyway, I decided to use the int3 trick to see if gdb was able to breakpoint and it worked. But then I wanted to manually fix the code &#8211; restore the original byte and point EIP to the correct address &#8211; and gdb didn&#8217;t allowed me. You get a &#8220;Value being assigned to is no longer active.&#8221; error message. Web searching for the problem, and there is a small patch at <a href="https://bugzilla.redhat.com/attachment.cgi?id=313103&amp;action=diff">https://bugzilla.redhat.com/attachment.cgi?id=313103&amp;action=diff</a>. I tried it and it works! The problem isn&#8217;t exclusive with these two binaries but happens if you stop at the beginning of a function and gdb is missing stack frame information. So it&#8217;s a very useful fix <img src='http://reverse.put.as/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /><br />
I have also included in this patch the fix for LIBICONV problem, as described <a href="http://reverse.put.as/2009/01/14/how-to-compile-gdb-and-other-apple-open-source-packages-in-mac-os-x/">here</a>. If you don&#8217;t want to compile gdb yourself, I&#8217;m including the (fat) binary, compiled in Snow Leopard, 32/64 bits.</p>
<p>Enjoy!<br />
fG!</p>
<p><a href="http://reverse.put.as/wp-content/uploads/2011/02/all_patches_v0.2.patch.gz">all_patches_v0.2.patch.gz</a><br />
SHA256(all_patches_v0.2.patch.gz)= e9e113b583f6eeea47025fce612028ca76b63386cc35d6fcda5bb7c9a705814f</p>
<p><a href="http://reverse.put.as/wp-content/uploads/2011/02/gdb-i386-apple-darwin.gz">gdb-i386-apple-darwin.gz</a><br />
SHA256(gdb-i386-apple-darwin.gz)= 5ed41b093cd451b55bf35b6f103a9879c1e224f4721647c82757f8aee21293fb</p>
]]></content:encoded>
			<wfw:commentRss>http://reverse.put.as/2011/02/21/update-to-gdb-patches-fix-a-new-bug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
