<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Cheat Sheets on Zach Grace</title><link>https://zachgrace.com/cheat_sheets/</link><description>Recent content in Cheat Sheets on Zach Grace</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Wed, 10 Apr 2019 00:00:00 +0000</lastBuildDate><atom:link href="https://zachgrace.com/cheat_sheets/index.xml" rel="self" type="application/rss+xml"/><item><title>Proxmox Cheat Sheet</title><link>https://zachgrace.com/cheat_sheets/proxmox/</link><pubDate>Wed, 10 Apr 2019 00:00:00 +0000</pubDate><guid>https://zachgrace.com/cheat_sheets/proxmox/</guid><description>&lt;h2 id="importing-vmware-images">Importing VMware Images&lt;/h2>
&lt;p>When exporting a VM from VMware, the image will likely get exported in one of two formats depending on how you exported it, OVF or OVA. Below are the steps for importing each into Proxmox. This was tested on version 5.3-8.&lt;/p>
&lt;h2 id="ovf">OVF&lt;/h2>
&lt;ol>
&lt;li>Transfer the &lt;code>.ovf&lt;/code> and &lt;code>.vmdk&lt;/code> to the host via SCP&lt;/li>
&lt;li>Run &lt;code>qm importovf &amp;lt;vmid&amp;gt; &amp;lt;ovf file&amp;gt; &amp;lt;storage&amp;gt;&lt;/code>, Ex: &lt;code>qm importovf 100 exported.ovf local-lvm&lt;/code>&lt;/li>
&lt;/ol>
&lt;p>Note: if the &lt;code>.vmdk&lt;/code> name differs from what&amp;rsquo;s stated in the manifest, you&amp;rsquo;ll need to rename it to match.&lt;/p></description></item><item><title>Docker Cheat Sheet</title><link>https://zachgrace.com/cheat_sheets/docker/</link><pubDate>Thu, 16 Feb 2017 00:00:00 +0000</pubDate><guid>https://zachgrace.com/cheat_sheets/docker/</guid><description>&lt;p>Install docker on a debian-based system: &lt;code>apt-get install docker.io&lt;/code>&lt;/p>
&lt;p>Download an Ubuntu 14.04 image: &lt;code>docker pull ubuntu:14.04&lt;/code>&lt;/p>
&lt;p>Download many Ubuntu-based images: &lt;code>docker pull ubuntu&lt;/code>&lt;/p>
&lt;p>Run bash in Ubuntu: &lt;code>docker run -it ubuntu /bin/bash&lt;/code>&lt;/p>
&lt;p>View running containers: &lt;code>docker ps&lt;/code>&lt;/p>
&lt;p>Attach to a running container: &lt;code>docker attach b80939864b33&lt;/code>&lt;/p>
&lt;pre>&lt;code>root@Docker:~# docker run -it ubuntu:14.04 /bin/bash
root@01a82e993d47:/# ls
bin boot dev etc home lib lib64 media mnt opt proc root run sbin srv sys tmp usr var
root@01a82e993d47:/# touch TEST
root@01a82e993d47:/# ls
TEST bin boot dev etc home lib lib64 media mnt opt proc root run sbin srv sys tmp usr var
root@Docker:~# docker commit -m "Test" -a "ztg" 01a82e993d47 foobar/ubuntu:v2
10a437b18b7f5aa3ee657b536505ff4bb5dd956a8611cb2324b24b03b9800f4c
root@Docker:~# docker run -it foobar/ubuntu:v2
root@0233b5a1119a:/# ls
TEST bin boot dev etc home lib lib64 media mnt opt proc root run sbin srv sys tmp usr var&lt;/code>&lt;/pre>
&lt;p>View available docker images:&lt;/p></description></item><item><title>radare2 Cheat Sheet</title><link>https://zachgrace.com/cheat_sheets/radare2/</link><pubDate>Sat, 05 Mar 2016 00:00:00 +0000</pubDate><guid>https://zachgrace.com/cheat_sheets/radare2/</guid><description>&lt;p>Here&amp;rsquo;s a few commands I&amp;rsquo;ve found useful while learning the radare2 tool set.&lt;/p>
&lt;h2 id="radare2r2">radare2/r2&lt;/h2>
&lt;p>List functions&lt;/p>
&lt;p>&lt;code>afl&lt;/code>&lt;/p>
&lt;p>Disassemble function:&lt;/p>
&lt;p>&lt;code>aa&lt;/code>&lt;/p>
&lt;p>&lt;code>pdr@main&lt;/code>&lt;/p>
&lt;p>Print call graph:&lt;/p>
&lt;p>&lt;code>agc &amp;gt; /tmp/foo.dot&lt;/code>
&lt;code>xdot /tmp/foo.dot&lt;/code>&lt;/p>
&lt;p>Print a detailed graph:&lt;/p>
&lt;p>&lt;code>ag $$ &amp;gt; /tmp/c2.dot&lt;/code>&lt;/p>
&lt;p>Disassemble instruction:&lt;/p>
&lt;p>&lt;code>pD 2&lt;/code>&lt;/p>
&lt;p>Seek to a specific memory location:&lt;/p>
&lt;p>&lt;code>s 0x08048470&lt;/code>&lt;/p>
&lt;p>Write hex value:&lt;/p>
&lt;p>&lt;code>wx eb&lt;/code>&lt;/p>
&lt;h2 id="debuggingvisual-mode">Debugging/Visual Mode&lt;/h2>
&lt;p>&lt;a href="https://radare.gitbooks.io/radare2book/content/introduction/basic_debugger_session.html">https://radare.gitbooks.io/radare2book/content/introduction/basic_debugger_session.html&lt;/a>&lt;/p>
&lt;p>&lt;code>r2 -d ./file&lt;/code>&lt;/p>
&lt;p>Set breakpoint&lt;/p>
&lt;p>&lt;code>db 0x00401383&lt;/code>&lt;/p>
&lt;p>Remove breakpoint&lt;/p>
&lt;p>&lt;code>db -0x00401383&lt;/code>&lt;/p>
&lt;p>List breakpoints&lt;/p></description></item><item><title>GDB Cheat Sheet</title><link>https://zachgrace.com/cheat_sheets/gdb/</link><pubDate>Sat, 04 Jul 2015 00:00:00 +0000</pubDate><guid>https://zachgrace.com/cheat_sheets/gdb/</guid><description>&lt;p>This is a collection of commands I&amp;rsquo;ve found useful when working with GDB.&lt;/p>
&lt;hr>
&lt;p>Run an executable with args:&lt;/p>
&lt;p>&lt;code>gdb --args path/to/executable -every -arg you can=think &amp;lt; of&lt;/code>&lt;/p>
&lt;p>&lt;code>gdb -q --args ./bof $(/opt/metasploit-framework/tools/pattern_create.rb 1000)&lt;/code>&lt;/p>
&lt;hr>
&lt;p>Set a breakpoint:&lt;/p>
&lt;p>&lt;code>break main&lt;/code>&lt;/p>
&lt;p>&lt;code>b main&lt;/code>&lt;/p>
&lt;hr>
&lt;p>Set a breakpoint at an instruction:&lt;/p>
&lt;p>&lt;code>b *0x80484b5&lt;/code>&lt;/p>
&lt;hr>
&lt;p>Disassemble a function:&lt;/p>
&lt;p>&lt;code>disassemble main&lt;/code>&lt;/p>
&lt;p>&lt;code>disas main&lt;/code>&lt;/p>
&lt;hr>
&lt;p>Show registers:&lt;/p>
&lt;p>&lt;code>info registers&lt;/code>&lt;/p>
&lt;p>&lt;code>i r&lt;/code>&lt;/p>
&lt;hr>
&lt;p>Show a specific register:&lt;/p>
&lt;p>&lt;code>info registers eip&lt;/code>&lt;/p>
&lt;p>&lt;code>i r eip&lt;/code>&lt;/p></description></item></channel></rss>