你恶是吧?我比你还恶!
今天跟bombLab干上了
phase6是真的长,汇编字节数到了200+
我有点不想看了,就问群友
我:这个汇编代码跳转也太多了,看不过来。朋友们,要是你遇到一个函数里,jump次数特别多的情况,一般怎么看呢? 好多跳转指令啊,我完全被他绕进去了...
群友给我支招了:
群友: 什么土法逆向,有种东西叫ida
我:好像不能把可执行程序复制出来,只能在他的云端用gdb 跑,也不能用 IDA 反汇编。
群友:你都能跑gdb了,dump一下hex,本地跑
可当我满怀信心的去hexdump的时候,却发现这个云端系统完全不支持hexdump命令,我想是不是hexdump软件没有安装,准备 sudo apt install的时候,却发现连网都没有。
又去找其他方法,比如用 vim -b ob -t等,都是 command not found
我感受到了一股 恶意 ,这个实验的设计者,已经做好了一切的准备,在各个可以抄近路的地方都设置了障碍。

这股恶意,让我想起了宫崎英高、想起了地主老财,想起了万恶的旧社会.....

比恶是吧,我TM比你还恶!

我在走投无路的情况下,只能选择老老实实的用肉眼观察汇编代码,并参考以前做过的代码来写。
真正认真投入进去了以后,反而发现并没有多么的困难了。
有死磕的态度时,困难似乎都给我让路了。
原本担心过不了的看不懂的代码,到头来发现大概率是检查输入合法性的,并不影响真正的代码逻辑。
(我是不太想再看一遍了,太痛苦了。
#include <stdio.h>
#include <stdlib.h>
struct node{
int value;
int key;
struct node* next;
};
void explode_bomb(){
printf("Bomb!\n");
exit(1);
}
int main(){
int input[6]={5,2,3,6,1,4};
if(input[0]>6){
explode_bomb();
}
for(int i=0;i<6;i++){
input[i]=7-input[i];
}
struct node nodes[6];
//初始化链表节点
// 2 > 5 > 4 > 1 > 6 > 3
int values[6]={0x2a9,0x3c3,0x1ae,0x375,0x377,0x228};
for(int i=0;i<6;i++){
nodes[i].value=values[i];
nodes[i].key=i+1;
if(i==5){
break;
}
nodes[i].next = &(nodes[i+1]);
}
nodes[5].next=NULL;//尾节点
int cx = 0;
struct node* dx=NULL;
struct node* output[6];
for(int i=0;i<6;i++){
cx = input[i];
dx = &nodes[0];
if(cx > 1){
printf("cx=%d\n", cx);
for(int ax=1;ax!=cx;ax++){
dx = dx->next;
}
}
printf("output[%d]=%04x\n",i,dx->value);
output[i] = dx;
}
//为output数组节点设置顺序关系
for(int i=0;i<5;i++){
output[i]->next = output[i+1];
}
output[5]->next=NULL;//尾节点
printf("hello!\n");
struct node* cur = output[0];
for(int i=5;i!=0;i--){
struct node* next = cur->next;
if(cur->value < next->value){
printf("curr->val=%4x, next->val=%4x\n",cur->value,next->value);
explode_bomb();
}
cur = cur->next;
}
printf("success!\n");
}
终于通过了!


浙公网安备 33010602011771号