Skip to content

Commit

Permalink
Capstone、Unicorn 与 Keystone
Browse files Browse the repository at this point in the history
  • Loading branch information
CYRUS-STUDIO committed Feb 8, 2025
1 parent 04ba002 commit f6e16e0
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 18 deletions.
7 changes: 3 additions & 4 deletions content/posts/Capstone、Unicorn 与 Keystone.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
+++
title = 'Capstone、Unicorn 与 Keystone'
date = 2025-02-09T01:28:39.611158+08:00
date = 2025-02-09T01:39:39.875555+08:00
draft = false
+++

Expand Down Expand Up @@ -122,8 +122,7 @@ for insn in md.disasm(code, START_ADDRESS):
0xec708:subv1.2d, v3.2d, v1.2d
0xec70c:cmeqv2.2d, v2.2d, #0
0xec710:cmeqv3.2d, v3.2d, #0
0xec714:bicv0.16b, v0.16b, v2.16b
0xec718:bicv1.16b, v1.16b, v3.16b
. . .
```

Expand Down Expand Up @@ -255,7 +254,7 @@ Result of 1 + 1 = 2



Keystone 是一个轻量级的汇编框架,支持多种架构和编程语言,可以快速生成机器代码(汇编),常用于安全研究和逆向工程
Keystone 是一个轻量级的汇编框架,支持多种架构和编程语言,可以快速将汇编指令翻译成机器码



Expand Down
4 changes: 2 additions & 2 deletions public/index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
<description>Recent content on CYRUS STUDIO</description>
<generator>Hugo</generator>
<language>zh-cn</language>
<lastBuildDate>Sun, 09 Feb 2025 01:28:39 +0800</lastBuildDate>
<lastBuildDate>Sun, 09 Feb 2025 01:39:39 +0800</lastBuildDate>
<atom:link href="https://cyrus-studio.github.io/blog/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Capstone、Unicorn 与 Keystone</title>
<link>https://cyrus-studio.github.io/blog/posts/capstoneunicorn-%E4%B8%8E-keystone/</link>
<pubDate>Sun, 09 Feb 2025 01:28:39 +0800</pubDate>
<pubDate>Sun, 09 Feb 2025 01:39:39 +0800</pubDate>
<guid>https://cyrus-studio.github.io/blog/posts/capstoneunicorn-%E4%B8%8E-keystone/</guid>
<description>版权归作者所有,如有转发,请注明文章出处:https://cyrus-studio.github.io/blog/&#xA;Capstone 简介 Capstone 是一个强大的多平台开源反汇编框架,用于将机器码翻译为汇编代码。&#xA;官网:https://www.capstone-engine.org/&#xA;源码地址:https://github.com/capstone-engine/capstone&#xA;文档:https://www.capstone-engine.org/documentation.html&#xA;相关应用:&#xA;Radare2 内部使用 Capstone 作为其反汇编引擎之一。&#xA;Frida 的底层核心使用 Capstone 作为反汇编引擎,用于分析运行时的指令流、解码和显示二进制代码(例如,用户可以通过 Frida 的 API 获取内存中的指令数据,并使用 Capstone 对其进行解码和分析。)&#xA;使用 Capstone 反汇编 .so 文件中的机器码 要反汇编 .so 文件,首先需要提取其中的代码段内容(通常为 .text 段),然后利用 Capstone 进行反汇编。&#xA;1. 安装 capstone pip install capstone 2. 提取 .so 文件中的代码段 使用 readelf 工具获取 .text 段的偏移和大小( -A 1:表示匹配行后再输出 1 行):&#xA;readelf -S libvmp-lib.so | grep -A 1 .text&#xD;[14] .text PROGBITS 000000000009d480 0009d480&#xD;00000000000af0f8 0000000000000000 AX 0 0 16 关键信息:</description>
</item>
Expand Down
9 changes: 4 additions & 5 deletions public/posts/capstoneunicorn-与-keystone/index.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions public/posts/index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
<description>Recent content in Posts on CYRUS STUDIO</description>
<generator>Hugo</generator>
<language>zh-cn</language>
<lastBuildDate>Sun, 09 Feb 2025 01:28:39 +0800</lastBuildDate>
<lastBuildDate>Sun, 09 Feb 2025 01:39:39 +0800</lastBuildDate>
<atom:link href="https://cyrus-studio.github.io/blog/posts/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Capstone、Unicorn 与 Keystone</title>
<link>https://cyrus-studio.github.io/blog/posts/capstoneunicorn-%E4%B8%8E-keystone/</link>
<pubDate>Sun, 09 Feb 2025 01:28:39 +0800</pubDate>
<pubDate>Sun, 09 Feb 2025 01:39:39 +0800</pubDate>
<guid>https://cyrus-studio.github.io/blog/posts/capstoneunicorn-%E4%B8%8E-keystone/</guid>
<description>版权归作者所有,如有转发,请注明文章出处:https://cyrus-studio.github.io/blog/&#xA;Capstone 简介 Capstone 是一个强大的多平台开源反汇编框架,用于将机器码翻译为汇编代码。&#xA;官网:https://www.capstone-engine.org/&#xA;源码地址:https://github.com/capstone-engine/capstone&#xA;文档:https://www.capstone-engine.org/documentation.html&#xA;相关应用:&#xA;Radare2 内部使用 Capstone 作为其反汇编引擎之一。&#xA;Frida 的底层核心使用 Capstone 作为反汇编引擎,用于分析运行时的指令流、解码和显示二进制代码(例如,用户可以通过 Frida 的 API 获取内存中的指令数据,并使用 Capstone 对其进行解码和分析。)&#xA;使用 Capstone 反汇编 .so 文件中的机器码 要反汇编 .so 文件,首先需要提取其中的代码段内容(通常为 .text 段),然后利用 Capstone 进行反汇编。&#xA;1. 安装 capstone pip install capstone 2. 提取 .so 文件中的代码段 使用 readelf 工具获取 .text 段的偏移和大小( -A 1:表示匹配行后再输出 1 行):&#xA;readelf -S libvmp-lib.so | grep -A 1 .text&#xD;[14] .text PROGBITS 000000000009d480 0009d480&#xD;00000000000af0f8 0000000000000000 AX 0 0 16 关键信息:</description>
</item>
Expand Down
10 changes: 5 additions & 5 deletions public/sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
xmlns:xhtml="http://www.w3.org/1999/xhtml">
<url>
<loc>https://cyrus-studio.github.io/blog/posts/capstoneunicorn-%E4%B8%8E-keystone/</loc>
<lastmod>2025-02-09T01:28:39+08:00</lastmod>
<lastmod>2025-02-09T01:39:39+08:00</lastmod>
</url><url>
<loc>https://cyrus-studio.github.io/blog/</loc>
<lastmod>2025-02-09T01:28:39+08:00</lastmod>
</url><url>
<loc>https://cyrus-studio.github.io/blog/posts/frida-%E5%AE%9E%E7%8E%B0-jni-%E6%96%B9%E6%B3%95%E5%9C%B0%E5%9D%80%E8%B7%9F%E8%B8%AA%E5%8F%8D%E6%B1%87%E7%BC%96patch/</loc>
<lastmod>2025-02-09T01:28:39+08:00</lastmod>
<lastmod>2025-02-09T01:39:39+08:00</lastmod>
</url><url>
<loc>https://cyrus-studio.github.io/blog/posts/</loc>
<lastmod>2025-02-09T01:39:39+08:00</lastmod>
</url><url>
<loc>https://cyrus-studio.github.io/blog/posts/frida-%E5%AE%9E%E7%8E%B0-jni-%E6%96%B9%E6%B3%95%E5%9C%B0%E5%9D%80%E8%B7%9F%E8%B8%AA%E5%8F%8D%E6%B1%87%E7%BC%96patch/</loc>
<lastmod>2025-02-09T01:28:39+08:00</lastmod>
</url><url>
<loc>https://cyrus-studio.github.io/blog/posts/%E4%BD%BF%E7%94%A8-miniconda-%E7%AE%A1%E7%90%86-python-%E7%8E%AF%E5%A2%83/</loc>
Expand Down

0 comments on commit f6e16e0

Please sign in to comment.