Skip to content
KitploitKITPLOIT
StrumentiBlog
Invia
StrumentiBlog
Invia

Strumenti di Hacking, PenTest e Cybersecurity per il tuo Arsenale di Sicurezza!

Kitploit è una directory di strumenti di hacking, cybersecurity e pentesting. Scopri gli ultimi aggiornamenti dei progetti per trovare vulnerabilità, analizzare sistemi, automatizzare i test e rafforzare la tua sicurezza.

··Feed·Contatto·Privacy·© 2026 Kitploit

Directory degli strumenti

Categorie

Vedi tutte le categorie
Loading categories
gogsownz — Gogs CVEs | Kitploit
Strumenti/GitHubGitHub/thez3ro/gogsownz
Escalation di PrivilegiAnalisi delle VulnerabilitàExploitSfruttamento di Applicazioni WebStrumento di Accesso Remoto
GitHubthez3ro/gogsownz

gogsownz

Gogs CVEs

Vedi Repository
791546 anni faRevisionato da Kitploit

Più Popolari

Vedi tutti →

Scopri gli strumenti più utilizzati dalla nostra community.

Esplora tutti gli strumenti

Sfoglia la nostra collezione di strumenti

Vedi tutti gli strumenti →
Condividi

GogsOwnz

GogsOwnz è un semplice script per ottenere diritti di amministratore e RCE su un server Gogs/Gitea.
Sfrutta vulnerabilità in Gogs/Gitea, tra cui CVE-2018-18925, CVE-2018-20303.

Disclaimer legale Questo script è fornito così com'è. Senza garanzia, usalo a tuo rischio, per favore rispetta la legge.

Utilizzo tipico - [Per favore, leggi l'uso completo]

Ottieni informazioni sul server Gogs/Gitea in esecuzione

root@kitploit:~
python3 gogsownz.py https://127.0.0.1:3000/ -v --info

Sfrutta escalation privilegi pre-autenticazione

root@kitploit:~
python3 gogsownz.py https://127.0.0.1:3000/ -v --preauth

Sfrutta escalation privilegi

root@kitploit:~
python3 gogsownz.py https://127.0.0.1:3000/ -v -C '<user>:<password>' --cleanup

o in alternativa

root@kitploit:~
python3 gogsownz.py https://127.0.0.1:3000/ -v -c '<i_like_gogs_cookie>' --cleanup

Sfrutta RCE pre-autenticazione

root@kitploit:~
python3 gogsownz.py https://127.0.0.1:3000/ -v --preauth --rce 'sleep 10' --cleanup

Sfrutta RCE autenticata

root@kitploit:~
python3 gogsownz.py https://127.0.0.1:3000/ -v -C '<user>:<password>' --rce 'sleep 10' --cleanup

Utilizzo completo

root@kitploit:~
usage: gogsownz [-h] [-C CREDS] [-n COOKIENAME] [-c COOKIE] [-i] [--rce RCE]
                [--repo REPO] [--preauth] [--windows] [--cleanup] [--tor]
                [--check-tor] [--burp] [-k] [--verbose]
                url

positional arguments:
  url                   URL for the Gogs server

optional arguments:
  -h, --help            show this help message and exit
  -C CREDS, --creds CREDS
                        Credentials for the Gogs server, in the from
                        "username:password"
  -n COOKIENAME, --cookie-name COOKIENAME
                        Name of the Gogs-specific session cookie
  -c COOKIE, --cookie COOKIE
                        Session for the Gogs server, the value in the
                        i_like_gogits Cookie
  -i, --info            Only detect informations about the running Gogs
                        server, then quit
  --rce RCE             Command to execute on the Gogs server
  --repo REPO           Use an existing repo for the PrivEsc
  --preauth             Try the pre-auth vulnerability
  --windows             Gogs server runs on Windows
  --cleanup             Remove all created repo after exploit
  --tor                 Use tor proxy when performing requests
  --check-tor           Check that Tor is correctly set up before running
  --burp                Use burp proxy when performing requests
  -k, --insecure        Allow insecure server connections when using SSL
  --verbose, -v

Ringraziamenti

Ringraziamenti a:

  • Tencent Security (@md5_salt, @ma7h1as e @chromium1337)
  • PentesterLab (@snyff)
  • LuckyC4t
  • la comunità di sicurezza di gogs :D

Ulteriori letture

https://github.com/gogs/gogs/issues/5469
https://github.com/gogs/gogs/issues/5558
https://github.com/gogs/gogs/commit/8c8c37a66b4cef6fc8a995ab1b4fd6e530c49c51
https://github.com/gogs/gogs/issues/5599
https://2018.zeronights.ru/wp-content/uploads/materials/17-Who-owned-your-code.pdf

Mitigazioni

Se curi la configurazione del tuo file unit di systemd, rimarrai piacevolmente sorpreso di vedere che lo sfruttamento è in qualche modo contenuto:

root@kitploit:~
[Unit]
Description=Gogs
After=syslog.target
After=network.target

[Service]
Type=simple
User=gogs
Group=gogs
WorkingDirectory=/home/gogs/installations/gogs/
ExecStart=/home/gogs/installations/gogs/gogs web
Restart=always
Environment=USER=gogs HOME=/home/gogs

# Some distributions may not support these hardening directives. If you cannot start the service due
# to an unknown option, comment out the ones not supported by your version of systemd.
ProtectSystem=full
PrivateDevices=yes
PrivateTmp=yes
NoNewPrivileges=true

[Install]
WantedBy=multi-user.target

Questo almeno manterrà l'accesso al filesystem contenuto in un filesystem effimero creato da systemd. Aiuta, ma probabilmente dovresti correggere la vulnerabilità di escalation e non dare alcun admin... ovviamente.

Scarica lo strumento