<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"><channel><title><![CDATA[Uday Mittal's Substack: Red Team Training]]></title><description><![CDATA[A dedicated space for courses published by me.]]></description><link>https://www.udaymittal.com/s/red-team-training</link><image><url>https://substackcdn.com/image/fetch/$s_!4-oo!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8eca86ff-0051-4405-b74f-74d582ba8c15_561x561.png</url><title>Uday Mittal&apos;s Substack: Red Team Training</title><link>https://www.udaymittal.com/s/red-team-training</link></image><generator>Substack</generator><lastBuildDate>Thu, 16 Apr 2026 08:14:20 GMT</lastBuildDate><atom:link href="https://www.udaymittal.com/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Uday Mittal]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[udaymittal@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[udaymittal@substack.com]]></itunes:email><itunes:name><![CDATA[Uday Mittal]]></itunes:name></itunes:owner><itunes:author><![CDATA[Uday Mittal]]></itunes:author><googleplay:owner><![CDATA[udaymittal@substack.com]]></googleplay:owner><googleplay:email><![CDATA[udaymittal@substack.com]]></googleplay:email><googleplay:author><![CDATA[Uday Mittal]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[Mona.py for exploit devs: 6 must know commands]]></title><description><![CDATA[Six mona.py commands I regularily use during exploit development. They help me speed up the entire process. Watch the video for demonstartion.]]></description><link>https://www.udaymittal.com/p/monapy-for-exploit-devs-6-must-know-commands</link><guid isPermaLink="false">https://www.udaymittal.com/p/monapy-for-exploit-devs-6-must-know-commands</guid><dc:creator><![CDATA[Uday Mittal]]></dc:creator><pubDate>Sat, 19 Oct 2024 17:41:00 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/a095b87a-6e17-4767-9c29-06b9fa154e39_457x317.webp" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>When it comes to exploit development for Microsoft Windows, Mona.py is the go to library for most security researchers. In this post I list six commands that I use often. Watch the video for demonstration.</p><h3>What is Mona.py?</h3><ul><li><p>A pycommand for Immunity Debugger, designed and developed to aid the exploit development process</p></li><li><p>Automates various tasks such as address search, pattern generation and comparison, egg hunter generation etc.</p></li><li><p>Replaces pvefindaddr</p></li><li><p>Developed by Corelanc0d3r (Peter Van Eeckhoutte)</p></li><li><p>Official link: http://bit.ly/mona-py</p></li></ul><h3>Command 1: Set workingfolder</h3><ul><li><p>Sets the working directory for mona to store command output and related files:</p><ul><li><p><strong>!mona config -set workingfolder c:\logs\%p</strong></p></li></ul></li><li><p>This will tell mona to write the output to subfolders of c:\logs. The %p variable will be replaced with the process name currently being debugged.</p></li><li><p>If you want to further group output, you can even use the %i variable in the workingfolder parameter. This variable will get replaced with the process ID of the application being debugged.</p></li></ul><h3>Command 2: bytearray</h3><ul><li><p>Generates an array of hex bytes from \x00 to \xff (except for the excluded ones):</p><ul><li><p><strong>!mona</strong> <strong>bytearray</strong></p></li></ul></li><li><p>Produces two files: text and binary</p></li><li><p>Takes two flags:</p><ul><li><p>-b &#8211; to exclude bytes from array</p></li><li><p>-r &#8211; to output array in the reverse order (\xff..\x00)</p></li></ul></li><li><p>Use compare command to automate the comparison process:</p><ul><li><p><strong>!mona compare &#8211;f &lt;filename&gt; -a &lt;address&gt;</strong></p></li></ul></li></ul><h3>Command 3: pc, po &amp; findmsp</h3><ul><li><p>Generates a cyclic pattern (Metasploit pattern) of a given size and length:</p><ul><li><p><strong>!mona pc &lt;length&gt;</strong></p></li></ul></li><li><p>Locates given four bytes in a cyclic pattern and returns the offset:</p><ul><li><p><strong>!mona po &lt;bytes&gt;</strong></p></li></ul></li><li><p>Find instances of the cyclic pattern:</p><ul><li><p><strong>!mona</strong> <strong>findmsp</strong></p></li></ul></li><li><p>Optional argument:</p><ul><li><p><strong>-distance </strong>Sets the distance from ESP to begin search from</p></li></ul></li></ul><h3>Command 4: egg</h3><ul><li><p>Creates an egghunter routine with a default tag (w00t):</p><ul><li><p><strong>!mona egg</strong></p></li></ul></li><li><p>Optional arguments:</p><ul><li><p>-t : tag (ex: w00t). Default value is w00t</p></li><li><p>-c : enable checksum routine. Only works in conjunction with parameter -f</p></li><li><p>-f : file containing the shellcode</p></li><li><p>-depmethod : method can be &#8220;virtualprotect&#8221;, &#8220;copy&#8221; or &#8220;copy_size&#8221;</p></li><li><p>-depreg : sets the register that contains a pointer to the API function to bypass DEP. By default this register is set to ESI</p></li><li><p>-depsize : sets the size for the dep bypass routine</p></li><li><p>-depdest : this register points to the location of the egghunter itself.</p></li></ul></li></ul><h3>Command 5: jmp</h3><ul><li><p>Searches for pointers that will lead to execution of the code located at the address pointed by a given register:</p><ul><li><p><strong>!mona</strong> <strong>jmp &#8211;r &lt;register&gt;</strong></p></li></ul></li><li><p>Default module criteria : skip aslr and rebase modules. The search will include OS modules by default, but this can be overruled by using the -cm os=false global option.</p></li></ul><h3>Command 6: seh</h3><ul><li><p>Searches for pointers to routines that will lead to code execution in a SEH overwrite exploit:</p><ul><li><p><strong>!mona</strong> <strong>seh</strong></p></li></ul></li><li><p>By default, it will attempt to bypass SafeSEH by excluding pointers from rebase, aslr and safeseh protected modules.</p></li><li><p>The optional -all parameter, if specified, will also search for pointers in memory locations outside of loaded modules.</p></li></ul><h3>Watch the video</h3><div id="youtube2-E1WztWHv4bY" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;E1WztWHv4bY&quot;,&quot;startTime&quot;:null,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/E1WztWHv4bY?rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div><h3>Learn the art of exploit development</h3><p>If you want to learn the art of exploit development check out our Hands-on courses:</p><ul><li><p><a href="https://www.udemy.com/course/hands-on-fuzzing-and-exploit-development-basic/">Hands-on Exploit Development</a></p></li><li><p><a href="https://www.udemy.com/course/hands-on-exploit-development-advanced/">Hands-on Exploit Development (Advanced)</a></p></li><li><p><a href="https://www.udemy.com/course/immunity-debugger-yaksas-csc-lab-essentials/">Immunity Debugger for Exploit Devs - YCSC Lab Essentials</a></p></li></ul>]]></content:encoded></item></channel></rss>