当前位置:网站首页>[buuctf.reverse] 103_[CFI-CTF 2018]powerPacked
[buuctf.reverse] 103_[CFI-CTF 2018]powerPacked
2022-06-09 10:47:00 【石氏是时试】
powerPC的东西,如果IDA没有插件还真不好弄。我就没有
不过可以用Retdec可以实现反编译
py \tools\retdec\bin\retdec-decompiler.py powerPacker然后拿到c语言的代码,找到主要加密逻辑
int main(int argc, char ** argv) {
char * v1 = (char *)0x45484b7d; // bp-48, 0x100006f0
int32_t v2; // 0x100006bc
printf("Insert password : ", (int32_t)argv, v2, 0x45484b7d, 0x6b616e71, 0x78676172, L"mg", 0x7265);
int32_t v3; // bp-80, 0x100006bc
scanf("%31s", &v3, v2, 0x45484b7d, 0x6b616e71, 0x78676172, L"mg", 0x7265);
for (int32_t i = 0; i < 21; i++) {
char * v4 = (char *)(i + (int32_t)&v1); // 0x10000760
*v4 = (char)((0x1000000 * (int32_t)*v4 - 0x2000000) / 0x1000000); //对给定串减2再比较
}
// 0x10000798
if (strcmp(&v3, (int32_t *)&v1) == 0) {
// 0x100007b8
puts("Password is correct. Submit this as the flag.");
} else {
// 0x100007c8
puts("Wrong password.");
}
// 0x100007d4
return 0;
}
加密方法就是对给定串减2再与输入比较,注意这里给定的串是以32位整形给出的,不清楚是程序本身就那样还是由于反编译程序的问题。不过还好能看出来。
a = b'EHK}kanqxgarqygtre'
print(bytes([i-2 for i in a]))
#CFI{i_love_powerpc
#flag{i_love_powerpc}
将给定串减2后再处理一下包裹就行了。1分区出来以后还会有这么简单的题真不可思议。
边栏推荐
- Leetcode 159 Longest substring containing at most two different characters (2022.06.08)
- P5482 [JLOI2011]不等式组,cckk
- At last someone explained the law of large numbers
- Course design of network sniffer design based on C language
- Protobuf介绍以及简单使用
- TemplateDoesNotExist at /users/register/
- MySQL learning notes - Chapter 5 - data backup and recovery, MySQL logs
- Computer selection 1
- Execution engine - (compiler, JIT)
- Shutter popup shutter shutter_ easyloading
猜你喜欢

MySQL 学习笔记-第五篇-数据备份与恢复、MySQL 日志

Possible causes of processing chain loading error -process chain loading error

Baidu post-90s programmers were sentenced for deleting and modifying databases, saying they were dissatisfied with their leaders

Jingzhida rushes to the scientific innovation board: the annual revenue is 458million, and the SME fund is the shareholder

【SystemVerilog 之数据类型】~ 数据类型、Logic 类型、数组

字符串切割 group by

The most complete knowledge summary, which must be read by beginners

At last someone explained the law of large numbers

对象的实例化和访问

web开发重点,简单开发web
随机推荐
In modern society, people are more and more dependent on semiconductor products
6% equity transfer of Fujian tulougou Cultural Tourism Development Co., Ltd., shared by tamigou
Tidb cloud launched Google cloud marketplace, empowering global developers with a new stack of real-time HTAP databases
文档书写规范
精诚所至,金石为开
Lecture 4: data warehouse construction (II)
How much do you know, deep analysis, worth collecting
Leetcode 159 Longest substring containing at most two different characters (2022.06.08)
[go] introduction to exp
[buuctf.reverse] 115_[RCTF2019]DontEatMe
MySQL learning notes - Chapter 5 - data backup and recovery, MySQL logs
音乐创作工具Steinberg Cubase Pro
[basic knowledge] ~ zener diode, triode, amplification circuit, number of logic gate transistors, FPGA device junction temperature range, FPGA loading mode, Schmitt trigger, C language structured prog
Use the five number generalization method to determine the outliers in the data set
Introduction and simple use of protobuf
单体模式
Introduction to automatic partition management of gaussdb (DWS)
物联网低代码平台如何使用操作日志?
处理链加载数据出错的可能原因-process chain loading error
【基础知识】~ 稳压二极管、三极管、放大电路、逻辑门晶体管数量、FPGA 器件结温范围、FPGA 加载方式、施密特触发器、C 语言结构化编程、中断向量地址、寄生效应、上拉电阻的作用