Skip to content

Commit d921cb2

Browse files
authored
Merge pull request #1299 from qilingframework/dev
Getting ready for 1.4.5
2 parents f3e66ec + 2a34d54 commit d921cb2

File tree

228 files changed

+9623
-3369
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

228 files changed

+9623
-3369
lines changed

.github/workflows/build-ci.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,18 @@ jobs:
1010
fail-fast: false
1111
matrix:
1212
#os: [windows-2019, macos-10.15, ubuntu-18.04, ubuntu-20.04]
13-
os: [windows-latest, ubuntu-18.04, ubuntu-20.04]
14-
python-version: [3.8, 3.9]
15-
exclude:
16-
- os: ubuntu-18.04
17-
python-version: 3.9
13+
os: [windows-latest, ubuntu-20.04]
14+
python-version: [3.8, 3.9]
1815
include:
19-
- os: ubuntu-18.04
16+
- os: ubuntu-22.04
2017
python-version: 3.9
2118
container: Docker
2219

2320
steps:
24-
- uses: actions/checkout@v2
21+
- uses: actions/checkout@v3
2522

2623
- name: Set up Python
27-
uses: actions/setup-python@v2
24+
uses: actions/setup-python@v4
2825
with:
2926
python-version: ${{ matrix.python-version }}
3027

ChangeLog

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,48 @@
11
This file details the changelog of Qiling Framework.
22

