Informacion de CentOS#

Informacion del sistema centOS instalado en vbox
[root@centos-8 ~]# uname -a
Linux centos-8.local 4.18.0-365.el8.x86_64 #1 SMP Thu Feb 10 16:11:23 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

[root@centos-8 ~]# cat /etc/os-release
NAME="CentOS Stream"
VERSION="8"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Stream 8"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://centos.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux 8"
REDHAT_SUPPORT_PRODUCT_VERSION="CentOS Stream"
[root@centos-8 ~]# cat /etc/debian_version /etc/redhat-release
cat: /etc/debian_version: No existe el fichero o el directorio
CentOS Stream release 8
[root@centos-8 ~]# hostname -I
10.0.2.15 192.168.56.4 192.168.100.24 192.168.122.1 2806:2f0:90a1:d87f:5672:6f1b:4ccb:f08c 

[root@centos-8 ~]# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 08:00:27:5b:89:5e brd ff:ff:ff:ff:ff:ff
    inet 10.0.2.15/24 brd 10.0.2.255 scope global dynamic noprefixroute enp0s3
       valid_lft 84035sec preferred_lft 84035sec
    inet6 fe80::a00:27ff:fe5b:895e/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
3: enp0s8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 08:00:27:e6:49:f9 brd ff:ff:ff:ff:ff:ff
    inet 192.168.56.4/24 brd 192.168.56.255 scope global dynamic noprefixroute enp0s8
       valid_lft 336sec preferred_lft 336sec
    inet6 fe80::3b9c:c5ea:f320:e8eb/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
4: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
    link/ether 52:54:00:41:dc:21 brd ff:ff:ff:ff:ff:ff
    inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
       valid_lft forever preferred_lft forever

[root@centos-8 ~]# ip route show
default via 10.0.2.2 dev enp0s3 proto dhcp metric 100 
default via 192.168.100.1 dev enp0s9 proto dhcp metric 102 
10.0.2.0/24 dev enp0s3 proto kernel scope link src 10.0.2.15 metric 100 
192.168.56.0/24 dev enp0s8 proto kernel scope link src 192.168.56.4 metric 101 
192.168.100.0/24 dev enp0s9 proto kernel scope link src 192.168.100.24 metric 102 
192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1 linkdown 

[root@centos-8 ~]# ip route show
default via 10.0.2.2 dev enp0s3 proto dhcp metric 100 
default via 192.168.100.1 dev enp0s9 proto dhcp metric 102 
10.0.2.0/24 dev enp0s3 proto kernel scope link src 10.0.2.15 metric 100 
192.168.56.0/24 dev enp0s8 proto kernel scope link src 192.168.56.4 metric 101 
192.168.100.0/24 dev enp0s9 proto kernel scope link src 192.168.100.24 metric 102 
192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1 linkdown 

[root@centos-8 ~]# cat /etc/resolv.conf
# Generated by NetworkManager
search local
nameserver 192.168.100.1
nameserver fe80::1%enp0s9
[root@centos-8 ~]# netstat -ntulp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      1/systemd           
tcp        0      0 192.168.122.1:53        0.0.0.0:*               LISTEN      1731/dnsmasq        
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      955/sshd            
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      953/cupsd           
tcp6       0      0 :::111                  :::*                    LISTEN      1/systemd           
tcp6       0      0 :::22                   :::*                    LISTEN      955/sshd            
tcp6       0      0 ::1:631                 :::*                    LISTEN      953/cupsd           
udp        0      0 192.168.122.1:53        0.0.0.0:*                           1731/dnsmasq        
udp        0      0 0.0.0.0:67              0.0.0.0:*                           1731/dnsmasq        
udp        0      0 0.0.0.0:111             0.0.0.0:*                           1/systemd           
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           804/avahi-daemon: r 
udp        0      0 127.0.0.1:323           0.0.0.0:*                           825/chronyd         
udp        0      0 0.0.0.0:38739           0.0.0.0:*                           804/avahi-daemon: r 
udp6       0      0 fe80::752:7ca:f112::546 :::*                                947/NetworkManager  
udp6       0      0 :::111                  :::*                                1/systemd           
udp6       0      0 :::5353                 :::*                                804/avahi-daemon: r 
udp6       0      0 ::1:323                 :::*                                825/chronyd         
udp6       0      0 :::42314                :::*                                804/avahi-daemon: r 

