= CTFに用意するツール = * Binary * GB級のファイルを編集できるバイナリエディタ * Ncurses Hexedit * pyew (コマンド操作型のバイナリ/実行ファイルエディタ) * UTF-16やCP932も認識できるfstrings * istrings * file * nkf, iconv * md5sum, sha1sum, sha256sum, sha3sum * 暗号 * パスワードリカバリ * [[http://www.openwall.com/john/|john]] * community-enhanced versionを推奨 * oclHashcat * [[https://github.com/robertdavidgraham/pemcrack|robertdavidgraham/pemcrack]] Cracks SSL PEM files that hold encrypted private keys. Brute forces or dictionary cracks. * pkcrack ZIPファイルに対する既知平文攻撃 * fcrackzip ZIPファイルに対する辞書攻撃/ブルートフォース攻撃 * rot13, caesar * make MD5 collision * [[http://www.mscs.dal.ca/~selinger/md5collision/|evilize]] * [[https://marc-stevens.nl/p/hashclash/|hashclash]] * [[http://code.google.com/p/hash-identifier/|hash-identifier]] (Hashの種類特定) * [[https://github.com/bwall/HashPump|HashPump]] Length Extension Attackをしてくれるツール * [[https://gitlab.mma.club.uec.ac.jp/nomeaning/hashpump-rb|hashpump-rb]] Ruby用バインディング * Webservice * [[http://rumkin.com/tools/cipher/cryptogram-solver.php]] 単純換字暗号ソルバ(単語の区切りが必要) * [[http://www.blisstonia.com/software/Decrypto/]] 単純換字暗号ソルバ(単語の区切りが不要) * [[http://www.mygeocachingprofile.com/codebreaker.vigenerecipher.aspx]] vigenerecipherのsolver * [[http://www.guballa.de/vigenere-solver]] vigenerecipherのsolver * dumpasn1 * CrypTool1 * Windows * Network * Wireshark * netcat, socat * nmap * zmap * tcpdump * tcpreplay * tcprewrite * ssldump * ngrep * tcptrace * [[https://github.com/simsong/tcpflow|tcpflow]] * [[http://www.bro.org/|bro]] * !NetworkMiner * pcapngを読まない: `tcpdump -r pcapng -w pcap` * Nemesis * hping3 * [[https://github.com/desaster/kippo|kippo]] - medium interaction SSH ハニーポット * SSHの脆弱性関連 * [[https://www.cr0.org/progs/sshfun/|ssh_kex_keygen and ssh_decode]] * pcapファイルの修復 * pcapfix * And more treasure trove: http://wiki.wireshark.org/Tools ! * [[https://github.com/klemenb/nighthawk|nighthawk]] ARP spoofing tool * Web * curl * Fiddler * nikto * 各種ブラウザ(特にFirefox, Chrome) * HTTP通信を覗くツール(Live HTTP Headers(Firefox)やWiresharkなど) * mitmproxy * !JavaScript Debugger(Firefoxなら!FireBug, Operaなら!DragonFlyなど…) * dotjs 特定ドメインにアクセス時に指定したJavaScriptを実行する * jsdetox (!JavaScript難読化解除) * cadaver(ftp likeな!WebDav Client) * OS * qemu * Virtual``Box * Windows * [[http://technet.microsoft.com/ja-jp/sysinternals/bb545027.aspx|ユーティリティ インデックス @ Windows Sysinternals]] * VMMap * Program * gcc / clang * PHP * インタラクティブシェル: psysh * llvm * lli:llvmのビットコードを実行, llc:マシン用のアセンブリコードを出力 * gdb, lldb * [[http://qira.me/|qira]] * [[http://radare.org/y/|radare]] * [[http://metasm.cr0.org/|METASM]] assembly manipulation suite * rubyから操作可能 * perl / ruby / python[23] * objdump * binutils-multiarch * プロセスの動きを追跡できるツール * Linux * strace, gdb * Windows * Process Monitor * [[http://www.rohitab.com/apimonitor|API Monitor]] * FreeBSD * truss * [[http://reverse.lostrealm.com/tools/rsymtab.html|rsymtab]] * static linkされたバイナリファイルからライブラリ部分を探して、シンボルを付与し直す。 (!!) * Strippedかつstatically linkedなバイナリからライブラリ部分を検索する。 * シンボルを付与し直したりはしないけど、64bit ELFに対応。 * ELFファイルのセキュリティ設定のチェック https://github.com/slimm609/checksec.sh * niceな逆アセンブラ * objdump * 以下のようにしてシェルコードの逆アセンブルも可能{{{ objdump -b binary -m i386 -D ファイル名 }}} * [[http://www.agner.org/optimize/#objconv|objconv]] * サブルーチンの切り分けをやってくれる * 再アセンブル可能なアセンブリを吐き出す。珍しい。 * udis86/ndisasm (シェルコードならこれら) * IDA * Hopper * for Windows * disasm (文字列埋め込み) * dispe (分岐解析あり, 文字列埋め込み無し) * DUMPBIN (Windows版objdumpのようなもの。Visual Studioなどに付属) * 逆コンパイラ * x86 * [[http://decompiler.fit.vutbr.cz/decompilation-run/]] * 割とまとも * [[http://derevenets.com/]] *64bitも逆コンパイル出来る。(やっぱり間違う) * [[http://boomerang.sourceforge.net/|Boomerang Decompiler]] * 使えない * Hopper * 不満はあるものの比較的まとも * Disassembler側で手動で,引数の数や変数名など補正をかけながら使う * Java * [[http://www.varaneckas.com/jad/|JAD]] * [[http://jd.benow.ca/|Java Decompiler]] * [[https://bitbucket.org/mstrobel/procyon|Procyon]] * Ref: http://code.google.com/p/umjammer/wiki/JavaReverseEngineering * .NET Framework * [[http://ilspy.net/|ILSpy]] * !MonoDevelop * ちょくちょく間違える.信用性が低い. * Python * https://github.com/zrax/pycdc 優秀。おすすめ。 * https://github.com/gstarnberger/uncompyle * Pwn * [[https://github.com/Gallopsled/pwntools|pwntools]] * Metasploit * ROP関連 * [[https://github.com/0vercl0k/rp|rp++]] * [[http://shell-storm.org/project/ROPgadget/|ROPgadget]] * [[https://github.com/longld/peda|PEDA]] - Python Exploit Development Assistance for GDB * https://github.com/zachriggle/peda * Formatter * tidy, Eclipse, jq, ..etc * 各種!EsoLangのインタープリター * BrainF*ck * [[http://compsoc.dur.ac.uk/whitespace/|WhiteSpace]] * Disassembler: [[http://mearie.org/projects/esotope/ws.en]] * Piet * [[http://www.bertnase.de/npiet/|npiet]] 実行及び各ステップの表示が可能 * PEフォーマット (Portable Executable) * [[http://tuts4you.com/download.php?view.398|PE iDentifier(PEiD)]] * [[http://research.pandasecurity.com/blogs/images/userdb.txt|userdb for PEiD]] * [[http://www.ollydbg.de/|OllyDbg1.x]] * [[http://www.openrce.org/downloads/details/111/IsDebuggerPresent|IsDebuggerPresent Plugin]] デバッガにアタッチされていることを隠すプラグイン * [[http://www.openrce.org/downloads/details/108/OllyDump|ollydump]] メモリからPE掃き出し * [[http://www.ollydbg.de/version2.html|OllyDbg2.x]](1.x系のプラグイン動かない) * for Android * [[https://code.google.com/p/android-apktool/|APKTool]] * [[https://code.google.com/p/smali/|smali/baksmali]] (逆アセンブラ) * [[http://code.google.com/p/dex2jar/|dex2jar]] (Javaに変換して逆コンパイル可能に) * [[https://apkstudio.codeplex.com/]] apkファイルを直接修正 * [[https://bytecodeviewer.com]] * jadx * Forensics * [[http://foremost.sourceforge.net/|foremost]] * [[http://www.cgsecurity.org/wiki/PhotoRec|PhotoRec/TestDisk]] * [[http://osforensics.com/tools/mount-disk-images.html|OSFMount]] (WindowsでHDDイメージをマウントしたいとき * The Sleuth Kit / Autopsy * qemu-nbd * kpartx * 7zip * [[http://www.diskinternals.com/zip-repair/|zip repair]] zipファイルの復元 * [[http://sourceforge.net/projects/tcpxtract/]] パケットキャプチャーからファイルを取り出す * [[https://code.google.com/p/volatility/|Volatility]] (システムメモリダンプ解析) * [[https://github.com/dkovar/analyzeMFT|analyzeMFT]] (NTFSのMFT解析) * Digital Forensic Framework * http://itaya.corso-b.net/TIPS/DiskProbe/index.html DiskProbe (物理ディスクをEDIT) * !WinHex * pdfstreamdumper * And more treasure trove: http://www.forensicswiki.org/wiki/Tools ! * Steganography * stegdetect * [[http://domnit.org/stepic/doc/|stepic]] * mathematics(一部cryptoと共通) * 高機能な電卓 * pari/gp * [[http://z3.codeplex.com/|Z3]] - SAT, SMTソルバ * minisat - SATソルバー。2007年の時点でトップクラスの性能( http://www.satcompetition.org/ )。 * !CryptoMiniSat - SATソルバー。XORが多い問題向けらしい。 * GMP-ECM - 素因数分解 * Rubygems *gmp * 多倍長整数の高速計算や余剰類関係の演算のために *RMagick * 画像の操作が出来る *facets * string.^で文字列同士のxorが出来るようになる *nokogiri, mechanize * HTMLのパーサー。Web問題の自動化などに *zxing *QRコードリーダー * highline 文字表示に色を付ける * ruby-pcap * パケットファイルの操作に * [[https://github.com/bpaquet/pcap_tools|pcap_tools]] * HTTP通信を含むパケットファイルの操作 * ffi * Cの関数を呼び出す * misc * 使い慣れたテキストエディタ * スペクトル表示のできる音声エディタ * audacity * いろいろな形式が読める画像エディタ * GIMP * XML Parser/Editor * [[http://www.microsoft.com/en-us/download/details.aspx?id=7973|XML Notepad]] * [[http://lazesoftware.com/tool/strgen/]] 文字列ジェネレーター * [[http://dic.nicovideo.jp/a/%E3%81%82%E3%81%81%5E%E3%80%9C%E5%BF%83%E3%81%8C%E3%81%B4%E3%82%87%E3%82%93%E3%81%B4%E3%82%87%E3%82%93%E3%81%99%E3%82%8B%E3%82%93%E3%81%98%E3%82%83%E3%81%81%5E%E3%80%9C|様々な架空言語一覧]] == 参考文献 == * http://d.hatena.ne.jp/waidotto/20120820/1345477008 * http://www.slideshare.net/tohakushi/tcpdumptcpreplay * http://wiki.wireshark.org/Tools * http://delimitry.blogspot.ca/2014/10/useful-tools-for-ctf.html = 使い方 = <>