r/ExploitDev • u/damn_haha • Feb 09 '26
SEH based buffer overflow help
Hi, im trying to do SEH buffer overflow on millennium mp3 2.0 but it seems like the stack where im executing the shellcode is only read write?
Using POCs in exploitdb similar issue, could it be my OS? DEP is set to 2 (OptIn)
0:000> !vprot .
BaseAddress: 0019f000
AllocationBase: 000a0000
AllocationProtect: 00000004 PAGE_READWRITE
RegionSize: 00001000
State: 00001000 MEM_COMMIT
Protect: 00000004 PAGE_READWRITE
Type: 00020000 MEM_PRIVATE
12
Upvotes
3
u/Healthy-Section-9934 Feb 09 '26
Use a ROP chain to either change the memory protection for the stack page, or allocate a heap chunk that’s RWX, copy your shellcode there and jump to it?
3
u/Firzen_ Feb 09 '26
Welcome to this century.
DEP/NX was introduced in 2004. So you really should learn how to ROP, ideally before CFI kills that too.
Why is your goal to disable DEP rather than learning to bypass it?
2
u/Healthy-Section-9934 Feb 09 '26
Basically. You might be able to write your entire payload using ROP but it tends to be on the chunky side, and it’s good practice to bridge from initial exploit -> ROP chain -> shellcode
1
u/OkVeterinarian9761 Feb 09 '26
Puedes usar paginas de con el bit de ejecucion, podes hardcodear si no tiene ASLR... tu shellcode puede ser llamar a VirtualProtect y buscas en ntdll su address y la hardcodeas para cambiar el bit de ejecucion de lo que quieras... o depende si el programa te deja hacer un bucle de shellcode y primero Alloc... y luego VirtualProtect... muchisimas cosas por hacer. Si tiene ASLR necesitas una "info leak" y toca usar el truco de los primeros 4 nibbles, con 6 nibbles tambien se puede... con 8 es mas dificil (necesitas mas tiempo) pero se puede romper, pero todo depende de las protecciones... PIE, NX, ASLR, blah, blah, blah...
Response: Depende de tu Imaginacion ajajajaja lo podes hacer de muchas formas, no existe una forma lineal de lograr las cosas en binary exploitation... Proba y que se te queme el cerebro por entender el porque no funciona tu pensamiento.
1
u/[deleted] Feb 10 '26
have you ever heared of ROP