[root@centos-8 ~]# ping -c 4 1.1.1.1
PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.
64 bytes from 1.1.1.1: icmp_seq=1 ttl=63 time=7.91 ms
64 bytes from 1.1.1.1: icmp_seq=2 ttl=63 time=7.02 ms
64 bytes from 1.1.1.1: icmp_seq=3 ttl=63 time=6.41 ms
64 bytes from 1.1.1.1: icmp_seq=4 ttl=63 time=6.29 ms

--- 1.1.1.1 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3005ms
rtt min/avg/max/mdev = 6.287/6.905/7.905/0.639 ms
[root@centos-8 ~]# dig example.com.

; <<>> DiG 9.11.36-RedHat-9.11.36-2.el8 <<>> example.com.
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 30574
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;example.com.           IN  A

;; ANSWER SECTION:
example.com.        56785   IN  A   93.184.216.34

;; Query time: 9 msec
;; SERVER: 192.168.100.1#53(192.168.100.1)
;; WHEN: lun feb 28 20:48:01 CST 2022
;; MSG SIZE  rcvd: 56

Privilegios de usuario#

[rebecanovella@centos-8 ~]$  getent passwd ${USER}
rebecanovella:x:1000:1000:rebecanovella:/home/rebecanovella:/bin/bash

[rebecanovella@centos-8 ~]$ id
uid=1000(rebecanovella) gid=1000(rebecanovella) grupos=1000(rebecanovella),10(wheel),974(wireshark) contexto=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023

[rebecanovella@centos-8 ~]$ groups
rebecanovella wheel wireshark

[rebecanovella@centos-8 ~]$ sudo -l
Matching Defaults entries for rebecanovella on centos-8:
    !visiblepw, always_set_home, match_group_by_gid, always_query_group_plugin, env_reset,
    env_keep="COLORS DISPLAY HOSTNAME HISTSIZE KDEDIR LS_COLORS", env_keep+="MAIL PS1 PS2 QTDIR USERNAME
    LANG LC_ADDRESS LC_CTYPE", env_keep+="LC_COLLATE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES",
    env_keep+="LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE", env_keep+="LC_TIME LC_ALL LANGUAGE
    LINGUAS _XKB_CHARSET XAUTHORITY", secure_path=/sbin\:/bin\:/usr/sbin\:/usr/bin

User rebecanovella may run the following commands on centos-8:
    (ALL) NOPASSWD: ALL

[rebecanovella@centos-8 ~]$ sudo -i
[root@centos-8 ~]# 

Herramientas del sistema#

[rebecanovella@centos-8 ~]$ which wireshark tcpdump nmap netcat ngrep dsniff wget curl whois bind-utils net-tools iproute iptables iptables-services iputils traceroute ethtool
/usr/bin/wireshark
/usr/sbin/tcpdump
/usr/bin/nmap
/usr/bin/netcat
/usr/sbin/ngrep
/usr/sbin/dsniff
/usr/bin/wget
/usr/bin/curl
/usr/bin/whois
/usr/bin/which: no bind-utils in (/home/rebecanovella/.local/bin:/home/rebecanovella/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin)
/usr/bin/which: no net-tools in (/home/rebecanovella/.local/bin:/home/rebecanovella/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin)
/usr/bin/which: no iproute in (/home/rebecanovella/.local/bin:/home/rebecanovella/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin)
/usr/sbin/iptables
/usr/bin/which: no iptables-services in (/home/rebecanovella/.local/bin:/home/rebecanovella/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin)
/usr/bin/which: no iputils in (/home/rebecanovella/.local/bin:/home/rebecanovella/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin)
/usr/bin/traceroute
/usr/sbin/ethtool


