Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_bin/*
34 changes: 18 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@

BOF_CFLAGS := -I ./ -Os -w -Wno-incompatible-pointer-types -fno-builtin-memset -fno-asynchronous-unwind-tables -fno-unwind-tables -fno-jump-tables -fno-tree-switch-conversion

all: bof

bof:
@(mkdir _bin 2>/dev/null) && echo 'creating _bin' || echo '_bin exists'
@(x86_64-w64-mingw32-gcc -w -Wno-incompatible-pointer-types -o _bin/hash.x64.o -I ./ -Os -s -c hash/hash.c && x86_64-w64-mingw32-strip --strip-unneeded _bin/hash.x64.o) && echo '[*] hash' || echo '[X] hash'
@(x86_64-w64-mingw32-gcc -w -Wno-incompatible-pointer-types -o _bin/klist.x64.o -I ./ -Os -s -c klist/klist.c && x86_64-w64-mingw32-strip --strip-unneeded _bin/klist.x64.o) && echo '[*] klist' || echo '[X] klist'
@(x86_64-w64-mingw32-gcc -w -Wno-incompatible-pointer-types -o _bin/triage.x64.o -I ./ -DTRIAGE -Os -s -c klist/klist.c && x86_64-w64-mingw32-strip --strip-unneeded _bin/triage.x64.o) && echo '[*] triage' || echo '[X] triage'
@(x86_64-w64-mingw32-gcc -w -Wno-incompatible-pointer-types -o _bin/dump.x64.o -I ./ -DDUMP -Os -s -c klist/klist.c && x86_64-w64-mingw32-strip --strip-unneeded _bin/dump.x64.o) && echo '[*] dump' || echo '[X] dump'
@(x86_64-w64-mingw32-gcc -w -Wno-incompatible-pointer-types -o _bin/describe.x64.o -I ./ -Os -s -c describe/describe.c && x86_64-w64-mingw32-strip --strip-unneeded _bin/describe.x64.o) && echo '[*] describe' || echo '[X] describe'
@(x86_64-w64-mingw32-gcc -w -Wno-incompatible-pointer-types -o _bin/tgtdeleg.x64.o -I ./ -Os -s -c tgtdeleg/tgtdeleg.c && x86_64-w64-mingw32-strip --strip-unneeded _bin/tgtdeleg.x64.o) && echo '[*] tgtdeleg' || echo '[X] tgtdeleg'
@(x86_64-w64-mingw32-gcc -w -Wno-incompatible-pointer-types -o _bin/ptt.x64.o -I ./ -Os -s -c ptt/ptt.c && x86_64-w64-mingw32-strip --strip-unneeded _bin/ptt.x64.o) && echo '[*] ptt' || echo '[X] ptt'
@(x86_64-w64-mingw32-gcc -w -Wno-incompatible-pointer-types -o _bin/purge.x64.o -I ./ -Os -s -c purge/purge.c && x86_64-w64-mingw32-strip --strip-unneeded _bin/purge.x64.o) && echo '[*] purge' || echo '[X] purge'
@(x86_64-w64-mingw32-gcc -w -Wno-incompatible-pointer-types -o _bin/asktgt.x64.o -I ./ -Os -s -c asktgt/asktgt.c && x86_64-w64-mingw32-strip --strip-unneeded _bin/asktgt.x64.o) && echo '[*] asktgt' || echo '[X] asktgt'
@(x86_64-w64-mingw32-gcc -w -Wno-incompatible-pointer-types -o _bin/asktgs.x64.o -I ./ -Os -s -c asktgs/asktgs.c && x86_64-w64-mingw32-strip --strip-unneeded _bin/asktgs.x64.o) && echo '[*] asktgs' || echo '[X] asktgs'
@(x86_64-w64-mingw32-gcc -w -Wno-incompatible-pointer-types -o _bin/renew.x64.o -I ./ -Os -s -c renew/renew.c && x86_64-w64-mingw32-strip --strip-unneeded _bin/renew.x64.o) && echo '[*] renew' || echo '[X] renew'
@(x86_64-w64-mingw32-gcc -w -Wno-incompatible-pointer-types -o _bin/changepw.x64.o -I ./ -Os -s -c changepw/changepw.c && x86_64-w64-mingw32-strip --strip-unneeded _bin/changepw.x64.o) && echo '[*] changepw' || echo '[X] changepw'
@(x86_64-w64-mingw32-gcc -w -Wno-incompatible-pointer-types -o _bin/asreproasting.x64.o -I ./ -Os -s -c asreproasting/asreproasting.c && x86_64-w64-mingw32-strip --strip-unneeded _bin/asreproasting.x64.o) && echo '[*] asreproasting' || echo '[X] asreproasting'
@(x86_64-w64-mingw32-gcc -w -Wno-incompatible-pointer-types -o _bin/kerberoasting.x64.o -I ./ -Os -s -c kerberoasting/kerberoasting.c && x86_64-w64-mingw32-strip --strip-unneeded _bin/kerberoasting.x64.o) && echo '[*] kerberoasting' || echo '[X] kerberoasting'
@(x86_64-w64-mingw32-gcc -w -Wno-incompatible-pointer-types -o _bin/s4u.x64.o -I ./ -Os -s -c s4u/s4u.c && x86_64-w64-mingw32-strip --strip-unneeded _bin/s4u.x64.o) && echo '[*] s4u' || echo '[X] s4u'
@(x86_64-w64-mingw32-gcc -w -Wno-incompatible-pointer-types -o _bin/cross_s4u.x64.o -I ./ -Os -s -c s4u/cross_s4u.c && x86_64-w64-mingw32-strip --strip-unneeded _bin/cross_s4u.x64.o) && echo '[*] cross_s4u' || echo '[X] cross_s4u'
@(x86_64-w64-mingw32-gcc $(BOF_CFLAGS) -o _bin/hash.x64.o -s -c hash/hash.c && x86_64-w64-mingw32-strip --strip-unneeded _bin/hash.x64.o) && echo '[*] hash' || echo '[X] hash'
@(x86_64-w64-mingw32-gcc $(BOF_CFLAGS) -o _bin/klist.x64.o -s -c klist/klist.c && x86_64-w64-mingw32-strip --strip-unneeded _bin/klist.x64.o) && echo '[*] klist' || echo '[X] klist'
@(x86_64-w64-mingw32-gcc $(BOF_CFLAGS) -DTRIAGE -o _bin/triage.x64.o -s -c klist/klist.c && x86_64-w64-mingw32-strip --strip-unneeded _bin/triage.x64.o) && echo '[*] triage' || echo '[X] triage'
@(x86_64-w64-mingw32-gcc $(BOF_CFLAGS) -DDUMP -o _bin/dump.x64.o -s -c klist/klist.c && x86_64-w64-mingw32-strip --strip-unneeded _bin/dump.x64.o) && echo '[*] dump' || echo '[X] dump'
@(x86_64-w64-mingw32-gcc $(BOF_CFLAGS) -o _bin/describe.x64.o -s -c describe/describe.c && x86_64-w64-mingw32-strip --strip-unneeded _bin/describe.x64.o) && echo '[*] describe' || echo '[X] describe'
@(x86_64-w64-mingw32-gcc $(BOF_CFLAGS) -o _bin/tgtdeleg.x64.o -s -c tgtdeleg/tgtdeleg.c && x86_64-w64-mingw32-strip --strip-unneeded _bin/tgtdeleg.x64.o) && echo '[*] tgtdeleg' || echo '[X] tgtdeleg'
@(x86_64-w64-mingw32-gcc $(BOF_CFLAGS) -o _bin/ptt.x64.o -s -c ptt/ptt.c && x86_64-w64-mingw32-strip --strip-unneeded _bin/ptt.x64.o) && echo '[*] ptt' || echo '[X] ptt'
@(x86_64-w64-mingw32-gcc $(BOF_CFLAGS) -o _bin/purge.x64.o -s -c purge/purge.c && x86_64-w64-mingw32-strip --strip-unneeded _bin/purge.x64.o) && echo '[*] purge' || echo '[X] purge'
@(x86_64-w64-mingw32-gcc $(BOF_CFLAGS) -o _bin/asktgt.x64.o -s -c asktgt/asktgt.c && x86_64-w64-mingw32-strip --strip-unneeded _bin/asktgt.x64.o) && echo '[*] asktgt' || echo '[X] asktgt'
@(x86_64-w64-mingw32-gcc $(BOF_CFLAGS) -o _bin/asktgs.x64.o -s -c asktgs/asktgs.c && x86_64-w64-mingw32-strip --strip-unneeded _bin/asktgs.x64.o) && echo '[*] asktgs' || echo '[X] asktgs'
@(x86_64-w64-mingw32-gcc $(BOF_CFLAGS) -o _bin/renew.x64.o -s -c renew/renew.c && x86_64-w64-mingw32-strip --strip-unneeded _bin/renew.x64.o) && echo '[*] renew' || echo '[X] renew'
@(x86_64-w64-mingw32-gcc $(BOF_CFLAGS) -o _bin/changepw.x64.o -s -c changepw/changepw.c && x86_64-w64-mingw32-strip --strip-unneeded _bin/changepw.x64.o) && echo '[*] changepw' || echo '[X] changepw'
@(x86_64-w64-mingw32-gcc $(BOF_CFLAGS) -o _bin/asreproasting.x64.o -s -c asreproasting/asreproasting.c && x86_64-w64-mingw32-strip --strip-unneeded _bin/asreproasting.x64.o) && echo '[*] asreproasting' || echo '[X] asreproasting'
@(x86_64-w64-mingw32-gcc $(BOF_CFLAGS) -o _bin/kerberoasting.x64.o -s -c kerberoasting/kerberoasting.c && x86_64-w64-mingw32-strip --strip-unneeded _bin/kerberoasting.x64.o) && echo '[*] kerberoasting' || echo '[X] kerberoasting'
@(x86_64-w64-mingw32-gcc $(BOF_CFLAGS) -o _bin/s4u.x64.o -s -c s4u/s4u.c && x86_64-w64-mingw32-strip --strip-unneeded _bin/s4u.x64.o) && echo '[*] s4u' || echo '[X] s4u'
@(x86_64-w64-mingw32-gcc $(BOF_CFLAGS) -o _bin/cross_s4u.x64.o -s -c s4u/cross_s4u.c && x86_64-w64-mingw32-strip --strip-unneeded _bin/cross_s4u.x64.o) && echo '[*] cross_s4u' || echo '[X] cross_s4u'
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,13 @@ To form AS-REQ's more inline with genuine requests, the `/opsec` flag can be use

Requesting a TGT without a PAC can be done using the `/nopac` switch. The `/nopreauth` flag can be used to send an AS-REQ without pre-authentication.

The `/certificate:X` option accepts a base64-encoded PFX blob similar to Rubeus and reuses `/password:X` as the PFX password when needed. This path now performs direct PKINIT with a CryptoAPI-backed PFX and does not require SYSTEM.

```
krb_asktgt /user:USER /password:PASSWORD [/domain:DOMAIN] [/dc:DC] [/enctype:{rc4|aes256}] [/ptt] [/nopac] [/opsec]
krb_asktgt /user:USER /aes256:HASH [/domain:DOMAIN] [/dc:DC] [/ptt] [/nopac] [/opsec]
krb_asktgt /user:USER /rc4:HASH [/domain:DOMAIN] [/dc:DC] [/ptt] [/nopac]
krb_asktgt /user:USER /certificate:BASE64_PFX [/password:PFX_PASSWORD] [/domain:DOMAIN] [/dc:DC] [/ptt]
krb_asktgt /user:USER /nopreauth [/domain:DOMAIN] [/dc:DC] [/ptt]
```

Expand Down Expand Up @@ -238,7 +241,7 @@ krb_changepw /ticket:BASE64 /new:PASSWORD [/dc:DC] [/targetuser:USER] [/targetdo

## TODO

- [ ] Implement `asktgt /cert:...`
- [x] Implement `asktgt /cert:...`
- [ ] Refactoring code to reduce BOFs size
- [ ] Expand the output of the `describe`
* if you need anything, PM me to X or TG :)
Expand Down
Loading