Skip to content

Commit bd4fbfb

Browse files
authored
initial commit
1 parent 5b2ce95 commit bd4fbfb

File tree

10 files changed

+1336
-0
lines changed

10 files changed

+1336
-0
lines changed

CHANGELOG.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2023-05-15 v1 Initial release

CLA.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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.

License.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
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.

README.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
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.ru/trng-2023/)
6+
7+
8+
9+
## Prerequisites
10+
11+
The script depends on: colorama (for pretty printing), pycryptodome
12+
13+
## Installation
14+
15+
The script can be run as-is (the subdirectory *triangle_check* is required):
16+
17+
```
18+
python3 triangle_check.py
19+
```
20+
21+
It can also be built into a pip package:
22+
23+
```
24+
python3 -m build
25+
pip3 install dist/triangle_check-1.0-py3-none-any.whl
26+
27+
```
28+
29+
30+
## Usage
31+
32+
```
33+
Usage: triangle_check.py /path/to/iTunes_backup [backup_password]
34+
```
35+
36+
### iTunes backup location
37+
38+
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).
39+
The directory you are looking for should contain may subdirectories, and should include 'Manifest.db', 'Manifest.plist'. The backup may be encrypted
40+
with a password, if set up in iTunes. That password is required to decrypt password-protected backups.
41+
42+
### Advanced: create backup with libimobiledevice
43+
44+
You can use the tool *idevicebackup2* that is a part of the open-source package named [libimobiledevice](https://libimobiledevice.org/). Popular Linux
45+
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.
46+
47+
### Scanning the backup
48+
49+
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
50+
more information and detected IOCs, and that would mean that the device was *most likely* compromised.
51+
52+
Example output:
53+
54+
```
55+
==== IDENTIFIED TRACES OF COMPROMISE (Operation Triangulation) ====
56+
2022-*-* SUSPICION Suspicious combination of events:
57+
* file modification: Library/SMS/Attachments/ab/11
58+
* file attribute change: Library/SMS/Attachments/ab/11
59+
* location service stopped: com.apple.locationd.bundle-/System/Library/LocationBundles/WRMLinkSelection.bundle
60+
* file modification: Library/Preferences/com.apple.ImageIO.plist
61+
* file attribute change: Library/Preferences/com.apple.ImageIO.plist
62+
* file birth: Library/Preferences/com.apple.ImageIO.plist
63+
* file modification: Library/Preferences/com.apple.locationd.StatusBarIconManager.plist
64+
* file attribute change: Library/Preferences/com.apple.locationd.StatusBarIconManager.plist
65+
* file birth: Library/Preferences/com.apple.locationd.StatusBarIconManager.plist
66+
2022-*-* DETECTED Exact match by NetUsage : BackupAgent
67+
2022-*-* DETECTED Exact match by NetTimestamp : BackupAgent
68+
```
69+
70+
## What's next?
71+
72+
The research on the Operation Triangulation is ongoing. For more updates, please check [Securelist](https://securelist.ru/trng-2023/)

0 commit comments

Comments
 (0)