To avoid issues, which command would you run to drop an SMB session before trying to connect as another user?

Study for the SANS560 GIAC Penetration Tester (GPEN) Test. Study with flashcards and multiple choice questions, each question has hints and explanations. Get ready for your exam!

Multiple Choice

To avoid issues, which command would you run to drop an SMB session before trying to connect as another user?

Explanation:
You need to explicitly terminate the existing SMB connection before re-authenticating, so you don’t carry over the old session or credentials. The command to do this uses Windows’ network-connection management: net use TARGET /del. This removes the active connection to the SMB share identified by TARGET, effectively dropping the session. Once the session is removed, you can connect again with the desired user credentials. The other options are not appropriate: net stop smb would stop the SMB service system-wide, which is disruptive and unnecessary for just dropping one session. killall smb is not a Windows command and doesn’t apply here. rm -rf share would delete a local directory, not manage network sessions.

You need to explicitly terminate the existing SMB connection before re-authenticating, so you don’t carry over the old session or credentials. The command to do this uses Windows’ network-connection management: net use TARGET /del. This removes the active connection to the SMB share identified by TARGET, effectively dropping the session. Once the session is removed, you can connect again with the desired user credentials.

The other options are not appropriate: net stop smb would stop the SMB service system-wide, which is disruptive and unnecessary for just dropping one session. killall smb is not a Windows command and doesn’t apply here. rm -rf share would delete a local directory, not manage network sessions.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy