Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
firmianay committed Apr 29, 2018
1 parent 033944e commit f665682
Show file tree
Hide file tree
Showing 135 changed files with 438 additions and 466 deletions.
94 changes: 52 additions & 42 deletions SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,42 +41,51 @@ GitHub 地址:https://github.com/firmianay/CTF-All-In-One
* [1.7.3 ARM 汇编基础](doc/1.7.3_arm.md)
* [1.7.4 Android 常用工具](doc/1.7.4_android_tools.md)
* [二、工具篇](doc/2_tools.md)
* [2.1 VM](doc/2.1_vm.md)
* [2.1.1 QEMU](doc/2.1.1_qemu.md)
* [2.2 gdb/peda](doc/2.2_gdb.md)
* [2.3 ollydbg](doc/2.3_ollydbg.md)
* [2.4 windbg](doc/2.4_windbg.md)
* [2.5 radare2](doc/2.5_radare2.md)
* [2.6 IDA Pro](doc/2.6_idapro.md)
* [2.7 pwntools](doc/2.7_pwntools.md)
* [2.8 zio](doc/2.8_zio.md)
* [2.9 JEB](doc/2.9_jeb.md)
* [2.10 metasploit](doc/2.10_metasploit.md)
* [2.11 binwalk](doc/2.11_binwalk.md)
* [2.12 Burp Suite](doc/2.12_burpsuite.md)
* [2.13 LLDB](doc/2.13_lldb.md)
* 虚拟化分析环境
* [2.1.1 VirtualBox](doc/2.1.1_virtualbox.md)
* [2.1.2 QEMU](doc/2.1.2_qemu.md)
* [2.1.3 Docker](doc/2.1.3_docker.md)
* [2.1.4 Unicorn](doc/2.1.4_unicorn.md)
* 静态分析工具
* [2.2.1 radare2](doc/2.2.1_radare2.md)
* [2.2.2 IDA Pro](doc/2.2.2_idapro.md)
* [2.2.3 JEB](doc/2.2.3_jeb.md)
* [2.2.4 Capstone](doc/2.2.4_capstone.md)
* [2.2.5 Keystone](doc/2.2.5_keystone.md)
* 动态分析工具
* [2.3.1 GDB](doc/2.3.1_gdb.md)
* [2.3.2 OllyDbg](doc/2.3.2_ollydbg.md)
* [2.3.3 x64dbg](doc/2.3.3_x64dbg.md)
* [2.3.4 WinDbg](doc/2.3.4_windbg.md)
* [2.3.5 LLDB](doc/2.3.5_lldb.md)
* 其他工具
* [2.4.1 pwntools](doc/2.4.1_pwntools.md)
* [2.4.2 zio](doc/2.4.2_zio.md)
* [2.4.3 metasploit](doc/2.4.3_metasploit.md)
* [2.4.4 binwalk](doc/2.4.4_binwalk.md)
* [2.4.5 Burp Suite](doc/2.4.5_burpsuite.md)
* [2.4.6 Wireshark](doc/2.4.6_wireshark.md)
* [三、分类专题篇](doc/3_topics.md)
* [3.1 Reverse](doc/3.1_reverse.md)
* [3.2 Crypto](doc/3.2_crypto.md)
* [3.2.1 古典密码](doc/3.2.1_classic_crypto.md)
* [3.3 Pwn](doc/3.3_pwn.md)
* [3.3.1 格式化字符串漏洞](doc/3.3.1_format_string.md)
* [3.3.2 整数溢出](doc/3.3.2_integer_overflow.md)
* [3.3.3 栈溢出](doc/3.3.3_stack_overflow.md)
* [3.3.4 返回导向编程(ROP)(x86)](doc/3.3.4_rop_x86.md)
* [3.3.5 返回导向编程(ROP)(ARM)](doc/3.3.5_rop_arm.md)
* [3.3.6 Linux 堆利用(上)](doc/3.3.6_heap_exploit_1.md)
* [3.3.7 Linux 堆利用(中)](doc/3.3.7_heap_exploit_2.md)
* [3.3.8 Linux 堆利用(下)](doc/3.3.8_heap_exploit_3.md)
* [3.3.9 内核 ROP](doc/3.3.9_kernel_rop.md)
* [3.3.10 Linux 内核漏洞利用](doc/3.3.10_linux_kernel_exploit.md)
* [3.3.11 Windows 内核漏洞利用](doc/3.3.11_windows_kernel_exploit.md)
* [3.3.12 竞争条件](doc/3.3.12_race_condition.md)
* [3.4 Web](doc/3.4_web.md)
* [3.4.1 SQL 注入利用](doc/3.4.1_sql_injection.md)
* [3.4.2 XSS 漏洞利用](doc/3.4.2_xss.md)
* [3.5 Misc](doc/3.5_misc.md)
* [3.6 Mobile](doc/3.6_mobile.md)
* Pwn
* [3.1.1 格式化字符串漏洞](doc/3.1.1_format_string.md)
* [3.1.2 整数溢出](doc/3.1.2_integer_overflow.md)
* [3.1.3 栈溢出](doc/3.1.3_stack_overflow.md)
* [3.1.4 返回导向编程(ROP)(x86)](doc/3.1.4_rop_x86.md)
* [3.1.5 返回导向编程(ROP)(ARM)](doc/3.1.5_rop_arm.md)
* [3.1.6 Linux 堆利用(上)](doc/3.1.6_heap_exploit_1.md)
* [3.1.7 Linux 堆利用(中)](doc/3.1.7_heap_exploit_2.md)
* [3.1.8 Linux 堆利用(下)](doc/3.1.8_heap_exploit_3.md)
* [3.1.9 内核 ROP](doc/3.1.9_kernel_rop.md)
* [3.1.10 Linux 内核漏洞利用](doc/3.1.10_linux_kernel_exploit.md)
* [3.1.11 Windows 内核漏洞利用](doc/3.1.11_windows_kernel_exploit.md)
* [3.1.12 竞争条件](doc/3.1.12_race_condition.md)
* Reverse
* Web
* [3.3.1 SQL 注入利用](doc/3.3.1_sql_injection.md)
* [3.3.2 XSS 漏洞利用](doc/3.3.2_xss.md)
* Crypto
* Misc
* Mobile
* [四、技巧篇](doc/4_tips.md)
* [4.1 Linux 内核调试](doc/4.1_linux_kernel_debug.md)
* [4.2 Linux 命令行技巧](doc/4.2_Linux_terminal_tips.md)
Expand Down Expand Up @@ -113,16 +122,15 @@ GitHub 地址:https://github.com/firmianay/CTF-All-In-One
* [5.5.1 动态污点分析](doc/5.5.1_dyn_taint_analysis.md)
* [5.6 LLVM](doc/5.6_llvm.md)
* [5.6.1 Clang](doc/5.6.1_clang.md)
* [5.7 Capstone/Keystone](doc/5.7_cap-keystone.md)
* [5.7 程序切片](doc/5.7_slicing.md)
* [5.8 SAT/SMT](doc/5.8_sat-smt.md)
* [5.8.1 Z3](doc/5.8.1_z3.md)
* [5.9 基于模式的漏洞分析](doc/5.9_pattern_based_detection.md)
* [5.10 基于二进制比对的漏洞分析](doc/5.10_diff_based_detection.md)
* [5.11 反编译技术](doc/5.11_decompiling.md)
* [5.11.1 RetDec](doc/5.11.1_retdec.md)
* [5.12 Unicorn 模拟器](doc/5.12_unicorn.md)
* [六、题解篇](doc/6_writeup.md)
* pwn
* Pwn
* [6.1.1 pwn HCTF2016 brop](doc/6.1.1_pwn_hctf2016_brop.md)
* [6.1.2 pwn NJCTF2017 pingme](doc/6.1.2_pwn_njctf2017_pingme.md)
* [6.1.3 pwn XDCTF2015 pwn200](doc/6.1.3_pwn_xdctf2015_pwn200.md)
Expand All @@ -143,15 +151,18 @@ GitHub 地址:https://github.com/firmianay/CTF-All-In-One
* [6.1.18 pwn HITBCTF2017 Sentosa](doc/6.1.18_pwn_hitbctf2017_sentosa.md)
* [6.1.19 pwn HITBCTF2018 gundam](doc/6.1.19_pwn_hitbctf2018_gundam.md)
* [6.1.20 pwn 33C3CTF2016 babyfengshui](doc/6.1.20_pwn_33c3ctf2016_babyfengshui.md)
* re
* Reverse
* [6.2.1 re XHPCTF2017 dont_panic](doc/6.2.1_re_xhpctf2017_dont_panic.md)
* [6.2.2 re ECTF2016 tayy](doc/6.2.2_re_ectf2016_tayy.md)
* [6.2.3 re Codegate2017 angrybird](doc/6.2.3_re_codegate2017_angrybird.md)
* [6.2.4 re CSAWCTF2015 wyvern](doc/6.2.4_re_csawctf2015_wyvern.md)
* [6.2.5 re PicoCTF2014 Baleful](doc/6.2.5_re_picoctf2014_baleful.md)
* [6.2.6 re SECCON2017 printf_machine](doc/6.2.6_re_seccon2017_printf_machine.md)
* web
* Web
* [6.3.1 web HCTF2017 babycrack](doc/6.3.1_web_hctf2017_babycrack.md)
* Crypto
* Misc
* Mobile
* [七、实战篇](doc/7_exploit.md)
* CVE
* [7.1.1 [CVE-2017-11543] tcpdump 4.9.0 Buffer Overflow](doc/7.1.1_tcpdump_2017-11543.md)
Expand All @@ -162,7 +173,6 @@ GitHub 地址:https://github.com/firmianay/CTF-All-In-One
* [7.1.6 [CVE-2017-9430] DNSTracer 1.9 Buffer Overflow](doc/7.1.6_dnstracer_2017-9430.md)
* [7.1.7 [CVE-2018-6323] GNU binutils 2.26.1 Integer Overflow](doc/7.1.7_binutils_2018-6323.md)
* Malware
* 7.2.x
* [八、学术篇](doc/8_academic.md)
* [8.1 The Geometry of Innocent Flesh on the Bone: Return-into-libc without Function Calls (on the x86)](doc/8.1_ret2libc_without_func_calls.md)
* [8.2 Return-Oriented Programming without Returns](doc/8.2_rop_without_returns.md)
Expand Down Expand Up @@ -192,5 +202,5 @@ GitHub 地址:https://github.com/firmianay/CTF-All-In-One
* [9.1 更多 Linux 工具](doc/9.1_Linuxtools.md)
* [9.2 更多 Windows 工具](doc/9.2_wintools.md)
* [9.3 更多资源](doc/9.3_books_blogs.md)
* [9.4 Linux x86-64 系统调用表](doc/9.4_linux_syscall.md)
* [9.4 Linux 系统调用表](doc/9.4_linux_syscall.md)
* [9.5 幻灯片](doc/9.5_slides.md)
Empty file added doc/1.1.5_rop_arm.md
Empty file.
6 changes: 3 additions & 3 deletions doc/1.5.7_memory.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ RET ; 函数返回并跳转

