Skip to content

Instantly share code, notes, and snippets.

View timb-machine's full-sized avatar

Tim Brown timb-machine

View GitHub Profile
@timb-machine
timb-machine / Patching a VMDK file
Created September 4, 2017 14:40
Patching a VMDK file
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/mman.h>
#include <stdio.h>
int main(int argc, char **argv) {
int filehandle;
char *mmapbuffer;
filehandle = open("sarpedon-000002.vmdk", O_RDWR);
mmapbuffer = mmap(0, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, f, 0);
@timb-machine
timb-machine / Google Compute Engine
Created September 5, 2017 22:55
Google Compute Engine
...
description: Computer
product: Google Compute Engine ()
vendor: Google
serial: GoogleCloud-<hex>
width: 64 bits
capabilities: smbios-2.4 dmi-2.4 vsyscall32
configuration: boot=normal uuid=<uuid>
...
*-core
@timb-machine
timb-machine / iosarm7binpatch.sh
Last active September 24, 2017 23:25
iosarm7binpatch.sh
#!/bin/sh
# https://osandamalith.wordpress.com
sed -i "" "s/\x00\x30\x93\xe4/\x00\x30\x93\xe5/g;s/\x00\x30\xd3\xe4/\x00\x30\xd3\xe5/g;" "${1}"
ldid -s "${1}"
lquerylv_fix/ecfile: TARGET_FILE=/usr/sbin/lquerylv - this is likely the "same" fix as in lvm_fix, i.e. a regression
lsmcode_fix2/ecfile: TARGET_FILE=/usr/bin/bsh - not worked out what the relates to, i reckon there is another bug...
lsmcode_fix2/ecfile: TARGET_FILE=/usr/ccs/lib/libc.a - this is likely a fix for a regression from malloc_file
lsmcode_fix2/ecfile: TARGET_FILE=/usr/ccs/lib/libc.a.min - this is likely a fix for a regression from malloc_file
lsmcode_fix/ecfile: TARGET_FILE=/usr/sbin/lsmcode - not worked out what the relates to, i reckon there is another bug...
lvm_fix/ecfile: TARGET_FILE=/usr/sbin/lquerylv - this actually fixes a bug in DBGCMD_LQUERYLV
malloc_fix/ecfile: TARGET_FILE=/usr/ccs/lib/libc.a
malloc_fix/ecfile: TARGET_FILE=/usr/ccs/lib/libc.a.min
FWIW: this is why I think the lquerylv patch and lvm patch are identical, they patch the same file and from a quick check the more significant change
@timb-machine
timb-machine / linikatz.out
Last active November 16, 2017 09:11
linikatz.out
Script started on Thu 26 Oct 2017 14:46:21 BST
_ _ _ _ _
| (_)_ __ (_) | ____ _| |_ ____
| | | '_ \| | |/ / _` | __|_ /
| | | | | | | < (_| | |_ / /
|_|_|_| |_|_|_|\_\__,_|\__/___|
=[ @timb_machine ]=
=== Machine secrets ===
@timb-machine
timb-machine / Router OS notes
Created November 16, 2017 09:11
Router OS notes
x - RouterOS
Core vs optional
Linux so supports various architecture
2.9 added /nova/etc/devel-login
If this exists, devel/<admin password> gets proper shell
Anatomy++ created createnpk.py and dumpnpk.py for 3.x
3.22 added checksums and signing
supout.rif contains
Configuration
/proc/
Script started on 2017-11-19 18:23:01+0000
Scanning x (x.x.x.x:443). [SNI: None]
Enumerating ciphers...
Testing protocol SSLv2.0...
Testing protocol SSLv3.0...
Testing protocol TLSv1.0...
Testing protocol TLSv1.1...
RSA_WITH_AES_128_CBC_SHA [0x0000002f]
RSA_WITH_AES_256_CBC_SHA [0x00000035]
RSA_WITH_CAMELLIA_128_CBC_SHA [0x00000041]
@timb-machine
timb-machine / micro:bit Space Invaders
Last active August 19, 2018 18:28
micro:bit Space Invaders
# https://makecode.microbit.org/45205-27183-13795-15925
let score = 0
let delay = 0
let highscore = 0
let onscreen = 0
let clearscreeen: Image = null
let ship: Image = null
input.onButtonPressed(Button.A, () => {
if (onscreen == 1) {
game.addScore(1)
@timb-machine
timb-machine / micro:bit Space Invaders 2
Created August 19, 2018 19:58
micro:bit Space Invaders 2
# https://makecode.microbit.org/31667-75115-87037-56723
let score = 0
let delay = 0
let highscore = 0
let onscreen = 0
let heart: Image = null
let lives = 0
let clearscreen: Image = null
let ship: Image = null
input.onButtonPressed(Button.A, () => {
@timb-machine
timb-machine / EMF Camp 2018
Created September 2, 2018 17:02
EMF Camp 2018
4th time we've run the CTF (sometimes as Cisco/Portcullis, this year as Team Alpaca)
106 challenges
Bandwidth usage so far peaked out at 24.4Mbps and disk usage at 19.4MB/s
Time machine challenge resulted in single CPU being pegged at 100%, required reprovisioning (x4 vCPUs) - go Ansible/Docker!
43 teams registered including one person playing over the Internet on their own (currently in 3rd place)
401 right submissions
507 wrong submissions
Jonty was yet again an item in the scavenger hunt category - sorry Jonty :)
We also caused uproar in the HAM community over "parabolic antenna"
We included a badge challenge for the first time