![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Hacker之路
heri2
这个作者很懒,什么都没留下…
展开
-
RSA加密解密算法
1 引言 1.1 任务概要 本次课程设计即完成RSA算法签名验证。 1.1.1 任务要求 (1)产生两个奇数,判断是否是素数。 (2)计算得到n=pq的值和φ(n)的值。 (3)设定加密用的参数e=17,用辗转相除法求得解密用的参数d。 (4)设默认要加密的明文为31631,使用模重复平方法对该明文进行加密和解密。 (5)给出辗转相除法求得解密用的参数d的演示过程,如图16演示。 (6)界面设计友...原创 2019-02-27 20:08:09 · 2656 阅读 · 0 评论 -
unlink 发生条件、过程演示 、如何利用
文章目录发生条件:unlink 源码:演示 发生条件: unlink是利用glibc malloc 的内存回收机制造成攻击的,核心就在于当两个free的堆块在物理上相邻时,会将他们合并,并将原来free的堆块在原来的链表中解链,加入新的链表中,但这样的合并是有条件的,向前或向后合并。 unlink 源码: #define bin_at(m, i) \ (mbinptr) (((char *) ...原创 2019-07-19 17:29:02 · 682 阅读 · 0 评论 -
三个白帽 - pwnme_k0
ctf wiki 题目:三个白帽 - pwnme_k0 检查代码保护: 可以看出程序主要开启了 NX 保护以及 Full RELRO 保护。这我们就没有办法修改程序的 got 表了。 运行代码: 猜想代码逻辑,和可能的漏洞。 发现存在有格式化漏洞,而且有两个点。用户名和密码, 用IDA直接分析这部分 IDA分析: 通过覆盖ret地址来执行shellcode, 首先远程服务器默认开启ALRS ...原创 2019-07-11 01:51:17 · 965 阅读 · 0 评论 -
sctf-level2
查看程序保护措施 查看IDA 有system函数但是没有 '/bin/sh’字符串,bss段可写 思路 利用read 函数将’/bin/sh’写入bss区域 , 再调用system() 函数 。根据IDA偏移量为0x88 ...原创 2019-07-10 19:47:52 · 267 阅读 · 0 评论 -
sctf-when_did_you_born
IDA : 思路: 输入v5 (不等于1926),, 通过v4 覆盖到v5 使其等于1926. 可以看出偏移为2 from pwn import * #sh = process('./when_did_you_born') sh = remote('111.198.29.45',52538) sh.recv() sh.sendline('1925') payload = 'AAaaaaaa'...原创 2019-07-09 20:36:33 · 737 阅读 · 0 评论 -
xctf - cgfsb
查看程序保护 用IDA 打开 查看24行代码可知,通过修改全局变量pwnme = 8 则结束。 使用gdb 动态调试。 漏洞代码; pwnme 地址, exp: from pwn import * sh = remote('111.198.29.45',36640) sh.recv() sh.sendline('hacker') sh.recv() payload = p32(0x804a...原创 2019-07-09 20:02:25 · 1411 阅读 · 4 评论 -
pwnable 1 . fd
通过ssh 链接发现 , 有flag文件但是没有权限看, 查看 fd.c 看fd.c 发现程序读取argv[1] 作为文件描述符 , 熟悉unix 环境的知道 fd = 0 , 1 , 2是分别是输入输出和错误, 所以我们输入4660 使得fd = 0 , 在输入LETMEWIN , 拿到flag ...原创 2019-06-18 16:33:25 · 140 阅读 · 0 评论 -
pwnable-passcode
源码 : #include <stdio.h> #include <stdlib.h> void login(){ int passcode1; int passcode2; printf("enter passcode1 : "); scanf("%d", passcode1); fflush(stdin); // ha! mommy told me t...原创 2019-06-22 15:33:28 · 137 阅读 · 0 评论 -
pwnable- bof
查看程序源码 #include <stdio.h> #include <string.h> #include <stdlib.h> void func(int key){ char overflowme[32]; printf("overflow me : "); gets(overflowme); // smash me! if(key == 0xca...原创 2019-06-20 21:29:33 · 212 阅读 · 0 评论 -
pwnable-[collision]
进入服务器查看代码 ,flag必然没有r权限 #include <stdio.h> #include <string.h> unsigned long hashcode = 0x21DD09EC; unsigned long check_password(const char* p){ int* ip = (int*)p; int i; int res=0; fo...原创 2019-06-20 18:57:16 · 710 阅读 · 0 评论 -
栈溢出攻击
大神的博客就是强 基础知识:https://zhuanlan.zhihu.com/p/25816426 知识储备 核心目的: 攻击指令的地址来覆盖返回地址 修改返回地址, 让其指向溢出数据的一段指令 修改返回地址, 让其指向内存中以后的某个函数 修改返回地址 , 让其指向内存中以后的指令 修改某个被调用的函数地址,让其指向另一个函数 “X90” , NOP 观察程序运行过程 栈的变化 ...原创 2019-02-27 13:13:02 · 463 阅读 · 0 评论 -
pwnable input
文章目录程序源码解题思路step 1step 2step 3step 4step 5exp 程序源码 #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/socket.h> #include <arpa/inet.h> int main(int...原创 2019-08-02 16:39:54 · 195 阅读 · 0 评论