exam questions

Exam PT0-001 All Questions

View all questions & answers for the PT0-001 exam

Exam PT0-001 topic 1 question 117 discussion

Actual exam question from CompTIA's PT0-001
Question #: 117
Topic #: 1
[All PT0-001 Questions]

Which of the following commands would allow a penetration tester to access a private network from the Internet in Metasploit?

  • A. set rhost 192.168.1.10
  • B. run autoroute -s 192.168.1.0/24
  • C. db_nmap -iL /tmp/privatehosts.txt
  • D. use auxiliary/server/socks4a
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️
Reference -
https://www.offensive-security.com/metasploit-unleashed/pivoting/

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
mr_robot
Highly Voted 5 years, 2 months ago
PenTest+ Practice Tests Book - SYBEX D. Metasploit is a tool for the development of exploits and the testing of them on live targets. The socks4a auxiliary is a module from within the framework. This auxiliary module provides a proxy server that uses Metasploit Framework routing to relay connections. So, using the use auxiliary/server/socks4a module allows a tester to access a private network from the Internet.
upvoted 9 times
mr_robot
5 years, 1 month ago
Don't think this is right. Probably A is correct. - https://github.com/rapid7/metasploit-framework/blob/master/documentation/modules/auxiliary/server/socks4a.md
upvoted 1 times
khuno
5 years ago
It will be socks4a that will create a session through the internet. (the question says access the network.) It will not be autoroute because that will help you pivot to another computer in the network. Meaning you are already in.
upvoted 2 times
...
...
...
byrne
Highly Voted 4 years, 6 months ago
Once you got access to a perimeter box that has 2 NIC (1 for internal network and 1 for inet), you'll use B. run autoroute -s 192.168.1.0/24 in order to ACCESS the internal network. Once you got access using 'autoroute' you can use D. use auxiliary/server/socks4a in order to run post modules in meterpreter Therefore, first you'll need B to access, and after D to enumerate, run scripts.... Answer B. run autoroute -s 192.168.1.0/24 https://www.ivoidwarranties.tech/posts/pentesting-tuts/pivoting/meterpreter/
upvoted 5 times
...
miabe
Most Recent 2 years, 11 months ago
Selected Answer: B
looks good to me
upvoted 1 times
...
anonamphibian
3 years, 4 months ago
RHOST is just defining the remote host outside your local network. Run autorun actually performs the execution of accessing the private network.
upvoted 1 times
...
Cock
3 years, 4 months ago
It was on the exam
upvoted 1 times
...
kabwitte
4 years, 11 months ago
I would go with B: Preparing to pivot across a network requires us to first establish a Meterpreter session on the victim machine. From there, we can use the autoroute script to enable access to the non-routable subnet: meterpreter > run autoroute -s 10.0.0.0/24 Note: An non-routable address is a private network address. Non-routable: https://docs.actian.com/dataconnect/11.1/index.html#page/User/Non-routable_Addresses.htm
upvoted 3 times
kabwitte
4 years, 11 months ago
Sorry, I missed a source for the autoroute script: https://github.com/rapid7/metasploit-framework/blob/master/documentation/modules/auxiliary/server/socks4a.md
upvoted 1 times
...
...
D1960
5 years, 3 months ago
Maybe: B. run autoroute -s 192.168.1.0/24 ? Reference: https://www.offensive-security.com/metasploit-unleashed/Pivoting/
upvoted 4 times
kabwitte
4 years, 11 months ago
Yup, I believe you are correct sir! The link you provided actually gives the answer. :)
upvoted 3 times
dumdada
3 years, 7 months ago
But this only works if you are already in the local network, doesnt it? The question says "from the Internet"
upvoted 2 times
...
...
mr_robot
5 years, 1 month ago
Agree with you. "Preparing to pivot across a network requires us to first establish a Meterpreter session on the victim machine. From there, we can use the autoroute script to enable access to the non-routable subnet" - https://github.com/rapid7/metasploit-framework/blob/master/documentation/modules/auxiliary/server/socks4a.md run autoroute -s 192.168.1.0/24 - Add a route to 192.168.1.0/24 (establish a Meterpreter session on the victim machine - https://www.offensive-security.com/metasploit-unleashed/Pivoting/ use auxiliary/server/socks4a - Setup and run a socks proxy over meterpreter, this module provides a socks4a proxy server that uses the builtin Metasploit routing to relay connections. - https://www.offensive-security.com/metasploit-unleashed/proxytunnels/ https://nullsweep.com/pivot-cheatsheet-for-pentesters/ set rhost 192.168.1.10 - Set the target address db_nmap -iL /tmp/privatehosts.txt - Use nmap and place results in database
upvoted 4 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...