\documentclass[10pt,a4paper]{article} % Packages \usepackage{fancyhdr} % For header and footer \usepackage{multicol} % Allows multicols in tables \usepackage{tabularx} % Intelligent column widths \usepackage{tabulary} % Used in header and footer \usepackage{hhline} % Border under tables \usepackage{graphicx} % For images \usepackage{xcolor} % For hex colours %\usepackage[utf8x]{inputenc} % For unicode character support \usepackage[T1]{fontenc} % Without this we get weird character replacements \usepackage{colortbl} % For coloured tables \usepackage{setspace} % For line height \usepackage{lastpage} % Needed for total page number \usepackage{seqsplit} % Splits long words. %\usepackage{opensans} % Can't make this work so far. Shame. Would be lovely. \usepackage[normalem]{ulem} % For underlining links % Most of the following are not required for the majority % of cheat sheets but are needed for some symbol support. \usepackage{amsmath} % Symbols \usepackage{MnSymbol} % Symbols \usepackage{wasysym} % Symbols %\usepackage[english,german,french,spanish,italian]{babel} % Languages % Document Info \author{lavender09} \pdfinfo{ /Title (penetration-testing-cheat-sheet.pdf) /Creator (Cheatography) /Author (lavender09) /Subject (Penetration Testing Cheat Sheet) } % Lengths and widths \addtolength{\textwidth}{6cm} \addtolength{\textheight}{-1cm} \addtolength{\hoffset}{-3cm} \addtolength{\voffset}{-2cm} \setlength{\tabcolsep}{0.2cm} % Space between columns \setlength{\headsep}{-12pt} % Reduce space between header and content \setlength{\headheight}{85pt} % If less, LaTeX automatically increases it \renewcommand{\footrulewidth}{0pt} % Remove footer line \renewcommand{\headrulewidth}{0pt} % Remove header line \renewcommand{\seqinsert}{\ifmmode\allowbreak\else\-\fi} % Hyphens in seqsplit % This two commands together give roughly % the right line height in the tables \renewcommand{\arraystretch}{1.3} \onehalfspacing % Commands \newcommand{\SetRowColor}[1]{\noalign{\gdef\RowColorName{#1}}\rowcolor{\RowColorName}} % Shortcut for row colour \newcommand{\mymulticolumn}[3]{\multicolumn{#1}{>{\columncolor{\RowColorName}}#2}{#3}} % For coloured multi-cols \newcolumntype{x}[1]{>{\raggedright}p{#1}} % New column types for ragged-right paragraph columns \newcommand{\tn}{\tabularnewline} % Required as custom column type in use % Font and Colours \definecolor{HeadBackground}{HTML}{333333} \definecolor{FootBackground}{HTML}{666666} \definecolor{TextColor}{HTML}{333333} \definecolor{DarkBackground}{HTML}{A3A3A3} \definecolor{LightBackground}{HTML}{F3F3F3} \renewcommand{\familydefault}{\sfdefault} \color{TextColor} % Header and Footer \pagestyle{fancy} \fancyhead{} % Set header to blank \fancyfoot{} % Set footer to blank \fancyhead[L]{ \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{C} \SetRowColor{DarkBackground} \vspace{-7pt} {\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\noindent \hspace*{-6pt}\includegraphics[width=5.8cm]{/web/www.cheatography.com/public/images/cheatography_logo.pdf}} } \end{tabulary} \columnbreak \begin{tabulary}{11cm}{L} \vspace{-2pt}\large{\bf{\textcolor{DarkBackground}{\textrm{Penetration Testing Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{lavender09} via \textcolor{DarkBackground}{\uline{cheatography.com/187967/cs/39212/}}} \end{tabulary} \end{multicols}} \fancyfoot[L]{ \footnotesize \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{LL} \SetRowColor{FootBackground} \mymulticolumn{2}{p{5.377cm}}{\bf\textcolor{white}{Cheatographer}} \\ \vspace{-2pt}lavender09 \\ \uline{cheatography.com/lavender09} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Not Yet Published.\\ Updated 13th June, 2023.\\ Page {\thepage} of \pageref{LastPage}. \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Sponsor}} \\ \SetRowColor{white} \vspace{-5pt} %\includegraphics[width=48px,height=48px]{dave.jpeg} Measure your website readability!\\ www.readability-score.com \end{tabulary} \end{multicols}} \begin{document} \raggedright \raggedcolumns % Set font size to small. Switch to any value % from this page to resize cheat sheet text: % www.emerson.emory.edu/services/latex/latex_169.html \footnotesize % Small font. \begin{multicols*}{4} \begin{tabularx}{3.833cm}{x{1.20155 cm} x{2.23145 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{3.833cm}}{\bf\textcolor{white}{Setting Up}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Using apt}} & apt \textless{}COMMAND\textgreater{} \textless{}PACKAGE\textgreater{} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} {\bf{Firefox Extensions}} & Wappalyzer, Foxyproxy, HacKontent, Vulners \tn % Row Count 3 (+ 2) % Row 2 \SetRowColor{LightBackground} {\bf{Note-Taking}} & Obsidian, Pwndocs \tn % Row Count 5 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{3.833cm}}{{\bf{Pwndocs}} This is a professional Penetration Testing report generator available {[}Here{]}(https://github.com/pwndoc/pwndoc) \newline \newline {\bf{System Updates}} You can add custom commands to your `\textasciitilde{}/.bashrc` file to run things like system updates without having to type the whole apt command \newline `\{\{lang-bash\}\}echo "alias sysupdate='sudo apt-get update -y \&\& sudo apt-get upgrade -y'" \textgreater{}\textgreater{} \textasciitilde{}/. bashrc` \newline \newline To run this command, start a new terminal and type `sysupdate`} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{x{1.7165 cm} x{1.7165 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{3.833cm}}{\bf\textcolor{white}{Information Gathering}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{2}{x{3.833cm}}{{\bf{nslookup}}} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} Query All & nslookup -query=all \textless{}URL\textgreater{} \tn % Row Count 3 (+ 2) % Row 2 \SetRowColor{LightBackground} Name Server & nslookup -type=ns \textless{}URL\textgreater{} \tn % Row Count 5 (+ 2) % Row 3 \SetRowColor{white} {[}Zone Transfer{]}(https://www.youtube.com/watch?v=kdYnSfzb3UA\&pp=ygUed2hhdCBpcyBhIHpvbmUgdHJhbnNmZXIgYXR0YWNr) & {[}Link{]}(https://allabouttesting.org/top-5-commands-to-test-dns-zone-transfer-in-2-minutes/) \tn % Row Count 11 (+ 6) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{2}{x{3.833cm}}{{\bf{Nmap}}} \tn % Row Count 12 (+ 1) % Row 5 \SetRowColor{white} Check Open Ports & nmap -n -Pn -vvv \textless{}IP\textgreater{} \tn % Row Count 14 (+ 2) % Row 6 \SetRowColor{LightBackground} Scan w/Common Scripts & nmap -sSCV -Pn -A -vvv -p=\textless{}PORTS\textgreater{} \textless{}IP\textgreater{} -{}-min-rate=5000 \tn % Row Count 17 (+ 3) % Row 7 \SetRowColor{white} Output Scan to Files & \textless{}nmap command\textgreater{} -oA filename \tn % Row Count 19 (+ 2) % Row 8 \SetRowColor{LightBackground} Change XML to HTML & xlstproc filename.xml -o filename.html \tn % Row Count 21 (+ 2) % Row 9 \SetRowColor{white} {\bf{Whois}} & whois \textless{}URL\textgreater{} \tn % Row Count 22 (+ 1) % Row 10 \SetRowColor{LightBackground} {\bf{Dnsenum}} & dnsenum \textless{}URL\textgreater{} \tn % Row Count 23 (+ 1) % Row 11 \SetRowColor{white} {\bf{Cyberchef}} & {[}Link{]}(https://gchq.github.io/CyberChef/) \tn % Row Count 26 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{3.833cm}}{Replace `\textless{}\textgreater{}` with the respective info.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{x{1.44186 cm} x{1.99114 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{3.833cm}}{\bf\textcolor{white}{Exploitation}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Metasploit}} & metasploit -q \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} Update & metasploit update \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} Documentation & {[}Link{]}(https://docs.metasploit.com/) \tn % Row Count 4 (+ 2) % Row 3 \SetRowColor{white} Multihandler & {[}Link{]}(https://www.infosecmatter.com/metasploit-module-library/?mm=exploit/multi/handler) \tn % Row Count 8 (+ 4) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{2}{x{3.833cm}}{{\bf{Searchsploit}}} \tn % Row Count 9 (+ 1) % Row 5 \SetRowColor{white} Vulnerability Search & searchsploit \textless{}APPLICATION\textgreater{} \tn % Row Count 11 (+ 2) % Row 6 \SetRowColor{LightBackground} download module & searchsploit -m \textless{}MODULE NUM\textgreater{} \tn % Row Count 13 (+ 2) % Row 7 \SetRowColor{white} {\bf{Reverse Shell Generator}} & {[}Revshells{]}(https://www.revshells.com/) \tn % Row Count 15 (+ 2) % Row 8 \SetRowColor{LightBackground} \mymulticolumn{2}{x{3.833cm}}{{\bf{Netcat}}} \tn % Row Count 16 (+ 1) % Row 9 \SetRowColor{white} Reverse Shell (Connect) & nc -lvnp \textless{}PORT\textgreater{} \tn % Row Count 18 (+ 2) % Row 10 \SetRowColor{LightBackground} Bind Shell (Connect) & nc \textless{}IP\textgreater{} \textless{}PORT\textgreater{} \tn % Row Count 20 (+ 2) % Row 11 \SetRowColor{white} rlwrap & `rlwrap nc \textless{}..\textgreater{}` - Gives you more control \tn % Row Count 22 (+ 2) % Row 12 \SetRowColor{LightBackground} {\bf{Pwncat - Python Netcat C2}} & {[}Link{]}(https://pwncat.readthedocs.io/en/latest/usage.html) \tn % Row Count 25 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{x{1.51052 cm} x{1.92248 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{3.833cm}}{\bf\textcolor{white}{Bruteforce Attacks}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Hashcat}} & {[}Full Cheatsheet{]}(https://github.com/frizb/Hashcat-Cheatsheet) \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} Find \seqsplit{encoding/encryption} in help & hashcat -h | grep \textless{}ENC\textgreater{} \tn % Row Count 5 (+ 2) % Row 2 \SetRowColor{LightBackground} {\bf{JohnTheRipper}} & {[}Full Cheatsheet{]}(https://countuponsecurity.files.wordpress.com/2016/09/jtr-cheat-sheet.pdf) \tn % Row Count 10 (+ 5) % Row 3 \SetRowColor{white} {\bf{Crackstation}} - Rainbow Table & {[}Link{]}(https://crackstation.net/) \tn % Row Count 12 (+ 2) % Row 4 \SetRowColor{LightBackground} {\bf{CrackMapExec}} & {[}Link{]}(https://cheatsheet.haax.fr/windows-systems/exploitation/crackmapexec/) \tn % Row Count 16 (+ 4) % Row 5 \SetRowColor{white} {\bf{WPScan}} & {[}Link{]}(https://www.exploit-db.com/docs/english/45556-wordpress-penetration-testing-using-wpscan-and-metasploit.pdf) \tn % Row Count 22 (+ 6) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{3.833cm}}{{\bf{Hashcat}} \newline hashcat -h | grep md5 \newline \newline {\bf{CrackMapExec (CME)}} \newline {[}Comprehensive Guide{]}(https://www.youtube.com/watch?v=IY\_VyAz3JGA\&pp=ygUMY3JhY2ttYXBleGVj)} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{x{1.3732 cm} x{2.0598 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{3.833cm}}{\bf\textcolor{white}{Wi-Fi Cracking}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{2}{x{3.833cm}}{{\bf{Airmon-ng}} - Monitor} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} Start listener on interface & airmon-ng start wlan0 \tn % Row Count 3 (+ 2) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{2}{x{3.833cm}}{{\bf{Airodump-ng}} - Dump} \tn % Row Count 4 (+ 1) % Row 3 \SetRowColor{white} Select Interface & airodump-ng wlan0 \tn % Row Count 5 (+ 1) % Row 4 \SetRowColor{LightBackground} Dump Hashes & airodump-ng -w \textless{}WORDLIST\textgreater{} -c 1 -{}-bssid \textless{}MAC\textgreater{} wlan0 \tn % Row Count 8 (+ 3) % Row 5 \SetRowColor{white} & airodump-ng -w Attack1 -c 1 -{}-bssid E6:6F:14:31:63:1C wlan0 \tn % Row Count 11 (+ 3) % Row 6 \SetRowColor{LightBackground} \mymulticolumn{2}{x{3.833cm}}{{\bf{Aircrack-ng}} - Crack} \tn % Row Count 12 (+ 1) % Row 7 \SetRowColor{white} Crack Captured MAC & aircrack-ng -a2 -b \textless{}MAC\textgreater{} -w \textless{}WORDLIST\textgreater{} \textless{}/path/to/capture\textgreater{} \tn % Row Count 15 (+ 3) % Row 8 \SetRowColor{LightBackground} & aircrack-ng -a2 -b E6:6F:14:31:63:1C -w \seqsplit{/root/Desktop/wordlist.txt} \seqsplit{/root/Desktop/Attack1-01}.cap \tn % Row Count 19 (+ 4) % Row 9 \SetRowColor{white} {\bf{Documentation}} & {[}Link{]}(https://www.aircrack-ng.org/documentation.html) \tn % Row Count 22 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}