CTF write up(47)
-
[CTF write up] HITCON CTF 2023 qual - Full Chain - Wall Maria : VM escape on Qemu with Sandbox option enabled
#include "hw/hw.h" #include "hw/pci/msi.h" #include "hw/pci/pci.h" #include "qapi/visitor.h" #include "qemu/main-loop.h" #include "qemu/module.h" #include "qemu/osdep.h" #include "qom/object.h" #define TYPE_PCI_MARIA_DEVICE "maria" #define MARIA_MMIO_SIZE 0x10000 #define BUFF_SIZE 0x2000 typedef struct { PCIDevice pdev; struct { uint64_t src; uint8_t off; } state; char buff[BUFF_SIZE]; MemoryReg..
2023.09.12 -
[CTF write up] WACon CTF 2023 qual - heaphp : PHP Extension Exploitation
memcpy의 인자로 들어가는 len 값으로 PHP 파라미터 구조체에서 가져온 진짜 인자의 길이를 사용하지만, _emalloc 변수에 들어가는 size 변수는 strlen 함수의 결과를 값으로 사용한다. 따라서 add_note의 두번째 인자에 Null 바이트를 포함시키면 Heap Overflow가 발생한다. The len value entered as an argument to memcpy uses the length of the actual argument taken from the PHP parameter structure, but the size variable entered into the _emalloc variable uses the result of the strlen function as ..
2023.09.04 -
[CTF write up] corCTF 2023 - cshell3 : Pwning the AIS terminal
바이너리가 간단한 편은 아니었지만, 그럼에도 불구하고 매우 Basic한 문제였다. The binary wasn't simple, but it was a very basic challenge nonetheless. void VHFADMIN() { char *username, *password; username = readline("Enter username: "); password = readline("Enter password: "); char l_password_hash[65] = {0}; sha256_password(password, l_password_hash); if (strcmp(username, "admin") == 0 && strcmp(l_password_hash, password_hash)..
2023.07.31 -
[CTF write up] zer0pts CTF 2023 - decompile me, aush me, Warmuprofile, qjail, BrainJIT, jqi, Neko Note
보호되어 있는 글입니다.
2023.07.16 -
[CTF write up] Fall GoN Open Qual CTF 2023 - NPU : Qemu VM Escape via DMA MMIO reentrancy
보호되어 있는 글입니다.
2023.07.09 -
[CTF write up] codegate CTF 2023 general - Mediocrity : Race Condtion in VM
취약점은 매우 간단한다. Thread를 생성할때, mem을 포인터째로 복사해서 mem에서 Race condition이 발생한다. The vulnerability is very simple. When creating a thread, mem is copied as a pointer, so a race condition occurs in mem. opcode 중 mem을 참조하여 read / write 하는 부분이 있는데, 기본적으로는 boundary check가 잘 되어있지만, Race condition을 이용하면 Boundary check 이후 mem 값을 변경하여 OOB read / write를 할 수 있다. There is a part of the opcode that reads/writes by r..
2023.06.18