query-profile 0.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# 🚀 Quick Claim Steps — `query-profile` on PyPI
|
|
2
|
+
|
|
3
|
+
> **Follow these steps to claim the `query-profile` package name on PyPI**
|
|
4
|
+
> as a proof of concept for the dependency confusion vulnerability.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Step 1: Create a PyPI Account
|
|
9
|
+
|
|
10
|
+
1. Go to **https://pypi.org/account/register/**
|
|
11
|
+
2. Enter: **Username**, **Email**, **Password**
|
|
12
|
+
3. Verify your email (check your inbox)
|
|
13
|
+
4. (Optional but recommended) Enable **Two-Factor Authentication**
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Step 2: Create an API Token
|
|
18
|
+
|
|
19
|
+
1. Go to **https://pypi.org/manage/account/token/**
|
|
20
|
+
2. Click **"Add API token"**
|
|
21
|
+
3. Token name: `query-profile-claim`
|
|
22
|
+
4. Scope: **Entire account** (or project-specific)
|
|
23
|
+
5. **Copy the token** — it starts with `pypi-...` and you won't see it again!
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Step 3: Install Build Tools
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
pip install build twine
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Step 4: Build & Upload the Package
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
# Go to the package directory
|
|
39
|
+
cd poc_claim_query_profile/
|
|
40
|
+
|
|
41
|
+
# Build the package
|
|
42
|
+
python -m build
|
|
43
|
+
|
|
44
|
+
# Upload to PyPI
|
|
45
|
+
python -m twine upload dist/*
|
|
46
|
+
# When prompted:
|
|
47
|
+
# Username: __token__
|
|
48
|
+
# Password: <paste-your-pypi-api-token>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## Step 5: Verify It Worked
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
# Confirm it installs from PyPI
|
|
57
|
+
pip install query-profile
|
|
58
|
+
|
|
59
|
+
# Confirm it imports
|
|
60
|
+
python -c "import query_profile; print('✅ Package claimed by L0bo!')"
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
You should see: `✅ Package claimed by L0bo!`
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## ✅ Done! You've Claimed the Package
|
|
68
|
+
|
|
69
|
+
The `query-profile` name is now registered on PyPI under your account.
|
|
70
|
+
|
|
71
|
+
### Next Steps:
|
|
72
|
+
|
|
73
|
+
- **View the package page**: https://pypi.org/project/query-profile/
|
|
74
|
+
- **Delete the package** (if needed later): Go to the package settings on PyPI
|
|
75
|
+
- **Report the vulnerability**: The full report is in `report_dependency_confusion_query_profile.md`
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
> ⚠️ **This package contains NO malicious code.** It's an empty, harmless package that simply proves the namespace was unclaimed. After demonstrating the vulnerability to Apple, you can delete the package from PyPI.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: query-profile
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: DEPENDENCY CONFUSION POC — This package name was unclaimed on PyPI. Claimed by security researcher to demonstrate the attack surface in Apple's ml-health-query-profiles repository.
|
|
5
|
+
Author: L0bo
|
|
6
|
+
License: MIT
|
|
7
|
+
Requires-Python: >=3.10
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
|
|
10
|
+
# query-profile
|
|
11
|
+
|
|
12
|
+
**⚠️ DEPENDENCY CONFUSION PROOF OF CONCEPT ⚠️**
|
|
13
|
+
|
|
14
|
+
This package name (`query-profile`) was identified as **unclaimed on PyPI** while being directly referenced in Apple's official open-source repository:
|
|
15
|
+
|
|
16
|
+
- **Repository**: [apple/ml-health-query-profiles](https://github.com/apple/ml-health-query-profiles)
|
|
17
|
+
- **Affected file**: [docs/TUTORIAL.md](https://github.com/apple/ml-health-query-profiles/blob/HEAD/docs/TUTORIAL.md)
|
|
18
|
+
- **Issue**: The tutorial instructs users to run `pip install query-profile`, but Apple never published this package to PyPI.
|
|
19
|
+
|
|
20
|
+
This package is a **harmless proof of concept** — it does nothing except demonstrate that the package name was unclaimed and could be registered by an attacker. In a real attack, a malicious package under this name could:
|
|
21
|
+
|
|
22
|
+
- Steal OpenAI/Anthropic/Azure API keys
|
|
23
|
+
- Exfiltrate sensitive health query data
|
|
24
|
+
- Install backdoors or persistence mechanisms
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
*This package was published for responsible disclosure purposes only. No malicious code is included.*
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# query-profile
|
|
2
|
+
|
|
3
|
+
**⚠️ DEPENDENCY CONFUSION PROOF OF CONCEPT ⚠️**
|
|
4
|
+
|
|
5
|
+
This package name (`query-profile`) was identified as **unclaimed on PyPI** while being directly referenced in Apple's official open-source repository:
|
|
6
|
+
|
|
7
|
+
- **Repository**: [apple/ml-health-query-profiles](https://github.com/apple/ml-health-query-profiles)
|
|
8
|
+
- **Affected file**: [docs/TUTORIAL.md](https://github.com/apple/ml-health-query-profiles/blob/HEAD/docs/TUTORIAL.md)
|
|
9
|
+
- **Issue**: The tutorial instructs users to run `pip install query-profile`, but Apple never published this package to PyPI.
|
|
10
|
+
|
|
11
|
+
This package is a **harmless proof of concept** — it does nothing except demonstrate that the package name was unclaimed and could be registered by an attacker. In a real attack, a malicious package under this name could:
|
|
12
|
+
|
|
13
|
+
- Steal OpenAI/Anthropic/Azure API keys
|
|
14
|
+
- Exfiltrate sensitive health query data
|
|
15
|
+
- Install backdoors or persistence mechanisms
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
*This package was published for responsible disclosure purposes only. No malicious code is included.*
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "query-profile"
|
|
3
|
+
version = "0.0.1"
|
|
4
|
+
description = "DEPENDENCY CONFUSION POC — This package name was unclaimed on PyPI. Claimed by security researcher to demonstrate the attack surface in Apple's ml-health-query-profiles repository."
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.10"
|
|
7
|
+
license = {text = "MIT"}
|
|
8
|
+
authors = [
|
|
9
|
+
{name = "L0bo"},
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
[build-system]
|
|
13
|
+
requires = ["hatchling"]
|
|
14
|
+
build-backend = "hatchling.build"
|
|
15
|
+
|
|
16
|
+
[tool.hatch.build.targets.wheel]
|
|
17
|
+
packages = ["query_profile"]
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"""
|
|
2
|
+
query-profile — DEPENDENCY CONFUSION POC
|
|
3
|
+
|
|
4
|
+
This package exists solely to prove that the 'query-profile' name
|
|
5
|
+
was unclaimed on PyPI while being referenced in Apple's documentation.
|
|
6
|
+
|
|
7
|
+
No malicious functionality is included.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
__version__ = "0.0.1"
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"""
|
|
2
|
+
query-profile — DEPENDENCY CONFUSION PROOF OF CONCEPT
|
|
3
|
+
|
|
4
|
+
This package exists to demonstrate that the 'query-profile' name
|
|
5
|
+
was unclaimed on PyPI while being referenced in Apple's official
|
|
6
|
+
ml-health-query-profiles repository (https://github.com/apple/ml-health-query-profiles).
|
|
7
|
+
|
|
8
|
+
This package contains NO malicious code. See README.md for details.
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
if __name__ == "__main__":
|
|
12
|
+
print("query-profile: This is a dependency confusion proof-of-concept package.")
|
|
13
|
+
print("No malicious functionality is included.")
|
|
14
|
+
print("See: https://github.com/apple/ml-health-query-profiles")
|