From 5a6995f81f8ebd964c610d6f3dc98c2be48a09c4 Mon Sep 17 00:00:00 2001 From: Omar Santos <santosomar@gmail.com> Date: Sat, 5 Aug 2023 22:44:30 -0400 Subject: [PATCH] Update c2_example1.md --- .../post_exploitation/c2_example1.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/programming_and_scripting_for_cybersecurity/post_exploitation/c2_example1.md b/programming_and_scripting_for_cybersecurity/post_exploitation/c2_example1.md index 0b1a504..d6bd4d2 100644 --- a/programming_and_scripting_for_cybersecurity/post_exploitation/c2_example1.md +++ b/programming_and_scripting_for_cybersecurity/post_exploitation/c2_example1.md @@ -1,5 +1,8 @@ # Example of Creating a C2 Using Python -Let's create a Python script that sets up a listener to communicate with a remote device. The listener waits for a connection, then allows the user to send commands to the remote device. Here's a breakdown of the code: +Let's create a Python script that sets up a listener to communicate with a remote device. The listener waits for a connection, then allows the user to send commands to the remote device. +🤖 Checkout [this prompt in ChatGPT](https://chat.openai.com/share/a8399b03-9d33-444a-bce3-e7995d351316) + +Here's a breakdown of the code: 1. **Importing Required Module**: ```python @@ -24,8 +27,8 @@ Let's create a Python script that sets up a listener to communicate with a remot 5. **Socket Address Configuration**: ```python - IP = "192.168.74.128" - Port = 8008 + IP = "10.6.6.88" + Port = 1337 socket_address = (IP, Port) ``` The IP address and port for the listener are defined. @@ -54,3 +57,5 @@ Let's create a Python script that sets up a listener to communicate with a remot 9. **Exception Handling**: If any exception occurs during command execution or communication, the script prints "Exception occurred" and closes the socket. + +