\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 (iot-reversing-field-manual.pdf) /Creator (Cheatography) /Author (djf) /Subject (IoT Reversing Field Manual 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}{403F4C} \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{IoT Reversing Field Manual Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{djf} via \textcolor{DarkBackground}{\uline{cheatography.com/68878/cs/17477/}}} \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{multicols*}{2} \begin{tabularx}{8.4cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{8.4cm}}{\bf\textcolor{white}{Serial Protocols}} \tn \SetRowColor{white} \mymulticolumn{1}{x{8.4cm}}{\seqsplit{https://learn.sparkfun.com/tutorials/serial-communication} - Good Introduction% Row Count 2 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{8.4cm}}{\bf\textcolor{white}{UART}} \tn \SetRowColor{white} \mymulticolumn{1}{x{8.4cm}}{{\bf{Details}} \newline % Row Count 1 (+ 1) `UART is a serial protocol used for interecting with the system. May return a shell, and or access to the filesystem. Seperate from JTAG.` \newline % Row Count 4 (+ 3) {\bf{Enumerate Pinout {[}Multimeter{]}}} \newline % Row Count 5 (+ 1) TX` - Voltage fluctuates at boot\textasciicircum{}1\textasciicircum{} from 0 to 3.3/5.5v` \newline % Row Count 7 (+ 2) RX` - Constant low value below VCC and above GND` \newline % Row Count 8 (+ 1) GND` - Voltage is constant 0, has 4 traces in a crosss shape\textasciicircum{}2\textasciicircum{}` \newline % Row Count 10 (+ 2) VCC` - Normally not used to if device already powered, should not fluctaute`% Row Count 12 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{`\textasciicircum{}1\textasciicircum{} Fluctuation is caused from the debug messages being sent.` \newline `\textasciicircum{}2\textasciicircum{} Testing continuity of GND to other pins, shows other pins that may be grounded` \newline \newline `Square outlined pin, normally is "pin 1"`} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{8.4cm}}{\bf\textcolor{white}{JTAG}} \tn \SetRowColor{white} \mymulticolumn{1}{x{8.4cm}}{{\bf{Details}} \newline % Row Count 1 (+ 1) `Used for on-chip-debugging, generally allows for access to a GNU Debugger (GDB) for the JTAG host. Pinout for hidden console may be found with JTAGenum/JTAGulator. Then access GDB with a Bus Pirate or Shikra USB-to-Serial devices and debug applications using OpenOCD software.`% Row Count 7 (+ 6) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{8.4cm}}{\bf\textcolor{white}{Accessing Serial Consoles}} \tn \SetRowColor{white} \mymulticolumn{1}{x{8.4cm}}{{\bf{BASH}} \newline % Row Count 1 (+ 1) `sudo dmesg | grep -iC 5 usb` \newline % Row Count 2 (+ 1) `sudo screen -L /dev/ttyUSB0 115200` \newline % Row Count 3 (+ 1) `Alternatively, use the {\bf{Arduino IDE}} serial console. Useful when input is off with the screen utility`% Row Count 6 (+ 3) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{`In the screen command, 115200 is the baud rate of the serial communications` \newline \newline `The baud rate can be determined using -` \newline `https://github.com/devttys0/baudrate.git`} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{3.04 cm} x{4.96 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Hardware Physical Tools}} \tn % Row 0 \SetRowColor{LightBackground} JTAGulator & Identifies JTAG \& UART pinouts. \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} JTAGenum\textasciicircum{}1\textasciicircum{} & Identifies JTAG pinouts \tn % Row Count 3 (+ 1) % Row 2 \SetRowColor{LightBackground} Bus Pirate\textasciicircum{}2\textasciicircum{} & FT232RL - USB to Serial, Use SOIC8 Clip to dump firmwarez \tn % Row Count 6 (+ 3) % Row 3 \SetRowColor{white} Shikra\textasciicircum{}3\textasciicircum{} & FT232H(Q) - USB to Serial \tn % Row Count 8 (+ 2) % Row 4 \SetRowColor{LightBackground} RS-232 Generic Adapter\textasciicircum{}4\textasciicircum{} & USB to Serial \tn % Row Count 10 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{`\textasciicircum{}1\textasciicircum{} JTAGenum Setup Tutorial: ` \newline `https://p16.praetorian.com/blog/jtagulator-vs-jtagenum-tools-for-identifying-jtag-pins-in-iot-devices` \newline `\textasciicircum{}2\textasciicircum{} Bus Pirate Pinout Information` \newline `http://dangerousprototypes.com/docs/Common\_Bus\_Pirate\_cable\_pinouts` \newline `\textasciicircum{}3\textasciicircum{} Shikra Pinout {[}UART{]} D0 - TX, D1 - RX` \newline `See also, Adafruit FT232H Breakout - ` \newline `https://cdn-learn.adafruit.com/downloads/pdf/adafruit-ft232h-breakout.pdf` \newline `\textasciicircum{}4\textasciicircum{} Male DB9: GND - Pin 5, TX - Pin 3, RX - Pin 2`} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}