Skip to content

Instantly share code, notes, and snippets.

@azu
azu / Pre-hijacking Attacks.md
Last active November 28, 2023 02:22
Pre-hijacking Attacksのメモ書きやSSO/パスワードリセット/アカウントマージ周りのチェックリスト

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

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

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

@SwitHak
SwitHak / 20211210-TLP-WHITE_LOG4J.md
Last active June 14, 2024 00:16
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
@nrjdalal
nrjdalal / QEMU-Silicon-Mac-Virtualization.md
Last active February 1, 2024 05:31
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
@jhaddix
jhaddix / cloud_metadata.txt
Last active June 10, 2024 09:08 — 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

トラップはよい機能だけど完全に信頼できるというわけではないよ。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は効かないぞ」と表示されてプロセスが動き続けているのを見た時の彼の顔といったらなかなかのものだった。

@FrankSpierings
FrankSpierings / README.md
Last active January 20, 2024 20:45
Linux Container Escapes and Hardening
@jhaddix
jhaddix / all.txt
Last active June 18, 2024 19:44
all wordlists from every dns enumeration tool... ever. Please excuse the lewd entries =/
This file has been truncated, but you can view the full file.
.
..
........
@
*
*.*
*.*.*
🐎
@a-r-g-v
a-r-g-v / docs.md
Last active October 5, 2018 06:18
Packer+Circle CIでGoogle Compute Engineのイメージを生成する
@julianlam
julianlam / provisioning-unprivileged-lxc-containers-via-login-or-script.md
Last active September 7, 2023 12:45
Provisioning and usage of unprivileged LXC containers via indirect login or script #blog

Provisioning and usage of unprivileged LXC containers via indirect login or script

As I've discovered, managing LXC containers is fairly straightforward, but when building out a system for provisioning out user maintained instances of NodeBB, it was imperative that unprivileged LXC containers were used, so that in the event of shell breakout from NodeBB followed by privilege escalation of the saas user, the root user in the LXC container would only be an unprivileged user on the host machine.

During the course of development, I ran into numerous blockers when it came to managing LXC containers in unexpected circumstances. Namely:

  • Using LXC in a subshell is not directly supported. This usually happens under one of the following two circumstances:
    • After switching users via su or executing lxc-* commands as another user via sudo
    • Executing lxc-* commands via a program, application, or script. In my case, a Node.js application.
@staltz
staltz / introrx.md
Last active June 18, 2024 06:15
The introduction to Reactive Programming you've been missing