{"id":13439469,"url":"https://github.com/diegocr/netcat","last_synced_at":"2025-04-04T20:15:03.059Z","repository":{"id":40791673,"uuid":"1643158","full_name":"diegocr/netcat","owner":"diegocr","description":"NetCat for Windows","archived":false,"fork":false,"pushed_at":"2014-04-02T02:24:20.000Z","size":313,"stargazers_count":833,"open_issues_count":9,"forks_count":242,"subscribers_count":35,"default_branch":"master","last_synced_at":"2025-03-28T19:11:48.288Z","etag":null,"topics":["c","netcat","network","penetration-testing","pentesting","security","windows"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/diegocr.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":"license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-04-21T00:17:24.000Z","updated_at":"2025-03-27T15:27:30.000Z","dependencies_parsed_at":"2022-07-10T14:46:44.557Z","dependency_job_id":null,"html_url":"https://github.com/diegocr/netcat","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diegocr%2Fnetcat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diegocr%2Fnetcat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diegocr%2Fnetcat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diegocr%2Fnetcat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/diegocr","download_url":"https://codeload.github.com/diegocr/netcat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247242681,"owners_count":20907134,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","netcat","network","penetration-testing","pentesting","security","windows"],"created_at":"2024-07-31T03:01:14.180Z","updated_at":"2025-04-04T20:15:03.036Z","avatar_url":"https://github.com/diegocr.png","language":"C","readme":"\n )\\  )\\   )\\.---.  .-,.-.,-.    )\\.-.     /`-.   .-,.-.,-. \n(  \\, /  (   ,-._( ) ,, ,. (  ,' ,-,_)  ,' _  \\  ) ,, ,. ( \n ) \\ (    \\  '-,   \\( |(  )/ (  .   _  (  '-' (  \\( |(  )/ \n( ( \\ \\    ) ,-`      ) \\     ) '..' )  )   _  )    ) \\    \n `.)/  )  (  ``-.     \\ (    (  ,   (  (  ,' ) \\    \\ (    \n    '.(    )..-.(      )/     )/'._.'   )/    )/     )/    for Windows\n-----------------------------------------------------------------------\n\nThis NetCat for Windows was originally created by Rodney Beede, it's\na version compiled without the GAPING_SECURITY_HOLE option (-e switch)\nwhich can trigger false positives in anti-virus programs. Check the\nfile readme.rodneybeede.txt for further details.\n\nWhy am I creating this version, you may ask? Well, during some of my\ntelnet sessions i've noticed extraneous characters being returned and\nsuch, so... basically, this version should fix those issues.\n\nYou can also find there a nc.exe executable, which was compiled\nusing GCC 4.8.1 and tested under Windows 7 (HP) 32-bits.\n\nSHA1(nc.exe)= c5e19c02a9a1362c67ea87c1e049ce9056425788\n\nIf you have some question, feel free to contact me.\n\nSincerely,\nDiego Casorran.\n\n\nJust for the sake of, you'll find below the original NetCat README file:\n\n\nUPDATE 12/27/04 security fix in -e option for Windows\n\nNetcat 1.11 for NT - nc111nt.zip\n\nThe original version of Netcat was written by *hobbit* \u003chobbit/at/avian.org\u003e\nThe NT version was done by Weld Pond \u003cweld/at/vulnwatch.org\u003e\n\nNetcat for NT is the tcp/ip \"Swiss Army knife\" that never made it into any \nof the resource kits.  It has proved to be an extremely versatile tool on \nthe unix platform. So why should NT always be unix's poor cousin when it \ncomes to tcp/ip testing and exploration?  I bet many NT admins out there\nkeep a unix box around to use tools such as Netcat or to test their systems\nwith the unix version of an NT vulnerability exploit.  With Netcat for NT\npart of that feeling disempowerment is over.\n\nIncluded with this release is Hobbit's original description of the powers \nof Netcat.  In this document I will briefly describe some of the things an\nNT admin might want to do and know about with Netcat on NT.  For more\ndetailed technical information please read hobbit.txt included in the\nnc11nt.zip archive.\n\n     Basic Features\n\n     * Outbound or inbound connections, TCP or UDP, to or from any ports\n     * Full DNS forward/reverse checking, with appropriate warnings\n     * Ability to use any local source port\n     * Ability to use any locally-configured network source address\n     * Built-in port-scanning capabilities, with randomizer\n     * Can read command line arguments from standard input\n     * Slow-send mode, one line every N seconds\n     * Hex dump of transmitted and received data\n     * Ability to let another program service established\n       connections\n     * Telnet-options responder\n\n     New for NT\n\n     * Ability to run in the background without a console window\n     * Ability to restart as a single-threaded server to handle a new\n       connection\n\n\nA simple example of using Netcat is to pull down a web page from a web\nserver.  With Netcat you get to see the full HTTP header so you can see\nwhich web server a particular site is running.\n\nSince NT has a rather anemic command processor, some of the things that are\neasy in unix may be a bit more clunky in NT. For the web page example first\ncreate a file get.txt that contains the following line and then a blank\nline:\n\nGET / HTTP/1.0\n\nTo use Netcat to retrieve the home page of a web site use the command:\nnc -v www.website.com 80 \u003c get.txt\n\nYou will see Netcat make a connection to port 80, send the text contained\nin the file get.txt, and then output the web server's response to stdout.\nThe -v is for verbose.  It tells you a little info about the connection\nwhen it starts.\n\nIt is a bit easier to just open the connection and then type at the console\nto do the same thing. \nnc -v www.website.com 80\n\nThen just type in GET / HTTP/1.0 and hit a couple of returns.  You will \nsee the same thing as above.\n\nA far more exciting thing to do is to get a quick shell going on a remote\nmachine by using the -l or \"listen\" option and the -e or \"execute\"\noption.  You run Netcat listening on particular port for a connection.\nWhen a connection is made, Netcat executes the program of your choice\nand connects the stdin and stdout of the program to the network connection.\n\nnc -l -p 23 -t -e cmd.exe\n\nwill get Netcat listening on port 23 (telnet).  When it gets connected to\nby a client it will spawn a shell (cmd.exe).  The -t option tells Netcat\nto handle any telnet negotiation the client might expect.\n\nThis will allow you to telnet to the machine you have Netcat listening on\nand get a cmd.exe shell when you connect.  You could just as well use \nNetcat instead of telnet:\n\nnc xxx.xxx.xxx.xxx 23\n\nwill get the job done.  There is no authentication on the listening side\nso be a bit careful here.  The shell is running with the permissions of the\nprocess that started Netcat so be very careful.  If you were to use the\nAT program to schedule Netcat to run listening on a port with the \n-e cmd.exe option, when you connected you would get a shell with user\nNT AUTHORITY\\SYSTEM.\n\nThe beauty of Netcat really shines when you realize that you can get it\nlistening on ANY port doing the same thing.  Do a little exploring and\nsee if the firewall you may be behind lets port 53 through.  Run Netcat\nlistening behind the firewall on port 53.  \n\nnc -L -p 53 -e cmd.exe\n\nThen from outside the firewall connect to the listening machine:\n\nnc -v xxx.xxx.xxx.xx 53\n\nIf you get a command prompt then you are executing commands on the\nlistening machine.  Use 'exit' at the command prompt for a clean\ndisconnect. The -L (note the capital L) option will restart Netcat with\nthe same command line when the connection is terminated.  This way you can\nconnect over and over to the same Netcat process.\n\nA new feature for the NT version is the -d or detach from console flag.\nThis will let Netcat run without an ugly console window cluttering up the\nscreen or showing up in the task list.\n\nYou can even get Netcat to listen on the NETBIOS ports that are probably\nrunning on most NT machines.  This way you can get a connection to a\nmachine that may have port filtering enabled in the TCP/IP Security Network\ncontrol panel.  Unlike Unix, NT does not seem to have any security around\nwhich ports that user programs are allowed to bind to.  This means any\nuser can run a program that will bind to the NETBIOS ports.\n\nYou will need to bind \"in front of\" some services that may already be\nlistening on those ports.  An example is the NETBIOS Session Service that\nis running on port 139 of NT machines that are sharing files.  You need\nto bind to a specific source address (one of the IP addresses of the \nmachine) to accomplish this.  This gives Netcat priority over the NETBIOS\nservice which is at a lower priority because it is bound to ANY IP address.\nThis is done with the Netcat -s option:\n\nnc -v -L -e cmd.exe -p 139 -s xxx.xxx.xxx.xxx\n\nNow you can connect to the machine on port 139 and Netcat will field\nthe connection before NETBIOS does.  You have effectively shut off\nfile sharing on this machine by the way.  You have done this with just\nuser privileges to boot.\n\nPROBLEMS with Netcat 1.1 for NT\n\nThere are a few known problems that will eventually be fixed.  One is\nthe -w or timeout option.  This works for final net reads but not\nfor connections.  Another problem is using the -e option in UDP mode.\nYou may find that some of the features work on Windows 95.  Most\nof the listening features will not work on Windows 95 however.   These will\nbe fixed in a later release.\n\nNetcat is distributed with full source code so that people can build\nupon this work.  If you add something useful or discover something \ninteresting about NT TCP/IP let met know.\n\nWeld Pond \u003cweld/at/l0pht.com\u003e, 2/2/98\n","funding_links":[],"categories":["C","\u003ca id=\"b35965810463fb97b1ca26d94a8b62f0\"\u003e\u003c/a\u003eNetcat"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiegocr%2Fnetcat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdiegocr%2Fnetcat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiegocr%2Fnetcat/lists"}