iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
To check whether a Tor onion service’s private key may be exposed, first identify the HiddenServiceDir used by the running Tor configuration, then inspect the key and every known place it could have been copied or read. A clean directory today can show that no obvious copy remains; it cannot prove that nobody copied the key in the past. Treat credible disclosure as a compromise because possession of the identity key can let someone impersonate the onion service.
This guide shows how to perform a careful, non-destructive audit, how to interpret evidence, and what to do if exposure is plausible. It does not require uploading the key to a scanner or disclosing it in a support ticket.
How can I check whether my Tor onion service’s private key may be exposed?
Use this sequence: locate the active service directory, verify which onion address it belongs to, inspect the private-key file and access controls, inventory every authorized reader and copy, then review historical storage and access records. The Tor Project says the service directory contains the service keys and warns that leaked keys let other people impersonate an Onion Service, making it compromised and dangerous to visit (Tor’s setup guide).
- Find the active
HiddenServiceDir. Read the Tor configuration actually used by the running instance, including any included configuration files. Do not assume a standard path such as/var/lib/tor. - Map the directory to the service. Read its
hostnamefile and compare the onion address with the service you are investigating. The address is public identity information, not the private key. - Identify the identity key. In the service directory, the file named
private_keyis the service identity private key described by the Tor manual. Keep its contents out of terminals, chat, tickets, screenshots and web scanners. - Check current access. Review ownership, mode bits, ACLs, running services, administrator accounts, backup jobs and deployment tools that can read the directory.
- Search for known copies. Audit backups, archives, source-control history, cloud or synchronization storage, configuration-management artifacts, exports and incident bundles.
- Assess evidence, not just absence. Public publication, access by an untrusted account, or a backup outside your control is evidence of possible compromise. A clean search is not proof that no historical copy exists.
What exactly is the Tor onion-service private key?
The onion address is derived from the service’s public identity key. The matching private identity key remains on the service host and is used to authenticate the service’s descriptors. The public address can be shared; the private key must remain secret. The Tor Project’s explanation of how Onion Services work describes this public/private identity relationship.
Popular on Amazon
- 【90 Degree Full Function USB C Adapter】Supports the latest USB4 standard for up to 40Gbps of bandwidth, 8K video support, and up to 240W Fast charging; Support USB PD 3.1 Extended Power Range (EPR) including 140W, 180W and 240W. Your productivity is easily doubled. *Warm Tip: For the best fit, please make sure the USB-C port is fully exposed; thick or bulky cases may affect compatibility.
- 【Reliable Quality】Made from high-quality, scratch-resistant aluminum alloy, delicate metal frame. get excellent wear resistance and heat dissipation. Non-Slip Design for easier insertion and removal.
- 【Small and portable】Ultra thin size, ultra compact design, a petite physique that matches the minimalist design of your modern laptops. Coming with a slim figure that won't block the port next to the one it's plugged into.
- 【Compatibility】Widely work with most usb c, thunderbolt 4/3 devices. Compatibilit for ROG Ally, Steam Deck, Switch, MacBook Pro, Quest 3 VR headset, Surface Book 2, iPhone 18/17/16/15, Samsung Galaxy S23/S22/S21, Note 20/10, Google Pixel, ChromeBook, etc.
- 【Excellence Customer Support】If you experience any issues or cable failure, simply reach out to our dedicated customer service team. We provide a prompt response within 18 hours, providing you with the necessary technical support to resolve any concerns.
Do not confuse the identity key with other files in the service directory. The hostname file identifies the address, while the service keys and supporting state allow Tor to operate it. A client-authorization key pair is a separate credential used to decide which clients may reach a restricted service; it does not replace or protect a leaked identity key.
How do I find the active HiddenServiceDir?
Start with the configuration of the Tor process serving the onion site, rather than with a guessed filesystem location. The Tor torrc(5) manual defines HiddenServiceDir as the directory containing service data and identifies HiddenServiceDir/private_key as the service private key.
- Identify the running instance and its configuration file. A host may run more than one Tor instance, container or system service. Check the service manager, container definition or process launch configuration to determine which instance serves the onion address.
- Read the effective configuration. Search the main
torrcand any files brought in with%includedirectives for active, uncommentedHiddenServiceDirentries. A line in an unused example file is not evidence of the directory in use. - Record each directory. Multiple
HiddenServiceDirentries can represent different onion services. Keep a separate audit record for each one and do not assume that a single key covers all services. - Confirm the mapping. As the Tor setup documentation explains, the
hostnamefile contains the onion address. Read it locally with the least-privileged administrative method available and compare it with the address under investigation.
For a configuration review, an illustrative command is grep -R --line-number --include='torrc*' '^[[:space:]]*HiddenServiceDir[[:space:]]' /path/to/tor/config. Replace the path with the real configuration location and account for containers, included files and nonstandard service layouts. The command is a way to find declarations; it does not by itself prove which Tor process is currently using them.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Clear out junk files and repair common Windows errors3Fix the driver behind crashes, sound loss and screen glitchesHow should I inspect the live service directory without disclosing the key?
Inspect metadata and access paths first. Avoid commands that print the private-key contents, and redirect sensitive output to a protected local file only when necessary.
- Check existence and ownership. Confirm that the expected
private_keyexists and note its owner, group, mode and timestamps. Use metadata tools such asstatrather thancat. - Review directory permissions. The Tor manual says the service data directory is owner-readable by default unless group readability is enabled. Verify the actual setting on this host; do not rely on the default.
- Check ACLs and inherited permissions. POSIX ACLs, filesystem mounts, container bind mounts and privileged backup agents can grant access not visible in ordinary mode bits. Review them with your operating system’s ACL and mount inspection tools.
- List potential readers. Include the Tor account, root or equivalent administrators, monitoring and backup agents, deployment identities, automation runners and any service account that can traverse the parent directories.
- Check copies in temporary locations. Look for administrator-created archives, troubleshooting bundles, crash dumps and temporary exports. Delete or quarantine discovered copies according to your incident-retention policy rather than casually overwriting evidence.
- Protect the investigation. Do not paste the key into an online scanner, issue tracker or chat. If a hash is useful for internal correlation, generate and store it under your organization’s incident controls; a hash does not prove that the underlying secret was never copied.
A local inventory can establish the current state of the host. It cannot reveal a copy that was deleted, exfiltrated or stored on a system you cannot inspect.
Also popular on Amazon
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Where should I look for historical or off-host copies?
Most exposure investigations fail when they examine only the live file. Treat every system that could read, package, replicate or display the service directory as an audit target. These are practical operational checks derived from Tor’s key-secrecy and administration guidance, not a claim that Tor publishes a complete forensic checklist.
Backups and snapshots
List backup products, schedules, retention periods, immutable snapshots, disaster-recovery replicas and administrator-created copies. Determine whether the service directory was included, who can restore it, where encryption keys are held and whether old generations remain available. A backup outside the intended trust boundary is a possible exposure even if it has never been restored.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Deployment and configuration-management artifacts
Inspect build workspaces, release archives, infrastructure-as-code variables, secret stores, provisioning logs and CI/CD workspaces. A key accidentally embedded in a template or generated into a build artifact may persist after the live deployment is corrected. Review access by automation identities as well as by human users.
Source-control history
Search repositories, forks, tags, pull-request attachments, code-review comments and deleted-file history. Removing a secret from the current branch does not remove it from every clone or historical commit. If a repository was public or accessible to an untrusted organization, treat the key as potentially disclosed.
Cloud synchronization and object storage
Review synchronized administrator home directories, shared drives, object-storage buckets, machine images and exported virtual-machine disks. Check access logs where available, but remember that retention gaps and incomplete logging limit what those records can establish.
Also popular on Amazon
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
Support and incident material
Look for diagnostic bundles, screenshots, ticket attachments, shell transcripts and chat messages. Even a partial key, an unprotected archive or a copied service directory can materially expand the set of people who may possess the secret.
Free tools Windows power users keep installed
One-click scans. No signup required.
Can I know for sure that nobody copied the key?
No. Filesystem scans, permission reviews and available logs can show current conditions and reveal known copies, but they cannot prove a negative across every historical account, backup, temporary file, screenshot or external system. The reviewed Tor documentation provides no test that establishes that a private key was never copied.
Use calibrated conclusions:
- “No known exposure found” means your documented checks found no evidence in the systems and records you could examine.
- “Exposure is plausible” means an unauthorized reader, uncontrolled copy, logging gap or suspicious access cannot be ruled out.
- “Compromise is confirmed or highly credible” means the key was published, recovered by an untrusted party, read by an account outside the intended trust boundary, or found in a location whose confidentiality cannot be guaranteed.
Do not turn “the file is still present with restrictive permissions” into “the key was never exposed.” Current permissions protect remaining copies; they do not retract earlier copies.
How should I interpret the evidence?
Compare each check by what it can actually establish. A response that only inspects the present host is faster but gives weaker assurance than an investigation that also covers historical copies and access records.
| Check | What a positive finding means | What a negative finding cannot prove |
|---|---|---|
| Live file and permissions | The key is currently present and shows which local principals can normally read it. | That no one read or copied it earlier. |
| ACL, process and account review | Identifies unexpected readers or excessive privileges on the host. | That an authorized account did not export the key. |
| Backup and archive review | Finds retained copies and reveals who can restore them. | That an unknown or deleted backup never existed. |
| Repository and artifact review | Shows whether the secret entered a development or deployment workflow. | That every clone, fork or cache is clean. |
| Access and publication logs | Can provide evidence of reads, downloads or public disclosure. | That an unlogged access did not occur. |
What should I do if the private key may have leaked?
Handle credible disclosure as an identity compromise, not as an ordinary permissions problem. Tor’s setup guidance states: “If your keys leak, other people can impersonate your Onion Service, deeming it compromised, useless, and dangerous to visit.”
Also popular on Amazon
- Portable and powerful USB-C HUB: BENFEI USB Type-C HUB, with super-soft and knot-free silicone woven design cable, meets most mobile office needs. Compact, lightweight, stylish, and powerful portable USB C Hub equipped with 1 x HDMI port, 1 x 100W charging, and 3 x USB ports. 18-month warranty, 24-hour response, to ensure you feel at ease when using our product.
- Design centered on comfort and reliability: Thanks to BENFEI's end-to-end in-house cable production capability, in-house PCBA and assembly capability, using the industry's most advanced silicone woven design and process, 20cm cable in length, no knots, super-soft, the HUB is easy to use in all scenarios: laptop, tablet, stand etc. Super-soft, 25000+ life cycles, to meet your daily carrying and office needs.
- 100W Charging: Support up to 90W USB C pass-through charging via Type-C port to keep your laptop powered. 10W is reserved for other interface operations. No data and video function on the Type-C port.
- 4K HDMI Display: The HDMI port supports media display at resolutions up to 4K 30Hz, keeping every incredible moment detailed and ultra vivid. Please note that the C port of the Host device needs to support video output.
- Transfer Files in Seconds: Transfer files and from your laptop at speeds up to 10 Gbps with USB A 3.2 port. Extra 2 USB A 2.0 ports are perfectly for your keyboards and mouse.
- Preserve useful evidence. Record dates, affected hosts, repository locations, account names, backup generations and relevant logs. Limit circulation of the secret itself.
- Restrict remaining access. Remove unnecessary readers, isolate uncontrolled copies and secure backup and storage credentials. Do not destroy evidence before your incident process determines what must be retained.
- Decide whether to retire the identity. If an untrusted party may possess the key, the safest operational assumption is that the old onion identity can be impersonated. Ending use normally requires creating a new service identity and therefore a new onion address; simply changing file permissions does not change the identity.
- Plan continuity. Publish the new address only through an independently trusted channel, such as a previously authenticated administrative contact. Explain the transition to legitimate users and consider how bookmarks, allowlists and client-authorization credentials will be updated.
- Review dependent systems. Rotate credentials that were stored alongside the key, investigate automation accounts and check whether the same secret appeared in other services or environments.
The reviewed Tor sources establish the impersonation consequence but do not provide a dedicated key-compromise migration runbook. Your choice between continued operation, a planned cutover and immediate retirement should reflect the service’s threat model, user-safety requirements and ability to communicate a new address.
How do backups and client authorization change the risk?
Tor recommends keeping a backup when an Onion Service is intended to remain available for a long time. That backup preserves availability after hardware failure, but it is another copy of the identity secret and must be protected at least as carefully as the live file. Encrypted offline storage is one possible approach; the medium is less important than controlled access, encryption-key custody and a tested recovery process.
Client authorization is a separate control. It uses credentials to restrict which clients can access a service, but it does not make a leaked service identity key trustworthy again. If the identity key is compromised, authorization changes should be considered alongside—not instead of—an identity and address decision.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.What are the most common audit mistakes?
- Assuming a universal path. The active
HiddenServiceDirmay be nonstandard, containerized or different for each service. - Checking only
hostname. The hostname identifies the public address; it is not evidence that the private key is protected. - Searching only the current directory. Backups, repository history, deployment artifacts and support bundles may outlive the file on disk.
- Relying on mode bits alone. ACLs, privileged agents, mounts and administrator access can bypass the apparent owner/group restriction.
- Uploading the secret for analysis. An online scanner or ticket can become the very disclosure channel being investigated.
- Deleting evidence immediately. Removing a copy may reduce ongoing exposure but can erase the records needed to determine scope and timing.
- Assuming client authorization solves identity compromise. Access control for clients does not prevent impersonation by someone holding the service identity key.
- Promising certainty. Report what was checked, what evidence was found, which systems were out of scope and what uncertainty remains.
What should the final audit record contain?
Keep a dated, access-controlled record for each onion service. It should identify the Tor instance and effective configuration source; the HiddenServiceDir and corresponding onion address; key-file ownership and permission observations; accounts, services and automation with read access; backup and synchronization destinations; repository and artifact searches; log-retention limits; findings; and the decision to continue, contain or replace the identity.
Recommended Free Tools
Store the record separately from the private key and restrict it to people who need it for the incident or operations process. Never place the key itself in the report. The value of the record is reproducibility: another authorized operator should be able to see what “no known exposure found” means and which uncertainty remains.
Also popular on Amazon
- 【Read before You Buy】 Note: This adapter is USB 2.0 version and cannot transmit HDM, VGA, or other video signals. Nevertheless, they are fully capable of charging devices,duplicating files, and can be seamlessly integrated with USB-C earphones, wireless network adapters, and SD card adapters.
- 【Easy to Use and Safe】Thanks to modern manufacturing techniques, we've made these adapters sufficiently compact so that they can remain inserted in your device without noticeable protrusion or inconvenience. This means you don't have to constantly plug and unplug them, reducing the likelihood of wear and misalignment, and making them more convenient to carry around.
- 【Reliable Quality】Engineered for enhanced durability, durable aluminum alloy shell material,get excellent wear resistance and heat dissipation,the male USB C and female USB connectors & the male USB and female USB C connectors are designed to be plugged and unplugged up to 20000 times. Provides data transfer, device charging, memory space expansion, and additional computer peripherals.
- 【Think more for you】Do you need to connect a USB-C-enabled device to an odd device that only has USB-A ports? Then these USB-A male to USB-C female adapters are made for you.Simply insert the adapter into the USB-A port on the device, and you can instantly connect your USB-C device to the device that originally didn't have the correct connection port.
- 【Trusted xiwxi Quality and Service】As a responsible brand seller, you will receive xiwxi's 12-month Quality assurance and lifetime friendly customer service, you're not just buying a product,you're investing in peace of mind with all-round quality and exceptional customer service.
What is the safest conclusion from a clean check?
A clean current directory and restrictive permissions are good operating conditions, not proof of historical secrecy. Confidence improves when the active configuration, local readers, backups, development artifacts, synchronization locations and access records have all been reviewed and documented. If any credible evidence indicates that an untrusted party obtained the identity key, treat the onion identity as compromised and plan a new address through a trusted communication channel.
Frequently Asked Questions
Does deleting the private_key file create a new onion address?
Deleting or replacing the file is not a controlled way to rotate an identity and can make the service unavailable or destroy recovery material. A deliberate new service identity produces a new address; plan that change with a backup and a communication path before retiring the old identity.
Will changing the onion service’s hostname file protect the service?
No. The hostname file records the address and is not the secret that authenticates the service. Editing it does not revoke a private key that may already be in someone else’s possession.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →Can Tor logs tell me whether the key was copied?
Logs may show relevant service, account or storage activity when those events were recorded, but reading a local file is not always logged and retention may be incomplete. Treat logs as supporting evidence rather than proof that every copy or read was captured.
Should I keep a backup of an onion service identity key?
For a service that must survive hardware loss, Tor’s setup guidance recommends maintaining a backup. Protect that backup as a second high-value secret, with controlled restoration access and encryption-key management, because availability benefits do not reduce disclosure risk.
Is client authorization enough after an identity-key leak?
No. Client authorization limits which clients can access a service; it does not stop an attacker who can impersonate the service identity. A possible identity-key compromise still requires an incident decision about retiring the old address.

