当前位置:网站首页>ReW_p
ReW_p
2022-06-26 07:41:00 【BL_zshaom】
经典exe
:
v18是我们输入的;v5是那一串带点的;v0是我们输入的字符串长度;
看函数sub_4116c7:
每三个一组,取前六位、取后两位、取前两位,和0x30、f、3f进行与操作。这么熟悉的操作,想起了base64加密。再看看加密字符串:

能够确定,是base64加密
然后往下看
v1是加密后字符串的长度;
然后进入函数sub_411389:
依旧是加密,只不过表的最后两位给换了。
往下看函数sub_411023:
就是给加密后的字符串加点,加到第一位:a2的第一位是点,然后a2的第二位是a1的第一位,然后依次换位。
接下来的函数也是加点,只不过加到了第22位上
接下来的函数运用的是爆破思想:
个人理解:首先是可见字符串的ASCII码值,x代表ASCII码值,a代表数组1,b代表数组2,c代表数组3
如果a的第一位的x对应b的第一位,那么就让c的第一位赋值为x
脚本:
int main()
{
char Str[100];
int a[100];
char a1[]=".W1BqthGbfGBqoXBmVZRQd.W5VoXNJcMR6XNBxoM5FoFDucMWyWNfBpXNAoF0.";
int a2 = 2;
int len = strlen(a1);
for ( int i = 0;i<len ; i++ )
{
for(int j = 0;j < 128;j++){
a[i] = j;
if ( a[i] < 65 || a[i] > 90 )//如果a[i]的值小于65或者大于90进去继续
{
if ( a[i] >= 97 && a[i] <= 122 )//如果值在(97,122)之间正好是25小于26,那么ASCII值加上97,变成大写的26个字母其中之一
a[i] = (a[i] + a2 - 97) % 26 + 97;
}
else
{
a[i] = (a[i] + a2 - 65) % 26 + 65;//如果值在(65,90)之间正好是25小于26,那么ASCII值加上65,变成小写的26个字母其中之一
}
if((char)a[i] == a1[i]){
Str[i] = j;
}
}
}
for(int i = 0;i<len;i++){
printf("%c",Str[i]);
}
return 0;
}

解出来的字符串去点然后进行两次的base64解密即可
经典base

查看伪代码,我们发现有一个base58加密(Base58 采用数字、大写字母、小写字母,去除歧义字符 0(零)、O(大写字母 O)、I(大写字母i)、l(小写字母L),总计58个字符作为编码的字母表也就是:123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz)
那我们直接用icyberchef:
从base58转换为字符串
经典re1
用x64dbg打开之后,运行,然后右键>搜索>当前区域>字符串,然后ctrl+f搜索flag找到
经典re2
用ida打开
首先我们输入v7,然后将v7的值赋给v10,然后进入while循环,过程是把v7的值每一个都与7异或,然后退出循环,如果v8和那个unk函数里的值一样就是yes
那么我们要做的就是找到unk函数里的值,然后再每个值异或7即可
然后进入unk函数
发现什么都没有,这需要动态调试了,unk的值应该是程序运行到某个地方然后才会跑出来值
关于ida的动调:首先找一个合适的调试器
然后文件目录下找到dbgsrv
我们用的是64位的
把端口、ip填进去
开始调试

找到这一串字符串,发现是他们进入到unk函数里
在ida里面,进入unk函数
可以发现mov了很多值进入函数里,我们用f5查看代码

但不造我为啥后面没有字符串。。。。。
然后写一个简简单单的脚本得到flag
squid
放到linux里面运行
拉入ida,shift+f12查看字符串,发现有很多py开头的
意味着是一个python文件被打包成了exe文件
用pyinstxtractor.py文件
通过readme.txt获得使用方法

成功解包
捣鼓了半天,根据cmd里面的提示发现,说是要用python3.6去解包,于是我把python版本改为3.6,然后解包,PYZ-00.pyz_extracted文件夹里才有东西了。
之后把struct里面的文件头给pyc补充上,然后放到在线python反编译得到
打开PCcharm运行得到
cheems
先查壳


ida里面也找不到字符串和函数
然后可以看到是upx
但放到010发现是cpx,怪了,手动改改
可以了
然后ida找字符串
边栏推荐
- Web technology sharing | webrtc recording video stream
- C#/. Net phase VI 01C Foundation_ 02:vs2019 basic operations, excluding code files, smart tips, data types, differences between float and double, and differences between string and string
- Is it safe for individuals to buy stocks with compass software? How to buy stocks
- Median segmentation (find rules) - Niuke
- The difference between insert ignore and insert into
- Is it legal to open an account for compass stock trading software? Is it safe?
- 3D porphyrin MOF (mof-p5) / 3D porphyrin MOF (mof-p4) / 2D cobalt porphyrin MOF (ppf-1-co) / 2D porphyrin COF (POR COF) / supplied by Qiyue
- C implementation adds a progress bar display effect to the specified column of the GridView table in devaxpress - code implementation method
- JS event loop mechanism
- Quickly find five channels for high-quality objects, quickly collect and avoid detours
猜你喜欢

Junit

Redis(5)----浅谈压缩列表

解决 psycopg2.NotSupportedError: PQconninfo not available in libpq < 9.3

Iron / zinc / copper / platinum metal complexes such as 5,10,15,20-tetra (4-hydroxyphenyl) porphyrin (THPP) / (thppfe) / (thppzn) / (thppcu) / (thpppt) - Qiyue R & D

3D porphyrin MOF (mof-p5) / 3D porphyrin MOF (mof-p4) / 2D cobalt porphyrin MOF (ppf-1-co) / 2D porphyrin COF (POR COF) / supplied by Qiyue

Redis(4)----浅谈整数集合

Calculate division in Oracle - solve the error report when the divisor is zero

Jemter 压力测试 -可视化工具支持-【安装篇】

This article will take you to learn in detail what is FTTH

Cache usage
随机推荐
ECE 9203/9023 analysis
手机开户哪个证券公司佣金最低?网上开户是否安全么?
Detach an entity from jpa/ejb3 persistence context
In interface testing, several methods to verify the success of deleting interfaces
Request&Response
SQL
QT basics tutorial: qstring
Es string type (text vs keyword) selection
Summary of domestic database examination data (continuously updated)
B站增量数据湖探索与实践
D do not assign references to non domain parameters
Getdrawingcache of view is empty. Solution: interview questions for Android audio and video development
少年,你可知 Kotlin 协程最初的样子?
What is Wi Fi 6 (802.11ax)? Why is Wi Fi 6 important?
Junit
Jemter 压力测试 -可视化工具-【使用篇】
Here is the command to display the disk space usage. Go ahead and pay attention to more wonderful things!
php array_ Merge details
Jemter stress test - basic requirements - [teaching]
[UVM practice] Chapter 2: a simple UVM verification platform (5) build test cases