[rebecanovella@centos-8 ~]$ whereis wireshark tcpdump nmap netcat ngrep dsniff wget curl whois bind-utils net-tools iproute iptables iptables-services iputils traceroute ethtool
wireshark: /usr/bin/wireshark /usr/lib64/wireshark /usr/share/wireshark /usr/share/man/man1/wireshark.1.gz
tcpdump: /usr/sbin/tcpdump /usr/share/man/man8/tcpdump.8.gz
nmap: /usr/bin/nmap /usr/share/nmap /usr/share/man/man1/nmap.1.gz
netcat: /usr/bin/netcat /usr/share/man/man1/netcat.1.gz
ngrep: /usr/sbin/ngrep /usr/share/man/man8/ngrep.8.gz
dsniff: /usr/sbin/dsniff /etc/dsniff /usr/share/man/man8/dsniff.8.gz
wget: /usr/bin/wget /usr/share/man/man1/wget.1.gz /usr/share/info/wget.info.gz
curl: /usr/bin/curl /usr/share/man/man1/curl.1.gz
whois: /usr/bin/whois.md /usr/bin/whois /etc/whois.conf /usr/share/man/man1/whois.1.gz
bind-utils:
net-tools:
iproute:
iptables: /usr/sbin/iptables /usr/libexec/iptables /usr/share/man/man8/iptables.8.gz
iptables-services:
iputils:
traceroute: /usr/bin/traceroute /usr/share/man/man8/traceroute.8.gz
ethtool: /usr/sbin/ethtool /usr/share/man/man8/ethtool.8.gz


Información de Debian#

Informacion del sistema Debian instalado en vbox
Informacion del sistema Debian instalado en vbox
root@debian:~# uname -a
Linux debian 5.10.0-11-amd64 #1 SMP Debian 5.10.92-1 (2022-01-18) x86_64 GNU/Linux

root@debian:~# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

root@debian:~# cat /etc/debian_version /etc/redhat-release
11.2
cat: /etc/redhat-release: No existe el fichero o el directorio

root@debian:~# hostname -I
10.0.2.15 192.168.56.3 

root@debian:~# ip addr 
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 08:00:27:63:d9:c4 brd ff:ff:ff:ff:ff:ff
    inet 10.0.2.15/24 brd 10.0.2.255 scope global dynamic noprefixroute enp0s3
       valid_lft 85059sec preferred_lft 85059sec
    inet6 fe80::a00:27ff:fe63:d9c4/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
3: enp0s8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 08:00:27:ac:7c:57 brd ff:ff:ff:ff:ff:ff
    inet 192.168.56.3/24 brd 192.168.56.255 scope global dynamic enp0s8
       valid_lft 377sec preferred_lft 377sec
    inet6 fe80::a00:27ff:feac:7c57/64 scope link 
       valid_lft forever preferred_lft forever
root@debian:~# cat /etc/resolv.conf
# Generated by NetworkManager
nameserver 192.168.100.1

root@debian:~# netstat -ntulp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      581/sshd: /usr/sbin 
tcp6       0      0 :::22                   :::*                    LISTEN      581/sshd: /usr/sbin 
udp        0      0 0.0.0.0:68              0.0.0.0:*                           471/dhclient        
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           362/avahi-daemon: r 
udp        0      0 0.0.0.0:42309           0.0.0.0:*                           362/avahi-daemon: r 
udp6       0      0 :::57780                :::*                                362/avahi-daemon: r 
udp6       0      0 :::5353                 :::*                                362/avahi-daemon: r 

root@debian:~# ping -c 4 1.1.1.1
PING 1.1.1.1 (1.1.1.1): 56 data bytes
64 bytes from 1.1.1.1: icmp_seq=0 ttl=63 time=6.581 ms
64 bytes from 1.1.1.1: icmp_seq=1 ttl=63 time=6.334 ms
64 bytes from 1.1.1.1: icmp_seq=2 ttl=63 time=7.035 ms
64 bytes from 1.1.1.1: icmp_seq=3 ttl=63 time=6.475 ms
--- 1.1.1.1 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max/stddev = 6.334/6.606/7.035/0.263 ms


