Command List Flashcards
crc32
show data of a file in hexadecimal
(win) ipconfig /all
show the network settings for the current device
C:\Users\neonb>ipconfig /all
Windows IP Configuration
Host Name . . . . . . . . . . . . : Auto
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : lan
Ethernet adapter Ethernet 2:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : ExpressVPN TAP Adapter
Physical Address. . . . . . . . . : 00-FF-32-37-BB-62
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Unknown adapter Local Area Connection:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : ExpressVPN TUN Driver
Physical Address. . . . . . . . . :
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Wireless LAN adapter Local Area Connection* 11:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft Wi-Fi Direct Virtual Adapter #3
Physical Address. . . . . . . . . : 22-2B-20-CC-6C-CB
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Wireless LAN adapter Wi-Fi 2:
Connection-specific DNS Suffix . : lan
Description . . . . . . . . . . . : Realtek RTL8821CE 802.11ac PCIe Adapter #2
Physical Address. . . . . . . . . : 20-2B-20-CC-6C-CB
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IPv6 Address. . . . . . . . . . . : 2603:7081:d00:ac29:da3b:5338:d0bc:d81c(Preferred)
IPv6 Address. . . . . . . . . . . : fd00:f405:95d6:90e3::16e2(Preferred)
Lease Obtained. . . . . . . . . . : Tuesday, May 2, 2023 4:35:52 PM
Lease Expires . . . . . . . . . . : Thursday, May 4, 2023 5:01:05 PM
IPv6 Address. . . . . . . . . . . : fd00:f405:95d6:90e3:fa02:5e52:a9c3:7fc4(Preferred)
Temporary IPv6 Address. . . . . . : 2603:7081:d00:ac29:9188:fbb3:5825:74ff(Preferred)
Temporary IPv6 Address. . . . . . : fd00:f405:95d6:90e3:9188:fbb3:5825:74ff(Preferred)
Link-local IPv6 Address . . . . . : fe80::9de2:87cb:5ca8:17b0%9(Preferred)
IPv4 Address. . . . . . . . . . . : 192.168.1.147(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Lease Obtained. . . . . . . . . . : Tuesday, May 2, 2023 4:35:59 PM
Lease Expires . . . . . . . . . . : Wednesday, May 3, 2023 4:01:16 PM
Default Gateway . . . . . . . . . : fe80::f605:95ff:fed6:90e5%9
192.168.1.1
DHCP Server . . . . . . . . . . . : 192.168.1.1
DHCPv6 IAID . . . . . . . . . . . : 153103136
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-2A-93-13-19-00-E0-4C-E6-55-2B
DNS Servers . . . . . . . . . . . : 2603:7081:d00:ac29::1
192.168.1.1
NetBIOS over Tcpip. . . . . . . . : Enabled
/?
shows the options for a command (cascading, it will not give you the cascades)
(win) cls
clear the screen
(linux) ifconfig
shows ip information for the current device
(05/03 05:43:13) cita220@cita220-vm: ~
$ ifconfig
enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 137.37.121.40 netmask 255.255.252.0 broadcast 137.37.123.255
inet6 fe80::41e4:7f24:7b57:5a31 prefixlen 64 scopeid 0x20<link></link>
ether 08:00:27:02:a7:0c txqueuelen 1000 (Ethernet)
RX packets 24612 bytes 25589096 (25.5 MB)
RX errors 0 dropped 2 overruns 0 frame 0
TX packets 2816 bytes 303739 (303.7 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 207 bytes 18199 (18.1 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 207 bytes 18199 (18.1 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0</host>
(linux) sudo ethtool enp0s3
shows the ethernet wire settings connected to the device
(05/03 05:45:47) cita220@cita220-vm: ~
$ sudo ethtool enp0s3
[sudo] password for cita220:
Settings for enp0s3:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supported pause frame use: No
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Speed: 1000Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
MDI-X: off (auto)
Supports Wake-on: umbg
Wake-on: d
Current message level: 0x00000007 (7)
drv probe link
Link detected: yes
(win) getmac
returns mac address information
C:\Users\neonb>getmac
Physical Address Transport Name
=================== ==========================================================
00-FF-32-37-BB-62 Media disconnected
N/A Media disconnected
20-2B-20-CC-6C-CB \Device\Tcpip_{321C9BB8-9C91-46A1-BB9F-3AD123449B61}
(win) arp -a
Address Resolution Protocol (find an ip from a mac or vice versa). Shows queried mac addresses
C:\Users\neonb>arp -a
Interface: 192.168.1.147 — 0x9
Internet Address Physical Address Type
192.168.1.1 f4-05-95-d6-90-e5 dynamic
192.168.1.44 3c-9b-d6-2e-ed-9a dynamic
224.0.0.22 01-00-5e-00-00-16 static
224.0.0.251 01-00-5e-00-00-fb static
224.0.0.252 01-00-5e-00-00-fc static
239.255.255.250 01-00-5e-7f-ff-fa static
255.255.255.255 ff-ff-ff-ff-ff-ff static
(linux) cntrl l
clear screen
(linux) ip link
Shows the mac address (link address, ethernet address)
(05/03 05:46:19) cita220@cita220-vm: ~
$ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
link/ether 08:00:27:02:a7:0c brd ff:ff:ff:ff:ff:ff
(linux) arp -n
Shows arp info, queued mac addresses for linux
(05/03 05:57:11) cita220@cita220-vm: ~
$ arp -n
Address HWtype HWaddress Flags Mask Iface
137.37.120.93 ether 00:50:56:0a:01:0b C enp0s3
137.37.120.1 ether 20:b3:99:57:db:b2 C enp0s3
137.37.122.20 ether 00:0c:29:a0:92:3c C enp0s3
(05/03 05:59:19) cita220@cita220-vm: ~
(linux) ip n
Ip neighbor
(05/03 05:59:19) cita220@cita220-vm: ~
$ ip n
137.37.120.93 dev enp0s3 lladdr 00:50:56:0a:01:0b STALE
137.37.120.1 dev enp0s3 lladdr 20:b3:99:57:db:b2 STALE
137.37.122.20 dev enp0s3 lladdr 00:0c:29:a0:92:3c STALE
(linux) sudo groupadd wireshark
adds wire shark the virtual machine
(win) nslookup www.google.com
get the ip address of google . com that you are connecting to
C:\Users\neonb>nslookup www.google.com
Server: 2603-7081-0d00-ac29-0000-0000-0000-0001.res6.spectrum.com
Address: 2603:7081:d00:ac29::1
Name: www.google.com.lan
Address: 192.168.1.1
(win) nslookup 2603:7081:d00:ac29::1
find the hostname from this ip address (ipv6 used in this example)
C:\Users\neonb>nslookup 2603:7081:d00:ac29::1
Server: 2603-7081-0d00-ac29-0000-0000-0000-0001.res6.spectrum.com
Address: 2603:7081:d00:ac29::1
Name: 2603-7081-0d00-ac29-0000-0000-0000-0001.res6.spectrum.com
Address: 2603:7081:d00:ac29::1