pwnable.tw start writeup

environment $ uname -a Linux base-debootstrap 4.4.0-159-generic #187-Ubuntu SMP Thu Aug 1 16:28:06 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux $ gdb --version GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1 Copyright (C) 2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word". Finding Executed file command. This file is ELF file for 32bit. ...

October 12, 2019 · 4 min · 808 words · FAMASoon

Tor Hidden Service でウェブサイトを公開してみる

まえがき ダークウェブについて という記事を読んだ。 内容はダークウェブ、主にTor Hidden Service(以下 “HS”)に的を絞って解説しているものだ。 HSについては先の記事でも書かれているようにTor Bundle Browserを用いれば簡単にアクセスが可能。 有名なHSはFacebookやThe New York Timesが挙げられる。 さて、そんなHSだがアクセスするだけでなくサイトの開設も簡単だったりする。 自分でサーバをたててサイトを開いたことがあれば誰でもできるような内容だ。 早速やってみるとしよう。 環境 $ uname -a Linux instance-2 4.10.0-40-generic #44~16.04.1-Ubuntu SMP Thu Nov 9 15:37:44 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.3 LTS Release: 16.04 Codename: xenial Tor のセッティング 何はともあれ Tor をインストールしなければ始まらない。 Ubuntu 16.04 では apt で簡単にインストールできる。 $ sudo apt install tor $ sudo systemctl start tor Tor 公式ドキュメントである https://www.torproject.org/docs/tor-onion-service を読めばわかるがtorrcの設定を変更しHSのアドレスとソレに対応した秘密鍵を生成する。 torrcは"/etc/tor/torrc"にあると思う。 生成されたファイルは"HiddenServiceDir"に書かれているディレクトリに吐かれる。 “HiddenServicePort"には接続したいポートを書けば良い。 リバースプロキシとかポートフォワーディングとか想像すればわかりやすいと思う。 “HiddenServiceDir”, “HiddenServicePort"ともにコメントアウトされていると思うので、それらを参考に書くと良いだろう。 これで生成されたHSのアドレスを確認できる。 (ディレクトリは"HiddenServiceDir"で設定したものを指定する) ...

October 12, 2019 · 1 min · 150 words · FAMASoon

windbgとVirtualBox を用いた Windows カーネルデバッグ

シリアルポート経由でカーネルデバッグした時に実施した手順です。 VM側のWindowsで実施する手順 Windows上で管理者権限でPowershellを起動 下記コマンドを入力 bcdedit /debug on bcdedit /dbgsettings serial debugport:1 baudrate:115200 Windowsをシャットダウン ホスト側のWinodwsで実施する手順 VirtualBoxでVMの設定を開き下記の画像のように設定 “シリアルポートを有効化"にチェックを入れる “ポートモード"を"ホストにパイプ"にする “パス/アドレス"を”\.\pipe\com1"にする VMを起動する ストア からWinDbg Previewをインストールする(なぜか自分の環境ではWDKのWinDbgだとカーネルでバッグをしようにも"debuggee not connected"と表示され使えなかったためWinDbg Previewを使う) WinDbg Preview を開いたら"ファイル"タブから"Attach to kernel"を選択し下記設定をする “Pipe"にチェックを入れる “Reconnect"にチェックを入れる “Port"を”\.\pipe\com1"にする VMを起動 これでカーネルでバッグが実施可能になる。

October 12, 2019 · 1 min · 35 words · FAMASoon