githacker-git-leak

Recover full source code from exposed remote Git .git directories.

1.6k|234|Updated Dec 7, 2019
One-click install
npx skills add https://github.com/wgpsec/AboutSecurity --skill githacker-git-leak
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: githacker-git-leak
Source: https://github.com/wgpsec/AboutSecurity/tree/main/skills/tool/githacker-git-leak
Command: npx skills add https://github.com/wgpsec/AboutSecurity --skill githacker-git-leak

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill enables retrieval of source code from improperly exposed Git repositories by leveraging remote .git directories to reconstruct the entire history, including stash, all branches, tags, and reflog.

Core Features & Use Cases

  • Complete repository recovery: recover source code and commit history even when directory listing is blocked.
  • Deep audit capability: search recovered content for hard-coded credentials, APIs, and sensitive strings across all branches and tags.
  • Use Case: perform post-incident analysis on a compromised target by restoring its repository to inspect for secrets and exposure.

Quick Start

Run githacker with the target URL to recover the full Git repository from the remote .git directory and inspect for sensitive data.

Frequently Asked Questions about githacker-git-leak

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I recover source code from an exposed .git directory on a remote server?

To recover source code from an exposed .git directory, you can reconstruct the repository by downloading exposed files like .git/HEAD and .git/config to rebuild commit history, branches, and stash. This enables full source code retrieval even if directory listing is blocked.

Can I retrieve git reflog and stash history during a repository leak assessment?

Yes, you can retrieve git reflog and stash history during a repository leak assessment. The reconstruction process deterministically restores the entire commit history and stash, enabling deep audit capability to search for hard-coded credentials across all recovered branches and tags.

What is the best way to find hard-coded credentials in a compromised git repository?

The best way to find hard-coded credentials in a compromised git repository is to perform a full repository recovery first. By restoring all branches, tags, and reflog from the exposed .git directory, you can conduct a thorough code audit to search for sensitive strings and API keys.

Does git recovery work when remote directory listing is disabled?

Git recovery works even when remote directory listing is disabled. By leveraging exposed .git directory files and brute-forcing to discover branches and tags, the process reconstructs the complete source code and commit history without needing direct directory access.

How do I reconstruct full git branches and tags during incident response?

To reconstruct full git branches and tags during incident response, apply repository recovery techniques against the target's exposed .git directory. This deterministic restoration rebuilds the complete commit history and reflog, allowing you to inspect for secrets and analyze exposure.

What are the limitations of git leak recovery for security assessments?

Limitations of git leak recovery for security assessments depend on the exposure of the target's .git directory. If critical files like .git/HEAD or .git/config are inaccessible, or if brute-forcing branches and tags fails, full repository reconstruction and credential discovery may not be possible.