Skip to content

Instantly share code, notes, and snippets.

View sengkyaut's full-sized avatar
🐶
Working from home

Seng Kyaut sengkyaut

🐶
Working from home
View GitHub Profile
@sengkyaut
sengkyaut / chrome_remote_debug_lfi.py
Created January 12, 2024 16:03 — forked from pich4ya/chrome_remote_debug_lfi.py
Chrome Debugger Local File Inclusion (No CVE, a security misconfiguration if the port is accessible for the attacker)
#!/usr/bin/env python
# @author Pichaya Morimoto (p.morimoto@sth.sh)
# Ported from https://github.com/rapid7/metasploit-framework/blob/master//modules/auxiliary/gather/chrome_debugger.rb
# pip install requests websocket-client python-socks
# This exploit code can be used to read arbitrary files on the victim machine with
# chrome/chromium --remote-debugging-port=9222, usually runs as a test automation tool in any software testing phase
import requests
import json
import urllib3
import websocket
@sengkyaut
sengkyaut / usb_hid_keys.h
Created November 29, 2023 15:11 — forked from MightyPork/usb_hid_keys.h
USB HID Keyboard scan codes
/**
* USB HID Keyboard scan codes as per USB spec 1.11
* plus some additional codes
*
* Created by MightyPork, 2016
* Public domain
*
* Adapted from:
* https://source.android.com/devices/input/keyboard-devices.html
*/
@sengkyaut
sengkyaut / ida_launcher.bat
Created December 24, 2022 06:09 — forked from vient/ida_launcher.bat
Add IDA to context menu. Download as ZIP, unpack to safe place (don't delete after!) and run setup.bat. You will get "Open with IDA" in context menu. Requires WSL installed with `file` installed inside.
@echo off
setlocal
reg query HKCR\IDApro.Database32\shell\open\command > NUL
if errorlevel 1 goto idb_handler_not_found
for /f tokens^=2^ delims^=^" %%a in ('reg query "HKCR\IDApro.Database32\shell\open\command" ^| findstr /ri "REG_SZ"') do set IDA_DIR=%%~dpa
echo IDA folder %IDA_DIR%
@sengkyaut
sengkyaut / root_bypass.js
Created October 26, 2022 06:28 — forked from pich4ya/root_bypass.js
Bypass Android Root Detection / Bypass RootBeer - August 2019
// $ frida -l antiroot.js -U -f com.example.app --no-pause
// CHANGELOG by Pichaya Morimoto (p.morimoto@sth.sh):
// - I added extra whitelisted items to deal with the latest versions
// of RootBeer/Cordova iRoot as of August 6, 2019
// - The original one just fucked up (kill itself) if Magisk is installed lol
// Credit & Originally written by: https://codeshare.frida.re/@dzonerzy/fridantiroot/
// If this isn't working in the future, check console logs, rootbeer src, or libtool-checker.so
Java.perform(function() {
var RootPackages = ["com.noshufou.android.su", "com.noshufou.android.su.elite", "eu.chainfire.supersu",
@sengkyaut
sengkyaut / intentMonitor.js
Created October 1, 2022 07:21 — forked from bet4it/intentMonitor.js
Monitor android intents with frida
Java.perform(function () {
var act = Java.use("android.app.Activity");
act.getIntent.overload().implementation = function () {
var intent = this.getIntent()
var cp = intent.getComponent()
console.log("Starting " + cp.getPackageName() + "/" + cp.getClassName())
var ext = intent.getExtras();
if (ext) {
var keys = ext.keySet()
var iterator = keys.iterator()
@sengkyaut
sengkyaut / fizzbuzz.py
Created September 26, 2022 14:34
Divided by 3 or 5
# Create a function that takes in an input: 'nums', which is an array/iterable of positive integers
# e.g. nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] The function should return an array (arr) that mirrors nums as follows.
# 1. For each index in nums, there should be a corresponding string in arr
# 2. If the integer at the given index in nums is divisible by 3, the string in arr should be "Fizz"
# 3. If the integer at the given index in nums is divisible by 5, the string in arr should be "Buzz"
# 4. However, if the integer at the given index in nums is divisible by BOTH 3 and 5, the string in arr should be "FizzBuzz" instead
# 5. If the integer at the given index in nums is not divisible by 3 or 5,the string in arr should be the integer cast as a string,
# e.g. if the integer in nums is 1, the integer in arr should be "1"
# The function should also print each number in the array one by one each on a new line.
# Example: Input: nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18
@sengkyaut
sengkyaut / demo.js
Created September 5, 2022 15:29 — forked from theseann/demo.js
FridaLab-solver-by-lushann
// frida -U uk.rossmarks.fridalab -l agent/demo.js --runtime=v8
function challenge01() {
Java.perform(function () {
Java.use("uk.rossmarks.fridalab.challenge_01").chall01.value = 1
})
}
function challenge02() {
Java.perform(function () {
@sengkyaut
sengkyaut / submit.md
Created June 24, 2022 15:00 — forked from tanaikech/submit.md
Upload Files to Google Drive using Javascript

Upload Files to Google Drive using Javascript

News

At October 11, 2019, I published a Javascript library to to run the resumable upload for Google Drive. When this is used, the large file can be uploaded. You can also use this js library.

Description

This is a sample script for uploading files to Google Drive using Javascript. The files are uploaded by Drive API v3. gapi.client.drive.files.create() can create an empty file on Google Drive. But it cannot directly upload files including contents. I think that this might not be able to upload files and metadata with the multipart/related, although this might be resolved by the future update. So now, as one of workarounds, I use using XMLHttpRequest.

  • This sample uses gapi.
  • Before you use this, please enable Drive API at API console and carr
@sengkyaut
sengkyaut / PowerView-3.0-tricks.ps1
Created June 14, 2022 02:49 — forked from HarmJ0y/PowerView-3.0-tricks.ps1
PowerView-3.0 tips and tricks
# PowerView's last major overhaul is detailed here: http://www.harmj0y.net/blog/powershell/make-powerview-great-again/
# tricks for the 'old' PowerView are at https://gist.github.com/HarmJ0y/3328d954607d71362e3c
# the most up-to-date version of PowerView will always be in the dev branch of PowerSploit:
# https://github.com/PowerShellMafia/PowerSploit/blob/dev/Recon/PowerView.ps1
# New function naming schema:
# Verbs:
# Get : retrieve full raw data sets
# Find : ‘find’ specific data entries in a data set
@sengkyaut
sengkyaut / laravel setup.sh
Created January 27, 2022 05:00 — forked from rolandstarke/laravel setup.sh
Server setup bash script for Laravel
# Ubuntu 18.04 LTS Server Setup for Laravel
# Login as root user
sudo su -
# Update list of available packages
apt update