Skip to content

Instantly share code, notes, and snippets.

View ldionmarcil's full-sized avatar

Louis Dion-Marcil ldionmarcil

View GitHub Profile
@ldionmarcil
ldionmarcil / hs256.bcheck
Created March 4, 2024 21:56
Burp Bcheck to find HS256 JWTs
metadata:
language: v1-beta
name: "HS256 JWT Detection"
description: "JWT Using HS256"
tags: "passive"
author: "@ldionmarcil"
given response then
if {latest.response} matches "ey[\w]+((oc|IU)zI1N|(aH|SF)MyNT|(hz|hT)MjU)[\w\-=]*\." then
report issue:
@ldionmarcil
ldionmarcil / hs256.bcheck
Created March 4, 2024 20:35
Burp Bcheck to find HS256 JWTs
metadata:
language: v1-beta
name: "HS256 JWT Detection"
description: "JWT Using HS256"
tags: "passive"
author: "@ldionmarcil"
given response then
if {latest.response} matches "ey.*((oc|IU)zI1N|(aH|SF)MyNT|(hz|hT)MjU)" then
report issue:
@ldionmarcil
ldionmarcil / cert.sh
Created March 4, 2024 18:03
find url common name and alternative name
function cert {
# accepts urls/hostnames as stdin
# returns Common Name + Subject Alternative Name from responding http server
if [ $# -eq 0 ]; then
# human readable
httpx -silent -json -tls-grab | jq -r '"\u001b[34m\(.url)\u001b[0m \(.tls | [.subject_cn] + .subject_an | unique | join(" "))"'
else
# batching
httpx -silent -json -tls-grab | jq -r '(.tls | [.subject_cn] + .subject_an | unique | join("\n"))'
@ldionmarcil
ldionmarcil / gist:af7b779c482fbb92a9d612fefc42df82
Created January 18, 2024 23:49
Some Burp logger++ filters I use
#clean : removes annoying requests a specific app might have that I dont want to permanently remove. for example if an app uses google identity toolkit but I don't want to filter out all of google API
!(Request.URL CONTAINS "/_track") AND Request.Hostname != "identitytoolkit.googleapis.com"
#nostatic : kinda dumb heuristic to remove most of the "uninteresting" (aka static) content in project. you can do much more with Response.Inferred_Type but I only use content-type because its much faster if you don't play with response bodies in large projects
!(#js OR #image OR #css OR #plain OR #audiovideo)
#json : filters for JSON content type. uses inferredtype because JSON is often returned with weird content types. not a member of #nostatic because parsing the body impacts perf too much.
Response.InferredType == "json"
#js
@ldionmarcil
ldionmarcil / confurl.sh
Created March 2, 2021 23:58
Bash wrapper around Confused to support URLs
function confurl() {
url="$1"
content=$(curl -s "$url")
type="npm" #default to npm
if [[ "$content" == *"=="* ]]; then
type="pip"
elif [[ "$content" == *"dependencies\""* ]]; then
type="npm"
elif [[ "$content" == *"maven.apache.org"* ]]; then
from matrix_client.client import MatrixClient
client = MatrixClient("https://matrix.org")
token = client.login_with_password(username="user", password="pass")
print("connected...")
room = client.join_room("!room:matrix.org")
print ("Room joined")
@ldionmarcil
ldionmarcil / DESCRIPTION.md
Last active December 31, 2016 18:19
Authenticated directory listing in XCloner WP plugin <3.5.1, leads to full backups disclosure

Description

Authenticated users are able to perform directory listings at any location available to the Wordpress user, leaking filenames of previous backups. This was found in XCloner - Backup and Restore version 3.1.5, but may have been introduced in earlier versions. Attackers can leverage directory listings to leak otherwise secret filepaths to previous backups, allowing them to acquire full backup contents, since the backup download is not authenticated.

POC

Logged in as a regular, unprivileged user (subscriber)

@ldionmarcil
ldionmarcil / DESCRIPTION.md
Last active August 28, 2016 18:54
Stored XSS in Newsletter WP plugin<4.6.0, could lead to privilege escalation

Description

There is a stored XSS vulnerability in the Newsletter Wordpress plugin version 4.6.0 when editors are given access to the Newsletter plugin. Editors are able to modify any subsriber's secret token, which is then displayed unescaped in various places in the administration panel. Attackers can then modify a token to contain a javascript snippet that will be served to and executed by administrators using the Newsletter panel, which may be used in order to perform an escalation of privileges. Found in version 4.6.0

POC

@ldionmarcil
ldionmarcil / DESCRIPTION.md
Created August 27, 2016 19:57
Unauthenticated stored XSS affecting admins in 404-to-301<2.3.1

Description

There is a stored XSS in the 404-to-301 WP plugin<2.3.1. Unauthenticated users can visit a specially crafted URL and the redirect path will be logged to the database. The redirection source is stored unescaped in the database, thus it is served as-is and evaluated in the browsers of logged-in admins when they check the redirection logs on http://wordpress/wp-admin/admin.php?page=i4t3-logs. Affected versions are <2.3.1.

POC

@ldionmarcil
ldionmarcil / gist:4f4ad5e39107e5702c84
Created April 1, 2015 13:00
vote greve ets printemps 2015
counter = 0
gel = {"Abstention" : 0,
"Pour" : 0,
"Contre" : 0,
"": 0}
greve = {"Abstention" : 0,
"Pour" : 0,
"Contre" : 0,
"": 0}