Skip to content

Commit 5184fe8

Browse files
authored
Merge pull request #472 from qilingframework/dev
getting ready for 1.1.1
2 parents aa7b635 + e56c284 commit 5184fe8

File tree

168 files changed

+3964
-987
lines changed

Some content is hidden

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

168 files changed

+3964
-987
lines changed

.github/workflows/pythonpublish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
pip install setuptools wheel
1717
- name: Build distribution 📦
1818
run: |
19-
pip install -r requirements.txt
19+
pip install .
2020
python setup.py sdist bdist_wheel
2121
- uses: actions/upload-artifact@v2
2222
with:

.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ build
1414
dist
1515

1616
# examples
17-
examples/**/registry/
18-
examples/**/dlls/
19-
examples/**/Windows/
17+
# examples/**/registry/
18+
# examples/**/dlls/
19+
# examples/**/Windows/
2020

2121
# test and logs
2222
jexamples/

.travis.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ matrix:
99
python: "3.6"
1010
cache: pip
1111
install:
12-
- pip3 install -r requirements.txt
13-
- python3 setup.py install
12+
- pip3 install .
1413
before_script:
1514
- cd tests
1615
script:
@@ -23,9 +22,9 @@ matrix:
2322
python: "3.7"
2423
cache: pip
2524
install:
26-
- pip3 install flake8 -r requirements.txt
25+
- pip3 install flake8
2726
- flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
28-
- python3 setup.py install
27+
- pip3 install .
2928
before_script:
3029
- cd tests
3130
script:
@@ -43,7 +42,6 @@ matrix:
4342
- pip3 install --upgrade pip
4443
install:
4544
# - pip3 install wheel 'capstone>=4.0.1' 'pefile>=2019.4.18' 'python-registry>=1.3.1' 'unicorn>=1.0.2rc4'
46-
- pip3 install -r requirements.txt
4745
# - |
4846
# if [ ! -f $HOME/dist/keystone*.whl ]; then
4947
# git clone https://github.com/keystone-engine/keystone && \
@@ -54,7 +52,7 @@ matrix:
5452
# sudo pip3 install $HOME/dist/*.whl;
5553
# fi
5654
- cd $TRAVIS_BUILD_DIR
57-
- python3 setup.py install
55+
- pip3 install . # Workaround since building from keystone sources doesn't work on Macos. Not sure why and I guess it's due to Travis. :/
5856
before_script:
5957
- ./examples/scripts/collectdylib.sh
6058
- cd tests
@@ -85,7 +83,6 @@ matrix:
8583
#- python -m pip install --upgrade pip
8684
install:
8785
# - pip3 install wheel 'capstone>=4.0.1' 'pefile>=2019.4.18' 'python-registry>=1.3.1' 'unicorn>=1.0.2rc3'
88-
- pip3 install -r requirements.txt
8986
# - |
9087
# if [ ! -f $HOME/dist/keystone*.zip ]; then
9188
# git clone https://github.com/keystone-engine/keystone && \
@@ -104,7 +101,7 @@ matrix:
104101
# cp $HOME/dist/keystone.dll /c/Python36/Lib/site-packages/keystone/;
105102
# fi
106103
- cd $TRAVIS_BUILD_DIR
107-
- python setup.py install
104+
- pip3 install .
108105
# - cp /c/Program\ Files\ \(x86\)/keystone/lib/keystone.dll /c/Python36/Lib/site-packages/keystone/
109106
before_script:
110107
- cmd.exe //C 'examples\scripts\dllscollector.bat'
@@ -135,7 +132,7 @@ matrix:
135132
# - docker exec qiling pip3 install -r requirements.txt
136133
# - docker exec qiling python3 setup.py install
137134
script:
138-
- docker run -it --rm -v ${TRAVIS_BUILD_DIR}:/qiling qilingframework/qiling:dev bash -c "pip3 install -r requirements.txt && python3 setup.py install && cd tests && ./test_elf.sh"
135+
- docker run -it --rm -v ${TRAVIS_BUILD_DIR}:/qiling qilingframework/qiling:dev bash -c "pip3 install . && cd tests && ./test_elf.sh"
139136
# - docker exec qiling bash -c "cd tests && ./test_elf.sh"
140137

