Skip to content

Instantly share code, notes, and snippets.

View tthtlc's full-sized avatar

Peter Teoh tthtlc

View GitHub Profile
@tthtlc
tthtlc / debug.log
Created April 13, 2018 14:31 — forked from DreamLinuxer/debug.log
GDB script example
Reading symbols from ~/gist/gist-4077328/gdb_test...done.
Breakpoint 1 at 0x4005cf: file gdb_test.c, line 7.
Breakpoint 1, output (val=91652772) at gdb_test.c:7
7 printf("OUTPUT: %X\n",val);
#0 output (val=91652772) at gdb_test.c:7
#1 0x0000000000400632 in rand_output (prev=4294967295, mid=1073741824, mask=2147483647) at gdb_test.c:16
#2 0x000000000040066a in main () at gdb_test.c:23
Breakpoint 1, output (val=4481602) at gdb_test.c:7
@tthtlc
tthtlc / OSCP note A'
Created May 27, 2018 10:44 — forked from c4ri0c4/OSCP note A'
OSCP notes A & B may have some commons
OSCP Handy Commands
Nmap Full Web Vulnerable Scan:
mkdir /usr/share/nmap/scripts/vulscan
cd /usr/share/nmap/scrripts/vulscan
wget http://www.computec.ch/projekte/vulscan/download/nmap_nse_vulscan-2.0.tar.gz && tar xzf nmap_nse_vulscan-2.0.tar.gz
@tthtlc
tthtlc / README.md
Created June 4, 2018 15:56 — forked from joyrexus/README.md
Perl one-liners

Hi:

perl -e 'print "hello world!\n"'

A simple filter:

perl -ne 'print if /REGEX/'

Filter out blank lines (in place):

@tthtlc
tthtlc / ARMDebianUbuntu.md
Created April 14, 2019 16:49 — forked from bruce30262/ARMDebianUbuntu.md
Emulating ARM on Debian/Ubuntu

You might want to read this to get an introduction to armel vs armhf.

If the below is too much, you can try Ubuntu-ARMv7-Qemu but note it contains non-free blobs.

Running ARM programs under linux (without starting QEMU VM!)

First, cross-compile user programs with GCC-ARM toolchain. Then install qemu-arm-static so that you can run ARM executables directly on linux

If there's no qemu-arm-static in the package list, install qemu-user-static instead

@tthtlc
tthtlc / build.sh
Created April 14, 2019 16:49 — forked from julianxhokaxhiu/build.sh
How to build minimal AARCH64 QEMU Static from sources with EXECVE
#!/bin/bash
#
# IMPORTANT!
# At the moment this script is forged only for Debian ( tested on 8.x release ).
# Although my efforts were put on building this also on Arch Linux or Alpine, at the moment only Debian seems to be able to build it.
# Also, not sure why these instructions where nowhere on the internet, therefore I leave them here for whoever need them.
#
###########
# Add Backports repo support
@tthtlc
tthtlc / Android_Emulator_AWS_EC2_ARM64_2022.txt
Created December 3, 2024 14:00 — forked from atyachin/Android_Emulator_AWS_EC2_ARM64_2022.txt
Running headless android emulator on AWS EC2 Ubuntu instance (ARM64 / aarch64) - 2022
Android Emulator (ARM64) on EC2 - 2022
---------------------------------------
1. Launch EC2 ARM based Instance (a1.metal / a1.2xlarge): (16 Gb RAM, 32Gb Disk), Ubuntu Server 22.04 LTS (HVM) ARM x64
2. sudo apt update && sudo apt upgrade
3. sudo apt install default-jdk python3-pip repo python-is-python3 unzip libpcre2-dev adb
4. wget https://dl.google.com/android/repository/commandlinetools-linux-8512546_latest.zip
5. unzip commandlinetools-linux-8512546_latest.zip -d android-sdk
6. sudo mv android-sdk /opt/
7. mkdir /opt/android-sdk/cmdline-tools/latest
8. mv /opt/android-sdk/cmdline-tools/* /opt/android-sdk/cmdline-tools/latest (ignore the error)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tthtlc
tthtlc / seclist
Created January 16, 2025 03:32 — forked from ubogdan/seclist
seclist
0trace 1.5 A hop enumeration tool http://jon.oberheide.org/0trace/
3proxy 0.7.1.1 Tiny free proxy server. http://3proxy.ru/
3proxy-win32 0.7.1.1 Tiny free proxy server. http://3proxy.ru/
42zip 42 Recursive Zip archive bomb. http://blog.fefe.de/?ts=b6cea88d
acccheck 0.2.1 A password dictionary attack tool that targets windows authentication via the SMB protocol. http://labs.portcullis.co.uk/tools/acccheck/
ace 1.10 Automated Corporate Enumerator. A simple yet powerful VoIP Corporate Directory enumeration tool that mimics the behavior of an IP Phone in order to download the name and extension entries that a given phone can display on its screen interface http://ucsniff.sourceforge.net/ace.html
admid-pack 0.1 ADM DNS spoofing tools - Uses a variety of active and passive methods to spoof DNS packets. Very powerful. http://packetstormsecurity.com/files/10080/ADMid-pkg.tgz.html
adminpagefinder 0.1 This python script looks for a large amount of possible administrative interfaces on a given site. http://packetstormse
@tthtlc
tthtlc / meterpreter_scripts.md
Created January 16, 2025 03:33 — forked from gahan9/meterpreter_scripts.md
List of Hacking Scripts for Metasploit's Meterpreter

Script Commands with Brief Descriptions

  • arp_scanner.rb - Script for performing an ARP's Scan Discovery.
  • autoroute.rb - Meterpreter session without having to background the current session.
  • checkvm.rb - Script for detecting if target host is a virtual machine.
  • credcollect.rb - Script to harvest credentials found on the host and store them in the database.
  • domain_list_gen.rb - Script for extracting domain admin account list for use.
# Top ten (or whatever) memory utilizing processes (with children aggregate) - Can be done without the multi-dimensional array
ps axo rss,comm,pid | awk '{ proc_list[$2] += $1; } END { for (proc in proc_list) { printf("%d\t%s\n", proc_list[proc],proc); }}' | sort -n | tail -n 10
# Download last file from index of
NAME=`wget --quiet URL -O - | grep util-vserver | tail -n 1 | sed 's|</a>.*||;s/.*>//'`; wget URL$UTILVSERVER;
# Delete newline
tr -d "\n" < file1 > file2
# which procs have $PATH_REGEX open?
find /proc -regex '/proc/[0-9]+/smaps' -exec grep -l "$PATH_REGEX" {} \; | cut -d'/' -f2
# Adding formatting to an xml document for easier reading
xmllint --format <filename> > <output file>