cowrie icon indicating copy to clipboard operation
cowrie copied to clipboard

/proc/uptime does not exist

Open mrseeker opened this issue 3 years ago • 2 comments

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:

  1. Log in on cowrie
  2. execute the command "cat /proc/uptime"
  3. 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.

mrseeker avatar Nov 30 '20 10:11 mrseeker

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

micheloosterhof avatar Dec 02 '20 06:12 micheloosterhof

The quick workaround is to add and entry in honeyfs/proc/uptime

micheloosterhof avatar Dec 02 '20 06:12 micheloosterhof