Skip to content

Commit 4ba05d0

Browse files
authored
Merge pull request #749 from qilingframework/dev
Getting ready for 1.2.3
2 parents 88a76ed + 53c7d58 commit 4ba05d0

File tree

358 files changed

+10114
-5456
lines changed

Some content is hidden

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

358 files changed

+10114
-5456
lines changed

.circleci/config.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
version: 2.1
2+
3+
jobs:
4+
macos:
5+
macos:
6+
xcode: 10.1
7+
environment:
8+
HOMEBREW_NO_AUTO_UPDATE: 1
9+
MACOSX_DEPLOYMENT_TARGET: 10.13.6
10+
steps:
11+
- checkout
12+
- run:
13+
name: "Install wget"
14+
command: |
15+
brew install wget cmake
16+
17+
- restore_cache:
18+
keys:
19+
- python-{{ .Environment.CIRCLE_JOB }}-3.7.0-macos-10.13.6
20+
21+
- run:
22+
name: "Install qiling framework"
23+
command: |
24+
pip3 install --upgrade pip
25+
pip3 install wheel setuptools
26+
pip3 install .
27+
cd examples
28+
rm -rf rootfs
29+
wget https://github.com/qilingframework/rootfs/archive/refs/heads/master.zip
30+
unzip master.zip && mv rootfs-master rootfs
31+
cd .. && ./examples/scripts/dylibcollector.sh
32+
cd examples/rootfs/x8664_macos/kext
33+
unzip -Pinfected SuperRootkit.kext.zip
34+
35+
- save_cache:
36+
paths:
37+
- ~/Library/Caches/pip
38+
key: python-{{ .Environment.CIRCLE_JOB }}-3.7.0-macos-10.13.6
39+
40+
- run:
41+
name: "Run macos test"
42+
command: |
43+
cd tests
44+
./test_macho.sh
45+
46+
47+
workflows:
48+
version: 2
49+
run-tests:
50+
jobs:
51+
- macos

.github/workflows/build-ci.yml

Lines changed: 78 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,22 @@ jobs:
99
strategy:
1010
fail-fast: false
1111
matrix:
12-
os: [ubuntu-18.04, ubuntu-20.04]
12+
#os: [windows-2019, macos-10.15, ubuntu-18.04, ubuntu-20.04]
13+
os: [windows-2019, ubuntu-18.04, ubuntu-20.04]
1314
python-version: [3.6.8, 3.7.6, 3.8.5]
1415
exclude:
15-
# - os: windows-2019
16-
# python-version: 3.7.6
17-
# - os: macos-10.15
18-
# python-version: 3.7.6
1916
- os: ubuntu-20.04
20-
python-version: 3.7.6
21-
# - os: windows-2019
22-
# python-version: 3.8.5
23-
# - os: macos-10.15
24-
# python-version: 3.8.5
17+
python-version: 3.7.6
2518
- os: ubuntu-20.04
2619
python-version: 3.8.5
20+
- os: windows-2019
21+
python-version: 3.6.8
22+
- os: windows-2019
23+
python-version: 3.7.6
24+
# - os: macos-10.15
25+
# python-version: 3.6.8
26+
# - os: macos-10.15
27+
# python-version: 3.7.6
2728
include:
2829
- os: ubuntu-20.04
2930
python-version: 3.6.8
@@ -37,41 +38,47 @@ jobs:
3738
with:
3839
python-version: ${{ matrix.python-version }}
3940

40-
# - name: win setup MSVC
41-
# if: contains(matrix.os, 'windows')
42-
# uses: microsoft/setup-msbuild@v1
4341