root@debian:~# dig example.com.

; <<>> DiG 9.16.22-Debian <<>> example.com.
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 48288
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;example.com.           IN  A

;; ANSWER SECTION:
example.com.        54502   IN  A   93.184.216.34

;; Query time: 8 msec
;; SERVER: 192.168.100.1#53(192.168.100.1)
;; WHEN: Mon Feb 28 21:26:04 CST 2022
;; MSG SIZE  rcvd: 56

Privilegios de usuario#

rebecanovella@debian:~$ getent passwd ${USER}
rebecanovella:x:1000:1000:rebecanovella,,,:/home/rebecanovella:/bin/bash

rebecanovella@debian:~$ id
uid=1000(rebecanovella) gid=1000(rebecanovella) grupos=1000(rebecanovella),24(cdrom),25(floppy),27(sudo),29(audio),30(dip),44(video),46(plugdev),109(netdev),113(bluetooth),119(scanner),125(wireshark)

rebecanovella@debian:~$ groups
rebecanovella cdrom floppy sudo audio dip video plugdev netdev bluetooth scanner wireshark

rebecanovella@debian:~$ sudo -l
Matching Defaults entries for rebecanovella on debian:
    env_reset, mail_badpass,
    secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin

User rebecanovella may run the following commands on debian:
    (ALL : ALL) NOPASSWD: ALL

rebecanovella@debian:~$ sudo -i
root@debian:~# 

Herramientas del sistema#

rebecanovella@debian:~$ which wireshark tcpdump nmap netcat-openbsd ngrep dsniff wget curl whois dnsutils net-tools iproute2 iptables iptables-persistent tsocks inetutils-ping inetutils-traceroute inetutils-tools ethtool
/usr/bin/wireshark
/usr/bin/tcpdump
/usr/bin/nmap
/usr/bin/ngrep
/usr/bin/wget
/usr/bin/curl
/usr/bin/whois
/usr/bin/tsocks
/usr/bin/inetutils-traceroute


rebecanovella@debian:~$ whereis wireshark tcpdump nmap netcat-openbsd ngrep dsniff wget curl whois dnsutils net-tools iproute2 iptables iptables-persistent tsocks inetutils-ping inetutils-traceroute inetutils-tools ethtool
wireshark: /usr/bin/wireshark /usr/lib/x86_64-linux-gnu/wireshark /etc/wireshark /usr/share/wireshark /usr/share/man/man1/wireshark.1.gz
tcpdump: /usr/bin/tcpdump /usr/share/man/man8/tcpdump.8.gz
nmap: /usr/bin/nmap /usr/share/nmap /usr/share/man/man1/nmap.1.gz
netcat-openbsd:
ngrep: /usr/bin/ngrep /usr/share/man/man8/ngrep.8.gz
dsniff: /usr/sbin/dsniff /usr/share/dsniff /usr/share/man/man8/dsniff.8.gz
wget: /usr/bin/wget /usr/share/man/man1/wget.1.gz /usr/share/info/wget.info.gz
curl: /usr/bin/curl /usr/share/man/man1/curl.1.gz
whois: /usr/bin/whois /usr/share/man/man1/whois.1.gz
dnsutils:
net-tools:
iproute2: /etc/iproute2 /usr/include/iproute2
iptables: /usr/sbin/iptables /etc/iptables /usr/share/iptables /usr/share/man/man8/iptables.8.gz
iptables-persistent:
tsocks: /usr/bin/tsocks /etc/tsocks.conf /usr/share/man/man8/tsocks.8.gz /usr/share/man/man1/tsocks.1.gz
inetutils-ping:
inetutils-traceroute: /usr/bin/inetutils-traceroute /usr/share/man/man1/inetutils-traceroute.1.gz
inetutils-tools:
ethtool: /usr/sbin/ethtool /usr/share/man/man8/ethtool.8.gz