load without any analysis (file header at offset 0x0): r2 -n /path/to/file
- analyze all:
aa - show sections:
iS - list functions:
afl - list imports:
ii - list entrypoints:
ie - seek to function:
s sym.main
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| from base64 import * | |
| Rcon = ( | |
| 0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, | |
| 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91, 0x39, | |
| 0x72, 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94, 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a, | |
| 0x74, 0xe8, 0xcb, 0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, | |
| 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, | |
| 0xc5, 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94, 0x33, 0x66, 0xcc, |
| from pwn import * | |
| import sys | |
| # NOTE : Tekan CTRL+D pada saat shell interactive pertama | |
| ch = process('./checker') | |
| #ch = remote("35.197.134.203", 8031) | |
| context.terminal = ['tmux', 'splitw', '-h'] | |
| gdb_cmd = """ | |
| source /home/ramdhan/ctf/tools/peda/peda.py | |
| b* 0x08048E50 | |
| """ |
Run below command to apply the patch.
$ base64 -d patch.b64 > patch
$ bspatch 010editor 010editor.patched patch
now you can run ./010editor.patched, you can register with your name and any serial number
| # Claas Heuer, August 2015 | |
| # | |
| # urls: | |
| # http://stackoverflow.com/questions/847179/multiple-glibc-libraries-on-a-single-host | |
| # http://www.gnu.org/software/libc/download.html | |
| cd $HOME | |
| mkdir glibc_update | |
| cd glibc_update |
| // This source code comes from: | |
| // http://stackoverflow.com/questions/8941711/is-is-possible-to-set-a-gdb-watchpoint-programatically | |
| // with additional tricks from: | |
| // https://code.google.com/p/google-breakpad/source/browse/trunk/src/client/linux/handler/exception_handler.cc?r=1361 | |
| #include <errno.h> | |
| #include <signal.h> | |
| #include <stddef.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> |
| command SelectTag call SelectTag() | |
| nnoremap <silent> <leader>p :SelectTag<CR> | |
| function SelectTag() | |
| let tagident = expand("<cword>") | |
| let curname = expand('%:p') | |
| exe "stjump ".tagident | |
| let newname = expand('%:p') | |
| if curname != newname | |
| exe "norm q" | |
| exe "tab drop ".newname |
| e scr.utf8 = true | |
| e scr.color = 3 | |
| ec func_var_type white | |
| ec func_var #61afef | |
| ec func_var_addr #4b5263 | |
| ec b0x00 #c678dd | |
| ec b0xff #be5046 | |
| ec prompt #d19a66 | |
| ec fname #56b6c2 | |
| ec label rgb:0f3 |
| from bs4 import BeautifulSoup | |
| import requests | |
| import json | |
| url = "https://ctf.asgama.web.id" | |
| class CTFDAutoSubmit: | |
| nonce_submit = 0 | |
| def __init__(self, url, user, pasw): | |
| self.ctf = requests.Session() |
| from pwn import * | |
| context.log_level = 'error' | |
| context.terminal = 'tmux splitw -h'.split() | |
| DEBUG = 0 | |
| cmd = """ | |
| """ | |
| libc = ELF('./libc.so.6') | |
| elf = ELF('./zeus') | |
| p = process("./zeus") |