141138
# - name: "Python 3.6 on WSL1 Ubuntu"

CREDITS.TXT

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Earl MARCUS (klks84) klks84@gmail.com
2222

2323
Key Contributors (in no particular order)
2424
=========================================
25+
lazymio
2526
kabeor
2627
0ssigeno
2728
liba2k

ChangeLog

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,21 @@
11
This file details the changelog of Qiling Framework.
22

33

4+
[Version 1.2-alpha1]: August [someDAY], 2020
5+
6+
- Fix Windows "import resource" issue
7+
- Add ql.save and ql.restore aka Qiling's Snapshot
8+
- Add ql.os.fd.save() and ql.os.fd.restore() to save file descriptor
9+
- Add IDA Plugin
10+
- Test, patch and make sure arm_thumb can work on its own
11+
- Added Qiling Debugger - Currently only works with MIPS
12+
- Add experimental 8086 and DOS support.
13+
- Fix path transformation on Windows when running Linux.
14+
- Idaplugin able to instrument code now
15+
- Refactor ql.fs_mapper (now ql.os.fs_mapper).
16+
17+
18+
------------------------------------
419
[Version 1.1]: July 24th, 2020
520

621
- More refactors and bug fixes

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ RUN apk add --no-cache \
1111
libtool \
1212
automake \
1313
autoconf \
14+
libmagic \
1415
g++ \
1516
linux-headers \
1617
git \
@@ -20,8 +21,7 @@ RUN apk add --no-cache \
2021