![](../pic/1.5.7_stack.png)

我们来看一个例子:[源码](../src/Others/1.5.7_memory/stack.c)
我们来看一个例子:[源码](../src/others/1.5.7_memory/stack.c)
```c
#include<stdio.h>
int add(int a, int b) {
Expand Down Expand Up @@ -208,7 +208,7 @@ void *sbrk(intptr_t increment);
在上图中我们看到 brk 指示堆结束地址,start_brk 指示堆开始地址。BSS segment 和 heap 之间有一段 Random brk offset,这是由于 ASLR 的作用,如果关闭了 ASLR,则 Random brk offset 为 0,堆结束地址和数据段开始地址重合。
例子:[源码](../src/Others/1.5.7_memory/brk.c)
例子:[源码](../src/others/1.5.7_memory/brk.c)
```C
#include <stdio.h>
#include <unistd.h>
Expand Down Expand Up @@ -347,7 +347,7 @@ void *mmap(void *addr, size_t len, int prot, int flags,
int munmap(void *addr, size_t len);
```

例子:[源码](../src/Others/1.5.7_memory/mmap.c)
例子:[源码](../src/others/1.5.7_memory/mmap.c)
```C
#include <stdio.h>
#include <sys/mman.h>
Expand Down
2 changes: 1 addition & 1 deletion doc/1.5.8_glibc_malloc.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
- [参考资料](#参考资料)


[下载文件](../src/Others/1.5.8_glibc_malloc)
[下载文件](../src/others/1.5.8_glibc_malloc)

## glibc
glibc 即 GNU C Library,是为 GNU 操作系统开发的一个 C 标准库。glibc 主要由两部分组成,一部分是头文件,位于 `/usr/include`;另一部分是库的二进制文件。二进制文件部分主要是 C 语言标准库,有动态和静态两个版本,动态版本位于 `/lib/libc.so.6`,静态版本位于 `/usr/lib/libc.a`
Expand Down
2 changes: 1 addition & 1 deletion doc/1.5.9_linux_kernel.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ $ make
## 系统调用
在 Linux 中,系统调用是一些内核空间函数,是用户空间访问内核的唯一手段。这些函数与 CPU 架构有关,x86-64 架构提供了 322 个系统调用,x86 提供了 358 个系统调用(参考附录9.4)。

下面是一个用 32 位汇编写的例子:
下面是一个用 32 位汇编写的例子[源码](../src/others/1.5.9_linux_kernel)
```
.data
Expand Down
68 changes: 34 additions & 34 deletions doc/1_basic.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
# 第一章 基础知识篇

- [1.1 CTF 简介](1.1_ctf.md)
- [1.2 学习方法](1.2_how_to_learn.md)
- [1.3 Linux 基础](1.3_linux_basic.md)
- [1.4 Web 安全基础](1.4_web_basic.md)
- [1.4.1 HTML 基础](1.4.1_html_basic.md)
- [1.4.2 HTTP 协议基础](1.4.2_http_basic.md)
- [1.4.3 JavaScript 基础](1.4.3_javascript_basic.md)
- [1.4.4 常见 Web 服务器基础](1.4.4_webserver_basic.md)
- [1.4.5 OWASP Top Ten Project 漏洞基础](1.4.5_owasp_basic.md)
- [1.4.6 PHP 源码审计基础](1.4.6_php_basic.md)
- [1.5 逆向工程基础](1.5_reverse_basic.md)
- [1.5.1 C 语言基础](1.5.1_c_basic.md)
- [1.5.2 x86/x86-64 汇编基础](1.5.2_x86&x64.md)
- [1.5.3 Linux ELF](1.5.3_elf.md)
- [1.5.4 Windows PE](1.5.4_pe.md)
- [1.5.5 静态链接](1.5.5_static_link.md)
- [1.5.6 动态链接](1.5.6_dynamic_link.md)
- [1.5.7 内存管理](1.5.7_memory.md)
- [1.5.8 glibc malloc](1.5.8_glibc_malloc.md)
- [1.5.9 Linux 内核](1.5.9_linux_kernel.md)
- [1.5.10 Windows 内核](1.5.10_windows_kernel.md)
- [1.6 密码学基础](1.6_crypto_basic.md)
- [1.6.1 初等数论](1.6.1_number_theory.md)
- [1.6.2 近世代数](1.6.2_modern_algebra.md)
- [1.6.3 流密码](1.6.3_stream_cipher.md)
- [1.6.4 分组密码](1.6.4_block_cipher.md)
- [1.6.5 公钥密码](1.6.5_public-key_crypto.md)
- [1.6.6 哈希函数](1.6.6_hash.md)
- [1.6.7 数字签名](1.6.7_digital_signature.md)
- [1.7 Android 安全基础](1.7_android_basic.md)
- [1.7.1 Android 环境搭建](1.7.1_android_env.md)
- [1.7.2 Dalvik 指令集](1.7.2_dalvik.md)
- [1.7.3 ARM 汇编基础](1.7.3_arm.md)
- [1.7.4 Android 常用工具](1.7.4_android_tools.md)
* [1.1 CTF 简介](1.1_ctf.md)
* [1.2 学习方法](1.2_how_to_learn.md)
* [1.3 Linux 基础](1.3_linux_basic.md)
* [1.4 Web 安全基础](1.4_web_basic.md)
* [1.4.1 HTML 基础](1.4.1_html_basic.md)
* [1.4.2 HTTP 协议基础](1.4.2_http_basic.md)
* [1.4.3 JavaScript 基础](1.4.3_javascript_basic.md)
* [1.4.4 常见 Web 服务器基础](1.4.4_webserver_basic.md)
* [1.4.5 OWASP Top Ten Project 漏洞基础](1.4.5_owasp_basic.md)
* [1.4.6 PHP 源码审计基础](1.4.6_php_basic.md)
* [1.5 逆向工程基础](1.5_reverse_basic.md)
* [1.5.1 C 语言基础](1.5.1_c_basic.md)
* [1.5.2 x86/x86-64 汇编基础](1.5.2_x86&x64.md)
* [1.5.3 Linux ELF](1.5.3_elf.md)
* [1.5.4 Windows PE](1.5.4_pe.md)
* [1.5.5 静态链接](1.5.5_static_link.md)
* [1.5.6 动态链接](1.5.6_dynamic_link.md)
* [1.5.7 内存管理](1.5.7_memory.md)
* [1.5.8 glibc malloc](1.5.8_glibc_malloc.md)
* [1.5.9 Linux 内核](1.5.9_linux_kernel.md)
* [1.5.10 Windows 内核](1.5.10_windows_kernel.md)
* [1.6 密码学基础](1.6_crypto_basic.md)
* [1.6.1 初等数论](1.6.1_number_theory.md)
* [1.6.2 近世代数](1.6.2_modern_algebra.md)
* [1.6.3 流密码](1.6.3_stream_cipher.md)
* [1.6.4 分组密码](1.6.4_block_cipher.md)
* [1.6.5 公钥密码](1.6.5_public-key_crypto.md)
* [1.6.6 哈希函数](1.6.6_hash.md)
* [1.6.7 数字签名](1.6.7_digital_signature.md)
* [1.7 Android 安全基础](1.7_android_basic.md)
* [1.7.1 Android 环境搭建](1.7.1_android_env.md)
* [1.7.2 Dalvik 指令集](1.7.2_dalvik.md)
* [1.7.3 ARM 汇编基础](1.7.3_arm.md)
* [1.7.4 Android 常用工具](1.7.4_android_tools.md)
99 changes: 99 additions & 0 deletions doc/2.1.1_virtualbox.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# 2.1.1 VirtualBox

- [虚拟化环境](#虚拟化环境)
- [硬件虚拟化环境](#硬件虚拟化环境)
- [物理机 Manjaro 17.02](#物理机-manjaro-1702)
- [Windows 虚拟机](#windows-虚拟机)
- [Linux 虚拟机](#linux-虚拟机)
- [工具安装脚本](#工具安装脚本)


## 虚拟化环境
虚拟化是资源的抽象化,是单一物理资源的多个逻辑表示,具有兼容性、隔离的优良特性。

在恶意代码和漏洞分析过程中常常需要使用虚拟化技术来进行辅助,这不仅可以保护真实的物理设备环境不被恶意代码攻击,还能够固化保存分析环境以提高工作效率,同时还能够在不影响程序执行流的情况下动态捕获程序内存、CPU 等关键数据。

虚拟化技术根据实现技术的不同可以分为:
- 软件虚拟化:用纯软件的方法在现有平台上实现对物理资源访问的截获和模拟。如 QEMU。
- 硬件虚拟化:由硬件平台对特殊指令进行截获和重定向,交由虚拟机监控器(VMM)进行处理,这需要 CPU、主板、BIOS 和软件的支持。如 VMWare、VirtualBox。

虚拟化技术根据是否改动操作系统又可以分为:
- 半虚拟化:通过修改开源操作系统,将虚拟机特殊指令的被动截获请求转化成客户机操作系统的主动通知以提高性能。如 Xen。
- 全虚拟化:不需要对操作系统进行改动,提供了完整的包括处理器、内存和外设的虚拟化平台。如 VMWare、VirtualBox、


## 硬件虚拟化环境
用硬件虚拟机的话比较简单,可以自己下载安装。下面是我个人的一些环境配置。

- VirtualBox(https://www.virtualbox.org/)
- VMware Workstation/Player(https://www.vmware.com/)

#### 物理机 Manjaro 17.02
Manjaro 17.02 x86-64(https://manjaro.org/) with BlackArch tools.
```text
$ uname -a
Linux firmy-pc 4.9.43-1-MANJARO #1 SMP PREEMPT Sun Aug 13 20:28:47 UTC 2017 x86_64 GNU/Linux
```
```text
yaourt -Rscn:
skanlite cantata kdenlive konversation libreoffice-still thunderbird-kde k3b cups
yaourt -S:
virtualbox tree git ipython ipython2 gdb google-chrome tcpdump vim wireshark-qt edb ssdeep wps-office strace ltrace metasploit python2-pwntools peda oh-my-zsh-git radare2 binwalk burpsuite checksec netcat wxhexeditor
pip3/pip2 install:
r2pipe
```

#### Windows 虚拟机
- 32-bit
- Windows XP
- Windows 7
- 64-bit
- Windows 7
```text
7-Zip/WinRAR
IDA_Pro_v6.8
吾爱破解工具包2.0
```
- Windows 10
下载地址:http://www.itellyou.cn/
#### Linux 虚拟机
- 32-bit/64-bit Ubuntu LTS - https://www.ubuntu.com/download
- 14.04
- 16.04
```text
$ uname -a
Linux firmyy-VirtualBox 4.10.0-28-generic #32~16.04.2-Ubuntu SMP Thu Jul 20 10:19:13 UTC 2017 i686 i686 i686 GNU/Linux
```
```text
apt-get purge:
libreoffice-common unity-webapps-common thunderbird totem rhythmbox simple-scan gnome-mahjongg aisleriot gnome-mines cheese transmission-common gnome-orca webbrowser-app gnome-sudoku onboard deja-dup usb-creator-common
apt-get install:
git vim tree ipython ipython3 python-pip python3-pip foremost ssdeep zsh
pip2 install:
termcolor
zio
other install:
oh my zsh
peda
```
- Kali Linux - https://www.kali.org/
- BlackArch - https://blackarch.org/
- REMnux - https://remnux.org
#### 工具安装脚本
- ctf-tools - https://github.com/zardus/ctf-tools
- [pwn_env](../src/others/2.1.1_vm/pwn_env.sh)
2 changes: 1 addition & 1 deletion doc/2.1.1_qemu.md → doc/2.1.2_qemu.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 2.1.1 QEMU
# 2.1.2 QEMU

- [简介](#简介)
- [安装](#安装)
Expand Down
1 change: 1 addition & 0 deletions doc/2.1.3_docker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# 2.1.3 Docker
2 changes: 1 addition & 1 deletion doc/5.12_unicorn.md → doc/2.1.4_unicorn.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 5.12 Unicorn 模拟器
# 2.1.4 Unicorn 模拟器

- [参考资料](#参考资料)

Expand Down
1 change: 0 additions & 1 deletion doc/2.10_metasploit.md

This file was deleted.

Loading

0 comments on commit f665682

Please sign in to comment.