Skip to content

Instantly share code, notes, and snippets.

@droogie
droogie / gist:1ad1dae695e89dde95456aefa6892523
Created November 22, 2016 21:26
List names of vmaps for current process (WebProcess.self)
log: PID PPID PGID SID TSID LOGIN WCHAN EMUL COMM TDNAME
log: 55 33 33 33 0 root - ORBIS kernel SEL WebProcess.self elf_user_thid
log: [PS4][INFO]: PID 55 number of vmaps 226
log: PID INDEX START END SIZE PRT RES PRES REF SHD FL TP PATH
log: 55 0 0x2bf6c000 0x2bf70000 0x4000 r-x 1 0 1 0 CN ??
log: 55 1 0x2bf70000 0x2bf74000 0x4000 rw- 1 0 1 0 -- df
log: 55 2 0x200ad0000 0x200ad4000 0x4000 rw- 1 0 7 0 -- df
log: 55 3 0x200ad4000 0x200adc000 0x8000 rw- 2 0 7 0 -- df
log: 55 4 0x200adc000 0x200ae4000 0x8000 rw- 2 0 7 0 -- df
log: 55 5 0x200ae4000 0x200aec000 0x8000 rw- 1 0 7 0 -- df
@droogie
droogie / gist:8dedcb6d9b69b5203d9e9613f50d881c
Created November 22, 2016 23:44
Misc UART dump when using UI/Attempting to launch Playroom
I/PSM UI : OnFocusActiveSceneChanged [BrowserMain : MainScene] -> [ContentAreaScene : ContentAreaScene]
I/PSM UI : Scene [ContentAreaScene : ContentAreaScene] : Alive
[SystemLogger][ClickThrough][EVT21]: s:[MainScene]s:[Sce.Vsh.ShellUI.AppSystem.LayerManager.RootScene:ShellApp:ShellAppScreen:WebBrowserScene:BrowserMain]s:[ContentAreaScene]s:[
Sce.Vsh.ShellUI.AppSystem.LayerManager.RootScene:TopMenu:Navigation:TopMenuFrameScene:ContentsArea:ContentAreaScene]s:[NULL]s:[NULL]s:[NULL]
EVT22 is empty
EVT_invalid_ is empty
@droogie
droogie / gist:a24fe6cdd288ee346aa1766f81ab4357
Created November 23, 2016 00:43
PS4 Enabled UART -> Shutdown
I/PSM UI : UI system timer elap
sed 00:06:00
[VSMALLOC] Video: Free=67257492, FreeChunk=87; System: Free=10024944, FreeChunk=6; Heap: Free=5101824
Shader=10;VertexBuffer=71;PixelBuffer=320;FrameBuffer=4;Image=6
W/PSM UI : ##### exit value = psexit: #####
I/PSM UI : ** Unload enqueue: WebBrowserPlugin : WebBrowserPlugin
@droogie
droogie / opengrok-crawl.py
Last active May 26, 2018 07:12
quick and dirty opengrok project crawl+downlaod
#my ghetto soluton until this feature is implemented, https://github.com/oracle/opengrok/issues/2000
from BeautifulSoup import BeautifulSoup
import urllib2
import re
import os
import argparse
parser = argparse.ArgumentParser()
requiredNamed = parser.add_argument_group("required named arguments")
@droogie
droogie / uefi-symbols.py
Last active December 11, 2018 07:58
UEFI driver gdb symbol loading script
# This quick and dirty script will print a chunk that you can copy into gdb for loading of UEFI driver symbols
# requires objdump to be in your env path
# Expects a debug.log file which it will parse for all loaded drivers
import glob, os
import sys
import subprocess
DEBUG_FILE = "debug.log"
UEFI_PATH = "/home/droogie/src/edk2/Build/OvmfX64/DEBUG_GCC5/X64/"
@droogie
droogie / main.js
Created February 7, 2019 22:15
WinJS code execution outside app sandbox
(function () {
var app = WinJS.Application;
var activation = Windows.ApplicationModel.Activation;
var isFirstActivation = true;
app.onactivated = function (args) {
if (isFirstActivation) {
// execute system command via lua
Windows.Storage.DownloadsFolder.createFileAsync("escape.lua").then(function (file) {
@droogie
droogie / binder-fuzzer.cpp
Created December 11, 2019 17:57
binder transaction dumb fuzz
#include <stdlib.h>
#include <utils/RefBase.h>
#include <utils/Log.h>
#include <binder/TextOutput.h>
#include <binder/IInterface.h>
#include <binder/IBinder.h>
#include <binder/ProcessState.h>
#include <binder/IServiceManager.h>
@droogie
droogie / driver-trace.py
Last active June 4, 2020 06:11
pykd windbg driver trace script
# 'sxe ld driver.sys' to breakpoint when driver loads
# probably want to manually breakpoint DriverEntry then trace...
# or find a better solution than this ghetto script
# modified to use pykd api more and increase the speed significantly
import pykd
PATH = "C:\\Users\\droogie\\Desktop\\trace.txt"
MODULE_NAME = "driver.sys"
// basic program to grab if a PE binary was compiled with ASLR or DEP
#include <stdio.h>
#include <stdlib.h>
#define BYTE unsigned char
#define WORD unsigned short
#define DWORD unsigned int
#define LONG long
#define ULONGLONG unsigned long long
#include <stdio.h>
#include <math.h>
#include <Windows.h>
#define MAX_THREADS 32
typedef struct PrimeData {
unsigned long min;
unsigned long max;
unsigned long count;