\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{djf} \pdfinfo{ /Title (enumeration.pdf) /Creator (Cheatography) /Author (djf) /Subject (Enumeration 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}{216AA3} \definecolor{LightBackground}{HTML}{F1F5F9} \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{Enumeration Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{djf} via \textcolor{DarkBackground}{\uline{cheatography.com/68878/cs/17349/}}} \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}djf \\ \uline{cheatography.com/djf} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Published 11th September, 2020.\\ Updated 11th September, 2020.\\ 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{tabularx}{17.67cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{17.67cm}}{\bf\textcolor{white}{Alive Hosts}} \tn \SetRowColor{white} \mymulticolumn{1}{x{17.67cm}}{{\bf{NMAP}} \newline % Row Count 1 (+ 1) `nmap -sn -n 172.16.0.1\textbackslash{}24 | grep "Nmap" | cut -d " " -f 5 \textgreater{} alives` \newline % Row Count 3 (+ 2) {\bf{NIX}} \newline % Row Count 4 (+ 1) bash/sh \newline % Row Count 5 (+ 1) `for x in \{1..254..1\};do ping -c 1 172.16.0.\$x | grep "64 b" | cut -d" " -f4 \textgreater{}\textgreater{} alive.hosts; done` \newline % Row Count 7 (+ 2) {\bf{WIN}} \newline % Row Count 8 (+ 1) cmd.exe \newline % Row Count 9 (+ 1) `for /L \%i in (10,1,254) do @ (for /L \%x in (10,1,254) do @ ping -n 1 -w 172.16.\%i.\%x 2\textgreater{}nul | find "Reply" \&\& echo 172.16.\%i.\%x \textgreater{}\textgreater{} alive.hosts)` \newline % Row Count 12 (+ 3) powershell.exe \newline % Row Count 13 (+ 1) `Foreach(\$x in 1..255)\{Test-Connection 172.16.0.\$x\}`% Row Count 15 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{17.67cm}}{\bf\textcolor{white}{NMAP}} \tn \SetRowColor{white} \mymulticolumn{1}{x{17.67cm}}{Alives Generation \newline % Row Count 1 (+ 1) `nmap -sn -n | grep "Nmap" | awk \$6 \textgreater{} alives.hosts` \newline % Row Count 3 (+ 2) `nmap -sn -n -oN scan.nmap \&\& awk \$6 scan.nmap \textgreater{} alives.hosts` \newline % Row Count 5 (+ 2) Very Minimal Footprint with Fragmentation \& Decoys \newline % Row Count 7 (+ 2) `nmap -sS -{}-max-retries 0 -{}-scan-delay 3 -{}-os-limit -{}-max-os-tries 1 -T0 -n -Pn -iL targets.txt -vv -f -D RND:10 -{}-ttl 32` \newline % Row Count 10 (+ 3) Conscious Footprint \newline % Row Count 11 (+ 1) `nmap -sS -sN -p1,2-9,39 -Pn -n -T2 -f 192.168.0.1\textbackslash{}24` \newline % Row Count 13 (+ 2) Aggressive Everything \newline % Row Count 14 (+ 1) `nmap -A -p- 0.0.0.0\textbackslash{}0` \newline % Row Count 15 (+ 1) XML Web Presentation \newline % Row Count 16 (+ 1) `nmap -sT -p- 192.168.1.5 -oX webpresentation.xml -{}-webxml`% Row Count 18 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{17.67cm}}{\bf\textcolor{white}{Break 01}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{17.67cm}}{} \tn % Row Count 0 (+ 0) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{x{2.7999 cm} x{5.4351 cm} x{2.7999 cm} x{5.4351 cm} } \SetRowColor{DarkBackground} \mymulticolumn{4}{x{17.67cm}}{\bf\textcolor{white}{NMAP Flags/Args}} \tn % Row 0 \SetRowColor{LightBackground} `-sn` & `Alive hosts discovery\textasciicircum{}1A\textasciicircum{}` & `-sU` & `UDP Scan` \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} `-Pn` & `Assume host is alive` & `-sT` & `Full TCP Handshake Scan` \tn % Row Count 5 (+ 2) % Row 2 \SetRowColor{LightBackground} `-n` & `Don't resolve IP addresses` & `-sS` & `TCP SYN Scan` \tn % Row Count 8 (+ 3) % Row 3 \SetRowColor{white} `-R` & `Always resolve IP addresses` & `-sA` & `TCP ACK Scan` \tn % Row Count 11 (+ 3) % Row 4 \SetRowColor{LightBackground} `-F` & `Fast amount of ports Scan` & `-sC` & `Nmap Scripts` \tn % Row Count 14 (+ 3) % Row 5 \SetRowColor{white} `-p-` & `All ports 1-65355` & `-sN` & `TCP NULL Scan` \tn % Row Count 16 (+ 2) % Row 6 \SetRowColor{LightBackground} `-T{[}1-5{]}` & `Timing speed very slow (1) to very fast (5)` & `-sF` & `TCP FIN Scan` \tn % Row Count 20 (+ 4) % Row 7 \SetRowColor{white} `-{}-scan-delay {[}int{]}` & `Time between probes` & `-sV` & `Service Enumeration` \tn % Row Count 24 (+ 4) % Row 8 \SetRowColor{LightBackground} `-f` & `Fragment Packets (IDS/FW evasion)` & `-O` & `OS Type Enumeration` \tn % Row Count 27 (+ 3) % Row 9 \SetRowColor{white} `-D` & `Decoy hosts traffic` & \seqsplit{`RND:10`} & `10 Random source hosts for '-D'` \tn % Row Count 30 (+ 3) \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{x{2.7999 cm} x{5.4351 cm} x{2.7999 cm} x{5.4351 cm} } \SetRowColor{DarkBackground} \mymulticolumn{4}{x{17.67cm}}{\bf\textcolor{white}{NMAP Flags/Args (cont)}} \tn % Row 10 \SetRowColor{LightBackground} `-PS` & `TCP SYN Ping\textasciicircum{}2A\textasciicircum{}` & `-PA` & `TCP ACK Ping\textasciicircum{}2A\textasciicircum{}` \tn % Row Count 2 (+ 2) % Row 11 \SetRowColor{white} `-PU` & `UDP Ping\textasciicircum{}3A\textasciicircum{}` & `-PE` & `ICMP Echo Request` \tn % Row Count 4 (+ 2) % Row 12 \SetRowColor{LightBackground} `-PP` & `ICMP Timestamp Query\textasciicircum{}4A\textasciicircum{}` & `-PM` & `ICMP Address Mask Query\textasciicircum{}5A\textasciicircum{}` \tn % Row Count 7 (+ 3) % Row 13 \SetRowColor{white} `-A` & `Aggressive Scan\textasciicircum{}6A\textasciicircum{}` & `-{}-ttl` & `Set Time-To-Live for packets` \tn % Row Count 10 (+ 3) % Row 14 \SetRowColor{LightBackground} `-{}-version-light` & `Versioning intensity: 2` & `-{}-version-all` & `Version intensity: 9` \tn % Row Count 13 (+ 3) % Row 15 \SetRowColor{white} `-{}-iflist` & `List interfaces (ifconfig)` & `-{}-traceroute` & `Trace route to destination` \tn % Row Count 16 (+ 3) % Row 16 \SetRowColor{LightBackground} `-{}-stats every {[}int{]}` & `Time between writing to stdout` & `-{}-script-updatedb` & `Update script db` \tn % Row Count 20 (+ 4) % Row 17 \SetRowColor{white} `-{}-data-length {[}int{]}` & `Use with -sU, size of UDP payload` & `-{}-open` & `Return only open ports` \tn % Row Count 24 (+ 4) % Row 18 \SetRowColor{LightBackground} `-{}-system-dns` & `Resolve hostnames with localhost` & `-{}-dns-servers` & `Specify name server addresses for resolutions` \tn % Row Count 28 (+ 4) % Row 19 \SetRowColor{white} `-{}-resume {[}file{]}` & `Scan to resume from output file` & `-{}-append-output` & `Append to output file` \tn % Row Count 31 (+ 3) \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{x{2.7999 cm} x{5.4351 cm} x{2.7999 cm} x{5.4351 cm} } \SetRowColor{DarkBackground} \mymulticolumn{4}{x{17.67cm}}{\bf\textcolor{white}{NMAP Flags/Args (cont)}} \tn % Row 20 \SetRowColor{LightBackground} `-{}-ip-options` & `Specify raw IP frame hex options` & \seqsplit{`Example`} & `-{}-ip-options \textbackslash{}x01\textbackslash{}x07\textbackslash{}x04\textbackslash{}x00*36\textbackslash{}x01` \tn % Row Count 3 (+ 3) % Row 21 \SetRowColor{white} `-sW` & `TCP Window Scan` & `-sM` & `TCP Maimon Scan` \tn % Row Count 5 (+ 2) % Row 22 \SetRowColor{LightBackground} `-sX` & `TCP Xmas Scan (all flags)` & `-{}-scanflags \seqsplit{URGACK`} & `Set TCP Flags` \tn % Row Count 9 (+ 4) \hhline{>{\arrayrulecolor{DarkBackground}}----} \SetRowColor{LightBackground} \mymulticolumn{4}{x{17.67cm}}{`1A. Sends ICMP Echo Req, SYN:443, ACK:80, ICMP Timestamp Req` \newline `2A. Destination port 80, may specify alternate port with the '-p' flag.` \newline `3A. Destination port 40125, may specify alternate port with the '-p' flag.` \newline `4A. Expects ICMP Code 14 reply, indicates host is available.` \newline `5A. Expects ICMP Code 18 reply, indicates host is available.` \newline `6A. Includes, OS detection, version scans, script scans, and traceroute.`} \tn \hhline{>{\arrayrulecolor{DarkBackground}}----} \end{tabularx} \par\addvspace{1.3em} \end{document}