Skip to content

Instantly share code, notes, and snippets.

@FrankSpierings
FrankSpierings / README.md
Last active February 20, 2025 10:48
Linux Container Escapes and Hardening

トラップはよい機能だけど完全に信頼できるというわけではないよ。SIGKILLとSIGSTOPはトラップできない。

大昔のいくつかのUnixにはSIGKILLをトラップする怪しげな方法があった。もしプログラムがptraceされていたら、どのようなシグナルでも(SIGKILLでも)、そのプロセスを停止させてptraceをしている側のプロセスに通知するという動作になっていた。

そこで僕は"sh"という名前のプログラムを書いた。そのプログラムはメモリサイズを/bin/shと同じになるように注意深く調整したあと、fork & execして、子プロセスをptraceした。子プロセスは"superman"というプログラムだった。僕の偽shは、supermanが何らかのシグナルを受け取ると、そのシグナル番号をsupermanのメモリに書き込んだ後、つねにSIGINTでsupermanを再開するという動作になっていた。supermanのSIGINTハンドラはシグナル番号をみて面白メッセージを表示するようになっていた。

僕はそのプログラムを起動して、システム管理者のところにいって、何かプロセスがkillできないんだけど、と言った。システム管理者は^Cや^\を一応試した後、別の端末からログインしてrootになって、psでsupermanを見つけて、それをkill -9した。

「クリプトン星人にはSIGKILLは効かないぞ」と表示されてプロセスが動き続けているのを見た時の彼の顔といったらなかなかのものだった。

@jhaddix
jhaddix / cloud_metadata.txt
Last active May 8, 2025 09:39 — forked from BuffaloWill/cloud_metadata.txt
Cloud Metadata Dictionary useful for SSRF Testing
## AWS
# from http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html#instancedata-data-categories
http://169.254.169.254/latest/user-data
http://169.254.169.254/latest/user-data/iam/security-credentials/[ROLE NAME]
http://169.254.169.254/latest/meta-data/iam/security-credentials/[ROLE NAME]
http://169.254.169.254/latest/meta-data/ami-id
http://169.254.169.254/latest/meta-data/reservation-id
http://169.254.169.254/latest/meta-data/hostname
http://169.254.169.254/latest/meta-data/public-keys/0/openssh-key
@nrjdalal
nrjdalal / QEMU-Silicon-Mac-Virtualization.md
Last active March 14, 2025 09:02
Create Virtual Machines using QEMU on Silicon based Apple Macs

Install QEMU on Silicon based Apple Macs (June 2021)

Option 1 - Automatically

zsh -c "$(curl -fsSL https://raw.githubusercontent.com/nrjdalal/silicon-virtualizer/master/install-qemu.sh)"

Option 2 - Manually

  • Install Xcode command line tools

xcode-select --install
@SwitHak
SwitHak / 20211210-TLP-WHITE_LOG4J.md
Last active April 28, 2025 21:31
BlueTeam CheatSheet * Log4Shell* | Last updated: 2021-12-20 2238 UTC

Security Advisories / Bulletins / vendors Responses linked to Log4Shell (CVE-2021-44228)

Errors, typos, something to say ?

  • If you want to add a link, comment or send it to me
  • Feel free to report any mistake directly below in the comment or in DM on Twitter @SwitHak

Other great resources

  • Royce Williams list sorted by vendors responses Royce List
  • Very detailed list NCSC-NL
  • The list maintained by U.S. Cybersecurity and Infrastructure Security Agency: CISA List
@azu
azu / Pre-hijacking Attacks.md
Last active October 19, 2024 05:41
Pre-hijacking Attacksのメモ書きやSSO/パスワードリセット/アカウントマージ周りのチェックリスト

Pre-hijacking Attacksについてのメモ書きです。 元の論文と記事は次のページを読んでください。

Pre-hijacking Attacks はメールアドレスの確認をしないでアカウントを作れるサービスという前提があります。

アカウント作成からそのまま機能を利用できるようにすることで、利用体験をよくするための施策として、メールアドレスの確認のステップを後回し またはしないサービスがあります。