Question: TCP Server [ 5 Marks ] CREATE A SERVER SCRIPT 1 . Accept only one connection at a time. [ 1 Mark ] a .

TCP Server [5 Marks] CREATE A SERVER SCRIPT
1. Accept only one connection at a time. [1 Mark]
a. Implement functionality in the server script to handle one connection at
any given time.
2. Print a success message when a connection is received [1 Mark]
a. Upon successfully establishing a connection, the server should display a
confirmation message.
3. Allows the user to enter commands to be executed on the target [2 Marks]
a. Implement a feature that reads input from the server-side user and
sends these commands to the connected client for execution.
4. Allows user to terminate shell by typing "end" [1 Mark]
a. Implement a feature that gracefully terminates the reverse shell session
when the server-side user types "end."
Part 3: TCP Client [5 Marks] CREATE A CLIENT SCRIPT
1. Connect to the server [1 Mark]
a. Implement functionality that allows the client to initiate a connection to
the server's IP address and port.
2. Receive commands from the server [1 Mark]
a. The client should be able to receive and interpret commands sent from
the server.
3. Execute command [1 Mark]
a. Implement command execution functionality using the subprocess
library.
4. Capture errors or response from command and send to server [2 Marks]
a. The client should capture the output or any errors from the executed
command and send this information back to the server.
Operation Instructions [5 Marks]
1. Where in the code to update IP addresses [1 Mark]
a. Provide specific instructions on where in the server and client code the
user should specify the IP addresses for the connection.
2. What port numbers to use? [1 Mark]
a. Suggest optimal port numbers for establishing the connection and
justify the choice.
3. Any known bugs? [2 Marks]
a. Document any known issues or limitations within the application,
providing descriptions and potential impacts.
4. Any custom commands? [1 Mark]
a. If there are any custom commands implemented in the reverse shell,
describe them and explain their usage.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!