Skip to content

Instantly share code, notes, and snippets.

What is this cheat sheet ?

I recently stumbled on a blind SSTI injection on a bug bounty program (no output nor stack trace, only 500 status code on invalid syntax)

The version was up to date and it was not possible to RCE because the conf was following best practices and there is no public sandbox bypass on the latest version. So was it possible to do stuff anyway ? Yes I found some nice gadgets to enumerate all accessible variables from the engine, read data blindly or perform some DoS.

This is not meant to be complete, you will find classic payloads for freemarker on other cheat sheets this is only the new stuff from my research which is not public anywhere else

get versions

/
//
/./
/../
/~/
/;/
/\\
/.././
/././
/.
`-=[SQL injection Queries]=-
HOW TO SUCCESSFULLY INJECTING SQL INJECTION
[~] after id no. like id=1 +/*!and*/+1=0 [~]
EX: site.com?index.php?pageid=3 div+0 Union select 1,version(),3,4,5
+div+0
+div false
+Having+1=0+
@attacker-codeninja
attacker-codeninja / download_apks.sh
Created November 20, 2024 03:56 — forked from lauritzh/download_apks.sh
Ever wanted to obtain an APK from an Android device? You do not need to install fancy Apps for this, ADB and the following minimal Bash script is sufficient to do so. Use the App's bundle identifier as first argument.
#!/bin/bash
# Usage: ./download_apks.sh com.example.app
BUNDLE_FILES=$(adb shell pm path "$1")
for file in $BUNDLE_FILES; do
CLEAN=$(echo "$file"|sed 's/[^:]*://')
adb pull "$CLEAN" .
done
@attacker-codeninja
attacker-codeninja / bscp.md
Created May 19, 2024 09:26 — forked from wonda-tea-coffee/bscp.md
BSCP攻略チートシート

試験ルール

  • 制限時間は4時間
  • 2つの脆弱なアプリケーションを攻略する
  • それぞれのアプリケーションでの流れは以下の通り
    • ステージ1: 任意のユーザー アカウントを奪う。
    • ステージ2: アカウントを使用して /admin の管理インターフェイスにアクセスする。おそらく、権限を昇格させるか、管理者アカウントを侵害する。
    • ステージ3: 管理インターフェイスを使用して、サーバーのファイルシステムから /home/carlos/secret の内容を読み取り、"submit solution" を使用して送信する。
  • ユーザー名「 administrator 」を持つ管理者アカウントと、通常は「 carlos 」と呼ばれる権限の低いアカウントが常に存在する。ユーザー名列挙の脆弱性が見つかった場合、次のユーザー名リストパスワードリストを使用して、権限の低いアカウントに侵入できる可能性がある。
  • 各アプリケーションには最大1人のアクティブユーザーがおり、ユーザーまたは管理者としてログインする。ユーザーは15秒ごとにサイトのホームページにアクセスし、アプリケーションから受信した電子メールのリンクをクリックすると想定できる。エクスプロイトサーバーの「被害者への送信」機能を使用して、反映された脆弱性をターゲットにすることができる。
  • SSRFの脆弱性が見つかった場合は、ローカルホストのポート6566 で実行されている内部専用サービスにアクセスすることで、それを使用してファイルを読み取ることができる。
@attacker-codeninja
attacker-codeninja / bscp.md
Created May 19, 2024 09:25 — forked from dhmosfunk/bscp.md
BSCP攻略チートシート

試験ルール

  • 制限時間は4時間
  • 2つの脆弱なアプリケーションを攻略する
  • それぞれのアプリケーションでの流れは以下の通り
    • ステージ1: 任意のユーザー アカウントを奪う。
    • ステージ2: アカウントを使用して /admin の管理インターフェイスにアクセスする。おそらく、権限を昇格させるか、管理者アカウントを侵害する。
    • ステージ3: 管理インターフェイスを使用して、サーバーのファイルシステムから /home/carlos/secret の内容を読み取り、"submit solution" を使用して送信する。
  • ユーザー名「 administrator 」を持つ管理者アカウントと、通常は「 carlos 」と呼ばれる権限の低いアカウントが常に存在する。ユーザー名列挙の脆弱性が見つかった場合、次のユーザー名リストパスワードリストを使用して、権限の低いアカウントに侵入できる可能性がある。
  • 各アプリケーションには最大1人のアクティブユーザーがおり、ユーザーまたは管理者としてログインする。ユーザーは15秒ごとにサイトのホームページにアクセスし、アプリケーションから受信した電子メールのリンクをクリックすると想定できる。エクスプロイトサーバーの「被害者への送信」機能を使用して、反映された脆弱性をターゲットにすることができる。
  • SSRFの脆弱性が見つかった場合は、ローカルホストのポート6566 で実行されている内部専用サービスにアクセスすることで、それを使用してファイルを読み取ることができる。
echo ""
echo "************ Github Dork Links (must be logged in) *******************"
echo ""
echo " password"
echo "https://github.com/search?q="hackertarget.site"+password&type=Code"
echo "https://github.com/search?q=""hackertarget""+password&type=Code"
echo ""
echo " npmrc _auth"
@attacker-codeninja
attacker-codeninja / JavascriptRecon.md
Created April 10, 2024 12:40 — forked from fuckup1337/JavascriptRecon.md
My Javascript Recon Process - BugBounty

Description

This is a simple guide to perform javascript recon in the bugbounty

Steps

  • The first step is to collect possibly several javascript files (more files = more paths,parameters -> more vulns)
@attacker-codeninja
attacker-codeninja / _deobfuscating-unminifying-obfuscated-web-app-code.md
Created March 23, 2024 16:36 — forked from 0xdevalias/_deobfuscating-unminifying-obfuscated-web-app-code.md
Some notes and tools for reverse engineering / deobfuscating / unminifying obfuscated web app code
CVE-2023-44267 - Online Art Gallery v1.0 is vulnerable to multiple Unauthenticated SQL Injection vulnerabilities. The 'lnm' parameter of the header.php resource
CVE-2023-43737 - Online Art Gallery v1.0 is vulnerable to multiple Unauthenticated SQL Injection vulnerabilities. The 'fnm' parameter of the header.php resource
CVE-2023-44268 - Online Art Gallery v1.0 is vulnerable to multiple Unauthenticated SQL Injection vulnerabilities. The 'gender' parameter of the header.php resource
CVE-2023-43738 - Online Art Gallery v1.0 is vulnerable to multiple Unauthenticated SQL Injection vulnerabilities. The 'email' parameter of the header.php resource
CVE-2023-44162 - Online Art Gallery v1.0 is vulnerable to multiple Unauthenticated SQL Injection vulnerabilities. The 'contact' parameter of the header.php resource
CVE-2023-44375 - Online Art Gallery v1.0 is vulnerable to multiple Unauthenticated SQL Injection vulnerabilities. The 'add1' parameter of the header.php resource
CVE-2023-44376 - Online Art Gallery v1.0 i