Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main(){
- int i;
- char *args[101] = {};
- for (i=0; i<101; i++) args[i] = "A";
- args['A'] = "\x00";
- args['B'] = "\x20\x0a\x0d";
- args['C'] = "6969";
- args[100] = NULL;
- setenv("\xde\xad\xbe\xef", "\xca\xfe\xba\xbe", 1);
- extern char** environ;
- FILE* fp = fopen("\x0a", "w");
- fwrite("\x00\x00\x00\x00", 4, 1, fp);
- fclose(fp);
- execve("/home/input2/input", args, environ);
- }
- /* python script on different ssh terminal to do while socket.recv on input
- import socket
- s = socket.socket()
- s.bind(('127.0.0.1', 1337))
- s.connect(('127.0.0.1', 6969))
- s.send('\xde\xad\xbe\xef')
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement