PyQBDI 0.8.0__cp39-cp39-macosx_10_14_x86_64.whl → 0.11.0__cp39-cp39-macosx_10_14_x86_64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of PyQBDI might be problematic. Click here for more details.
- {PyQBDI-0.8.0.dist-info → PyQBDI-0.11.0.dist-info}/LICENSE.txt +24 -1
- {PyQBDI-0.8.0.dist-info → PyQBDI-0.11.0.dist-info}/METADATA +39 -26
- PyQBDI-0.11.0.dist-info/RECORD +8 -0
- {PyQBDI-0.8.0.dist-info → PyQBDI-0.11.0.dist-info}/WHEEL +1 -1
- pyqbdi.cpython-39-darwin.so +0 -0
- pyqbdipreload.py +25 -10
- pyqbdipreloadlib.cpython-39-darwin.so +0 -0
- PyQBDI-0.8.0.dist-info/RECORD +0 -7
- pyqbdi.so +0 -0
- {PyQBDI-0.8.0.dist-info → PyQBDI-0.11.0.dist-info}/top_level.txt +0 -0
|
@@ -1,3 +1,26 @@
|
|
|
1
|
+
################################################################################
|
|
2
|
+
QBDI package license
|
|
3
|
+
################################################################################
|
|
4
|
+
|
|
5
|
+
QBDI binaries and packages can be statically linked with the followed source:
|
|
6
|
+
|
|
7
|
+
- QBDI under the Apache License v2.0
|
|
8
|
+
- LLVM under the Apache License v2.0 with LLVM Exceptions
|
|
9
|
+
https://releases.llvm.org/10.0.0/LICENSE.TXT
|
|
10
|
+
- spdlog under the MIT License
|
|
11
|
+
https://github.com/gabime/spdlog/blob/v1.x/LICENSE
|
|
12
|
+
- fmtlib under the MIT License
|
|
13
|
+
https://github.com/fmtlib/fmt/blob/master/LICENSE.rst
|
|
14
|
+
- Catch2 under the Boost Software License 1.0
|
|
15
|
+
https://github.com/catchorg/Catch2/blob/devel/LICENSE.txt
|
|
16
|
+
- Pybind11 under a BSD-style license
|
|
17
|
+
https://github.com/pybind/pybind11/blob/master/LICENSE
|
|
18
|
+
- A sha256 implementation under GPLv3 / Apache License v2.0
|
|
19
|
+
https://github.com/aguinet/sha256_literal#licensing
|
|
20
|
+
|
|
21
|
+
################################################################################
|
|
22
|
+
QBDI source code is under the Apache License v2.0
|
|
23
|
+
################################################################################
|
|
1
24
|
|
|
2
25
|
Apache License
|
|
3
26
|
Version 2.0, January 2004
|
|
@@ -187,7 +210,7 @@
|
|
|
187
210
|
same "printed page" as the copyright notice for easier
|
|
188
211
|
identification within third-party archives.
|
|
189
212
|
|
|
190
|
-
Copyright 2017 Quarkslab
|
|
213
|
+
Copyright 2017 - 2024 Quarkslab
|
|
191
214
|
|
|
192
215
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
216
|
you may not use this file except in compliance with the License.
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: PyQBDI
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.11.0
|
|
4
4
|
Summary: Python binding for QBDI
|
|
5
|
-
Home-page: UNKNOWN
|
|
6
5
|
Author: Nicolas Surbayrole
|
|
7
6
|
Author-email: qbdi@quarkslab.com
|
|
8
7
|
License: apache2
|
|
9
8
|
Project-URL: Documentation, https://qbdi.readthedocs.io/
|
|
10
9
|
Project-URL: Source, https://github.com/QBDI/QBDI
|
|
11
10
|
Project-URL: Homepage, https://qbdi.quarkslab.com/
|
|
12
|
-
Platform: UNKNOWN
|
|
13
11
|
Classifier: Development Status :: 5 - Production/Stable
|
|
14
12
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
15
13
|
Classifier: Operating System :: Microsoft :: Windows
|
|
16
14
|
Classifier: Operating System :: MacOS
|
|
17
15
|
Classifier: Operating System :: POSIX :: Linux
|
|
18
16
|
Classifier: Programming Language :: C++
|
|
19
|
-
Classifier: Programming Language :: Python :: 3.6
|
|
20
|
-
Classifier: Programming Language :: Python :: 3.7
|
|
21
17
|
Classifier: Programming Language :: Python :: 3.8
|
|
22
18
|
Classifier: Programming Language :: Python :: 3.9
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
23
22
|
Classifier: Topic :: Security
|
|
24
23
|
Classifier: Topic :: Software Development :: Debuggers
|
|
25
|
-
Requires-Python: >=3.
|
|
24
|
+
Requires-Python: >=3.8
|
|
26
25
|
Description-Content-Type: text/x-rst
|
|
26
|
+
License-File: LICENSE.txt
|
|
27
27
|
|
|
28
28
|
Introduction
|
|
29
29
|
============
|
|
@@ -32,17 +32,20 @@ Introduction
|
|
|
32
32
|
:target: https://qbdi.readthedocs.io/en/stable/?badge=stable
|
|
33
33
|
:alt: Documentation Status
|
|
34
34
|
|
|
35
|
-
.. image:: https://
|
|
36
|
-
:target: https://
|
|
35
|
+
.. image:: https://img.shields.io/github/v/release/QBDI/QBDI
|
|
36
|
+
:target: https://github.com/QBDI/QBDI/releases
|
|
37
37
|
|
|
38
|
-
.. image:: https://
|
|
39
|
-
:target: https://
|
|
38
|
+
.. image:: https://img.shields.io/pypi/pyversions/PyQBDI
|
|
39
|
+
:target: https://pypi.org/project/PyQBDI/
|
|
40
|
+
|
|
41
|
+
.. image:: https://img.shields.io/pypi/v/PyQBDI
|
|
42
|
+
:target: https://pypi.org/project/PyQBDI/
|
|
40
43
|
|
|
41
44
|
QuarkslaB Dynamic binary Instrumentation (QBDI) is a modular, cross-platform and cross-architecture
|
|
42
45
|
DBI framework. It aims to support Linux, macOS, Android, iOS and Windows operating systems running on
|
|
43
46
|
x86, x86-64, ARM and AArch64 architectures. In addition of C/C++ API, Python and JS/frida bindings are
|
|
44
47
|
available to script QBDI. Information about what is a DBI framework and how QBDI
|
|
45
|
-
works can be found in the
|
|
48
|
+
works can be found in the `documentation introduction <https://qbdi.readthedocs.io/en/stable/intro.html>`_.
|
|
46
49
|
|
|
47
50
|
QBDI modularity means it doesn't contain a preferred injection method and it is designed to be
|
|
48
51
|
used in conjunction with an external injection tool. QBDI includes a tiny (``LD_PRELOAD`` based)
|
|
@@ -63,18 +66,16 @@ Status
|
|
|
63
66
|
.. role:: orange
|
|
64
67
|
.. role:: red
|
|
65
68
|
|
|
66
|
-
======= ==============================
|
|
67
|
-
CPU Operating Systems Execution
|
|
68
|
-
======= ==============================
|
|
69
|
-
x86-64 Android, Linux, macOS, Windows :green:`Supported`
|
|
70
|
-
x86 Android, Linux, macOS, Windows :green:`Supported`
|
|
71
|
-
ARM
|
|
72
|
-
AArch64 Android
|
|
73
|
-
======= ==============================
|
|
74
|
-
|
|
75
|
-
.. warning::
|
|
69
|
+
======= ============================== ======================== =================================
|
|
70
|
+
CPU Operating Systems Execution Memory Access Information
|
|
71
|
+
======= ============================== ======================== =================================
|
|
72
|
+
x86-64 Android, Linux, macOS, Windows :green:`Supported` :green:`Supported`
|
|
73
|
+
x86 Android, Linux, macOS, Windows :green:`Supported` :green:`Supported`
|
|
74
|
+
ARM Android, Linux :yellow:`Supported (*)` :yellow:`Supported (*)`
|
|
75
|
+
AArch64 Android, Linux, macOS :yellow:`Supported (*)` :yellow:`Supported (*)`
|
|
76
|
+
======= ============================== ======================== =================================
|
|
76
77
|
|
|
77
|
-
|
|
78
|
+
\* The ARM and AArch64 instruction sets are supported but in early support.
|
|
78
79
|
|
|
79
80
|
Installation
|
|
80
81
|
============
|
|
@@ -82,7 +83,7 @@ Installation
|
|
|
82
83
|
Python API (PyQBDI)
|
|
83
84
|
+++++++++++++++++++
|
|
84
85
|
|
|
85
|
-
PyQBDI is available through PyPI. The wheel package can be either `downloaded <https://pypi.org/project/PyQBDI/#files>`
|
|
86
|
+
PyQBDI is available through PyPI. The wheel package can be either `downloaded <https://pypi.org/project/PyQBDI/#files>`__ or installed with the following command:
|
|
86
87
|
|
|
87
88
|
pip install PyQBDI
|
|
88
89
|
|
|
@@ -95,8 +96,20 @@ There is no strict development timeline or scheduled release plan for the QBDI p
|
|
|
95
96
|
All the new features and fixes are merged onto the ``dev-next`` branch.
|
|
96
97
|
Devel packages can be downloaded in the artefacts of:
|
|
97
98
|
|
|
98
|
-
- `
|
|
99
|
-
- `Github Actions
|
|
100
|
-
- `Github Actions
|
|
99
|
+
- `Github Actions <https://github.com/QBDI/QBDI/actions/workflows/python_linux.yml?query=branch%3Adev-next>`__ for Linux PyQBDI
|
|
100
|
+
- `Github Actions <https://github.com/QBDI/QBDI/actions/workflows/python_osx.yml?query=branch%3Adev-next>`__ for OSX PyQBDI
|
|
101
|
+
- `Github Actions <https://github.com/QBDI/QBDI/actions/workflows/python_windows.yml?query=branch%3Adev-next>`__ for windows PyQBDI
|
|
102
|
+
|
|
103
|
+
Compilation
|
|
104
|
+
===========
|
|
105
|
+
|
|
106
|
+
The PyQDBI library (apart from the wheel package) can be built by solely passing the **'-DQBDI_TOOLS_PYQBDI=ON'** option to the CMake build system.
|
|
107
|
+
|
|
108
|
+
However, if you want to build the wheel package, you can run these commands::
|
|
101
109
|
|
|
110
|
+
git clone https://github.com/QBDI/QBDI.git
|
|
111
|
+
python -m pip install --upgrade pip
|
|
112
|
+
python -m pip install setuptools wheel build
|
|
113
|
+
python -m build -w
|
|
102
114
|
|
|
115
|
+
A 32-bit version of Python is mandatory for the X86 architecture whereas a 64-bit one is required for the X86-64 architecture.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
pyqbdi.cpython-39-darwin.so,sha256=CmoJFqVEEutwXkfT_QFbdK6AvEqZuGuXa7PDwNF3HB8,6993336
|
|
2
|
+
pyqbdipreload.py,sha256=FkavEnds5DCFPnNLoHJ0LJtXVTjSRaWyYJRkcsjPFLc,3505
|
|
3
|
+
pyqbdipreloadlib.cpython-39-darwin.so,sha256=ikIcn565ds686CzGaJNQ8Wmz4NfXstfQL663_2CV6w0,7085104
|
|
4
|
+
PyQBDI-0.11.0.dist-info/LICENSE.txt,sha256=J-slihDKKorAhYuNFzflMLU8JARSPYV9wfMZIHWr0qE,12462
|
|
5
|
+
PyQBDI-0.11.0.dist-info/METADATA,sha256=fPm09oSNOR_cjMiaHya5YeXOOp4O0L1k7UfPLRKjG-0,5210
|
|
6
|
+
PyQBDI-0.11.0.dist-info/WHEEL,sha256=9KZ-3KJ1_ukzk3kLb-1Vnr7aqAIrAYGNgZNCTAyImgs,110
|
|
7
|
+
PyQBDI-0.11.0.dist-info/top_level.txt,sha256=vaVfPcyi2OkulsN7QdaZiIKzq2GbFV2q24OujHZlbRc,7
|
|
8
|
+
PyQBDI-0.11.0.dist-info/RECORD,,
|
|
Binary file
|
pyqbdipreload.py
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# This file is part of pyQBDI (python binding for QBDI).
|
|
4
4
|
#
|
|
5
|
-
# Copyright 2017 Quarkslab
|
|
5
|
+
# Copyright 2017 - 2024 Quarkslab
|
|
6
6
|
#
|
|
7
7
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
8
|
# you may not use this file except in compliance with the License.
|
|
@@ -22,22 +22,37 @@ import pyqbdi
|
|
|
22
22
|
from ctypes import util as ctypesutil
|
|
23
23
|
import sys
|
|
24
24
|
import os
|
|
25
|
-
|
|
25
|
+
import argparse
|
|
26
26
|
|
|
27
27
|
def run():
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
parser = argparse.ArgumentParser()
|
|
30
|
+
|
|
31
|
+
parser.add_argument("script", type=str, help="PyQBDI script")
|
|
32
|
+
parser.add_argument("target", type=str, help="command to instrument")
|
|
33
|
+
parser.add_argument("args", type=str, help="command arguments", nargs='*')
|
|
34
|
+
|
|
35
|
+
args = parser.parse_args()
|
|
32
36
|
|
|
33
|
-
script =
|
|
34
|
-
binary =
|
|
35
|
-
args =
|
|
37
|
+
script = args.script
|
|
38
|
+
binary = args.target
|
|
39
|
+
args = [args.target] + args.args
|
|
36
40
|
environ = os.environ.copy()
|
|
37
41
|
|
|
42
|
+
preloadlib = os.path.join(
|
|
43
|
+
os.path.dirname(pyqbdi.__file__),
|
|
44
|
+
os.path.basename(pyqbdi.__file__).replace("pyqbdi", "pyqbdipreloadlib"))
|
|
45
|
+
|
|
46
|
+
if not os.path.isfile(preloadlib):
|
|
47
|
+
print("Cannot found pyqbdi preload library : {}".format(preloadlib))
|
|
48
|
+
exit(1)
|
|
49
|
+
|
|
38
50
|
# add LD_PRELOAD or DYLD_INSERT_LIBRARIES
|
|
39
51
|
if platform.system() == 'Darwin':
|
|
40
|
-
|
|
52
|
+
|
|
53
|
+
environ["DYLD_INSERT_LIBRARIES"] = preloadlib
|
|
54
|
+
environ["DYLD_LIBRARY_PATH"] = os.path.join(sys.base_prefix, 'lib')
|
|
55
|
+
environ["DYLD_BIND_AT_LAUNCH"] = "1"
|
|
41
56
|
elif platform.system() == 'Linux':
|
|
42
57
|
libpythonname = "python{}.{}".format(sys.version_info.major, sys.version_info.minor)
|
|
43
58
|
libpython = ctypesutil.find_library(libpythonname)
|
|
@@ -48,7 +63,7 @@ def run():
|
|
|
48
63
|
print("PyQBDI in PRELOAD mode need lib{}.so".format(libpythonname))
|
|
49
64
|
exit(1)
|
|
50
65
|
|
|
51
|
-
environ["LD_PRELOAD"] = os.pathsep.join([libpython,
|
|
66
|
+
environ["LD_PRELOAD"] = os.pathsep.join([libpython, preloadlib])
|
|
52
67
|
environ["LD_BIND_NOW"] = "1"
|
|
53
68
|
else:
|
|
54
69
|
print("PyQBDI in PRELOAD mode is not supported on this platform")
|
|
Binary file
|
PyQBDI-0.8.0.dist-info/RECORD
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
pyqbdi.so,sha256=W9JU133gX12DpIRsqokaxNdFDwNARCPygkgcTmtSOKM,6673600
|
|
2
|
-
pyqbdipreload.py,sha256=hmbPXj9_SxfwGfs7-YPqH90Wr-DW7y0P1hDFsG-fYck,2937
|
|
3
|
-
PyQBDI-0.8.0.dist-info/LICENSE.txt,sha256=9gme0jaChArmCnb843j6rptcdffRYhiIg-E7eQyhi5g,11340
|
|
4
|
-
PyQBDI-0.8.0.dist-info/METADATA,sha256=kbU6iq-Z33cwisegCPiTeM0C9gT2Hwdyy8-RgtJPvGw,4662
|
|
5
|
-
PyQBDI-0.8.0.dist-info/WHEEL,sha256=7vkJ3ZnexegyTUl8grQkOVww_TVBMjxMIgcotcWEQj4,110
|
|
6
|
-
PyQBDI-0.8.0.dist-info/top_level.txt,sha256=vaVfPcyi2OkulsN7QdaZiIKzq2GbFV2q24OujHZlbRc,7
|
|
7
|
-
PyQBDI-0.8.0.dist-info/RECORD,,
|
pyqbdi.so
DELETED
|
Binary file
|
|
File without changes
|