44-
# - name: win run tests
45-
# if: contains(matrix.os, 'windows')
46-
# shell: bash
47-
# run: |
48-
# powershell Start-Process -PassThru -Wait PowerShell -ArgumentList "'-Command Set-MpPreference -DisableArchiveScanning \$true'"
49-
# powershell Start-Process -PassThru -Wait PowerShell -ArgumentList "'-Command Set-MpPreference -DisableBehaviorMonitoring \$true'"
50-
# powershell Start-Process -PassThru -Wait PowerShell -ArgumentList "'-Command Set-MpPreference -DisableRealtimeMonitoring \$true'"
51-
# powershell Add-MpPreference -ExclusionPath $GITHUB_WORKSPACE
52-
# pip3 install setuptools wheel
53-
# pip3 install .
54-
# cmd.exe //C 'examples\scripts\dllscollector.bat'
55-
# cd $GITHUB_WORKSPACE/examples/rootfs/x86_windows/bin
56-
# unzip -Pinfected wannacry.bin.zip
57-
# unzip -Pinfected UselessDisk.bin.zip
58-
# unzip -Pinfected GandCrab502.bin.zip
59-
# unzip -Pinfected al-khaser.bin.zip
60-
# unzip -Pinfected sality.dll.zip
61-
# cd $GITHUB_WORKSPACE/tests
62-
# cmd.exe //C '.\test_pe.bat'
63-
# - name: mac run tests
64-
# if: contains(matrix.os, 'macos')
65-
# continue-on-error: true
66-
# shell: bash
67-
# run: |
68-
# pip3 install setuptools wheel
69-
# pip3 install .
70-
# ./examples/scripts/dylibcollector.sh
71-
# cd $GITHUB_WORKSPACE/examples/rootfs/x8664_macos/kext
72-
# unzip -Pinfected SuperRootkit.kext.zip
73-
# cd $GITHUB_WORKSPACE/tests
74-
# ./test_macho.sh
42+
- name: Win setup MSVC
43+
if: contains(matrix.os, 'windows')
44+
uses: microsoft/setup-msbuild@v1
45+
46+
47+
- name: Win configure Pagefile
48+
if: contains(matrix.os, 'windows')
49+
uses: al-cheb/[email protected]
50+
with:
51+
minimum-size: 16GB
52+
maximum-size: 16GB
53+
disk-root: "C:"
54+
55+
56+
- name: win run tests
57+
if: contains(matrix.os, 'windows')
58+
shell: bash
59+
run: |
60+
powershell Start-Process -PassThru -Wait PowerShell -ArgumentList "'-Command Set-MpPreference -DisableArchiveScanning \$true'"
61+
powershell Start-Process -PassThru -Wait PowerShell -ArgumentList "'-Command Set-MpPreference -DisableBehaviorMonitoring \$true'"
62+
powershell Start-Process -PassThru -Wait PowerShell -ArgumentList "'-Command Set-MpPreference -DisableRealtimeMonitoring \$true'"
63+
powershell Start-Process -PassThru -Wait PowerShell -ArgumentList "'-Command Add-MpPreference -ExclusionPath $GITHUB_WORKSPACE'"
64+
pip3 install setuptools wheel
65+
pip3 install .
66+
cd examples
67+
rm -rf rootfs
68+
curl -LJk -o master.zip https://github.com/qilingframework/rootfs/archive/refs/heads/master.zip && unzip master.zip
69+
mv rootfs-master rootfs
70+
cd $GITHUB_WORKSPACE
71+
cmd.exe //C 'examples\scripts\dllscollector.bat'
72+
cd $GITHUB_WORKSPACE/examples/rootfs/x86_windows/bin
73+
unzip -Pinfected wannacry.bin.zip
74+
unzip -Pinfected UselessDisk.bin.zip
75+
unzip -Pinfected GandCrab502.bin.zip
76+
unzip -Pinfected al-khaser.bin.zip
77+
unzip -Pinfected sality.dll.zip
78+
cd $GITHUB_WORKSPACE/tests
79+
cmd.exe //C '.\test_pe.bat'
80+
81+
7582
- name: linux run tests
7683
if: contains(matrix.os, 'ubuntu')
7784
shell: 'script -q -e -c "bash {0}"'
@@ -80,13 +87,38 @@ jobs:
8087
pip3 install setuptools wheel flake8
8188
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
8289
pip3 install .
83-
cd examples/rootfs/x86_linux/kernel && unzip -P infected m0hamed_rootkit.ko.zip
90+
cd examples
91+
rm -rf rootfs
92+
wget https://github.com/qilingframework/rootfs/archive/refs/heads/master.zip
93+
unzip master.zip && mv rootfs-master rootfs
94+
cd rootfs/x86_linux/kernel && unzip -P infected m0hamed_rootkit.ko.zip
8495
cd ../../../../tests && ./test_elf.sh
8596
elif [ ${{ matrix.os }} == 'ubuntu-20.04' ]; then
97+
cd examples
98+
rm -rf rootfs
99+
wget https://github.com/qilingframework/rootfs/archive/refs/heads/master.zip
100+
unzip master.zip && mv rootfs-master rootfs
86101
docker run -it --rm -v ${GITHUB_WORKSPACE}:/qiling qilingframework/qiling:dev bash -c "pip3 install . && cd examples/rootfs/x86_linux/kernel && unzip -P infected m0hamed_rootkit.ko.zip && cd ../../../../tests && ./test_elf.sh"
87102
else
88103
pip3 install setuptools wheel
89104
pip3 install .
90-
cd examples/rootfs/x86_linux/kernel && unzip -P infected m0hamed_rootkit.ko.zip
105+
cd examples
106+
rm -rf rootfs
107+
wget https://github.com/qilingframework/rootfs/archive/refs/heads/master.zip
108+
unzip master.zip && mv rootfs-master rootfs
109+
cd rootfs/x86_linux/kernel && unzip -P infected m0hamed_rootkit.ko.zip
91110
cd ../../../../tests && ./test_elf.sh
92111
fi
112+
113+
114+
# - name: mac run tests
115+
# if: contains(matrix.os, 'macos')
116+
# shell: bash
117+
# run: |
118+
# pip3 install setuptools wheel
119+
# pip3 install .
120+
# ./examples/scripts/dylibcollector.sh
121+
# cd $GITHUB_WORKSPACE/examples/rootfs/x8664_macos/kext
122+
# unzip -Pinfected SuperRootkit.kext.zip
123+
# cd $GITHUB_WORKSPACE/tests
124+
# ./test_macho.sh

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ build
1616
dist
1717