3+
------------------------------------
4+
[Version 1.4.5]: December 29th, 2022
5+
6+
New features:
7+
- Qdb with PE (#1295)
8+
9+
Improvements:
10+
- Add pstate in const_arm64.py (#1236)
11+
- Implement ql_syscall_sched_yield (#1237)
12+
- Periodic quality PR (#1238)
13+
- Speed up MCU interrupt handler (#1240)
14+
- Minor update for setup.py, mcu test and windows registry (#1246)
15+
- Optimize qltui (#1247)
16+
- Optimize evm dependency package version manage (#1248)
17+
- Fix getrlimit related syscall (aka tenda fix) (#1249)
18+
- Add new ci for arm firmware (#1250)
19+
- More detailed tenda CI test and cleanup elf multithrad http test (#1251)
20+
- Fix MIPS relocs (#1252)
21+
- Newly compiled picohttpd for armeb and new test script (#1254)
22+
- Update armeb test binary and testing docker (#1255)
23+
- Update rootfs (#1256)
24+
- Qdb bug fix and improvement (#1257)
25+
- Improve handling of gdb 42000 magic pid (#1259)
26+
- Fix mcu issue in qdb and show flags in uppercase (#1263)
27+
- Update setup.py (#1267)
28+
- Handle Cortex M as a specific arch (#1271)
29+
- Fix some error in syscall fcntl and getsockopt (#1272)
30+
- Periodic maintenance PR (#1274)
31+
- Fix gdb attach on ARM thumb mode (#1285)
32+
- Qdb: add command show_args (#1289)
33+
- Periodic maintenance PR (#1293)
34+
35+
Contributors:
36+
- richor1042
37+
- vhertz
38+
- elicn
39+
- kabeor
40+
- xwings
41+
- ucgJhe
42+
- aquynh
43+
- owl129
44+
-
45+
346
------------------------------------
447
[Version 1.4.4]: September 24th, 2022
548

@@ -87,7 +130,6 @@ Contributors:
87130
- elicn
88131
- xwings
89132
- cq674350529
90-
- elicn
91133
- TheZ3ro
92134
- bet4it
93135
- chinggg

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ Qiling is an advanced binary emulation framework, with the following features:
2828

2929
Qiling also made its way to various international conferences.
3030

31+
2022:
32+
- [Black Hat, EU](https://www.blackhat.com/eu-22/arsenal/schedule/#reversing-mcu-with-firmware-emulation-29553)
33+
- [Black Hat, MEA](https://blackhatmea.com/node/724)
34+
3135
2021:
3236
- [Black Hat, USA](https://www.blackhat.com/us-21/arsenal/schedule/index.html#bringing-the-x-complete-re-experience-to-smart-contract-24119)
3337
- [Hack In The Box, Amsterdam](https://conference.hitb.org/hitbsecconf2021ams/sessions/when-qiling-framework-meets-symbolic-execution/)
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
hackme
2+
aaaaaaaaaaaa

examples/fuzzing/stm32f429/fuzz.py

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
#!/usr/bin/env python3
2+
#
3+
# Cross Platform and Multi Architecture Advanced Binary Emulation Framework
4+
#
5+
6+
import os
7+
import sys
8+
9+
from typing import Any, Optional
10+
11+
sys.path.append("../../..")
12+
from qiling.core import Qiling
13+
from qiling.const import QL_VERBOSE
14+
15+
from qiling.extensions.afl import ql_afl_fuzz_custom
16+
from qiling.extensions.mcu.stm32f4 import stm32f429
17+
18+
from unicorn import UC_ERR_OK, UcError
19+
20+
def main(input_file: str):
21+
ql = Qiling(["../../rootfs/mcu/stm32f429/bof.elf"],
22+
archtype="cortex_m",
23+
env=stm32f429,
24+
ostype='mcu',
25+
verbose=QL_VERBOSE.DISABLED)
26+
27+
ql.hw.create('rcc')
28+
ql.hw.create('usart2')
29+
ql.hw.create('usart3')
30+
31+
ql.fast_mode = True
32+
33+
def place_input_callback(ql: Qiling, input_bytes: bytes, persistent_round: int) -> Optional[bool]:
34+
"""Called with every newly generated input."""
35+
36+
ql.hw.usart3.send(input_bytes)
37+
38+
return True
39+
40+
def fuzzing_callback(ql: Qiling):
41+
ql.run(end=0x80006d9)
42+
43+
return UC_ERR_OK
44+
45+
ql.uc.ctl_exits_enabled(True)
46+
ql.uc.ctl_set_exits([0x80006d9])
47+
48+
ql_afl_fuzz_custom(ql, input_file, place_input_callback, fuzzing_callback=fuzzing_callback)
49+
50+
os.exit(0)
51+
52+
if __name__ == "__main__":
53+
if len(sys.argv) == 1:
54+
raise ValueError("No input file provided.")
55+
56+
main(sys.argv[1])

examples/fuzzing/stm32f429/fuzz.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/bash
2+
AFL_AUTORESUME=1 afl-fuzz -i afl_inputs -o afl_outputs -U -- python3 ./fuzz.py @@

examples/hello_mips32_linux_customapi.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,5 @@ def my_puts(ql: Qiling):
1717

1818
if __name__ == "__main__":
1919
ql = Qiling(["rootfs/mips32_linux/bin/mips32_hello"], "rootfs/mips32_linux", verbose=QL_VERBOSE.DEBUG)
20+
ql.os.set_api("puts", my_puts)
2021
ql.run()

examples/mcu/gd32vf103_blink.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from qiling.const import QL_VERBOSE
1111
from qiling.extensions.mcu.gd32vf1 import gd32vf103
1212

13-
ql = Qiling(['../rootfs/mcu/gd32vf103/blink.hex'], archtype="riscv64",
13+
ql = Qiling(['../rootfs/mcu/gd32vf103/blink.hex'], archtype="riscv64", ostype="mcu",
1414
env=gd32vf103, verbose=QL_VERBOSE.DEBUG)
1515

1616
ql.hw.create('rcu')

examples/mcu/stm32f407_gpio_hook.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414

1515
ql = Qiling(["../rootfs/mcu/stm32f407/ai-sine-test.elf"],
16-
archtype="cortex_m", env=stm32f407, verbose=QL_VERBOSE.DEFAULT)
16+
archtype="cortex_m", ostype="mcu", env=stm32f407, verbose=QL_VERBOSE.DEFAULT)
1717

1818
ql.hw.create('rcc')
1919
ql.hw.create('pwr')
@@ -23,6 +23,7 @@
2323
ql.hw.create('gpiod')
2424
ql.hw.create('spi1')
2525
ql.hw.create('crc')
26+
ql.hw.create('dbgmcu')
2627

2728
oled = PyGameSSD1306Spi(dc=(ql.hw.gpiod, 5))
2829
ql.hw.spi1.connect(oled)

examples/mcu/stm32f407_hack_lock.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def dicts():
2727
# Cracking the passwd of lock
2828
def crack(passwd):
2929
ql = Qiling(["../../examples/rootfs/mcu/stm32f407/backdoorlock.hex"],
30-
archtype="cortex_m", env=stm32f407, verbose=QL_VERBOSE.OFF)
30+
archtype="cortex_m", ostype="mcu", env=stm32f407, verbose=QL_VERBOSE.DISABLED)
3131

3232
ql.hw.create('spi2')
3333
ql.hw.create('gpioe')

0 commit comments

Comments
 (0)