cowrie
cowrie copied to clipboard
/proc/uptime does not exist
Describe the bug A hacker found a way to check the time using /proc/uptime, which caused an error to pop up.
To Reproduce Steps to reproduce the behavior:
- Log in on cowrie
- execute the command "cat /proc/uptime"
- No value is returned.
Expected behavior My server (that the honeypot is based on) gives the following information back:
cowrie@jarvis:~/cowrie$ uptime
11:05:48 up 9 days, 14:13, 1 user, load average: 0.00, 0.00, 0.00
cowrie@jarvis:~/cowrie$ cat /proc/uptime
828798.67 1650742.58
Server (please complete the following information):
- OS: Linux jarvis 4.19.0-12-amd64 #1 SMP Debian 4.19.152-1 (2020-10-18) x86_64 GNU/Linux
- Python: Python 3.7.3
Additional context Add any other context about the problem here.
This may be a wider issue, where the cat
command asked to print the contents of a file that only has meta data defined and no contents gives an error:
root@svr04:~# cat /proc/uptime
cat: /proc/uptime: No such file or directory
root@svr04:~# ls -l /proc/uptime
-r--r--r-- 1 root root 0 2013-04-05 12:25 uptime
The quick workaround is to add and entry in honeyfs/proc/uptime