1818
# test and logs
19+
tests/mac_test_elf.sh
1920
jexamples/
2021
logs/
2122
log/
@@ -33,5 +34,3 @@ test.file
3334
*.o
3435
core
3536
*.perf
36-
examples/rootfs/x86_windows/Windows/registry
37-
examples/rootfs/x8664_windows/Windows/registry

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "examples/rootfs"]
2+
path = examples/rootfs
3+
url = https://github.com/qilingframework/rootfs.git

.travis.yml

Lines changed: 0 additions & 90 deletions
This file was deleted.

ChangeLog

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,26 @@
11
This file details the changelog of Qiling Framework.
22

33
------------------------------------
4-
BREAK CHANGE
5-
- ql.multithread can be only set during Qiling.__init__ now.
6-
- ql.nprint and ql.dpring is depreciated. Please use logging directly instead.
7-
- ql.filename is renamed to ql.argv.
8-
- ql.output and ql.verbose now has slightly different meanings and can be adjusted runtime. See their docstring for details.
9-
- ql.filter now accepts a regular expression.
10-
- Remove ql.log_dir, ql.log_split, ql.append but add ql.log_file instead.
4+
[Version 1.2.4]: April [SOMETHING], 2021
115

6+
-
127

138
------------------------------------
14-
[Version 1.2.3]: March [SOMETHING], 2021
15-
-
9+
[Version 1.2.3]: March 30th, 2021
10+
11+
- Improved PR #689, Android syscall and test fix
12+
- GDB speed optimization
13+
- Fixed return value for uid/gid related syscall
14+
- Resolved multilevel symbolic links
15+
- Demigod set.api implementation
16+
- Major refactor, see commit 4aa8e59e04d5a8a5520e4e1e2595ecc78a80beba
17+
- Clean and remove rootfs
18+
- ql.filter now accepts a regular expression
19+
- consolidate output into verbose
1620

1721

1822
------------------------------------
19-
[Version 1.2.2]: February 8, 2021
23+
[Version 1.2.2]: February 8th, 2021
2024

2125
- Fix _acmdln and _wcmdln handling
2226
- More UEFI refactor

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
recursive-include qiling/debugger/gdb/xml *
22
recursive-include qiling/extensions/windows_sdk/defs *
33
recursive-include qiling/profiles *
4+
include qiling/os/uefi/guids.csv

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ Qiling is an advanced binary emulation framework, with the following features:
2424

2525
Qiling also made its way to various international conferences.
2626

27+
2021:
28+
- [Black Hat, Asia](https://www.blackhat.com/asia-21/arsenal/schedule/index.html#qiling-smart-analysis-for-smart-contract-22643)
29+
2730
2020:
2831
- [Black Hat, Europe](https://www.blackhat.com/eu-20/arsenal/schedule/index.html#qiling-framework-deep-dive-into-obfuscated-binary-analysis-21781)
2932
- [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)

0 commit comments

Comments
 (0)