当前位置:网站首页>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找字符串
边栏推荐
- MXNet对NIN网络中的网络的实现
- Liquid crystal texture diagram of purple solid mm-tpp-10c methacrylic acid decanoxy tetraphenyl porphyrin and mm-tpp-12c methacrylic acid dodecanoxy tetraphenyl porphyrin - Qi Yue display
- [UVM practice] Chapter 2: a simple UVM verification platform (5) build test cases
- Informatics Orsay all in one 1354: bracket matching test
- 解决 psycopg2.NotSupportedError: PQconninfo not available in libpq < 9.3
- 十大证券公司哪个佣金手续费最低,最安全可靠?
- [UVM practice] Chapter 3: UVM Fundamentals (3) field automation mechanism
- 执行npm install -g serve时报错权限权限问题解决方案
- How to convert Unicode into Chinese characters in Excel
- Is it legal to open an account for compass stock trading software? Is it safe?
猜你喜欢

Median segmentation (find rules) - Niuke

Record the dependent installation problems encountered in building the web assets when developing pgadmin
![Jemter stress test - visualization tool support - [installation]](/img/e9/9acda4e37c98cc21df9499684205c6.png)
Jemter stress test - visualization tool support - [installation]
![[recommend an entity class conversion tool mapstruct, which is powerful and easy to use]](/img/7b/43becce42192fb5e0469465aa27a36.png)
[recommend an entity class conversion tool mapstruct, which is powerful and easy to use]

记一次开发 pgadmin 时执行 Building the Web Assets 遇到的依赖安装问题
![Jemter stress test - basic requirements - [teaching]](/img/f4/36dbd80e89d96e1121a6e2b92d1d07.png)
Jemter stress test - basic requirements - [teaching]

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

Redis (4) -- Talking about integer set

PyTorch-12 GAN、WGAN

Google Earth engine (GEE) 01- the prompt shortcut ctrl+space cannot be used
随机推荐
Which of the top ten securities companies has the lowest commission fee and is the most safe and reliable?
Google Earth engine (GEE) 02 basic knowledge and learning resources
Es performance tuning and other features
Liangshui Xianmu shows his personal awareness as a unity3d worker
GMP model
Solution to the permission problem when NPM install -g serve reports an error
Okhttp3 source code explanation (IV) cache strategy, disadvantages of Android mixed development
How to design API return codes (error codes)?
JMeter stress test web agent local interface test [teaching]
记一次开发 pgadmin 时执行 Building the Web Assets 遇到的依赖安装问题
Informatics Olympiad 1355: string matching problem (STRs)
个人用指南针软件买股票安全吗?怎么炒股买股票呢
Go language custom DNS resolver practice yyds dry inventory
ECE 9203/9023 analysis
How can I find the completely deleted photos in Apple mobile phone?
Attention mechanism yyds, AI editor finally bid farewell to P and destroyed the whole picture
Apache inlong graduated as a top-level project with a million billion level data stream processing capability!
[UVM basics] understanding of sequence and sequencer
Jemter stress test - Basic request - [teaching]
Flutter (III) - master the usage of dart language in an article