Page 1 of 2 12 LastLast
Results 1 to 10 of 28

Thread: Recompiling NetCat [In Windows] To Bypass AntiVirus

Hybrid View

  1. #1
    Junior Member
    Join Date
    Feb 2007
    Posts
    74

    Default Recompiling NetCat [In Windows] To Bypass AntiVirus

    So I'm attempting to recompile netcat from it's windows ported source to by pass antivirus signatures. The compile goes well and exits with no warnings however whenever I try to invoke the nc -L command, when I try to connect to the machine from another computer and then close the session on the other computer, I get a WIN32 Unhandled exception and it shuts down nc on the host computer and thus I can no longer connect back to it. Has anyone successfully recompiled the windows source with a working -L flag? It seems the nc.exe that ships with the source works fine with -L so I don't understand what the issue could be.

  2. #2
    Good friend of the forums
    Join Date
    Feb 2009
    Posts
    356

    Default

    that is normal. You cannot listen forever. Try that in linux, listen, connect from another pc, drop session... host nc exits.

  3. #3
    Junior Member
    Join Date
    Feb 2007
    Posts
    74

    Default

    The -L flag is supposed to allow listening after someone connects and disconnects, and it works properly on the exe delivered in the folder already. Now when I try to compile it myself, it forcefully closes netcat on the host and gives an error when I connect and then disconnect, which it should not do, and I cannot figure out why.

  4. #4
    Member kazalku's Avatar
    Join Date
    Feb 2009
    Posts
    416

    Default

    Quote Originally Posted by xorred View Post
    You cannot listen forever.
    You can, in fact - if you use capital L. Try it or or have a look: http://www.ol-service.com/sikurezza/doc/netcat_eng2.pdf

  5. #5
    Super Moderator lupin's Avatar
    Join Date
    Jan 2010
    Posts
    2,943

    Default

    Quote Originally Posted by aspekt9 View Post
    So I'm attempting to recompile netcat from it's windows ported source to by pass antivirus signatures. The compile goes well and exits with no warnings however whenever I try to invoke the nc -L command, when I try to connect to the machine from another computer and then close the session on the other computer, I get a WIN32 Unhandled exception and it shuts down nc on the host computer and thus I can no longer connect back to it. Has anyone successfully recompiled the windows source with a working -L flag? It seems the nc.exe that ships with the source works fine with -L so I don't understand what the issue could be.
    Funnily enough I was trying this myself last Friday. I didn't attempt the -L option, but I was getting crashes when transferring binary files between a netcat sender and listener. netcat would crash after the file transfer was finished.

    Didnt get to spend too much time on this to really figure out what was going on. I compiled with Visual C++ 2008 Express on XP, trying a variety of different options in the makefile to see if that made any difference (nope). I was in the process of trying to compile with mingw when I got interrupted.

    Which compiler did you use and did you modify the makefile in any way?

    Edit: And yes, kazalku is right, -L allows you to listen harder (or re-listen after disconnect) , this is a Windows nc option and is not available on the standard Linux nc.
    Capitalisation is important. It's the difference between "Helping your brother Jack off a horse" and "Helping your brother jack off a horse".

    The Forum Rules, Forum FAQ and the BackTrack Wiki... learn them, love them, live them.

  6. #6
    Junior Member
    Join Date
    Feb 2007
    Posts
    74

    Default

    Quote Originally Posted by lupin View Post
    Funnily enough I was trying this myself last Friday. I didn't attempt the -L option, but I was getting crashes when transferring binary files between a netcat sender and listener. netcat would crash after the file transfer was finished.

    Didnt get to spend too much time on this to really figure out what was going on. I compiled with Visual C++ 2008 Express on XP, trying a variety of different options in the makefile to see if that made any difference (nope). I was in the process of trying to compile with mingw when I got interrupted.

    Which compiler did you use and did you modify the makefile in any way?

    Edit: And yes, kazalku is right, -L allows you to listen harder (or re-listen after disconnect) , this is a Windows nc option and is not available on the standard Linux nc.
    Good to see someone in a similar situation, I tried using VC++ 2008 as well. I also tried, cygwin and minGW but to no avail, all would compile correctly but the -L issue still occured. I have an inkling that it might be the newer VC++ because for both those compilers, they relied on binary files in the VC++ folder (I merely added the VC++ PATHS to the compiler PATHS in order to get cl.exe and link to work, that was the only way I could get it to compile) I'm wondering if maybe an older version of VC++ would produce different results, I don't see why it should but it's worth a shot I suppose.

  7. #7

    Default

    I have a modified version of crypcat HERE that compiles fine under windows and linux. The windows version requires Visual Studio 6. As for using VC 2008, I think that may be your problem since netcat is pretty old.

  8. #8
    Member imported_vvpalin's Avatar
    Join Date
    Apr 2009
    Posts
    442

    Default

    Quote Originally Posted by cybrsnpr View Post
    I have a modified version of crypcat HERE that compiles fine under windows and linux. The windows version requires Visual Studio 6. As for using VC 2008, I think that may be your problem since netcat is pretty old.
    that is definitely a keeper thanks
    Using backtrack for the first time is like being 10 years old again with the keys to a Ferrari.

  9. #9
    Junior Member
    Join Date
    Apr 2009
    Posts
    43

    Default

    Quote Originally Posted by cybrsnpr View Post
    I have a modified version of crypcat HERE that compiles fine under windows and linux. The windows version requires Visual Studio 6. As for using VC 2008, I think that may be your problem since netcat is pretty old.
    Just want to point out to anyone else trying to check out mocat that previously posted the link is dead, but I dug around and found it was moved to

    csr-group.com/csr-group/resources/mocat.html

  10. #10

    Default

    Quote Originally Posted by Wolfbane View Post
    Just want to point out to anyone else trying to check out mocat that previously posted the link is dead, but I dug around and found it was moved to

    csr-group.com/csr-group/resources/mocat.html
    The original link is working again. My hosting provider had a server crash that messed things up.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •