Image
 
linkedin_logo.png rss_logo.jpg
twitter_logo.png youtube_logo.jpg
Latest Additions
 
EH-Net Login
Welcome Guest.






Lost Password?
No account yet? Register
Who's Online
We have 34 guests online
 
Advertisement

You are here: Home arrow Resourcesarrow Toolsarrow start netcat at specific time?
EH-Net
May 18, 2013, 09:39:44 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Go back to The Ethical Hacker Network Online Magazine Home Page
 
   Home   Help Calendar Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: start netcat at specific time?  (Read 11487 times)
0 Members and 1 Guest are viewing this topic.
kthc
Newbie
*
Offline Offline

Posts: 2


View Profile
« on: September 27, 2007, 10:12:34 PM »

i'm very new to netcat and don't know how to do alot of stuff, one of them is having it start/run at a specific time how do i do that?
Logged
LK
Newbie
*
Offline Offline

Posts: 29


View Profile
« Reply #1 on: September 28, 2007, 02:17:05 AM »

Welcome to Ethical Hacker Network.

Hope you noticed the ethical part of the name, and we are hoping that you are going to use netcat for ethical purposes (for testing, learning etc.) on a system that you own.

If you want to start netcat at a specific time with the purpose to open a back door to that system with malicious intent, we totally discourage you in doing this.

But to answer your question:
- Windows - use "at"
- Linux - use "cron"
Logged

Security+, OSCP, CISM, CISSP
dean
Guest
« Reply #2 on: September 28, 2007, 10:27:36 AM »

I fail to see how asking about how to have netcat start at a specific time implies malicious intent. Simply asking about how to use a tool does not imply anything other than a desire to learn.

Netcat can be used for multiple tasks that are not malicious. for example: Used with dd to transfer a disk image for forensic purposes.

But to answer kthc's question:

A more elegant way is to add a reg key:

reg add hklm\software\microsoft\windows\currentversion\run /v listener /t reg_sz /d "nc -l –d -p 4321 -e cmd.exe"

Basically what the “reg” command does is add a new entry in the registry. An entry consists of a name, data type and value. In this case we have added new entry called “listener” using “/v”, with a data type of ascii that ends with a null character through “/t” (The Z in REG_SZ refers to the null character) and specified the value with “/d”.

Note that the command is enclosed in quotes as there are spaces in the string. Also note the additional “-d” option specified in the Netcat command string. This tells Netcat to run in the background. This is a feature of the Windows version of Netcat.

Also on XP you might want to use  "SCHTASKS" if you are having difficulty with "AT".

....begin shameless plug....

I wrote a document on netcat a while back. It can be found at

http://www.learnsecurityonline.com/index.php?option=com_content&task=view&id=168&Itemid=46

and on:

http://www.infosecwriters.com/texts.php?op=display&id=573

It covers most of what netcat is capable of. Netcat can do more but hey, you need to figure some things out for yourself. Smiley

---end shameless plug....

Dean
Logged
kthc
Newbie
*
Offline Offline

Posts: 2


View Profile
« Reply #3 on: September 28, 2007, 12:25:21 PM »

oh no, ther's no need to worry i'm a unviversity student whose taking a security course, so this is all for school, not to do anything else, everything i do will be on virtual machines
Logged
LK
Newbie
*
Offline Offline

Posts: 29


View Profile
« Reply #4 on: September 28, 2007, 02:12:29 PM »

I simply don't see the point in starting netcat at a "specific" time for learning purposes ... why just don't start netcat when needed or permanently start as dean explained?

And I never said that just using netcat implies malicious intent. The malicious intent I was thinking of is the one above.

But hey, the important thing is that kthc got the answer he was looking for.
Logged

Security+, OSCP, CISM, CISSP
LSOChris
Guest
« Reply #5 on: September 28, 2007, 06:07:56 PM »

good paper dean  Shocked

that learnsecurityonline place must be good :-)
Logged
dean
Guest
« Reply #6 on: September 28, 2007, 06:52:22 PM »

Cheers ChrisG.  Grin

Yeah, it's not a bad place at all. I hear the irc channel is pretty damn cool
Logged
LSOChris
Guest
« Reply #7 on: September 28, 2007, 09:41:29 PM »

i heard that too

it two people say it, it must be true
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!
Page created in 0.097 seconds with 23 queries.
 
Exclusive Deal

sansfire13_245x90_cw90.jpg
SANSFIRE 2013
June 15 - 22

5% Off w/ Code: EHN_5

SANS Deals 4 EH-Netters
5% OFF Any SANS Course in Any Format!
Coupon Code: EHN_5 Including SANS Rocky Mountain 2013 & SANS Boston 2013
Polls
Compared to this year, 2013 will be:
 
Recent Forum Topics
EH-Net News Feeds
Latest Additions
 
         
Advertisement

© 2013 The Ethical Hacker Network
Joomla! is Free Software released under the GNU/GPL License.