You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Provides virtual machine level API such as saving and restoring the current execution state.
25
-
- Supports cross architecture and platform debugging capabilities.
26
-
- Built-in debugger with reverse debugging capability.
27
-
- Allows dynamic hot patch on-the-fly running code, including the loaded library.
28
-
- True framework in Python, making it easy to build customized security analysis tools on top.
29
-
30
-
Qiling also made its way to various international conferences.
31
-
32
-
2022:
33
-
-[Black Hat, EU](https://www.blackhat.com/eu-22/arsenal/schedule/#reversing-mcu-with-firmware-emulation-29553)
34
-
-[Black Hat, MEA](https://blackhatmea.com/node/724)
35
-
36
-
2021:
37
-
-[Black Hat, USA](https://www.blackhat.com/us-21/arsenal/schedule/index.html#bringing-the-x-complete-re-experience-to-smart-contract-24119)
38
-
-[Hack In The Box, Amsterdam](https://conference.hitb.org/hitbsecconf2021ams/sessions/when-qiling-framework-meets-symbolic-execution/)
39
-
-[Black Hat, Asia](https://www.blackhat.com/asia-21/arsenal/schedule/index.html#qiling-smart-analysis-for-smart-contract-22643)
40
-
41
-
2020:
42
-
-[Black Hat, Europe](https://www.blackhat.com/eu-20/arsenal/schedule/index.html#qiling-framework-deep-dive-into-obfuscated-binary-analysis-21781)
43
-
-[Black Hat, USA](https://www.blackhat.com/us-20/arsenal/schedule/index.html#qiling-framework-from-dark-to-dawn-----enlightening-the-analysis-of-the-most-mysterious-iot-firmware--21062)
44
-
-[Black Hat, USA (Demigod)](https://www.blackhat.com/us-20/briefings/schedule/#demigod-the-art-of-emulating-kernel-rootkits-20009)
45
-
-[Black Hat, Asia](https://www.blackhat.com/asia-20/arsenal/schedule/index.html#qiling-lightweight-advanced-binary-analyzer-19245)
46
-
-[Hack In The Box, Lockdown 001](https://conference.hitb.org/lockdown-livestream/)
47
-
-[Hack In The Box, Lockdown 002](https://conference.hitb.org/hitb-lockdown002/virtual-labs/virtual-lab-qiling-framework-learn-how-to-build-a-fuzzer-based-on-a-1day-bug/)
48
-
-[Hack In The Box, Cyberweek](https://cyberweek.ae/2020/lab-qiling-framework/)
Qiling is backed by [Unicorn Engine](http://www.unicorn-engine.org).
59
-
60
-
Visit our [website](https://www.qiling.io) for more information.
11
+
# Qiling Framework
61
12
62
-
---
63
-
#### License
13
+
Qiling is an advanced binary emulation framework that allows you to emulate and sandbox code in an isolated environment across multiple platforms and architectures. Built on top of Unicorn Engine, Qiling provides a higher-level framework that understands operating system contexts, executable formats, and dynamic linking.
64
14
65
-
This program is free software; you can redistribute it and/or modify
66
-
it under the terms of the GNU General Public License as published by
67
-
the Free Software Foundation; either version 2 of the License, or
68
-
(at your option) any later version.
15
+
## Table of Contents
69
16
70
-
---
17
+
-[Features](#features)
18
+
-[Use Cases](#use-cases)
19
+
-[Quick Start](#quick-start)
20
+
-[Installation](#installation)
21
+
-[Basic Usage](#basic-usage)
22
+
-[Qiling vs. Other Emulators](#qiling-vs-other-emulators)
23
+
-[Qiling vs. Unicorn Engine](#qiling-vs-unicorn-engine)
24
+
-[Qiling vs. QEMU User Mode](#qiling-vs-qemu-user-mode)
-**Multiple File Format Support**: PE, Mach-O, ELF, COM, MBR.
37
+
-**Kernel Module Emulation**: Supports Windows Driver (.sys), Linux Kernel Module (.ko) & macOS Kernel (.kext) via [Demigod](https://groundx.io/demigod/).
38
+
-**Isolated Sandboxing**: Emulates & sandboxes code in an isolated environment with a fully configurable sandbox.
39
+
-**In-depth API**: Provides in-depth memory, register, OS level, and filesystem level API.
40
+
-**Fine-grain Instrumentation**: Allows hooks at various levels (instruction/basic-block/memory-access/exception/syscall/IO/etc.).
41
+
-**Virtual Machine Level API**: Supports saving and restoring the current execution state.
42
+
-**Debugging Capabilities**: Supports cross-architecture and platform debugging, including a built-in debugger with reverse debugging capability.
43
+
-**Dynamic Hot Patching**: Allows dynamic hot patching of on-the-fly running code, including loaded libraries.
44
+
-**Python Framework**: A true framework in Python, making it easy to build customized security analysis tools.
77
45
78
-
##### Qiling vs. Unicorn engine
46
+
##Use Cases
79
47
80
-
Built on top of Unicorn, but Qiling & Unicorn are two different animals.
48
+
Qiling has been presented at various international conferences, showcasing its versatility in:
81
49
82
-
- Unicorn is just a CPU emulator, so it focuses on emulating CPU instructions,
83
-
that can understand emulator memory.
84
-
Beyond that, Unicorn is not aware of higher level concepts, such as dynamic
85
-
libraries, system calls, I/O handling or executable formats like PE, Mach-O
86
-
or ELF. As a result, Unicorn can only emulate raw machine instructions,
87
-
without Operating System (OS) context.
88
-
- Qiling is designed as a higher level framework, that leverages Unicorn to
89
-
emulate CPU instructions, but can understand OS: it has executable format
90
-
loaders (for PE, Mach-O & ELF currently), dynamic linkers (so we can
91
-
load & relocate shared libraries), syscall & IO handlers. For this reason,
92
-
Qiling can run executable binary without requiring its native OS.
93
-
94
-
##### Qiling vs. QEMU user mode
95
-
96
-
QEMU user mode does a similar thing to our emulator, that is, to emulate whole
97
-
executable binaries in a cross-architecture way.
98
-
However, Qiling offers some important differences against QEMU user mode:
50
+
- Binary analysis and reverse engineering.
51
+
- Malware analysis and sandboxing.
52
+
- Firmware analysis and emulation.
53
+
- Security research and vulnerability discovery.
54
+
- CTF challenges and exploit development.
99
55
100
-
- Qiling is a true analysis framework,
101
-
that allows you to build your own dynamic analysis tools on top (in Python).
102
-
Meanwhile, QEMU is just a tool, not a framework.
103
-
- Qiling can perform dynamic instrumentation, and can even hot patch code at
104
-
runtime. QEMU does neither.
105
-
- Not only working cross-architecture, Qiling is also cross-platform.
106
-
For example, you can run Linux ELF file on top of Windows.
107
-
In contrast, QEMU user mode only runs binary of the same OS, such as Linux
108
-
ELF on Linux, due to the way it forwards syscall from emulated code to
109
-
native OS.
110
-
- Qiling supports more platforms, including Windows, macOS, Linux & BSD. QEMU
111
-
user mode can only handle Linux & BSD.
56
+
For more details on Qiling's use cases, blog posts, and related work, please refer to [Qiling's use case, blog and related work](https://github.com/qilingframework/qiling/issues/134).
112
57
113
-
---
58
+
## Quick Start
114
59
115
-
####Installation
60
+
### Installation
116
61
117
-
Please see [setup guide](https://docs.qiling.io/en/latest/install/) file for how to install Qiling Framework.
62
+
Qiling requires Python 3.8 or newer. You can install it using pip:
118
63
119
-
---
64
+
```bash
65
+
pip install qiling
66
+
```
67
+
68
+
For more detailed installation instructions and dependencies, please refer to the [official documentation](https://docs.qiling.io/en/latest/install/).
120
69
121
-
#### Examples
70
+
###Basic Usage
122
71
123
-
The example below shows how to use Qiling framework in the most
124
-
straightforward way to emulate a Windows executable.
72
+
The example below shows how to use Qiling framework in the most straightforward way to emulate a Windows executable.
125
73
126
74
```python
127
75
from qiling import Qiling
@@ -135,8 +83,30 @@ if __name__ == "__main__":
135
83
ql.run()
136
84
```
137
85
138
-
- The following example shows how a Windows crackme may be patched dynamically
139
-
to make it always display the “Congratulation” dialog.
86
+
## Qiling vs. Other Emulators
87
+
88
+
There are many open-source emulators, but two projects closest to Qiling are [Unicorn](http://www.unicorn-engine.org) & [QEMU user mode](https://qemu.org). This section explains the main differences of Qiling against them.
89
+
90
+
### Qiling vs. Unicorn Engine
91
+
92
+
Built on top of Unicorn, but Qiling & Unicorn are two different animals.
93
+
94
+
-**Unicorn** is just a CPU emulator, so it focuses on emulating CPU instructions, that can understand emulator memory. Beyond that, Unicorn is not aware of higher level concepts, such as dynamic libraries, system calls, I/O handling or executable formats like PE, Mach-O or ELF. As a result, Unicorn can only emulate raw machine instructions, without Operating System (OS) context.
95
+
-**Qiling** is designed as a higher level framework, that leverages Unicorn to emulate CPU instructions, but can understand OS: it has executable format loaders (for PE, Mach-O & ELF currently), dynamic linkers (so we can load & relocate shared libraries), syscall & IO handlers. For this reason, Qiling can run executable binary without requiring its native OS.
96
+
97
+
### Qiling vs. QEMU User Mode
98
+
99
+
QEMU user mode does a similar thing to our emulator, that is, to emulate whole executable binaries in a cross-architecture way.
100
+
However, Qiling offers some important differences against QEMU user mode:
101
+
102
+
-**Qiling is a true analysis framework**, that allows you to build your own dynamic analysis tools on top (in Python). Meanwhile, QEMU is just a tool, not a framework.
103
+
-**Qiling can perform dynamic instrumentation**, and can even hot patch code at runtime. QEMU does neither.
104
+
- Not only working cross-architecture, **Qiling is also cross-platform**. For example, you can run Linux ELF file on top of Windows. In contrast, QEMU user mode only runs binary of the same OS, such as Linux ELF on Linux, due to the way it forwards syscall from emulated code to native OS.
105
+
-**Qiling supports more platforms**, including Windows, macOS, Linux & BSD. QEMU user mode can only handle Linux & BSD.
106
+
107
+
## Examples
108
+
109
+
- The following example shows how a Windows crackme may be patched dynamically to make it always display the “Congratulation” dialog.
140
110
141
111
```python
142
112
from qiling import Qiling
@@ -177,15 +147,13 @@ The below YouTube video shows how the above example works.
177
147
178
148
#### Emulating ARM router firmware on Ubuntu x64 host
179
149
180
-
Qiling Framework hot-patches and emulates an ARM router's `/usr/bin/httpd` on
181
-
an x86_64 Ubuntu host.
150
+
Qiling Framework hot-patches and emulates an ARM router's `/usr/bin/httpd` on an x86_64 Ubuntu host.
182
151
183
-
[](https://www.youtube.com/watch?v=e3_T3KLh2NU)
152
+
[](https://www.youtube.com/watch?v=e3_T3KLhNUs)
184
153
185
154
#### Qiling's IDA Pro Plugin: Instrument and Decrypt Mirai's Secret
186
155
187
-
This video demonstrates how Qiling's IDA Pro plugin can make IDA Pro run with
188
-
Qiling instrumentation engine.
156
+
This video demonstrates how Qiling's IDA Pro plugin can make IDA Pro run with Qiling instrumentation engine.
189
157
190
158
[](http://www.youtube.com/watch?v=ZWMWTq2WTXk)
191
159
@@ -195,63 +163,62 @@ Solving a simple CTF challenge with Qiling Framework and IDA Pro
195
163
196
164
[](https://www.youtube.com/watch?v=SPjVAt2FkKA)
$ ./qltool run -f examples/rootfs/x86_windows/bin/x86_hello.exe --rootfs examples/rootfs/x86_windows/ --console False --json
242
206
```
243
-
---
244
207
208
+
## Contributing
245
209
246
-
#### Contact
210
+
We welcome contributions from the community! If you're interested in contributing to Qiling Framework, please check out our [GitHub repository](https://github.com/qilingframework/qiling) and look for open issues or submit a pull request.
247
211
248
-
Get the latest info from our website https://www.qiling.io
via Twitter [@qiling_io](https://twitter.com/qiling_io).
214
+
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
252
215
253
-
---
216
+
## Contact
217
+
218
+
Get the latest info from our website [https://www.qiling.io](https://www.qiling.io)
0 commit comments