2122
RUN git clone -b dev https://github.com/qilingframework/qiling.git \
2223
&& cd qiling \
23-
&& pip3 install -r requirements.txt \
24-
&& python3 setup.py install \
24+
&& pip3 install . \
2525
&& rm -rf /tmp/*
2626

2727
WORKDIR /qiling

README.md

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99

1010
Qiling is an advanced binary emulation framework, with the following features:
1111

12-
- Cross platform: Windows, MacOS, Linux, BSD, UEFI
13-
- Cross architecture: X86, X86_64, Arm, Arm64, MIPS
14-
- Multiple file formats: PE, MachO, ELF
12+
- Cross platform: Windows, MacOS, Linux, BSD, UEFI, DOS
13+
- Cross architecture: X86, X86_64, Arm, Arm64, MIPS, 8086
14+
- Multiple file formats: PE, MachO, ELF, COM
1515
- Emulate & sandbox machine code in a isolated environment
1616
- Supports cross architecture and platform debugging capabilities
1717
- Provide high level API to setup & configure the sandbox
@@ -49,7 +49,7 @@ Qemu usermode does similar thing to our emulator, that is to emulate whole execu
4949
- Qiling is a true analysis framework, that allows you to build your own dynamic analysis tools on top (in friendly Python language). Meanwhile, Qemu is just a tool, not a framework.
5050
- Qiling can perform dynamic instrumentation, and can even hotpatch code at runtime. Qemu does not do either.
5151
- Not only working cross-architecture, Qiling is also cross-platform, so for example you can run Linux ELF file on top of Windows. In contrast, Qemu usermode only run binary of the same OS, such as Linux ELF on Linux, due to the way it forwards syscall from emulated code to native OS.
52-
- Qiling supports more platforms, including Windows, MacOS, Linux & BSD. Qemu usermode can only handles Linux & BSD.
52+
- Qiling supports more platforms, including Windows, MacOS, Linux & BSD. Qemu usermode can only handle Linux & BSD.
5353

5454
---
5555

@@ -121,7 +121,7 @@ The below Youtube video shows how the above example works.
121121

122122
#### Fuzzing with Qiling Unicornalf
123123

124-
- More information on fuzzing with Qiling Unicornalf can be found [here](https://github.com/qilingframework/qiling/tree/dev/examples/fuzzing/README.md).
124+
- More information on fuzzing with Qiling Unicornalf can be found [here](https://github.com/qilingframework/qiling/blob/dev/examples/fuzz_example_x64/README.md).
125125

126126
[![qiling DEMO 2: Fuzzing with Qiling Unicornalf](https://raw.githubusercontent.com/qilingframework/qilingframework.github.io/master/images/qilingfzz-s.png)](https://raw.githubusercontent.com/qilingframework/qiling/dev/examples/fuzzing/qilingfzz.png "Demo #2 Fuzzing with Qiling Unicornalf")
127127

@@ -205,9 +205,27 @@ Contact us at email info@qiling.io, or via Twitter [@qiling_io](https://twitter.
205205

206206
#### Key Contributors (in no particular order)
207207

208+
- lazymio
208209
- kabeor
209210
- 0ssigeno
210211
- liba2k
211212
- assafcarlsbad
212213
- ucgJhe
213214
- jhumble
215+
216+
217+
#### Donations:
218+
219+
- Opensource project is never an easy task. We value any help from the community
220+
- Please drop me an email kj@qiling.io after making the donation, i will mail you some swag as a token of appreciation
221+
222+
##### XMR:
223+
- 46T1c5taWuP6G4XvAG5shC6a7eai4Qe4HPFj5qEGyJzzMVRa9M9MR4DbNbbSDKtbgNR6bvWyj32Wb3HySYZuDqUp2GCr52o
224+
##### DASH:
225+
- XhTsLXTQEhN5F7hKtq8HV867um3HZuXvF9
226+
##### ADA:
227+
- DdzFFzCqrht8MbmRQL8v86XG5vQHYNC6NQwFkhCW4rsNHMLfzWyxVTce5yFayg6QqJBdL7AapwvFL3fBAoBmPLR9gDbkzLGfVVEGHnNC
228+
##### ETH:
229+
- 0xec095228411d4a232f4d221ad7defcde36eb981f
230+
##### BTC:
231+
- 1NmxDWWak8qtpmYGnXBK1osRNNYH2zxpZs

TODO

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,29 @@ Android
4646

4747

4848
-------------------- CHECKLIST before TAG --------------------
49-
49+
Release
5050
1. core.py
51-
- __version__ = "1.1" + "-rc1"
52-
2. setup.py
53-
- 'Development Status :: 3 - Alpha'
54-
3. ChangeLog
51+
- __version__ = "1.[x].[x]"
52+
2. Make sure development status classifer in setup.py is correct.
53+
- 'Development Status :: 5 - Production/Stable'
54+
3. Update ChangeLog
5555
4. commit and push
5656
5. Merge dev into master
57-
6. git tag 1.1-rc1
58-
7. git push origin --tags
59-
8. check for new Pypi package
57+
6. checkout master
58+
7. git pull
59+
6. git tag 1.[x].[x]
60+
8. git push origin --tags
61+
9. check for new Pypi package @ https://pypi.org/project/qiling
62+
63+
Pre-release/dev
64+
1. __version__.py
65+
- __version__ = "1.[x].[x]" + "-rc[x]"
66+
2. Make sure development status classifer in setup.py is correct.
67+
- 'Development Status :: 3 - Alpha'
68+
3. Update ChangeLog
69+
4. commit and push
70+
5. checkout dev
71+
6. git pull
72+
7. git tag 1.[x].[x]-rc[x]
73+
8. git push origin --tags
74+
9. check for new pre-release Pypi package @ https://pypi.org/project/qiling/#history

examples/crackme_x86_linux.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,16 @@ def fstat(self):
5050
def instruction_count(ql, address, size, user_data):
5151
user_data[0] += 1
5252

53+
def my__llseek(ql, *args, **kw):
54+
pass
5355

5456
def run_one_round(payload):
5557
stdin = MyPipe()
56-
ql = Qiling(["rootfs/x86_linux/bin/crackme_linux"], "rootfs/x86_linux", console=False, stdin=stdin,
58+
ql = Qiling(["rootfs/x86_linux/bin/crackme_linux"], "rootfs/x86_linux", console=True, stdin=stdin,
5759
stdout=sys.stdout, stderr=sys.stderr)
5860
ins_count = [0]
5961
ql.hook_code(instruction_count, ins_count)
62+
ql.set_syscall("_llseek", my__llseek)
6063
stdin.write(payload)
6164
ql.run()
6265
del stdin
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
afl_outputs
2+
AFLplusplus
3+
rootfs

0 commit comments

Comments
 (0)