\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{binca} \pdfinfo{ /Title (whois-and-dns.pdf) /Creator (Cheatography) /Author (binca) /Subject (WHOIS and DNS 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}{8B1FAD} \definecolor{LightBackground}{HTML}{F7F1F9} \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{WHOIS and DNS Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{binca} via \textcolor{DarkBackground}{\uline{cheatography.com/44948/cs/13285/}}} \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}binca \\ \uline{cheatography.com/binca} \\ \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 9th November, 2017.\\ 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*}{3} \begin{tabularx}{5.377cm}{x{1.4931 cm} x{3.4839 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{WHOIS Protocol}} \tn % Row 0 \SetRowColor{LightBackground} \seqsplit{whois.afrinic.net} & Africa \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \seqsplit{whois.apnic.net} & Asia Pacific, India, China and Australia \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} \seqsplit{whois.arin.net} & US and Canada \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} \seqsplit{whois.lacnic.net} & Mexico and Latin America \tn % Row Count 8 (+ 2) % Row 4 \SetRowColor{LightBackground} \seqsplit{whois.ripe.net} & Europe, Greenland, Russiana nd the Middle East \tn % Row Count 10 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{Provides client/server access to information about Internet domains and IPv4 and IPv6 netblocks using TCP/43. Described by RFC3912. Above are the regional registrars. Will automatically choose a server but can manually select using -h flag.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{whois Client Output}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Provides name(s) and phone number(s), physical address and DNS servers, which can be interrogated.% Row Count 2 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{DNS}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Global hierarchical database of domain names that uses UDP/53 for payloads \textless{}= 512 bytes and TCP/53 for payloads \textgreater{} 512 bytes (zone transfers). DNS zone transfers download the entire DNS zone. AXFR is a full transfer and IXFR is an incremental transfer.% Row Count 6 (+ 6) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{3.88206 cm} p{1.09494 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Reverse DNS Scan}} \tn % Row 0 \SetRowColor{LightBackground} IP address ==\textgreater{} & Name \tn % Row Count 1 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{Perform a whois lookup for IP addresses owned by the target organization, and then perform a reverse DNS (PTR) lookup for every IP.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{DNS Brute Force Scan}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Supply a dictionary of potential DNS names} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Read each entry} \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Attempt to resolve \$entry.example.com} \tn % Row Count 3 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{DNSRecon comes with a number of dictionaries. This technique is useful for virtual host discovery.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.64241 cm} x{3.33459 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{DNS Reconnaissance Tools}} \tn % Row 0 \SetRowColor{LightBackground} nslookup & Universally available but deprecated \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} dig & Fully featured DNS client \tn % Row Count 3 (+ 1) % Row 2 \SetRowColor{LightBackground} Nmap DNS NSE Scripts & Replicates functionality of dig with dns-zone-transfer. \tn % Row Count 6 (+ 3) % Row 3 \SetRowColor{white} DNSRecon & Includes wordlists for DNS brute force, advanced features include DNSSEC and mDNS support. \tn % Row Count 10 (+ 4) % Row 4 \SetRowColor{LightBackground} Metasploit & DNS functionality found in information-gathering auxiliary modules, including reverse brute force. \tn % Row Count 14 (+ 4) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.53827 cm} x{2.43873 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{dig Syntax and Options}} \tn % Row 0 \SetRowColor{LightBackground} -t any & Look up all records \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} -t mx & Look up MX records only \tn % Row Count 3 (+ 2) % Row 2 \SetRowColor{LightBackground} -t axfr & Attempt a zone transfer \tn % Row Count 5 (+ 2) % Row 3 \SetRowColor{white} -x \textless{}IP address\textgreater{} & Simplified PTR (reverse) lookup \tn % Row Count 7 (+ 2) % Row 4 \SetRowColor{LightBackground} \textless{}IP address\textgreater{}.in-addr.arpa PTR & PTR record search in old days \tn % Row Count 9 (+ 2) % Row 5 \SetRowColor{white} dig @192.168.1.8 version.bind chaos txt & Query the nameserver's version of BIND \tn % Row Count 11 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{Basic usage: \$ dig @\textless{}nameserver\textgreater{} example.com options \newline Will use the default DNS name server of the host if none is specified.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.84149 cm} x{3.13551 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Nmap}} \tn % Row 0 \SetRowColor{LightBackground} \seqsplit{dns-zone-transfer} & DNS zone transfer \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} dns-brute & DNS brute force, useful for CNAME discovery \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} -sL \textless{}IP range\textgreater{}| grep \textbackslash{}) & Reverse DNS scan \tn % Row Count 6 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{To use an custom word list: nmap -{}-script=\textless{}script name\textgreater{} \textless{}domain\textgreater{} (optional) -{}-script-args=dns-brute.hostlist=\textless{}path to file.txt\textgreater{}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.89126 cm} x{3.08574 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{DNSRecon}} \tn % Row 0 \SetRowColor{LightBackground} -h, -{}-help & Show this help mesasge and exit \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} -d, -{}-domain \textless{}domain\textgreater{} & Domain to Target for enumeration \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} -r, -{}-range \textless{}IP range\textgreater{} & IP Range for reverse lookup brute force \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} -n, -{}-name\_server \textless{}name\textgreater{} & Domain server to use \tn % Row Count 8 (+ 2) % Row 4 \SetRowColor{LightBackground} -D, -{}-dictionary \textless{}file\textgreater{} & Dictionary file to use for brute force \tn % Row Count 10 (+ 2) % Row 5 \SetRowColor{white} -t, -{}-type \textless{}types\textgreater{} & Specify the type of enumeration to perform \tn % Row Count 12 (+ 2) % Row 6 \SetRowColor{LightBackground} -a & Perform AXFR with standard enumeration \tn % Row Count 14 (+ 2) % Row 7 \SetRowColor{white} -s & Reverse Look-up for IPv4 ranges in SPF Records \tn % Row Count 16 (+ 2) % Row 8 \SetRowColor{LightBackground} -g & Perform Google enumeration \tn % Row Count 18 (+ 2) % Row 9 \SetRowColor{white} -w & Do deep whois analysis and reverse look-up \tn % Row Count 20 (+ 2) % Row 10 \SetRowColor{LightBackground} -z & Performs a DNSSEC Zone Walk \tn % Row Count 22 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{Usage: dnsrecon.py \textless{}options\textgreater{}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.33919 cm} x{2.63781 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Metasploit}} \tn % Row 0 \SetRowColor{LightBackground} \seqsplit{auxiliary/gather/dns\_bruteforce} & Performs a brute force dictionary DNS scan \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \seqsplit{auxiliary/gather/dns\_cache\_scraper} & Queries DNS cache for previously resolved names \tn % Row Count 5 (+ 3) % Row 2 \SetRowColor{LightBackground} \seqsplit{auxiliary/gather/dns\_info} & Gathers general DNS information \tn % Row Count 7 (+ 2) % Row 3 \SetRowColor{white} \seqsplit{auxiliary/gather/dns\_reverse\_lookup} & Performs a reverse DNS (PTR) scan of a netblock, replicates DNSRecon's reverse brute force \tn % Row Count 12 (+ 5) % Row 4 \SetRowColor{LightBackground} \seqsplit{auxiliary/gather/dns\_srv\_enum} & Enumerates SRV (Server) records \tn % Row Count 14 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}