Initial Access Tactics, techniques and procedures

From Enlace Hacktivista
Jump to navigation Jump to search

Phishing

Phishing is the most common attack method favored by advanced persistent threat groups and cyber criminal organized gangs. This is because it relies on social engineering to trick the target to either download a malicious e-mail attachment or click on a malicious link.

Tools

Password Attacks

Groups like Lapsus$ show's the world that you don't need to be a great technical hacker to pwn massive corporations and if common password and multi-factor authentication (MFA) attacks work on the likes of Uber, Rockstar games, Okta and so on then they will work on our hacktivist targets!

If your target uses multi-factor authentication you can try either social engineering or MFA fatigue.

Usernames

Create a bespoke username word list based on OSINT, recon, permutations and your targets employee LinkedIn, website and other social media profiles to aid in your password attacks to develop possible usernames and e-mails for password spraying.

Passwords

Common and leaked credentials to test login portals and network services.

Default passwords

Common and leaked passwords

Password cracking tools

Searching leaks

Services

Please note: DO NOT use intelx[.]io as they have been seen doxing hackers in the past and block the use of Tor. AVOID!

You can use services that compile COMBO lists (leaked credentials) to search for your targets domain, then download the results and use them in a password attack to see whether or not your target recycles their credentials.

Once your leaks have been downloaded you can parse your results in the format, e-mail:pass.

Password spraying

Employees commonly use recycled and weak credentials for convenience. If you already have valid passwords you can try and spray them across different services to test whether they have been recycled on other services or not. You can also take common passwords (Spring2023) and spray them hoping an employee uses a weak and guessable credential.

Hash cracking

Crack password hashes using both online and offline tools!

Identify hash

Online tools

Offline tools

Buying access

You can use the russian market to purchase credentials stolen from targets through the use of info stealer malware. Search your target here to see if you can make a quick win gaining access to an employee account. Any account that allows internal access is always a great start.

You can also find access brokers selling network access inside of companies on forums. Services include but is not limited to account credentials, shells, implants, and other remote management software (RDP, VPN, SSH, etc).

Spray and pray

As seen by Guacamaya, hacktivists can benefit from a highly targeted spray and pray campaign whereby you scan IP ranges of countries of interest or your target companies IP ranges for critical vulnerabilities and attack protocols with a password attack. In the case of Guacamaya they scanned and exploited proxyshell and yoinked all their target e-mails out of their Microsoft exchange e-mail servers and leaked them. You can also do the same! See scanning and recon for tools such as nuclei and the nmap scripting engine (NSE) to then vulnerability scan the IP addresses you discover.

Prerequisites

There are some prerequisites you will need to follow the below examples:

  1. Virtual or Dedicated server (OPSEC)
  2. Basic command line knowledge
  3. Terminal multiplexers such as Tmux or Gnu/Screen to maintain your scanning and hacking session
  4. Administration skills such as SSH and SCP.

Networks

Vulnerability Scanning

We can use a vulnerability scanning spray and pray technique on publicly facing applications to masscan the internet or specific IP ranges for critical vulnerabilities that we can later exploit and gain initial access into target networks with. Here we scan for and exploit both Proxyshell and CVE-2018-13379 as they are both high severity and critical CVE vulnerabilities. In your attacks focus on new and old CVE vulnerabilities that are commonly exploited.

Here we port scan IP ranges for either the entire internet or specific country IP ranges, append those ports to the end of the IP address separated with a colon and then proceed to vulnerability scan the discovered hosts before finally exploiting the identified vulnerabilities.

IP Ranges:

Proxyshell

Tool: masscan

1. Scan for Proxyshell:

  • sudo masscan -Pn -sS -iL ranges.txt --rate 50000 -p443 --open-only --excludefile block.txt | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+' > results.txt
  • sed -i 's/$/:443/' results.txt

Exploit Discovered hosts: Proxyshell

CVE-2018-13379

2. Scan for CVE-2018-13379:

Exploit Discovered hosts: Fortinet SSL VPN Path Traversal

Tool: zmap

1. Scan for Microsoft Exchange E-mail Servers:

sudo zmap -q -p 443 | httpx -silent -s -sd -location \
> | awk '/owa/ { print substr($1,9) }' > owa.txt

2. Vulnerability scan discovered hosts for Proxyshell using NSE

nmap -p 443 -Pn -n \
> --script http-vuln-exchange-proxyshell.nse -iL owa.txt

Exploit Discovered hosts

Domains

Mass subdomain enumerating, port scanning and vulnerability scanning domains at the start of an operation when targeting a country or specific TLDs (.gov) is a great way to get a lot of coverage and find low hanging fruit vulnerabilities which may serve as the initial access vector when hacking your targets.

See Domain Spray and Pray scanning.

Password Attacks

A lot of organizations use VPNs and RDPs to allow employees and third-party contractors to remotely connect into the internal network of the organization. For either developer, testing, lazy administration or forgotten about servers these systems can be left running with weak or default credentials with no multi-factor authentication in place. Port scan the internet for ports they commonly run on, cross referencing against Shodan for standard and non-standard ports then use common and default credentials.

RDP

1. Remote Desktop (RDP) Brute forcing:

VPN

2. Virtual Private Network (VPN) Brute forcing: