图穷匕见
第一步:使用binwalk分析下:
没有多余的文件嵌套进去。
第二步:分析图片的二进制,获得可显示字符。
一般我都是直接暴力获取长度至少为5的可显示字符。
使用正则表达式: ".{5,}"
你可以使用linux的grep获取。
如图:
这里出现一大串的数字,此事必有蹊跷。
使用010editor打开寻找这堆数据,发现在图片的尾部,那么直接copy下来。
分析字符串的长度和出现字符类型。
此步称为统计分析,如下:
总数:649566
32 个可分因子:1 2 3 6 9 18 23 27 46 54 69 138 207 414 523 621 1046 1242 1569 3138 4707 9414 12029 14121 24058 28242 36087 72174 108261 216522 324783 649566
2字母种类:A C
10数字种类:0 1 2 3 4 5 6 7 8 9
0特殊字符种类:
很容易想到这是16进制的特征(总数是2的倍数,出现0-9,a-f字符)。直接使用16进制解密,如下:
到这一步,需要怎么做呢?
上脚本:
#include "stdafx.h"
#include <iostream>
#include <core/core.hpp>
#include <highgui\highgui.hpp>
using namespace std;
using namespace cv;
int main()
{
Mat image(300, 300, CV_8UC1);
cout <<"rows:"<< image.rows << endl;
cout << "cols:"<<image.cols << endl;
for (int i = 0; i < image.rows; i++) {
for (int j = 0; j < image.cols; j++) {
image.at<uchar>(i, j) = 255;
}
}
FILE *fp = fopen("1.txt", "r");
while (1) {
int x, y;
fscanf(fp, "(%d,%d)\n", &x, &y);
//cout << "<"<<x<<","<<y<<">";
image.at<uchar>(x, y) = 0;
if (feof(fp)) break;
}
fclose(fp);
namedWindow("haha", WINDOW_AUTOSIZE);
imshow("haha", image);
waitKey();
destroyWindow("haha");
return 0;
}
得到一张二维码:
得到flag{40fc0a979f759c8892f4dc045e28b820}
流下没有技术的眼泪
是16 进制,两个一组;转换成 10 进制分析与 ascii 之间的关系,每个减去128 然后转换成 ascii 字符
上脚本:
strl ='d4e8e1f4a0f7e1f3a0e6e1f3f4a1a0d4e8e5a0e6ece1e7a0e9f3baa0c3d4c6fbb9e1e6b3e3b9e4b3b7b7e2b6b1e4b2b6b9e2b1b1b3b3b7e6b3b3b0e3b9b3b5e6fd'
print('长度是:%d' %len(strl))
print('转换成十进制: ')
i= 0
while i< len(strl):
each = int(strl[i:i+2],16)
print(each,end='')
i += 2
print('\n减去128: ')
i= 0
while i< len(strl):
each = int(strl[i:i+2],16)-128
print (each, end=' ')
i += 2
print('\n明文:')
i= 0
while i< len(strl):
each = int(strl[i:i+2],16)-128
print(chr(each),end=' ')
i += 2
解出flag:CTF{9af3c9d377b61d269b11337f330c935f}
What kind of document is this?
文件是一个bat文件,但打不开,直接去010
发现是MS Word/Excel的文件头
改后缀名打开
打开之后发现需要密码
那就破解
破解出来密码是:9919
发现打不开,那就试试ppt格式的
打开了
发现第7张ppt有东西
改个颜色,就出来flag了
Flag:Flag{okYOUWIN}
遗忘的密码
解压出来发现是未知文件
拖进010
看文本是取证类的题目
上工具:
volatility_2.6_win64_standalone.exe -f raw imageinfo
查看信息:
查看进程:volatility_2.6_win64_standalone.exe -f raw --profile=Win7SP1x86_23418 pslist
dump 下 notepad.exe
volatility_2.6_win64_standalone.exe -f raw --profile=Win7SP1x86_23418 memdump -p
3384 -D ./
搜索 password: strings 3384.dmp| grep password
密码:password*&!@wxcq12
volatility_2.6_win64_standalone.exe -f raw --profile=Win7SP1x86_23418 filescan | grep -E "flag"
直接搜索flag
发现有一个flag的压缩包
需要密码
解压出来
Flag:flag{4e0fcb08-48bd-4b70-99c3-a6a029c5e105}