/\ /\ /\ /\ /\ /\//\\/\ /\//\\/\ /\//\\/\ /\//\\/\ /\//\\/\ /\//\\\///\\/\//\\\///\\/\//\\\///\\/\//\\\///\\/\//\\\///\\/\ //\\\//\/\\///\\\//\/\\///\\\//\/\\///\\\//\/\\///\\\//\/\\///\\ \\//\/ \/\\// \/ *** PIMP MY UNIX *** \/ /\ ^^^^^^^^^^^^ /\ //\\ //\\ \\// * http://www.unfug.org * \\// \/ \/ /\ /\ //\\/\ /\//\\ \\///\\/\//\\\///\\/\//\\\///\\/\//\\\///\\/\//\\\///\\/\//\\\// \/\\///\\\//\/\\///\\\//\/\\///\\\//\/\\///\\\//\/\\///\\\//\/ \/\\//\/ \/\\//\/ \/\\//\/ \/\\//\/ \/\\//\/ \/ \/ \/ \/ \/ ################################################################## ### INDEX ++ less - less is more - pager for UNIX, Linux, Windows ... ++ Scapy - A Python interactive packet manipulation program for mastering the network ++ TPP - text presentation program, an ncurses-based presentation tool ################################################################## ### less - Tobias Walter (tobias@unwichtig.org) less: Pager mit dem man vor und zurueck gehen kann! Also: less is more than more. Seitenweise nach unten scrollen: SPACE, f, PAGE DOWN Seitenweise nach oben scrollen: b, PAGE UP ZeilenWeise bach unten scrollen: RETURN, e, DOWNARROW ZeilenWeise bach oben scrollen: y, UPARROW Springen zur ersten Zeile: g, HOME Springen zur letzten Zeile: G, END Vorwaerts suchen: /regex Rueckwaerts suchen: ?regex Naechster Suchtreffer vorwaerts: n Naechster Suchtreffer rueckwaerts: N Ignorieren von Gross- und Kleinschreibung: -I Vor all diese Befehle kann eine Zahl gesetzt wedern, die die Wiederholungen angibt. Text neu zeichnen: r Text neu zeichenen und Buffer verwerfen: R Editor starten: v startet $EDITOR mit der geoeffnenten Datei Followmode: F startet Followmode wie tail -f (Abbruch mit CTRL+C) Beenden: q, Q Automatisches Beenden am Ende des Files: -E Automatisches Beenden beim zweiten erreichen des Endes: -e Optionen wie -e oder -I koennen in der Environment Variable LESS gespeichert werden: LESS="-e -I" export LESS ##################################################################### ### Scapy - Benedikt Waldvogel (vorname.nachname at hs-furtwangen.de) ## Homepage: - http://www.secdev.org/projects/scapy/ ## Description Scapy is a powerful interactive packet manipulation program. It is able to forge or decode packets of a wide number of protocols, send them on the wire, capture them, match requests and replies, and much more ## Starten # dependencies (optional): # pyx, graphviz, visual, gnuplot, imagemagick $ USE="+graphviz +visual +gnuplot +pyx +imagemagick" emerge scapy sudo scapy -s mysession ## Pakete erstellen >>> pak = IP(dst="target.com")/ICMP() >>> pak >>> pak.show2() # sr1 : Send packets at layer 3 and return only the first answer >>> sr1(pak) ## Eingebaute Hilfe >>> ls() >>> ls(IP) >>> lsc() >>> lsc(sr) >>> help(srloop) >>> help(IP) ## Portscanner mit 4 Zeilen Code >>> ports = ["ftp", "ssh", "http", "https"] >>> ans, unans = sr(IP(dst="target.com")/TCP(dport=ports)) >>> for snt,rcv in ans: >>> rcv.sprintf("%-10s,TCP.sport%: %TCP.flags%") # SA = SYN+ACK -> port is open ## Sniffen >>> help(sniff) >>> s = sniff(count=100, filter="not port 42") >>> s.summary() >>> s.conversations() >>> s[10].show() >>> wrpcap("/tmp/sniff.cap", a) >>> rdpcap("/tmp/sniff.cap") ## Fuzzer >>> pak = IP(dst="target.com")/fuzz(UDP()/NTP(version=4)) >>> pak.show() >>> pak.show2() # can be sent in loop -> each time another random value >>> send(pak, loop=1) ## Einfaches Plotten >>> help(s.plot) >>> s[10].pdfdump() >>> hexdump(s[10]) # how many distinct ip stacks behind a host >>> ans, unans = sr(IP(dst="microsoft.com")/TCP(dport=[RandShort()]*1000)) # you may get problems with firewalls/ips here # -> use microsoft.com >>> ans.plot(lambda (s,r): r.id) ## High-Level Funktionen >>> arping("10.10.10.0/24") >>> arpcachepoison("10.10.10.10", "10.10.10.11") >>> report_ports("microsoft.com", ["ftp", "http", 8080]) # ... use lsc() ## KILLER >>> pak = IP(dst="target.com") # not yet complete >>> pak.libnet() >>> res,unans = traceroute([ "www.microsoft.com", "www.cisco.com", "www.heise.de", "www.yahoo.com", "www.wanadoo.fr", "www.pacsec.com"], dport=[80,443], maxttl=20, retry=-2) >>> res.graph() >>> res.trace3D() ##################################################################### ### TPP - Felix Krohn --## Dies ist ein Kommentar. --bgcolor white --fgcolor black --title TPP Feature Show --author Felix Krohn --date today --newpage intro --bgcolor black --fgcolor white --heading Was ist TPP? * Ein Präsentationsprogramm für die Kommandozeile --- * "Powerpoint for Sven G^W^Wtext tool users" --- * Einfache Syntax, benötigt wird nur ein Editor (also vim) --- * Erste Version: 4-Stunden-Hack in Ruby + ruby-ncurses --- * Erweitert bis zum Umkippen, dann neugeschrieben --- * http://www.ngolde.de/tpp.html * aptitude install tpp * emerge tpp * Doku und viele Beispiele in /usr/local/doc/tpp/ --newpage attrib --heading Attributes Normale Schrift ... --- --ulon ... Unterstrichen (z.B. im xterm) ... --- --revon ... invertiert und unterstrichen ... --- --boldon ... unterstrichen, invertiert und fett ... --center ... unterstrichen, invertiert und fett und zentriert ... --newpage Powerpoint-Emulationsmodus --bgcolor black --fgcolor white --beginslideleft Features, ... --endslideleft --- --beginslideright ...die jeden Schlips entzücken! --endslideright --- --beginslidetop Spätestens ... --endslidetop --- --beginslidebottom ... jetzt! --endslidetop --newpage --beginslideleft bling --endslideleft --- --beginslideright buzz --endslideright --- --beginslidetop fasel --endslidetop --- --beginslidebottom schwall --endslidetop --newpage --heading Alles so schön bunt hier... --bgcolor red --newpage --bgcolor black --boldon --color red Hallo --color white das --color green ist --color blue ein --color cyan Test --color magenta mit --color yellow Farben --newpage keys --heading Bedienung --beginoutput space bar ............................... display next entry within page space bar, cursor-down, cursor-right .... display next page b, cursor-up, cursor-left ............... display previous page q, Q .................................... quit tpp j, J .................................... jump directly to page l, L .................................... reload current presentation s, S .................................... jump to the first page e, E .................................... jump to the last page c, C .................................... start command line ?, h .................................... help screen --endoutput --newpage other --heading Other Things This is supposed to be shell output: --beginshelloutput $ ls ~/stud-offl/unfug/tpp align-footer.tpp colors2.tpp huge.tpp slidein.tpp bold.tpp horline.tpp shell.tpp tpp-features.tpp $ cd ~/stud-offl/unfug/tpp $ ls -lah drwx--x--x 2 fx fx 4.0K [2006-06-29 18:49] ./ drwxr-xr-x 5 fx fx 4.0K [2006-06-29 15:12] ../ -rw------- 1 fx fx 252 [2006-06-29 18:24] align-footer.tpp -rw------- 1 fx fx 726 [2006-06-29 15:12] bold.tpp -rw------- 1 fx fx 228 [2006-06-29 18:25] colors2.tpp -rw------- 1 fx fx 150 [2006-06-29 15:12] horline.tpp -rw------- 1 fx fx 276 [2006-06-29 15:24] huge.tpp -rw------- 1 fx fx 738 [2006-06-29 15:27] shell.tpp -rw------- 1 fx fx 969 [2006-06-29 18:39] slidein.tpp -rw------- 1 fx fx 3.4K [2006-06-29 18:49] tpp-features.tpp $ exit --endshelloutput --newpage shell-Ausgaben und nochmal... --beginshelloutput $ make love Make: Don't know how to make love. Stop. --- $ drink < bottle; opener bottle: cannot open opener: not found --- $ If I had a ( for every $ Congress spent, what would I have? Too many ('s. $ --endshelloutput --- blubb --newpage andere Befehle aufrufen Man kann Befehle ausführen und die Ausgaben anzeigen: --- uptime: --exec uptime --- praktisch um z.B. Bilder anzuzeigen (unter X) --- --exec display ~/Bilder/krohnracing-krohn.66.jpg --newpage --center And here some more serious shell things --beginshelloutput $ uptime 15:26:40 up 54 days, 3:05, 12 users, load average: 0.00, 0.04, 0.16 $ sleep 3 --sleep 3 $ uname -a Linux golgafrincham 2.6.16 #1 PREEMPT Sat Apr 15 21:30:06 CEST 2006 i686 GNU/Linux $ --endshelloutput --newpage figlet --heading FIGlet support! --huge This is FIGlet --- --sethugefont mini --huge This is the mini font