{% hint style="success" %}
Learn & practice AWS Hacking:HackTricks Training AWS Red Team Expert (ARTE)
Learn & practice GCP Hacking: HackTricks Training GCP Red Team Expert (GRTE)
Support HackTricks
- Check the subscription plans!
- Join the 💬 Discord group or the telegram group or follow us on Twitter 🐦 @hacktricks_live.
- Share hacking tricks by submitting PRs to the HackTricks and HackTricks Cloud github repos.
This ways to access data from Github that was supposedly deleted was reported in this blog post.
- You fork a public repository
- You commit code to your fork
- You delete your fork
{% hint style="danger" %} The data commited in the deleted fork is still accessible. {% endhint %}
- You have a public repo on GitHub.
- A user forks your repo.
- You commit data after they fork it (and they never sync their fork with your updates).
- You delete the entire repo.
{% hint style="danger" %} Even if you deleted your repo, all the changes made to it are still accessible through the forks. {% endhint %}
- You create a private repo that will eventually be made public.
- You create a private, internal version of that repo (via forking) and commit additional code for features that you’re not going to make public.
- You make your “upstream” repository public and keep your fork private.
{% hint style="danger" %} It's possible to access al the data pushed to the internal fork in the time between the internal fork was created and the public version was made public. {% endhint %}
How to discover commits from deleted/hidden forks
The same blog post propose 2 options:
If the commit ID (sha-1) value is known it's possible to access it in https://github.com/<user/org>/<repo>/commit/<commit_hash>
It's the same to access both of these:
- https://github.com/HackTricks-wiki/hacktricks/commit/8cf94635c266ca5618a9f4da65ea92c04bee9a14
- https://github.com/HackTricks-wiki/hacktricks/commit/8cf9463
And the latest one use a short sha-1 that is bruteforceable.
{% hint style="success" %}
Learn & practice AWS Hacking:HackTricks Training AWS Red Team Expert (ARTE)
Learn & practice GCP Hacking: HackTricks Training GCP Red Team Expert (GRTE)
Support HackTricks
- Check the subscription plans!
- Join the 💬 Discord group or the telegram group or follow us on Twitter 🐦 @hacktricks_live.
- Share hacking tricks by submitting PRs to the HackTricks and HackTricks Cloud github repos.