├── .github └── workflows │ └── main.yml ├── CHANGELOG.txt ├── CLA.md ├── LICENSE ├── License.txt ├── README.md ├── legal_notices.txt ├── pyproject.toml ├── requirements.txt ├── setup.cfg ├── triangle_check.py ├── triangle_check.spec └── triangle_check ├── __init__.py └── __main__.py /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | on: 2 | push: 3 | tags: 4 | - 'v*' 5 | 6 | name: Build trinagle_check release 7 | jobs: 8 | build: 9 | permissions: 10 | contents: 'write' 11 | name: Build trinagle_check release 12 | runs-on: ubuntu-latest 13 | steps: 14 | - name: Checkout code 15 | uses: actions/checkout@v2 16 | 17 | 18 | - name: PyInstaller Linux 19 | uses: JackMcKew/pyinstaller-action-linux@python3.10 20 | with: 21 | path: . 22 | 23 | - name: PyInstaller Windows 24 | uses: JackMcKew/pyinstaller-action-windows@python3-10-pyinstaller-5-3 25 | with: 26 | path: . 27 | 28 | - name: Cp Linux Dist 29 | run : cp -r dist/linux/triangle_check triangle_check_linux 30 | 31 | - name: Zip Linux Dist 32 | run : zip -r triangle_check_linux.zip triangle_check_linux 33 | 34 | - name: Cp Win Dist 35 | run : cp -r dist/windows/triangle_check triangle_check_win 36 | 37 | - name: Zip Win Dist 38 | run : zip -r triangle_check_win.zip triangle_check_win 39 | 40 | - name: Create Release 41 | id: create_release 42 | uses: actions/create-release@v1 43 | env: 44 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 45 | with: 46 | tag_name: ${{ github.ref }} 47 | release_name: Release ${{ github.ref }} 48 | draft: false 49 | prerelease: false 50 | 51 | - name: Upload Linux Release Asset 52 | id: upload-linux-release-asset 53 | uses: actions/upload-release-asset@v1 54 | env: 55 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 56 | with: 57 | upload_url: ${{ steps.create_release.outputs.upload_url }} 58 | asset_path: ./triangle_check_linux.zip 59 | asset_name: triangle_check_linux.zip 60 | asset_content_type: application/gzip 61 | 62 | - name: Upload Win Release Asset 63 | id: upload-win-release-asset 64 | uses: actions/upload-release-asset@v1 65 | env: 66 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 67 | with: 68 | upload_url: ${{ steps.create_release.outputs.upload_url }} 69 | asset_path: ./triangle_check_win.zip 70 | asset_name: triangle_check_win.zip 71 | asset_content_type: application/gzip 72 | -------------------------------------------------------------------------------- /CHANGELOG.txt: -------------------------------------------------------------------------------- 1 | 2023-05-15 v1 Initial release 2 | -------------------------------------------------------------------------------- /CLA.md: -------------------------------------------------------------------------------- 1 | # CONTRIBUTOR LICENSE AGREEMENT 2 | You accept and agree to the following terms and conditions for Your past, present and future Contributions submitted to the AO Kaspersky Lab (“Company”). 3 | 1. Definitions. 4 | "You" (or "Your") shall mean the legal owner of the Contribution that is making this CLA with the Company. For legal entities, the entity making a Contribution and all other entities that control, are controlled by, or are under common control with that entity are considered to be a single Contributor. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. 5 | "Contribution" shall mean any original work of authorship, including any derivative works, modifications or additions to an existing work, that is intentionally submitted by You to the Company for inclusion in, or documentation of, any of the products owned or distributed by the Company (the "Work"). You acknowledge that the Company desires to have all contributions made by You under the terms of this CLA and, thus, this CLA will apply to all of your Contributions submitted both before and after the date of signature. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Company or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Company for the purpose of discussing and improving the Work. 6 | 2. Grant of Copyright and Patent Licenses. 7 | Subject to the terms and conditions of this Agreement, You hereby grant to the Company and to recipients of software distributed by the Company a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license, including a license, to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, distribute, or sell Your Contributions and the Work. 8 | Subject to the terms and conditions of this Agreement, You hereby grant to the Company and to recipients of the Work distributed by the Company a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable patent license to make, have made, use, offer to sell, sell, import, distribute, and otherwise transfer Your Contributions and the Work. 9 | 3. Ownership and third party rights. 10 | You represent that you are the sole legal owner and are legally entitled to grant the above license for the Contributions. If: 11 | o (A.) your employer(s) has intellectual property or other rights to your Contributions, you represent that you have both (i.) received express, prior, written permission to make Contributions on behalf of that employer; and (ii.) that your employer has waived any of its rights for or claims in your Contributions to the Company, or 12 | o (B.) if another individual or third party has rights to intellectual property to your Contributions – whether as a result of being a co-inventor, assignee, or other right, you represent that you have both (i.) received express, prior, written permission to make Contributions on behalf of that individual or third party; and (ii.) that such individual or third party has waived any of its rights for or claims in your Contributions to the Company. 13 | You will submit such written permission to the Company at the time of the submission of your Contribution. 14 | 4. Your original creation. 15 | You represent that each of Your Contributions is Your original creation (see section 5 for submissions on behalf of others). You represent that Your Contribution submissions include complete details (including required attributions and details of applicable license restrictions) of any third-party license or public domain licenses, or other restriction (including, but not limited to, related patents and trademarks) of which you are personally aware or should be aware and which are associated with any part of Your Contributions. 16 | 5. Third party owned creation(s). 17 | Should You wish to submit work that is not Your original creation, You may submit it to the Company separately from any Contribution, clearly identifying the complete details of its ownership and source, and any applicable license or other restriction (including, but not limited to, related patents, trademarks, and license agreements) of which you are personally aware, and conspicuously marking the work, for example: "Submitted on behalf of a third-party: [named here].” “Owned by third-party: [named here.]” or “Copyright held by third-party: [named here].” 18 | 6. Notification. 19 | You agree to notify the Company of any facts or circumstances of which you become aware that would make these representations inaccurate in any respect, including if you become aware of any third party intellectual property rights that are infringed by your Contributions. 20 | 7. Assignment. 21 | Neither party may assign this Agreement without the other party’s consent which will not be unreasonably withheld; however, each party may assign this Agreement without the other party’s consent to an entity or individual that acquires all or substantially all of the business or assets of the assigning party or for an individual acquires all of the intellectual property rights in the Contribution owned by such individual, whether by merger, sale of assets, or otherwise, provided that such entity or individual assumes and agrees in writing to be bound by all of the obligations of the assigning party under this Agreement. 22 | 8. Entire agreement. 23 | This Agreement is the entire agreement, both written or oral, with respect to the Contributions between the parties. No amendment, modification or waiver of any provision of this Agreement will be effective unless in writing and signed by both parties. If any provision of this Agreement is held to be invalid or unenforceable, the remaining portions will remain in full force and effect and such provision will be enforced to the maximum extent possible so as to affect the intent of the parties and will be reformed to the extent necessary to make such provision valid and enforceable. All notices and other communications herein permitted or required under this Agreement will be sent by postage prepaid, via registered or certified mail or overnight courier, return receipt requested, or delivered personally to the parties at their respective addresses, or to such other address as either party will give to the other party in the manner provided herein for giving notice. Notice will be considered given upon receipt. 24 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 KLBot 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /License.txt: -------------------------------------------------------------------------------- 1 | == 2 | 3 | © 2023 AO Kaspersky Lab. All Rights Reserved. 4 | 5 | == 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 8 | 9 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 10 | 11 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 12 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Triangle Check: scan iTunes backups for traces of compromise by Operation Triangulation 2 | 3 | This script allows to scan iTunes backups for indicator of compromise by Operation Triangulation. 4 | 5 | For more information, please read [Securelist](https://securelist.com/trng-2023/) 6 | 7 | Contact: [triangulation@kaspersky.com](mailto:triangulation@kaspersky.com) 8 | 9 | ## Prerequisites 10 | 11 | The script depends on: colorama (for pretty printing), pycryptodome 12 | 13 | ## Installation 14 | 15 | The triangle_check utility can be installed from [PyPI](https://pypi.org/project/triangle-check/) (recommended): 16 | 17 | ``` 18 | python -m pip install triangle_check 19 | ``` 20 | 21 | The script can be run as-is (the subdirectory *triangle_check* is required): 22 | 23 | ``` 24 | python -m pip install -r requirements.txt 25 | python triangle_check.py 26 | ``` 27 | 28 | It can also be built into a pip package: 29 | 30 | ``` 31 | git clone https://github.com/KasperskyLab/triangle_check 32 | cd triangle_check 33 | python -m build 34 | python -m pip install dist/triangle_check-1.0-py3-none-any.whl 35 | ``` 36 | 37 | For Windows or Linux, alternatively use the [binary builds](https://github.com/KasperskyLab/triangle_check/releases) of the triangle_check utility. 38 | 39 | ## Usage 40 | 41 | ``` 42 | Usage: python -m triangle_check /path/to/iTunes_backup [backup_password] 43 | ``` 44 | 45 | ### iTunes backup location 46 | 47 | Locate the backup directory created by iTunes. The exact location depends on the OS and is described [here](https://support.apple.com/en-us/HT204215). 48 | The directory you are looking for should contain many subdirectories, and should include 'Manifest.db', 'Manifest.plist'. The backup may be encrypted 49 | with a password, if set up in iTunes. That password is required to decrypt password-protected backups. 50 | 51 | ### Advanced: create backup with libimobiledevice 52 | 53 | You can use the tool *idevicebackup2* that is a part of the open-source package named [libimobiledevice](https://libimobiledevice.org/). Popular Linux 54 | distributions, macports and homebrew allow to install it out of the box, and the package can be built from the source code for Linux or OSX. 55 | 56 | ### Scanning the backup 57 | 58 | Run the tool against the backup directory. If there are any traces of suspicious activity, the script will print out *SUSPICION* or *DETECTED* lines with 59 | more information and detected IOCs, and that would mean that the device was *most likely* compromised. 60 | 61 | Example output: 62 | 63 | ``` 64 | ==== IDENTIFIED TRACES OF COMPROMISE (Operation Triangulation) ==== 65 | 2022-*-* SUSPICION Suspicious combination of events: 66 | * file modification: Library/SMS/Attachments/ab/11 67 | * file attribute change: Library/SMS/Attachments/ab/11 68 | * location service stopped: com.apple.locationd.bundle-/System/Library/LocationBundles/WRMLinkSelection.bundle 69 | * file modification: Library/Preferences/com.apple.ImageIO.plist 70 | * file attribute change: Library/Preferences/com.apple.ImageIO.plist 71 | * file birth: Library/Preferences/com.apple.ImageIO.plist 72 | * file modification: Library/Preferences/com.apple.locationd.StatusBarIconManager.plist 73 | * file attribute change: Library/Preferences/com.apple.locationd.StatusBarIconManager.plist 74 | * file birth: Library/Preferences/com.apple.locationd.StatusBarIconManager.plist 75 | 2022-*-* DETECTED Exact match by NetUsage : BackupAgent 76 | 2022-*-* DETECTED Exact match by NetTimestamp : BackupAgent 77 | ``` 78 | 79 | ## What's next? 80 | 81 | The research on the Operation Triangulation is ongoing. For more updates, please check [Securelist](https://securelist.com/trng-2023/) 82 | -------------------------------------------------------------------------------- /legal_notices.txt: -------------------------------------------------------------------------------- 1 | INFORMATION ABOUT THIRD-PARTY CODE 2 | ----------------------------------------------------------------------------- 3 | This file contains information about third-party code which was used in the development of the application. 4 | 5 | Organization of the file: 6 | 7 | * SOFTWARE CODE 8 | * DEVELOPMENT TOOLS 9 | * OTHER INFORMATION 10 | 11 | ============================================================================= 12 | SOFTWARE CODE 13 | Information about third-party software code used in the development of the application. 14 | 15 | colorama 0.4.6 16 | Copyright (c) 2010 Jonathan Hartley 17 | All rights reserved. 18 | ----------------------------------------------------------------------- 19 | == 20 | the BSD License (three-clause) 21 | == 22 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 23 | 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 24 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 25 | 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | ----------------------------------------------------------------------- 28 | 29 | 30 | datetime 3.10 31 | 32 | ----------------------------------------------------------------------- 33 | Distributed under the terms of the Python Software Foundation License v.2 34 | ----------------------------------------------------------------------- 35 | 36 | 37 | getpass 3.10.6 38 | Authors: Piers Lauder (original) 39 | Guido van Rossum (Windows support and cleanup) 40 | Gregory P. Smith (tty support & GetPassWarning) 41 | ----------------------------------------------------------------------- 42 | Distributed under the terms of the Python Software Foundation License v.2 43 | ----------------------------------------------------------------------- 44 | Copyright (c) 2001-2022 Python Software Foundation. All rights reserved. 45 | 46 | Copyright (c) 2000 BeOpen.com. All rights reserved. 47 | 48 | Copyright (c) 1995-2001 Corporation for National Research Initiatives. All rights reserved. 49 | 50 | Copyright (c) 1991-1995 Stichting Mathematisch Centrum. All rights reserved. 51 | 52 | BEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0 53 | ------------------------------------------- 54 | 55 | BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1 56 | 57 | 1. This LICENSE AGREEMENT is between BeOpen.com ("BeOpen"), having an 58 | office at 160 Saratoga Avenue, Santa Clara, CA 95051, and the 59 | Individual or Organization ("Licensee") accessing and otherwise using 60 | this software in source or binary form and its associated 61 | documentation ("the Software"). 62 | 63 | 2. Subject to the terms and conditions of this BeOpen Python License 64 | Agreement, BeOpen hereby grants Licensee a non-exclusive, 65 | royalty-free, world-wide license to reproduce, analyze, test, perform 66 | and/or display publicly, prepare derivative works, distribute, and 67 | otherwise use the Software alone or in any derivative version, 68 | provided, however, that the BeOpen Python License is retained in the 69 | Software, alone or in any derivative version prepared by Licensee. 70 | 71 | 3. BeOpen is making the Software available to Licensee on an "AS IS" 72 | basis. BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR 73 | IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND 74 | DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS 75 | FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT 76 | INFRINGE ANY THIRD PARTY RIGHTS. 77 | 78 | 4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE 79 | SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS 80 | AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY 81 | DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. 82 | 83 | 5. This License Agreement will automatically terminate upon a material 84 | breach of its terms and conditions. 85 | 86 | 6. This License Agreement shall be governed by and interpreted in all 87 | respects by the law of the State of California, excluding conflict of 88 | law provisions. Nothing in this License Agreement shall be deemed to 89 | create any relationship of agency, partnership, or joint venture 90 | between BeOpen and Licensee. This License Agreement does not grant 91 | permission to use BeOpen trademarks or trade names in a trademark 92 | sense to endorse or promote products or services of Licensee, or any 93 | third party. As an exception, the "BeOpen Python" logos available at 94 | http://www.pythonlabs.com/logos.html may be used according to the 95 | permissions granted on that web page. 96 | 97 | 7. By copying, installing or otherwise using the software, Licensee 98 | agrees to be bound by the terms and conditions of this License 99 | Agreement. 100 | 101 | 102 | CNRI LICENSE AGREEMENT FOR PYTHON 1.6.1 103 | --------------------------------------- 104 | 105 | 1. This LICENSE AGREEMENT is between the Corporation for National 106 | Research Initiatives, having an office at 1895 Preston White Drive, 107 | Reston, VA 20191 ("CNRI"), and the Individual or Organization 108 | ("Licensee") accessing and otherwise using Python 1.6.1 software in 109 | source or binary form and its associated documentation. 110 | 111 | 2. Subject to the terms and conditions of this License Agreement, CNRI 112 | hereby grants Licensee a nonexclusive, royalty-free, world-wide 113 | license to reproduce, analyze, test, perform and/or display publicly, 114 | prepare derivative works, distribute, and otherwise use Python 1.6.1 115 | alone or in any derivative version, provided, however, that CNRI's 116 | License Agreement and CNRI's notice of copyright, i.e., "Copyright (c) 117 | 1995-2001 Corporation for National Research Initiatives; All Rights 118 | Reserved" are retained in Python 1.6.1 alone or in any derivative 119 | version prepared by Licensee. Alternately, in lieu of CNRI's License 120 | Agreement, Licensee may substitute the following text (omitting the 121 | quotes): "Python 1.6.1 is made available subject to the terms and 122 | conditions in CNRI's License Agreement. This Agreement together with 123 | Python 1.6.1 may be located on the internet using the following 124 | unique, persistent identifier (known as a handle): 1895.22/1013. This 125 | Agreement may also be obtained from a proxy server on the internet 126 | using the following URL: http://hdl.handle.net/1895.22/1013". 127 | 128 | 3. In the event Licensee prepares a derivative work that is based on 129 | or incorporates Python 1.6.1 or any part thereof, and wants to make 130 | the derivative work available to others as provided herein, then 131 | Licensee hereby agrees to include in any such work a brief summary of 132 | the changes made to Python 1.6.1. 133 | 134 | 4. CNRI is making Python 1.6.1 available to Licensee on an "AS IS" 135 | basis. CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR 136 | IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND 137 | DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS 138 | FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6.1 WILL NOT 139 | INFRINGE ANY THIRD PARTY RIGHTS. 140 | 141 | 5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON 142 | 1.6.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS 143 | A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1, 144 | OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. 145 | 146 | 6. This License Agreement will automatically terminate upon a material 147 | breach of its terms and conditions. 148 | 149 | 7. This License Agreement shall be governed by the federal 150 | intellectual property law of the United States, including without 151 | limitation the federal copyright law, and, to the extent such 152 | U.S. federal law does not apply, by the law of the Commonwealth of 153 | Virginia, excluding Virginia's conflict of law provisions. 154 | Notwithstanding the foregoing, with regard to derivative works based 155 | on Python 1.6.1 that incorporate non-separable material that was 156 | previously distributed under the GNU General Public License (GPL), the 157 | law of the Commonwealth of Virginia shall govern this License 158 | Agreement only as to issues arising under or with respect to 159 | Paragraphs 4, 5, and 7 of this License Agreement. Nothing in this 160 | License Agreement shall be deemed to create any relationship of 161 | agency, partnership, or joint venture between CNRI and Licensee. This 162 | License Agreement does not grant permission to use CNRI trademarks or 163 | trade name in a trademark sense to endorse or promote products or 164 | services of Licensee, or any third party. 165 | 166 | 8. By clicking on the "ACCEPT" button where indicated, or by copying, 167 | installing or otherwise using Python 1.6.1, Licensee agrees to be 168 | bound by the terms and conditions of this License Agreement. 169 | 170 | ACCEPT 171 | 172 | 173 | CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2 174 | -------------------------------------------------- 175 | 176 | Copyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam, 177 | The Netherlands. All rights reserved. 178 | 179 | Permission to use, copy, modify, and distribute this software and its 180 | documentation for any purpose and without fee is hereby granted, 181 | provided that the above copyright notice appear in all copies and that 182 | both that copyright notice and this permission notice appear in 183 | supporting documentation, and that the name of Stichting Mathematisch 184 | Centrum or CWI not be used in advertising or publicity pertaining to 185 | distribution of the software without specific, written prior 186 | permission. 187 | 188 | STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO 189 | THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 190 | FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE 191 | FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 192 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 193 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT 194 | OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 195 | 196 | ZERO-CLAUSE BSD LICENSE FOR CODE IN THE PYTHON DOCUMENTATION 197 | ---------------------------------------------------------------------- 198 | 199 | Permission to use, copy, modify, and/or distribute this software for any 200 | purpose with or without fee is hereby granted. 201 | 202 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 203 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 204 | AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 205 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 206 | LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 207 | OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 208 | PERFORMANCE OF THIS SOFTWARE. 209 | 210 | hashlib 3.10.6 211 | Copyright (C) 2005-2010 Gregory P. Smith (greg@krypto.org) 212 | ----------------------------------------------------------------------- 213 | Distributed under the terms of the Python Software Foundation License v.2 214 | ----------------------------------------------------------------------- 215 | BEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0 216 | ------------------------------------------- 217 | 218 | BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1 219 | 220 | 1. This LICENSE AGREEMENT is between BeOpen.com ("BeOpen"), having an 221 | office at 160 Saratoga Avenue, Santa Clara, CA 95051, and the 222 | Individual or Organization ("Licensee") accessing and otherwise using 223 | this software in source or binary form and its associated 224 | documentation ("the Software"). 225 | 226 | 2. Subject to the terms and conditions of this BeOpen Python License 227 | Agreement, BeOpen hereby grants Licensee a non-exclusive, 228 | royalty-free, world-wide license to reproduce, analyze, test, perform 229 | and/or display publicly, prepare derivative works, distribute, and 230 | otherwise use the Software alone or in any derivative version, 231 | provided, however, that the BeOpen Python License is retained in the 232 | Software, alone or in any derivative version prepared by Licensee. 233 | 234 | 3. BeOpen is making the Software available to Licensee on an "AS IS" 235 | basis. BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR 236 | IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND 237 | DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS 238 | FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT 239 | INFRINGE ANY THIRD PARTY RIGHTS. 240 | 241 | 4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE 242 | SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS 243 | AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY 244 | DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. 245 | 246 | 5. This License Agreement will automatically terminate upon a material 247 | breach of its terms and conditions. 248 | 249 | 6. This License Agreement shall be governed by and interpreted in all 250 | respects by the law of the State of California, excluding conflict of 251 | law provisions. Nothing in this License Agreement shall be deemed to 252 | create any relationship of agency, partnership, or joint venture 253 | between BeOpen and Licensee. This License Agreement does not grant 254 | permission to use BeOpen trademarks or trade names in a trademark 255 | sense to endorse or promote products or services of Licensee, or any 256 | third party. As an exception, the "BeOpen Python" logos available at 257 | http://www.pythonlabs.com/logos.html may be used according to the 258 | permissions granted on that web page. 259 | 260 | 7. By copying, installing or otherwise using the software, Licensee 261 | agrees to be bound by the terms and conditions of this License 262 | Agreement. 263 | 264 | 265 | CNRI LICENSE AGREEMENT FOR PYTHON 1.6.1 266 | --------------------------------------- 267 | 268 | 1. This LICENSE AGREEMENT is between the Corporation for National 269 | Research Initiatives, having an office at 1895 Preston White Drive, 270 | Reston, VA 20191 ("CNRI"), and the Individual or Organization 271 | ("Licensee") accessing and otherwise using Python 1.6.1 software in 272 | source or binary form and its associated documentation. 273 | 274 | 2. Subject to the terms and conditions of this License Agreement, CNRI 275 | hereby grants Licensee a nonexclusive, royalty-free, world-wide 276 | license to reproduce, analyze, test, perform and/or display publicly, 277 | prepare derivative works, distribute, and otherwise use Python 1.6.1 278 | alone or in any derivative version, provided, however, that CNRI's 279 | License Agreement and CNRI's notice of copyright, i.e., "Copyright (c) 280 | 1995-2001 Corporation for National Research Initiatives; All Rights 281 | Reserved" are retained in Python 1.6.1 alone or in any derivative 282 | version prepared by Licensee. Alternately, in lieu of CNRI's License 283 | Agreement, Licensee may substitute the following text (omitting the 284 | quotes): "Python 1.6.1 is made available subject to the terms and 285 | conditions in CNRI's License Agreement. This Agreement together with 286 | Python 1.6.1 may be located on the internet using the following 287 | unique, persistent identifier (known as a handle): 1895.22/1013. This 288 | Agreement may also be obtained from a proxy server on the internet 289 | using the following URL: http://hdl.handle.net/1895.22/1013". 290 | 291 | 3. In the event Licensee prepares a derivative work that is based on 292 | or incorporates Python 1.6.1 or any part thereof, and wants to make 293 | the derivative work available to others as provided herein, then 294 | Licensee hereby agrees to include in any such work a brief summary of 295 | the changes made to Python 1.6.1. 296 | 297 | 4. CNRI is making Python 1.6.1 available to Licensee on an "AS IS" 298 | basis. CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR 299 | IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND 300 | DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS 301 | FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6.1 WILL NOT 302 | INFRINGE ANY THIRD PARTY RIGHTS. 303 | 304 | 5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON 305 | 1.6.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS 306 | A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1, 307 | OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. 308 | 309 | 6. This License Agreement will automatically terminate upon a material 310 | breach of its terms and conditions. 311 | 312 | 7. This License Agreement shall be governed by the federal 313 | intellectual property law of the United States, including without 314 | limitation the federal copyright law, and, to the extent such 315 | U.S. federal law does not apply, by the law of the Commonwealth of 316 | Virginia, excluding Virginia's conflict of law provisions. 317 | Notwithstanding the foregoing, with regard to derivative works based 318 | on Python 1.6.1 that incorporate non-separable material that was 319 | previously distributed under the GNU General Public License (GPL), the 320 | law of the Commonwealth of Virginia shall govern this License 321 | Agreement only as to issues arising under or with respect to 322 | Paragraphs 4, 5, and 7 of this License Agreement. Nothing in this 323 | License Agreement shall be deemed to create any relationship of 324 | agency, partnership, or joint venture between CNRI and Licensee. This 325 | License Agreement does not grant permission to use CNRI trademarks or 326 | trade name in a trademark sense to endorse or promote products or 327 | services of Licensee, or any third party. 328 | 329 | 8. By clicking on the "ACCEPT" button where indicated, or by copying, 330 | installing or otherwise using Python 1.6.1, Licensee agrees to be 331 | bound by the terms and conditions of this License Agreement. 332 | 333 | ACCEPT 334 | 335 | 336 | CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2 337 | -------------------------------------------------- 338 | 339 | Copyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam, 340 | The Netherlands. All rights reserved. 341 | 342 | Permission to use, copy, modify, and distribute this software and its 343 | documentation for any purpose and without fee is hereby granted, 344 | provided that the above copyright notice appear in all copies and that 345 | both that copyright notice and this permission notice appear in 346 | supporting documentation, and that the name of Stichting Mathematisch 347 | Centrum or CWI not be used in advertising or publicity pertaining to 348 | distribution of the software without specific, written prior 349 | permission. 350 | 351 | STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO 352 | THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 353 | FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE 354 | FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 355 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 356 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT 357 | OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 358 | 359 | ZERO-CLAUSE BSD LICENSE FOR CODE IN THE PYTHON DOCUMENTATION 360 | ---------------------------------------------------------------------- 361 | 362 | Permission to use, copy, modify, and/or distribute this software for any 363 | purpose with or without fee is hereby granted. 364 | 365 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 366 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 367 | AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 368 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 369 | LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 370 | OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 371 | PERFORMANCE OF THIS SOFTWARE. 372 | 373 | os.path 3.10.6 374 | 375 | ----------------------------------------------------------------------- 376 | Distributed under the terms of the Python Software Foundation License v.2 377 | ----------------------------------------------------------------------- 378 | 379 | 380 | plistlib 3.10.6 381 | 382 | ----------------------------------------------------------------------- 383 | Distributed under the terms of the Python Software Foundation License v.2 384 | ----------------------------------------------------------------------- 385 | 386 | 387 | struct 3.10.6 388 | 389 | ----------------------------------------------------------------------- 390 | Distributed under the terms of the Python Software Foundation License v.2 391 | ----------------------------------------------------------------------- 392 | 393 | 394 | sys 3.10 395 | 396 | ----------------------------------------------------------------------- 397 | Distributed under the terms of the Python Software Foundation License v.2 398 | ----------------------------------------------------------------------- 399 | 400 | 401 | tempfile 3.10.6 402 | 403 | ----------------------------------------------------------------------- 404 | Distributed under the terms of the Python Software Foundation License v.2 405 | ----------------------------------------------------------------------- 406 | 407 | 408 | PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2 409 | 1. This LICENSE AGREEMENT is between the Python Software Foundation ("PSF"), and the Individual or Organization ("Licensee") accessing and otherwise using this software ("Python") in source or binary form and its associated documentation. 410 | 2. Subject to the terms and conditions of this License Agreement, PSF hereby grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use Python alone or in any derivative version, provided, however, that PSF's License Agreement and PSF's notice of copyright, i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Python Software Foundation; All Rights Reserved" are retained in Python alone or in any derivative version prepared by Licensee. 411 | 3. In the event Licensee prepares a derivative work that is based on or incorporates Python or any part thereof, and wants to make the derivative work available to others as provided herein, then Licensee hereby agrees to include in any such work a brief summary of the changes made to Python. 412 | 4. PSF is making Python available to Licensee on an "AS IS" basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT INFRINGE ANY THIRD PARTY RIGHTS. 413 | 5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. 414 | 6. This License Agreement will automatically terminate upon a material breach of its terms and conditions. 415 | 7. Nothing in this License Agreement shall be deemed to create any relationship of agency, partnership, or joint venture between PSF and Licensee. This License Agreement does not grant permission to use PSF trademarks or trade name in a trademark sense to endorse or promote products or services of Licensee, or any third party. 416 | 8. By copying, installing or otherwise using Python, Licensee agrees to be bound by the terms and conditions of this License Agreement. 417 | 418 | cpython/Lib/sqlite3 3.10.6 419 | Copyright (C) 2005 Gerhard Häring 420 | ----------------------------------------------------------------------- 421 | Distributed under the terms of the The License Agreement 422 | ----------------------------------------------------------------------- 423 | This file is part of pysqlite. 424 | 425 | This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. 426 | 427 | Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 428 | 429 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 430 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 431 | 3. This notice may not be removed or altered from any source distribution. 432 | 433 | pycryptodome 3.17 434 | 435 | ----------------------------------------------------------------------- 436 | Distributed under the terms of the The License Agreement 437 | ----------------------------------------------------------------------- 438 | The source code in PyCryptodome is partially in the public domain 439 | and partially released under the BSD 2-Clause license. 440 | 441 | Public domain 442 | ============= 443 | 444 | All code originating from PyCrypto is free and unencumbered software 445 | released into the public domain. 446 | 447 | Anyone is free to copy, modify, publish, use, compile, sell, or 448 | distribute this software, either in source code form or as a compiled 449 | binary, for any purpose, commercial or non-commercial, and by any 450 | means. 451 | 452 | In jurisdictions that recognize copyright laws, the author or authors 453 | of this software dedicate any and all copyright interest in the 454 | software to the public domain. We make this dedication for the benefit 455 | of the public at large and to the detriment of our heirs and 456 | successors. We intend this dedication to be an overt act of 457 | relinquishment in perpetuity of all present and future rights to this 458 | software under copyright law. 459 | 460 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 461 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 462 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 463 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 464 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 465 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 466 | OTHER DEALINGS IN THE SOFTWARE. 467 | 468 | For more information, please refer to 469 | 470 | BSD license 471 | =========== 472 | 473 | All direct contributions to PyCryptodome are released under the following 474 | license. The copyright of each piece belongs to the respective author. 475 | 476 | Redistribution and use in source and binary forms, with or without 477 | modification, are permitted provided that the following conditions are met: 478 | 479 | 1. Redistributions of source code must retain the above copyright notice, 480 | this list of conditions and the following disclaimer. 481 | 482 | 2. Redistributions in binary form must reproduce the above copyright notice, 483 | this list of conditions and the following disclaimer in the documentation 484 | and/or other materials provided with the distribution. 485 | 486 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 487 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 488 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 489 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 490 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 491 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 492 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 493 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 494 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 495 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 496 | 497 | 498 | 499 | 500 | 501 | ============================================================================= 502 | DEVELOPMENT TOOLS 503 | Information about third-party development tools used in the development of the application. 504 | 505 | Pyinstaller 5.11.0 506 | Copyright (c) 2010-2023, PyInstaller Development Team 507 | Copyright (c) 2005-2009, Giovanni Bajo 508 | Based on previous work under copyright (c) 2002 McMillan Enterprises, Inc. 509 | ----------------------------------------------------------------------- 510 | GNU GENERAL PUBLIC LICENSE 511 | Version 2, June 1991 512 | Copyright (C) 1989, 1991 Free Software Foundation, Inc. 513 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA 514 | Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. 515 | Preamble 516 | The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. 517 | When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. 518 | To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. 519 | For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. 520 | We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. 521 | Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. 522 | Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. 523 | The precise terms and conditions for copying, distribution and modification follow. 524 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 525 | 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". 526 | Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 527 | 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. 528 | You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 529 | 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: 530 | a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. 531 | b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. 532 | c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) 533 | These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. 534 | Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. 535 | In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 536 | 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: 537 | a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, 538 | b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, 539 | c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) 540 | The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. 541 | If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 542 | 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 543 | 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 544 | 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 545 | 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. 546 | If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. 547 | It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. 548 | This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 549 | 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 550 | 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. 551 | Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 552 | 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. 553 | NO WARRANTY 554 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 555 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 556 | END OF TERMS AND CONDITIONS 557 | How to Apply These Terms to Your New Programs 558 | If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. 559 | To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. 560 | one line to give the program's name and an idea of what it does. 561 | Copyright (C) yyyy name of author 562 | 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. 563 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 564 | You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 565 | Also add information on how to contact you by electronic and paper mail. 566 | If the program is interactive, make it output a short notice like this when it starts in an interactive mode: 567 | Gnomovision version 69, Copyright (C) year name of author 568 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome 569 | to redistribute it under certain conditions; type `show c' 570 | for details. 571 | The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. 572 | You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: 573 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' 574 | (which makes passes at compilers) written 575 | by James Hacker. 576 | signature of Ty Coon, 1 April 1989 577 | Ty Coon, President of Vice 578 | This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. 579 | ----------------------------------------------------------------------- 580 | PyInstaller is distributed under a dual-licensing scheme using both the GPL 2.0 License, with an exception that allows you to use it to build commercial products - listed below - and the Apache License, version 2.0, which only applies to a certain few files. 581 | 582 | Bootloader Exception 583 | -------------------- 584 | 585 | In addition to the permissions in the GNU General Public License, the 586 | authors give you unlimited permission to link or embed compiled bootloader 587 | and related files into combinations with other programs, and to distribute 588 | those combinations without any restriction coming from the use of those 589 | files. (The General Public License restrictions do apply in other respects; 590 | for example, they cover modification of the files, and distribution when 591 | not linked into a combined executable.) 592 | 593 | Run-time Hooks 594 | ----------------------------------------------------------------------------- 595 | Copyright (c) 2005-2023, PyInstaller Development Team. 596 | 597 | Licensed under the Apache License, Version 2.0 (the "License"); 598 | you may not use this file except in compliance with the License. 599 | 600 | ----------------------------------------------------------------------------- 601 | ================================ 602 | Apache License 2.0 603 | ================================ 604 | 605 | Apache License 606 | Version 2.0, January 2004 607 | http://www.apache.org/licenses/ 608 | 609 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 610 | 611 | 1. Definitions. 612 | 613 | "License" shall mean the terms and conditions for use, reproduction, 614 | and distribution as defined by Sections 1 through 9 of this document. 615 | 616 | "Licensor" shall mean the copyright owner or entity authorized by 617 | the copyright owner that is granting the License. 618 | 619 | "Legal Entity" shall mean the union of the acting entity and all 620 | other entities that control, are controlled by, or are under common 621 | control with that entity. For the purposes of this definition, 622 | "control" means (i) the power, direct or indirect, to cause the 623 | direction or management of such entity, whether by contract or 624 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 625 | outstanding shares, or (iii) beneficial ownership of such entity. 626 | 627 | "You" (or "Your") shall mean an individual or Legal Entity 628 | exercising permissions granted by this License. 629 | 630 | "Source" form shall mean the preferred form for making modifications, 631 | including but not limited to software source code, documentation 632 | source, and configuration files. 633 | 634 | "Object" form shall mean any form resulting from mechanical 635 | transformation or translation of a Source form, including but 636 | not limited to compiled object code, generated documentation, 637 | and conversions to other media types. 638 | 639 | "Work" shall mean the work of authorship, whether in Source or 640 | Object form, made available under the License, as indicated by a 641 | copyright notice that is included in or attached to the work 642 | (an example is provided in the Appendix below). 643 | 644 | "Derivative Works" shall mean any work, whether in Source or Object 645 | form, that is based on (or derived from) the Work and for which the 646 | editorial revisions, annotations, elaborations, or other modifications 647 | represent, as a whole, an original work of authorship. For the purposes 648 | of this License, Derivative Works shall not include works that remain 649 | separable from, or merely link (or bind by name) to the interfaces of, 650 | the Work and Derivative Works thereof. 651 | 652 | "Contribution" shall mean any work of authorship, including 653 | the original version of the Work and any modifications or additions 654 | to that Work or Derivative Works thereof, that is intentionally 655 | submitted to Licensor for inclusion in the Work by the copyright owner 656 | or by an individual or Legal Entity authorized to submit on behalf of 657 | the copyright owner. For the purposes of this definition, "submitted" 658 | means any form of electronic, verbal, or written communication sent 659 | to the Licensor or its representatives, including but not limited to 660 | communication on electronic mailing lists, source code control systems, 661 | and issue tracking systems that are managed by, or on behalf of, the 662 | Licensor for the purpose of discussing and improving the Work, but 663 | excluding communication that is conspicuously marked or otherwise 664 | designated in writing by the copyright owner as "Not a Contribution." 665 | 666 | "Contributor" shall mean Licensor and any individual or Legal Entity 667 | on behalf of whom a Contribution has been received by Licensor and 668 | subsequently incorporated within the Work. 669 | 670 | 2. Grant of Copyright License. Subject to the terms and conditions of 671 | this License, each Contributor hereby grants to You a perpetual, 672 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 673 | copyright license to reproduce, prepare Derivative Works of, 674 | publicly display, publicly perform, sublicense, and distribute the 675 | Work and such Derivative Works in Source or Object form. 676 | 677 | 3. Grant of Patent License. Subject to the terms and conditions of 678 | this License, each Contributor hereby grants to You a perpetual, 679 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 680 | (except as stated in this section) patent license to make, have made, 681 | use, offer to sell, sell, import, and otherwise transfer the Work, 682 | where such license applies only to those patent claims licensable 683 | by such Contributor that are necessarily infringed by their 684 | Contribution(s) alone or by combination of their Contribution(s) 685 | with the Work to which such Contribution(s) was submitted. If You 686 | institute patent litigation against any entity (including a 687 | cross-claim or counterclaim in a lawsuit) alleging that the Work 688 | or a Contribution incorporated within the Work constitutes direct 689 | or contributory patent infringement, then any patent licenses 690 | granted to You under this License for that Work shall terminate 691 | as of the date such litigation is filed. 692 | 693 | 4. Redistribution. You may reproduce and distribute copies of the 694 | Work or Derivative Works thereof in any medium, with or without 695 | modifications, and in Source or Object form, provided that You 696 | meet the following conditions: 697 | 698 | (a) You must give any other recipients of the Work or 699 | Derivative Works a copy of this License; and 700 | 701 | (b) You must cause any modified files to carry prominent notices 702 | stating that You changed the files; and 703 | 704 | (c) You must retain, in the Source form of any Derivative Works 705 | that You distribute, all copyright, patent, trademark, and 706 | attribution notices from the Source form of the Work, 707 | excluding those notices that do not pertain to any part of 708 | the Derivative Works; and 709 | 710 | (d) If the Work includes a "NOTICE" text file as part of its 711 | distribution, then any Derivative Works that You distribute must 712 | include a readable copy of the attribution notices contained 713 | within such NOTICE file, excluding those notices that do not 714 | pertain to any part of the Derivative Works, in at least one 715 | of the following places: within a NOTICE text file distributed 716 | as part of the Derivative Works; within the Source form or 717 | documentation, if provided along with the Derivative Works; or, 718 | within a display generated by the Derivative Works, if and 719 | wherever such third-party notices normally appear. The contents 720 | of the NOTICE file are for informational purposes only and 721 | do not modify the License. You may add Your own attribution 722 | notices within Derivative Works that You distribute, alongside 723 | or as an addendum to the NOTICE text from the Work, provided 724 | that such additional attribution notices cannot be construed 725 | as modifying the License. 726 | 727 | You may add Your own copyright statement to Your modifications and 728 | may provide additional or different license terms and conditions 729 | for use, reproduction, or distribution of Your modifications, or 730 | for any such Derivative Works as a whole, provided Your use, 731 | reproduction, and distribution of the Work otherwise complies with 732 | the conditions stated in this License. 733 | 734 | 5. Submission of Contributions. Unless You explicitly state otherwise, 735 | any Contribution intentionally submitted for inclusion in the Work 736 | by You to the Licensor shall be under the terms and conditions of 737 | this License, without any additional terms or conditions. 738 | Notwithstanding the above, nothing herein shall supersede or modify 739 | the terms of any separate license agreement you may have executed 740 | with Licensor regarding such Contributions. 741 | 742 | 6. Trademarks. This License does not grant permission to use the trade 743 | names, trademarks, service marks, or product names of the Licensor, 744 | except as required for reasonable and customary use in describing the 745 | origin of the Work and reproducing the content of the NOTICE file. 746 | 747 | 7. Disclaimer of Warranty. Unless required by applicable law or 748 | agreed to in writing, Licensor provides the Work (and each 749 | Contributor provides its Contributions) on an "AS IS" BASIS, 750 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 751 | implied, including, without limitation, any warranties or conditions 752 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 753 | PARTICULAR PURPOSE. You are solely responsible for determining the 754 | appropriateness of using or redistributing the Work and assume any 755 | risks associated with Your exercise of permissions under this License. 756 | 757 | 8. Limitation of Liability. In no event and under no legal theory, 758 | whether in tort (including negligence), contract, or otherwise, 759 | unless required by applicable law (such as deliberate and grossly 760 | negligent acts) or agreed to in writing, shall any Contributor be 761 | liable to You for damages, including any direct, indirect, special, 762 | incidental, or consequential damages of any character arising as a 763 | result of this License or out of the use or inability to use the 764 | Work (including but not limited to damages for loss of goodwill, 765 | work stoppage, computer failure or malfunction, or any and all 766 | other commercial damages or losses), even if such Contributor 767 | has been advised of the possibility of such damages. 768 | 769 | 9. Accepting Warranty or Additional Liability. While redistributing 770 | the Work or Derivative Works thereof, You may choose to offer, 771 | and charge a fee for, acceptance of support, warranty, indemnity, 772 | or other liability obligations and/or rights consistent with this 773 | License. However, in accepting such obligations, You may act only 774 | on Your own behalf and on Your sole responsibility, not on behalf 775 | of any other Contributor, and only if You agree to indemnify, 776 | defend, and hold each Contributor harmless for any liability 777 | incurred by, or claims asserted against, such Contributor by reason 778 | of your accepting any such warranty or additional liability. 779 | 780 | END OF TERMS AND CONDITIONS 781 | 782 | APPENDIX: How to apply the Apache License to your work. 783 | 784 | To apply the Apache License to your work, attach the following 785 | boilerplate notice, with the fields enclosed by brackets "[]" 786 | replaced with your own identifying information. (Don't include 787 | the brackets!) The text should be enclosed in the appropriate 788 | comment syntax for the file format. We also recommend that a 789 | file or class name and description of purpose be included on the 790 | same "printed page" as the copyright notice for easier 791 | identification within third-party archives. 792 | 793 | Copyright [yyyy] [name of copyright owner] 794 | 795 | Licensed under the Apache License, Version 2.0 (the "License"); 796 | you may not use this file except in compliance with the License. 797 | You may obtain a copy of the License at 798 | 799 | http://www.apache.org/licenses/LICENSE-2.0 800 | 801 | Unless required by applicable law or agreed to in writing, software 802 | distributed under the License is distributed on an "AS IS" BASIS, 803 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 804 | See the License for the specific language governing permissions and 805 | limitations under the License. 806 | 807 | The PyInstaller.isolated submodule 808 | ./PyInstaller/isolated/ 809 | ./tests/unit/test_isolation.py 810 | ---------------------------------- 811 | 812 | =========== 813 | MIT License 814 | =========== 815 | 816 | Permission is hereby granted, free of charge, to any person obtaining a copy 817 | of this software and associated documentation files (the "Software"), to deal 818 | in the Software without restriction, including without limitation the rights 819 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 820 | copies of the Software, and to permit persons to whom the Software is 821 | furnished to do so, subject to the following conditions: 822 | 823 | The above copyright notice and this permission notice shall be included in all 824 | copies or substantial portions of the Software. 825 | 826 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 827 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 828 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 829 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 830 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 831 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 832 | SOFTWARE. 833 | 834 | 835 | 836 | ============================================================================= 837 | OTHER INFORMATION 838 | 839 | The Software may include some software programs that are licensed (or sublicensed) to the user under the GNU General Public License (GPL) or other similar free software licenses which, among other rights, permit the user to copy, modify and redistribute certain programs, or portions thereof, and have access to the source code ("Open Source Software"). If such licenses require that for any software, which is distributed to someone in an executable binary format, that the source code also be made available to those users, then the source code should be made available by sending the request to source@kaspersky.com or the source code is supplied with the Software. -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = ["setuptools>=42", "colorama==0.4.6", "pycryptodome==3.17"] 3 | build-backend = "setuptools.build_meta" 4 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | setuptools>=42 2 | colorama==0.4.6 3 | pycryptodome==3.17 4 | -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | [metadata] 2 | name = triangle_check 3 | version = 1.1 4 | author = Kaspersky Lab 5 | author_email = triangulation@kaspersky.com 6 | description = Triangle Check: scan iTunes backups for traces of compromise by Operation Triangulation 7 | long_description = file: README.md 8 | long_description_content_type = text/markdown 9 | url = https://github.com/KasperskyLab/triangle_check 10 | license_files = License.txt 11 | legal_notices.txt 12 | CLA.md 13 | project_urls = 14 | Bug Tracker = https://github.com/KasperskyLab/triangle_check/issues 15 | classifiers = 16 | Programming Language :: Python :: 3 17 | License :: OSI Approved :: MIT License 18 | Operating System :: OS Independent 19 | 20 | [options] 21 | package_dir = 22 | = . 23 | packages = find: 24 | python_requires = >=3.8 25 | install_requires = 26 | setuptools>=42 27 | colorama==0.4.6 28 | pycryptodome==3.17 29 | 30 | [options.packages.find] 31 | where = . 32 | 33 | [options.entry_points] 34 | console_scripts = 35 | triangle_check = triangle_check:__main__.main 36 | -------------------------------------------------------------------------------- /triangle_check.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # © 2023 AO Kaspersky Lab. All Rights Reserved. 3 | # Checks iTunes backups for traces of compromise by Operation Triangulation 4 | 5 | import triangle_check.__main__ as m 6 | 7 | if __name__ == "__main__": 8 | m.main() 9 | 10 | -------------------------------------------------------------------------------- /triangle_check.spec: -------------------------------------------------------------------------------- 1 | # -*- mode: python ; coding: utf-8 -*- 2 | 3 | 4 | block_cipher = None 5 | 6 | 7 | a = Analysis( 8 | ['triangle_check.py'], 9 | pathex=[], 10 | binaries=[], 11 | datas=[], 12 | hiddenimports=[], 13 | hookspath=[], 14 | hooksconfig={}, 15 | runtime_hooks=[], 16 | excludes=[], 17 | win_no_prefer_redirects=False, 18 | win_private_assemblies=False, 19 | cipher=block_cipher, 20 | noarchive=False, 21 | ) 22 | pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher) 23 | 24 | exe = EXE( 25 | pyz, 26 | a.scripts, 27 | [], 28 | exclude_binaries=True, 29 | name='triangle_check', 30 | debug=False, 31 | bootloader_ignore_signals=False, 32 | strip=False, 33 | upx=True, 34 | console=True, 35 | disable_windowed_traceback=False, 36 | argv_emulation=False, 37 | target_arch=None, 38 | codesign_identity=None, 39 | entitlements_file=None, 40 | ) 41 | coll = COLLECT( 42 | exe, 43 | a.binaries, 44 | a.zipfiles, 45 | a.datas, 46 | strip=False, 47 | upx=True, 48 | upx_exclude=[], 49 | name='triangle_check', 50 | ) 51 | -------------------------------------------------------------------------------- /triangle_check/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # © 2023 AO Kaspersky Lab. All Rights Reserved. 3 | # Checks iTunes backups for traces of compromise by Operation Triangulation 4 | 5 | import sqlite3 6 | import plistlib 7 | import tempfile 8 | import hashlib 9 | import struct 10 | from Crypto.Cipher import AES 11 | from Crypto.Util.Padding import unpad 12 | import os.path 13 | from datetime import timezone 14 | 15 | cocoa_delta = 978307200.0 # 2001 - 1970, for adjusting to UNIX timestamps 16 | 17 | def AESUnwrap(K, encrypted): 18 | C = [] 19 | for i in range(len(encrypted)//8): 20 | C.append(struct.unpack(">Q", encrypted[i*8:i*8+8])[0]) 21 | n = len(C) - 1 22 | 23 | # 1) Initialize variables. 24 | R = [0] 25 | A = C[0] 26 | 27 | for c in C[1:]: 28 | R.append(c) 29 | # 2) Compute intermediate values. 30 | for j in range(5, -1, -1): 31 | for i in range(n, 0, -1): 32 | buf = struct.pack(">2Q", A ^ (n*j+i), R[i]) 33 | B = AES.new(K, AES.MODE_ECB).decrypt(buf) 34 | A, R[i] = struct.unpack(">2Q", B) 35 | 36 | # A[0] = IV = A6A6A6A6A6A6A6A6 37 | if A != 0xa6a6a6a6a6a6a6a6: 38 | raise RuntimeError(f'Decrypt match fail, please check if the password is correct') 39 | 40 | # 3) Output results. 41 | P = b"" 42 | for r in R[1:]: 43 | P += struct.pack(">Q", r) 44 | 45 | return P 46 | 47 | class IOSBackupChecker: 48 | def __init__(self): 49 | self.temp_files = [] 50 | 51 | def __del__(self): 52 | for fname in self.temp_files: 53 | os.unlink(fname) 54 | self.temp_files = [] 55 | 56 | def decrypt_with_key(self, fname, key): 57 | iv=b"\x00" * 16 58 | with open(fname, 'rb') as f: 59 | handle, out_fname = tempfile.mkstemp() 60 | outf = os.fdopen(handle, 'wb') 61 | outf.write(unpad(AES.new(key, AES.MODE_CBC, iv).decrypt(f.read()), AES.block_size)) 62 | outf.close() 63 | self.temp_files.append(out_fname) 64 | return out_fname 65 | 66 | def decrypt_with_manifest(self, path, domain): 67 | cur = self.fsdb.cursor() 68 | cur.execute(f"SELECT fileID, file FROM Files WHERE relativePath = '{path}' AND domain = '{domain}'") 69 | fileID, plist = cur.fetchone() 70 | fs_info = plistlib.loads(plist) 71 | fs_objects = fs_info['$objects'] 72 | fs_stat = fs_objects[1] 73 | path = os.path.join(self.dir, fileID[0:2], fileID) 74 | if self.encrypted: 75 | key = AESUnwrap(self.class_keys[int(fs_stat['ProtectionClass'])]['key'], fs_objects[fs_stat['EncryptionKey'].data]['NS.data'][4:]) 76 | path = self.decrypt_with_key(path, key) 77 | return path 78 | 79 | def append_map(self, timestamp, item, map): 80 | if not timestamp in map: 81 | map[timestamp] = [] 82 | map[timestamp].append(item) 83 | 84 | def append_timeline(self,timestamp, item): 85 | self.append_map(timestamp, item, self.timeline) 86 | 87 | def append_detection(self,timestamp, item): 88 | self.append_map(timestamp, item, self.detections) 89 | 90 | def run_heuristics(self, event_window): 91 | sms_attachment_directories = {} 92 | timestamp_start = event_window[0][0] 93 | 94 | event_classes = set() 95 | 96 | for (event_timestamp, event) in event_window: 97 | event_type = event[0] 98 | if event_type in ['M', 'C', 'B']: # filesystem events 99 | path = event[1] 100 | if path.startswith('Library/SMS/Attachments/'): 101 | #Library/SMS/Attachments/00/00 - good 102 | #Library/SMS/Attachments/00 - also good 103 | ##Library/SMS/Attachments/00/00/something else - legitimate attachment, bail out 104 | num_slashes = path.count('/') 105 | if num_slashes == 3 or num_slashes == 4: 106 | sms_attachment_directories[path] = sms_attachment_directories.get(path, {}) 107 | sms_attachment_directories[path][event_type] = True 108 | else: 109 | return # False positive! 110 | else: # suspicious locations 111 | event_classes.add('file') 112 | elif event_type in ['NetTimestamp', 'NetUsage', 'NetFirst', 'NetTimestamp2']: 113 | event_classes.add('net') 114 | elif event_type == 'LocationTimeStopped': 115 | event_classes.add('location') 116 | 117 | # Now, for each directory, check that both have 'M' and 'C' 118 | for k, v in sms_attachment_directories.items(): 119 | if (not 'M' in v) or (not 'C' in v): 120 | return False 121 | 122 | if (len(sms_attachment_directories) > 0): 123 | event_classes.add('sms') 124 | 125 | detection_threshold = 2 126 | 127 | if len(event_classes) >= detection_threshold: 128 | self.append_detection(timestamp_start, ('heuristics', event_window)) 129 | 130 | def scan_dir(self, backup_dir, backup_password, ask_password_func): 131 | self.dir = backup_dir 132 | 133 | with open(os.path.join(self.dir, 'Manifest.plist'), 'rb') as f: 134 | self.plist = plistlib.load(f) 135 | self.encrypted = self.plist['IsEncrypted'] 136 | 137 | temp_files = [] 138 | manifest_db_path = os.path.join(self.dir, "Manifest.db") 139 | with open(manifest_db_path, 'rb') as f: 140 | if f.read(4) == b'SQLi': 141 | self.encrypted = False # Already decrypted 142 | 143 | if self.encrypted and (backup_password is None): 144 | backup_password = ask_password_func() 145 | 146 | self.timeline = {} 147 | self.detections = {} 148 | 149 | if self.encrypted: 150 | key_bag = self.plist['BackupKeyBag'] 151 | 152 | keys = {} 153 | offset = 0 154 | ctx = None 155 | self.class_keys = {} 156 | while offset + 8 <= len(key_bag) : 157 | block_id = key_bag[offset:offset+4] 158 | block_len = struct.unpack(">L", key_bag[offset+4:offset+8])[0] 159 | #print(f'{block_id} {block_len} {key_bag[offset+8:offset+8+block_len]}') 160 | key_data = key_bag[offset+8:offset+8+block_len] 161 | keys[block_id] = key_data 162 | if block_id == b'UUID': 163 | ctx = {} 164 | elif block_id == b'CLAS': 165 | ctx['class'] = struct.unpack(">L", key_data)[0] 166 | elif block_id == b'WRAP': 167 | ctx['wrap'] = struct.unpack(">L", key_data)[0] 168 | elif block_id == b'WPKY': 169 | ctx['key'] = key_data 170 | if ctx['class'] in self.class_keys: 171 | raise RuntimeError(f'Duplicate class key {ctx["class"]}') 172 | self.class_keys[ctx['class']] = ctx 173 | ctx = {} 174 | offset += 8 + block_len 175 | 176 | product_ver = self.plist['Lockdown']['ProductVersion'].split('.') 177 | major, minor = int(product_ver[0]), int(product_ver[1]) 178 | 179 | material = backup_password 180 | if major > 10 or (major == 10 and minor > 2): 181 | material = hashlib.pbkdf2_hmac('sha256', backup_password, keys[b'DPSL'], struct.unpack(">L", keys[b'DPIC'])[0], 32) 182 | key = hashlib.pbkdf2_hmac('sha1', material, keys[b'SALT'], struct.unpack(">L", keys[b'ITER'])[0], 32) 183 | 184 | for k, v in self.class_keys.items(): 185 | v['key'] = AESUnwrap(key, v['key']) 186 | self.class_keys[k] = v 187 | 188 | manifest_key = self.plist['ManifestKey'] 189 | manifest_key_class = struct.unpack(" time_delta_max: 271 | event_window = event_window[:j] 272 | break 273 | 274 | self.run_heuristics(event_window) 275 | 276 | return self.detections 277 | 278 | def detection_to_string(self, detection): 279 | if detection[0] == 'exact': 280 | return f'Exact match by {detection[1]} : {detection[2]}' 281 | elif detection[0] == 'heuristics': 282 | str = f'Suspicious combination of events: ' 283 | for timestamp, event in detection[1]: 284 | event_type = event[0] 285 | if event_type == 'M': 286 | str += f'\n * file modification: {event[1]}' 287 | elif event_type == 'C': 288 | str += f'\n * file attribute change: {event[1]}' 289 | elif event_type == 'B': 290 | str += f'\n * file birth: {event[1]}' 291 | elif event_type == 'LocationTimeStopped': 292 | str += f'\n * location service stopped: {event[1]}' 293 | elif event_type in ['NetTimestamp', 'NetUsage', 'NetFirst', 'NetTimestamp2']: 294 | str += f'\n * traffic by process {event[1]}' 295 | else: 296 | raise RuntimeError(f'Unknown detection event {event_type}') 297 | return str 298 | 299 | -------------------------------------------------------------------------------- /triangle_check/__main__.py: -------------------------------------------------------------------------------- 1 | from colorama import Fore, Style 2 | import colorama 3 | import sys 4 | import getpass 5 | from . import IOSBackupChecker 6 | from datetime import datetime 7 | from datetime import timezone 8 | from os.path import basename, dirname 9 | 10 | 11 | def ask_password(): 12 | return getpass.getpass('The backup is encrypted, please enter the password:').encode('utf-8') 13 | 14 | def main(): 15 | colorama.init() 16 | 17 | dir = '.' 18 | password = None 19 | if len(sys.argv) == 1: 20 | print('Triangle Check: scan iTunes backups for traces of compromise by Operation Triangulation © 2023 AO Kaspersky Lab. All Rights Reserved.') 21 | print('\n Contact: triangulation@kaspersky.com') 22 | print(' More info: https://securelist.ru/trng-2023/') 23 | print('\nUsage: python -m triangle_check /path/to/iTunes_backup [backup_password]') 24 | return 25 | if len(sys.argv) > 1: 26 | dir = sys.argv[1] 27 | if len(sys.argv) > 2: 28 | password = sys.argv[2].encode('utf-8') 29 | 30 | checker = IOSBackupChecker() 31 | try: 32 | results = checker.scan_dir(dir, password, ask_password) 33 | except RuntimeError as scan_fail: 34 | print(Fore.LIGHTRED_EX + str(scan_fail) + Fore.RESET) 35 | return 36 | except FileNotFoundError as missing_file: 37 | print( 38 | Fore.LIGHTRED_EX 39 | + "File " 40 | + Fore.LIGHTBLUE_EX 41 | + f"{basename(missing_file.filename)}" 42 | + Fore.LIGHTRED_EX 43 | + " not found at the location " 44 | + Fore.LIGHTBLUE_EX 45 | + f"{dirname(missing_file.filename)}" 46 | + Fore.RESET 47 | ) 48 | return 49 | 50 | if len(results) > 0: 51 | print(Fore.LIGHTRED_EX + '==== IDENTIFIED TRACES OF COMPROMISE (Operation Triangulation) ====' + Fore.RESET) 52 | 53 | for k in sorted(results): # k is a UNIX timestamp of detection 54 | for detection in results[k]: 55 | dt = datetime.fromtimestamp(k, tz=timezone.utc) 56 | explanation = checker.detection_to_string(detection) 57 | if detection[0] == 'exact': 58 | print(f'{dt} ' + Fore.LIGHTRED_EX + 'DETECTED' + Fore.RESET + ' ' + explanation) 59 | elif detection[0] == 'heuristics': 60 | print(f'{dt} ' + Fore.LIGHTYELLOW_EX + 'SUSPICION' + Fore.RESET + ' ' + explanation) 61 | sys.exit(2) 62 | else: 63 | print(Fore.GREEN + 'No traces of compromise were identified' + Fore.RESET) 64 | sys.exit(0) 65 | 66 | 67 | if __name__ == "__main__": 68 | main() 69 | --------------------------------------------------------------------------------