CPTS labs - 07 Shell and payloads
Shells & Payloads
Shell Basics
Which two shell languages did we experiment with in this section? (Format: shellname&shellname)
Results: bash&powershell
In Pwnbox issue the $PSversiontable variable using PowerShell. Submit the edition of PowerShell that is running as the answer. Results: Core
Des is able to issue the command nc -lvnp 443 on a Linux target. What port will she need to connect to from her attack box to successfully establish a shell session?
Results: 443
SSH to $ipVictim with user "htb-student" and password "HTB_@cademy_stdnt!". Create a bind shell, then use netcat to connect to the target using the bind shell you set up. When you have completed the exercise, submit the contents of the flag.txt file located at /customscripts.
Results: B1nD_Shells_r_cool
When establishing a reverse shell session with a target, will the target act as a client or server? Results: Client
Connect to the target via RDP and establish a reverse shell session with your attack box then submit the hostname of the target box.
Results: Shells-Win10
Payloads
What command language interpreter is used to establish a system shell session with the target?
Results: powershell
Exploit the target using what you've learned in this section, then submit the name of the file located in htb-student's Documents folder. (Format: filename.extension)
Results: staffsalaries.txt
Administrator:500:aad3b435b51404eeaad3b435b51404ee:7796ee39fd3a9c3a1844556115ae1a54:::
Windows Shells
What file type is a text-based DOS script used to perform tasks from the cli? (answer with the file extension, e.g. '.something')
Results: .bat
What Windows exploit was dropped as a part of the Shadow Brokers leak? (Format: ms bulletin number, e.g. MSxx-xxx)
Results: MS17-010
*Gain a shell on the vulnerable target, then submit the contents of the flag.txt file that can be found in C:*
Results: EB-Still-W0rk$
NIX Shells
What language is the payload written in that gets uploaded when executing rconfig_vendors_auth_file_upload_rce?
Results: php
Exploit the target and find the hostname of the router in the devicedetails directory at the root of the file system.
Results: edgerouter-isp
Web Shells
laudanum
vHosts needed for these questions: status.inlanefreight.local
Establish a web shell session with the target using the concepts covered in this section. Submit the full path of the directory you land in. (Format: c:\path\you\land\in)
Modify the shell to use. Add to the whitelisting rule your ip.
Upload the file to the web server.
Once uploaded, go to http://status.inlanefreight.local//file/laudanum.aspx which is your uploaded file. You will see something like:
Results: c:\windows\system32\inetsrv
Where is the Laudanum aspx web shell located on Pwnbox? Submit the full path. (Format: /path/to/laudanum/aspx)
Results: /usr/share/laudanum/aspx/shell.aspx
antak webshell
vHosts needed for these questions: status.inlanefreight.local
. Where is the Antak webshell located on Pwnbox? Submit the full path. (Format:/path/to/antakwebshell)
Results: /usr/share/nishang/Antak-WebShell/antak.aspx
Establish a web shell with the target using the concepts covered in this section. Submit the name of the user on the target that the commands are being issued as. In order to get the correct answer you must navigate to the web shell you upload using the vHost name. (Format: *, 1 space)*
Set credentials for access to the web shell. Modify line 14
, adding a user and password.
Open the browser and upload the file to the web app. Open the url //files/Upload.aspx and enter user and password.
Now that we have access, we can utilize PowerShell commands to navigate and take actions against the host.
Results: iis apppool\status
php shells
In the example shown, what must the Content-Type be changed to in order to successfully upload the web shell? (Format: .../...)
Results: image/gif
Use what you learned from the module to gain a web shell. What is the file name of the gif in the /images/vendor directory on the target? (Format: xxxx.gif)
Results: ajax-loader.gif
Skills Assessment
CAT5's team has secured a foothold into Inlanefrieght's network for us. Our responsibility is to examine the results from the recon that was run, validate any info we deem necessary, research what can be seen, and choose which exploit, payloads, and shells will be used to control the targets. Once on the VPN or from your Pwnbox
, we will need to RDP
into the foothold host and perform any required actions from there. Below you will find any credentials, IP addresses, and other info that may be required.
Hosts 1-3 will be your targets for this skills challenge. Each host has a unique vector to attack and may even have more than one route built-in. The challenge questions below can be answered by exploiting these three hosts. Gain access and enumerate these targets. You will need to utilize the Foothold PC provided. The IP will appear when you spawn the targets. Attempting to interact with the targets from anywhere other than the foothold will not work. Keep in mind that the Foothold host has access to the Internal inlanefreight network (172.16.1.0/23
network) so you may want to pay careful attention to the IP address you pick when starting your listeners.
10.129.213.83
What is the hostname of Host-1? (Format: all lower case)
Results: SHELLS-WINSVR
Exploit the target and gain a shell session. Submit the name of the folder located in C:\Shares\ (Format: all lower case)
Results: dev-share
What distribution of Linux is running on Host-2? (Format: distro name, all lower case)
Results: Ubuntu
What language is the shell written in that gets uploaded when using the 50064.rb exploit?
Results: php
Exploit the blog site and establish a shell session with the target OS. Submit the contents of /customscripts/flag.txt
Results: B1nD_Shells_r_cool
What is the hostname of Host-3?
Results: SHELLS-WINBLUE
Exploit and gain a shell session with Host-3. Then submit the contents of C:\Users\Administrator\Desktop\Skills-flag.txt
Results: One-H0st-Down!
Last update: 2025-01-26 Created: January 26, 2025 19:15:53