Skip to content

Commit 65aa959

Browse files
docs: overhaul security posture and add code of conduct
This commit drastically improves the Transparency and Security Posture documentation and adds a strict Code of Conduct to protect maintainer privacy. Resolves #2
1 parent 02a70e4 commit 65aa959

4 files changed

Lines changed: 160 additions & 29 deletions

File tree

.github/SECURITY.md

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,27 @@
11
# 🛡️ Security Policy
22

3+
## Security Philosophy
4+
DroidTether operates natively in userspace and touches sensitive system network configuration aspects (specifically `utun` virtualization and OS-level routing tables). Because of this necessary privilege escalation (`sudo`), security and data sovereignty are our absolute top priorities.
5+
6+
We rely on a minimalist, auditable, Go-based codebase. We treat all security issues, especially those concerning the parsing of USB protocol packets (RNDIS) and arbitrary code execution vectors, with the highest urgency.
7+
8+
## Threat Model & Scope
9+
10+
We encourage security researchers to focus on the following high-priority vectors:
11+
- **Packet Parsing Engine**: Buffer overflows, memory leaks, or execution vectors resulting from malicious RNDIS sequences passed back from the USB device.
12+
- **Privilege Escalation**: Mechanisms that trick the daemon into writing arbitrary data outside of `/var/log/droidtether.log` or altering system states beyond the `utun` interface routing table.
13+
- **Data Leakage**: Scenarios where local packets are improperly broadcast, logged in plaintext, or forwarded inappropriately.
14+
15+
### 🚫 Out of Scope
16+
The following are universally out of scope for our security reporting:
17+
- **Physical Device Compromise**: If an attacker already has physical access to your unlocked Mac or Android device.
18+
- **Upstream Toolchain Vulnerabilities**: Issues stemming exclusively from core `libusb` or the Go compiler (these should be reported to their respective security teams).
19+
- **Social Engineering / Phishing**: Tricking a user into downloading a malicious, unsigned version of DroidTether.
20+
- **Denial of Service (DoS)**: Overloading the daemon by repeatedly plugging/unplugging devices is considered a stability issue, not a highly critical security failure unless it results in persistent kernel lockups.
21+
322
## Supported Versions
423

5-
DroidTether currently supports the following versions for security updates. We recommend always running the latest version available.
24+
DroidTether currently supports the following versions for security updates. We strongly recommend always running the latest signed version available on the Releases page.
625

726
| Version | Supported |
827
| ------- | ------------------ |
@@ -23,24 +42,25 @@ You can report vulnerabilities privately directly through the GitHub repository:
2342
3. Provide a detailed summary of the vulnerability, including steps to reproduce.
2443

