1、FD
直接通过ssh连接上去,然后,看下源代码。
#include <stdio.h> #include <stdlib.h> #include <string.h> char buf[32]; int main(int argc, char* argv[], char* envp[]){ if(argc<2){ printf("pass argv[1] a number "); return 0; } int fd = atoi( argv[1] ) - 0x1234; int len = 0; len = read(fd, buf, 32); if(!strcmp("LETMEWIN ", buf)){ printf("good job :) "); system("/bin/cat flag"); exit(0); } printf("learn about Linux file IO "); return 0; }
发现fd就linux下的文件描述符。
一般来说无非就是 0 1 2 了
那就令fd为0吧。
再把 LETMEWIN 传过去就O啦
2、col
这题的解太多了。我是直接将他除5 再调试下就传上去了
./col `python -c "print 4*'xc8xcexc5x06'+'xccxcexc5x06'"`