Offensive PythonOffensive ToolA Python Netcat Listener
Offensive PythonOffensive ToolA Python Netcat Listener

     During Red Team exercises, we may gain access to systems but in tightly controlled environments, it can be tough to move around, and netcat may not be readily available for a particular OS.  Well, never fear, Python to the rescuse once again.  I discovered a really useful module recently, appropriately named nclib.  Look how easy this makes coding sockets become!

#!/usr/bin/python3
from nclib import Netcat

nc = Netcat(listen=(‘192.168.134.129’, 56838))
nc.interact()

 The 3 lines of code above is doing what nc -l -p 56838 would do, and the module does a whole lot more.  You can build tools using the module and then use Pyinstaller to “one folder” or “one file” them up for easy deployment to whatever system you need it on.

2 Comments

  1. Respected Sir, could you please give me a free coupon for your “PEthical Hacking: Design Command and Control using Python 3” course on udemy ? I am financially insolvent now. If you do not want to give a free coupon then it is ok , hope I will buy your course one day. If you are angered by my words then please pardon me and please do not abuse me or mock me. May GOD bless you and your family.
    Regards
    Cyrus

Leave a Reply

Your email address will not be published. Required fields are marked *