<<Crack!> > 爆破“Password”

Date-2015/11/15 Sunday

 YPP

初学破解,往往都是从“爆破”开始。

本文没有多少技术含量,仅仅对以前的学习做一个简单的回顾;

文中尚有不妥之处,恳请各位同行不吝赐教!谢谢。

C实现的简单密码验证,图1:

//Crack_1.cpp

#include <stdio.h>

#include <string.h>

#define PASSWORD "1234567"

int ypp(char *);

int main()

{

char password[1024];

int n=0;

while(1)

{

printf("Please input PASSWORD:\t");

scanf("%s",password);

n=ypp(password);

if(n)

printf("Error!\n\n");

else

{

printf("Congratulation!\n\n");

break;

}

}

return 0;

}

int ypp(char *password)

{

int num;

num=strcmp(password,PASSWORD);

return num;

}

在VC6.0下编译运行,再用IDA对其反汇编,如图2

从反汇编信息中很容易识别出main的地址0x00401020

下一步Ollydbg载入, 暂且在这个地方下断点:

图3

图4

F9让程序“跑”起来!中断在此处。

F8单步至0040106A.scanf  此时程序正在等待我们输入“密码”

输入假密码(20151115),回车:

图5

继续单步……至00401079 CALL crack_1.00401005

图6

F7单步步入,就会来到ypp()的领空:

图7

图8

想知道密码的具体验证过程,就要仔细观察上面这段反汇编;

当单步到00401111 时,OD已识别出该C库函数strcmp()

存有真密码的参数值也被暴露出来! 

图9

图10 (EAX的值为1,即局部变量num值为真,密码判定失败!)

莫急,关键在后面。

当步过RETN时,走出ypp()又回到了0040107E

图11

“Jump is NOT taken”意为“不执行跳转!” 那么就继续往下执行(输出error!)

<爆破的关键就在于此>

<JE SHORT Crack_1.0040109F    ;将“JE”改为“JNE”即完成爆破!>

汇编指令JEJNE作用是相反的

JE: 相等转移

JNE:不相等转移

 

双击“Disassembly”栏中的JE指令,修改后单击“Assemble

图12

图13

图14

图15

需要注意的是,这种修改是“临时”的。

若想永久保留,请继续往下看:

 1.鼠标右键选中“JNZ SHORT……”这一行:Follow in Dump——Selection

图16

2.同样的方法,选中数据面板……Copy to executable file

图17

3.Save File……

图18

图19

验证

 

 

END.

(YPP)2015/11/15.

[email protected]

时间: 2024-08-24 03:19:55

<<Crack!> > 爆破“Password”的相关文章

VBA how to crack Excel Password

来源 更多vba相关 vba教程 VBA cheat sheet 1. VBA how to crack Excel Workbook/Worksheet password To remove the excel workbook or worksheet password requires opening the excel file as xml file and removing the password tags in the xml. Unlock Password protected

使用Burp和Hydra爆破服务-9.25

使用BP和Hydra爆破相关服务 Hydra:九头蛇,开源的功能强大的爆破工具,支持的服务很多,使用Hydra爆破C/S架构的服务.使用Bp爆破web登录窗口. DVWA:web应用程序漏洞演练平台,开源,集成的常见web漏洞,使用PHP+mysql环境的支持: 爆破=爆破工具(bp+bydra)+字典(用户字典.密码字典) 字典:就是一些用户名或者口令(弱口令/使用)的集合 过程(brup爆破登录页面,知道账号): step1:拦截数据包,登录页面的数据拦截下来,将拦截下来的数据发送到“int

UESTC_In Galgame We Trust CDOJ 10

As we all know, there are many interesting (H) games in kennethsnow’s computer. But he sets a password for those games. Zplinti1 wants to crack his password and play those games. Kennethsnow uses only 6 kinds of characters to form his password: brack

26.看起来有点难

这题进入以后用时间注入测试一下,成功: 之后就是自己写了个代码:(写的比较破,将就看看) #!/usr/bin/python #coding=utf-8 import requests import sys #计算长度 def length(strs):     for i in range(1,100):         url = "http://ctf5.shiyanbar.com/basic/inject/index.php?admin=1' or if(("+strs+&qu

加盐密码哈希:如何正确使用

Salted Password Hashing - Doing it Right If you're a web developer, you've probably had to make a user account system. The most important aspect of a user account system is how user passwords are protected. User account databases are hacked frequentl

MySQL SQL Injection Cheat Sheet

MySQL SQL Injection Cheat Sheet Some useful syntax reminders for SQL Injection into MySQL databases- This post is part of a series of SQL Injection Cheat Sheets.  In this series, I've endevoured to tabulate the data to make it easier to read and to u

CDOJ-10(栈的应用)

In Galgame We Trust Time Limit: 3000/1000MS (Java/Others)     Memory Limit: 65535/65535KB (Java/Others) As we all know, there are many interesting (H) games in kennethsnow’s computer. But he sets a password for those games. Zplinti1 wants to crack hi

Top 10 Free Wireless Network hacking/monitoring tools for ethical hackers and businesses

There are lots of free tools available online to get easy access to the WiFi networks intended to help the network admins and the programmers working on the WiFi systems and we at Team Techworm have picked the top 10 of those for ethical hackers, pro

字典法暴力破解Linux用户密码

Linux系列的很多操作系统是采用MD5加密用户密码的,加密的过程是单向的,所以要破解只能采用暴力破解法. 下面分享个程序来破解root用户密码. 程序会遍历字典文件中的每个密码,加密后和/etc/shadow中的密码匹配,如果相同则返回成功. #!/usr/bin/env python import crypt import sys import re dic = [ 'cookie', 'test', 'fuckyou' ] passwordfile = '/etc/shadow' def