Skip to content

Instantly share code, notes, and snippets.

View apocsantos's full-sized avatar

António Santos apocsantos

  • Viana do Castelo
View GitHub Profile
@jindrichsirucek
jindrichsirucek / Esp8266 wifi radio off and on again
Last active January 23, 2018 08:54
100% working example. It saves battery life greatly, but ESP can still operate (except wifi)..
extern "C" {
#include "user_interface.h"
}
void turnWifiOn()
{
if(MAIN_DEBUG) DEBUG_OUTPUT.println(E("WiFi Radio: Turning ON"));
wifi_fpm_do_wakeup();
wifi_fpm_close();
wifi_set_opmode(STATION_MODE);
wifi_station_connect();
@hfiref0x
hfiref0x / akagi_42b.c
Last active August 21, 2025 16:06
UAC bypass using FwCplLua COM interface and HKCU mscfile registry entry hijack
typedef interface IFwCplLua IFwCplLua;
typedef struct IFwCplLuaInterfaceVtbl {
BEGIN_INTERFACE
HRESULT(STDMETHODCALLTYPE *QueryInterface)(
__RPC__in IFwCplLua * This,
__RPC__in REFIID riid,
_COM_Outptr_ void **ppvObject);
@pjgpetecodes
pjgpetecodes / sprite1.asm
Last active November 10, 2017 13:44
Sam Coupe Sprite Tutorial - Part 1
;
; -----------------------------------------------------------------------------------
; | |
; | Program: SAM Coupe Sprites Tutorial 1 - Part 1 |
; | Filename: Sprites1.asm |
; | Version: 1.0 |
; | Date: 12/10/2017 |
; | Author: Pete Gallagher - PJG Creations Ltd |
; | |
; -----------------------------------------------------------------------------------
/*
# 010 Template for t.wnry
typedef struct {
char Signature[8]; // WANACRY!
uint32 Part1Size; // Always 0x100
char DataPart1[Part1Size];
uint32 Part2Signature;
uint64 Part2Size;
char DataPart2[Part2Size];
@msuiche
msuiche / WannaCry-SMB.c
Created May 13, 2017 08:39
WannaCry - DOUBLEPULSAR references
// https://twitter.com/msuiche
int threadMain()
{
unsigned int i; // edi@1
_DWORD *v1; // eax@2
void *v2; // esi@7
char v4; // [sp+13h] [bp-2Dh]@0
char v5; // [sp+14h] [bp-2Ch]@1
void *Memory; // [sp+18h] [bp-28h]@1
@msuiche
msuiche / EternalBlue-SmbHandler.asm
Created April 23, 2017 09:45
DOUBLEPULSAR - ETERNALBLUE - SmbHandler()
Thanks to https://zerosum0x0.blogspot.com/2017/04/doublepulsar-initial-smb-backdoor-ring.html#pulsar_step5 for the description
kd> dps srv!SrvTransaction2DispatchTable
91463530 9148b56f srv!SrvSmbOpen2
91463534 91485fe4 srv!SrvSmbFindFirst2
91463538 9148606d srv!SrvSmbFindNext2
9146353c 91488a89 srv!SrvSmbQueryFsInformation
91463540 914892f3 srv!SrvSmbSetFsInformation
91463544 9147ff65 srv!SrvSmbQueryPathInformation
91463548 91480c74 srv!SrvSmbSetPathInformation
anonymous
anonymous / dump.csv
Created April 8, 2017 21:24
Parsed out compromised hosts from #ShadowBrokers
ID Host IP Address Year Month Day Implant Version OS
PITCHIMPAIR ns1.youngdong.ac.kr 202.30.58.5 1969 12 31 INCISION 1.1.2.1 hppa2.0w-hp-hpux11.00
INTONATION tx.micro.net.pk 203.135.2.194 2000 8 17 JACKLADDER 2.0 sparc-sun-solaris2.7
INTONATION hakuba.janis.or.jp 210.232.42.3 2000 8 22 JACKLADDER 2.0 sparc-sun-solaris2.6
INTONATION mail.interq.or.jp 210.157.0.87 2000 8 24 JACKLADDER 2.0 sparc-sun-solaris2.6
INTONATION mx1.freemail.ne.jp 210.235.164.21 2000 8 28 JACKLADDER ? i386-pc-solaris2.7
INTONATION webnetra.entelnet.bo 166.114.10.28 2000 8 30 JACKLADDER 2.0 sparc-sun-solaris2.6
INTONATION opcwdns.opcw.nl 195.193.177.150 2000 9 6 JACKLADDER 2.0 sparc-sun-solaris2.6
INTONATION rayo.pereira.multi.net.co 206.49.164.2 2000 9 20 JACKLADDER 2.0 sparc-sun-solaris2.6
INTONATION most.cob.net.ba 195.222.48.5 2000 9 21 JACKLADDER 2.0 sparc-sun-solaris2.6
@msuiche
msuiche / Installer.dll
Created March 10, 2017 07:14
Installer.dll (Vault7)
// Decompiled with JetBrains decompiler
// Type: Installer.Install
// Assembly: Installer, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: 1DF6A781-016A-4A47-9C62-874A888EB357
// Assembly location:
using \u0004;
using \u0006;
using Microsoft.Win32;
using System;
Function Trace-Word
{
[Cmdletbinding()]
[Alias("Highlight")]
Param(
[Parameter(ValueFromPipeline=$true, Position=0)] [string[]] $content,
[Parameter(Position=1)]
[ValidateNotNull()]
[String[]] $words = $(throw "Provide word[s] to be highlighted!")
@msuiche
msuiche / SNPfilter.ps1
Created January 30, 2017 15:29
Powershell script to parse your SNP
# http://slatestarcodex.com/2014/11/12/how-to-use-23andme-irresponsibly/
$indexSNPName = 0
$indexSNPValue = 3
$fileName = "genome_Peter_Parker_Full_20170130051759.txt"
Write-Host " --- "
$rs909525 = gci $fileName | Select-String 'rs909525\t'
$rs909525 = $rs909525.Line.Split("`t")
Write-Host "[+]"$rs909525[$indexSNPName] "(Warrior Gene): ("$rs909525[$indexSNPValue]")"