2544
### 2. Direct Contact
26-
If you prefer, you can reach out to the author privately via:
45+
If you prefer, or do not have a GitHub account, you can reach out to the author privately via:
2746
- 🔗 **LinkedIn**: [Prince Pal](https://www.linkedin.com/in/theprincepal/)
2847
- 🤖 **Reddit**: [u/PrincePal_](https://www.reddit.com/user/PrincePal_/)
2948

3049
---
3150

3251
### What to Include in Your Report
3352
To help us triage and respond to your report as quickly as possible, please include:
34-
- A description of the vulnerability and its potential impact.
35-
- Step-by-step instructions to reproduce the issue (including proof-of-concept code, if possible).
36-
- The version of DroidTether, macOS, and Android being used.
37-
- Any relevant logs (e.g., `/var/log/droidtether.log`).
53+
- A clear description of the vulnerability and its potential systemic impact.
54+
- Step-by-step instructions to reproduce the issue (including Proof-of-Concept code or malicious RNDIS packet captures, if possible).
55+
- The exact version of DroidTether, macOS build, and Android device being used.
56+
- Any relevant crash logs or stack traces (e.g., from `/var/log/droidtether.log` or `/Library/Logs/DiagnosticReports/`).
3857

3958
### Our Commitment
40-
- We will acknowledge receipt of your report within **48 hours**.
41-
- We will keep you informed of our progress as we investigate and work on a fix.
42-
- We will provide public credit for your discovery (if you wish) once the vulnerability has been resolved.
59+
- **Response Time**: We will acknowledge the receipt of your report within **48 hours**.
60+
- **Transparency**: We will keep you informed of our progress as we investigate, patch, and deploy a fix.
61+
- **Recognition**: We will gladly provide public credit/attribution in our Release Notes and Security Advisories for your discovery (if you wish) once the vulnerability has been patched.
62+
*(Note: As an open-source hobby project, we currently do not offer financial bug bounties).*
4363

4464
---
4565

46-
Thank you for helping keep DroidTether and its users safe! 🚀
66+
Thank you for helping keep DroidTether and our users safe! 🚀

CODE_OF_CONDUCT.md

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, religion, or sexual identity
10+
and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
* Demonstrating empathy and kindness toward other people
21+
* Being respectful of differing opinions, viewpoints, and experiences
22+
* Giving and gracefully accepting constructive feedback
23+
* Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
* Focusing on what is best not just for us as individuals, but for the
26+
overall community
27+
28+
Examples of unacceptable behavior include:
29+
30+
* The use of sexualized language or imagery, and sexual attention or
31+
advances of any kind
32+
* Trolling, insulting or derogatory comments, and personal or political attacks
33+
* Public or private harassment
34+
* Publishing others' private information, such as a physical or email
35+
address, without their explicit permission
36+
* Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official e-mail address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to the community leaders responsible for enforcement via direct message to:
63+
- **LinkedIn**: [Prince Pal](https://www.linkedin.com/in/theprincepal/)
64+
- **Reddit**: [@PrincePal_](https://www.reddit.com/user/PrincePal_/)
65+
66+
All complaints will be reviewed and investigated promptly and fairly.
67+
68+
All community leaders are obligated to respect the privacy and security of the
69+
reporter of any incident.
70+
71+
## Enforcement Guidelines
72+
73+
Community leaders will follow these Community Impact Guidelines in determining
74+
the consequences for any action they deem in violation of this Code of Conduct:
75+
76+
### 1. Correction
77+
**Community Impact**: Use of inappropriate language or other behavior deemed
78+
unprofessional or unwelcome in the community.
79+
**Consequence**: A private, written warning from community leaders, providing
80+
clarity around the nature of the violation and an explanation of why the
81+
behavior was inappropriate. A public apology may be requested.
82+
83+
### 2. Warning
84+
**Community Impact**: A violation through a single incident or series
85+
of actions.
86+
**Consequence**: A warning with consequences for continued behavior. No
87+
interaction with the people involved, including unsolicited interaction with
88+
those enforcing the Code of Conduct, for a specified period of time.
89+
90+
### 3. Temporary Ban
91+
**Community Impact**: A serious violation of community standards, including
92+
sustained inappropriate behavior.
93+
**Consequence**: A temporary ban from any sort of interaction or public
94+
communication with the community for a specified period of time.
95+
96+
### 4. Permanent Ban
97+
**Community Impact**: Demonstrating a pattern of violation of community
98+
standards, including sustained inappropriate behavior, harassment of an
99+
individual, or aggression toward or disparagement of classes of individuals.
100+
**Consequence**: A permanent ban from any sort of public interaction within
101+
the community.
102+
103+
## Attribution
104+
105+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
106+
version 2.1, available at
107+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
108+
109+
[homepage]: https://www.contributor-covenant.org
110+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html

README.md

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,25 @@ DroidTether is a lightweight userspace daemon that brings high-performance USB t
1919

2020
---
2121

22-
## 🛡️ Transparency & Privacy
23-
DroidTether is built on a "local-only" model.
24-
- 📂 **100% Open Source**: Every line of code is available for audit in this repository.
25-
- 🚫 **No Telemetry**: No tracking, no analytics, and no "call-home" features.
26-
- 🔒 **Local Connectivity**: All networking happens strictly between your Mac and your Android device. No external servers are involved in the packet relay process.
27-
- 🕵️ **Log Privacy**: Logs reside only on your local machine at `/var/log/droidtether.log` for debugging purposes.
22+
## 🛡️ Security & Privacy Posture
2823

29-
> 📝 **Audit Note**: The entire core logic of DroidTether is contained in less than **2,000 lines of Go code**, making it exceptionally easy to audit for security and transparency. We believe in simplicity and clear source code as the ultimate form of trust.
24+
DroidTether is built on a strict **"local-only"** and **"least-privilege"** security model. We understand that system-level network applications require a high degree of trust, which is why we enforce extreme transparency.
25+
26+
### 🚫 Zero Telemetry & Data Sovereignty
27+
- **No Data Inspection**: DroidTether simply routes encrypted and unencrypted packets between the macOS kernel (`utun`) and the Android USB interface (`libusb`). It **does not** read, inspect, or modify the contents of your web traffic.
28+
- **No Analytics**: There is absolutely zero telemetry, tracking, or "call-home" functionality built into this daemon.
29+
- **Local Logs Only**: Operational logs reside strictly on your local machine at `/var/log/droidtether.log` for debugging purposes and are never transmitted anywhere.
30+
31+
### 🔑 Why `sudo` (Root) is Required
32+
To function without relying on deprecated Kernel Extensions, DroidTether operates natively in userspace but requires elevated OS privileges to bind to the network stack:
33+
1. **Virtual Interface Creation**: Creating the `utun` network interface requires macOS kernel routing permissions.
34+
2. **Routing Table Modification**: Injecting routes to prioritize your Android phone's internet connection requires superuser access.
35+
3. **Hardware USB Binding**: Opening raw protocol communication via `libusb` requires device-level access.
36+
37+
*Note: DroidTether performs these tasks purely in userspace without modifying System Integrity Protection (SIP) or demanding reduced security boot modes.*
38+
39+
### 📂 100% Auditable Core
40+
The entire core routing logic is written in modern Go and consists of fewer than **2,000 lines of code**. We believe in simplicity and auditable code as the ultimate form of security. Review our [Security Policy](.github/SECURITY.md) for vulnerability reporting.
3041

3142
---
3243

@@ -81,16 +92,6 @@ sudo ./build/droidtether
8192

8293
---
8394

84-
## 🔑 Why `sudo` is Required?
85-
Because DroidTether operates at the system network level, it requires elevated privileges for specific operations:
86-
1. **Network Interface Management**: Creating and configuring the virtual `utun` interface on macOS is a kernel-restricted task.
87-
2. **Routing Table Injection**: Updating your Mac's routing table to prioritize the phone's internet connection requires superuser permissions.
88-
3. **Log Management**: Writing operational logs to `/var/log/droidtether.log` for system-wide transparency.
89-
90-
*DroidTether performs these tasks purely in userspace—no persistent kernel extensions are installed.*
91-
92-
---
93-
9495
## 📖 How to Use
9596

9697
1. **Connect** your Android phone to your Mac via a USB-C cable.

TESTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,8 @@ Use these results as the "Gold Standard" to verify future optimizations or regre
161161

162162
| Device | Network | MAC/Host | OS | Result |
163163
|--------|---------|----------|----|--------|
164-
| **Galaxy S24** | **Airtel 5G** | MacBook Air M4 | Android 16 | **290 Mbps / 29ms Ping** |
165-
| Galaxy A55 | Jio 5G | MacBook Air M4 | Android 16 | 180 Mbps / 35ms Ping |
164+
| Galaxy S24 | Airtel 5G | MacBook Air M4 | Android 16 | 290 Mbps (DL) / 41 Mbps (UL) |
165+
| Galaxy A55 | Jio 5G | MacBook Air M4 | Android 16 | 180 Mbps (DL) / 25 Mbps (UL) |
166166

167167
*Tests performed via fast.com and `ping 8.8.8.8`. Zero packet loss verified.*
168168

0 commit comments

Comments
 (0)