netsh wlan show profiles *shows a list of the cached/stored/previous wifi connections you made
netsh wlan show profile name=profilename key=clear **shows cached/stored/previous wifi connection password ie "netsh wlan show profile name=ActionTec7777 key=clear"
rundll32.exe user32.dll,LockWorkStation *cmd to lock workstation
runas /user:DOMAIN\USERNAME cmd PASSWORD *will open cmd will elevated permissions in any users session.
ipconfig /allcompartments /all && perfmon /rel && dxidag && appwiz.cpl && services.msc && resmon && msconfig && netplwiz
psexec \\computername -c -i -h "\\networkpathofprogramtoinstall.exeect"
shutdown /r /f /m \\remoteCOMPUTERNAME * restarts the remote computer.
arp -a *show the Mac to IP address exchange, arp means address resolution protocol
nbtstat /* shows protocol statistics using NBT
netstat -boa /* need admin cmd to run this extention, though can run it w just -a or a few others.
netsh /* netsh int ip reset /* example of command
route /* used to manually config routes in routing table
getmac /* shows both local and remote MAC addresses. When ran w getmac /s \\foo displays remote mac. /v shows connection name and net adapter name
pathping ipaddresshere /* provides info about net latency and network loss at intermediate hops
telnet
ftp
ssh
win + d minimize everything
win + e file explorer
WINKEY + ↑ (up arrow) = Make the window full screen
WINKEY + ↓ (down arrow) = Restore a full-screen window
ALT + F4 close window
ALT + F5 refresh
shake a window minimizes the rest of the windows
Alt + Tab task switcher
Ctrl + Alt + Tab task switcher hold
SHIFT + WINKEY + ← (left arrow) or → (right arrow)
WINKEY + CTRL + D create a VD
WINKEY + CTRL + ← (left arrow) OR
WINKEY + CTRL + → (right arrow) = switch between virtual desktops you’ve created
CTRL + Tab = switch between the open tabs to the right
CTRL + Shift + Tab = switch between the open tabs to the left
CTRL + Shift + T open last closed tab
nbtstat
route print
To run a ping sweep on your network without any 3rd party tools you can type the following in cmd, change the ip starting range to where your IP
range starts. to figure this out type ipconfig in cmd then leave the last set blank, though include the period. as below:
Additionally this will pipe out the results to a text file. PS if it runs through very quick you did something wrong
FOR /L %i IN (1,1,254) DO ping -n 1 192.168.0.%i | FIND /i "reply">>c:\ipaddresses.txt
FOR /L %i IN (1,1,254) DO ping -n 1 192.168.0.1.%i | FIND /i "reply">>c:\ipaddresses.txt
FOR /L %i IN (1,1,254) DO nbtstat -a 192.168.0.%i>>nbtstat.txt
Sharepoint Cant save changes? *Clear cache files in office upload center
Sharepoint changes aren't reflecting in the corresponding sharepoint task list? *Create new synced project file for tasks list via the open in project option.
Taskkill /S remoteServer /u userName /PID processID *end remote task or program
exmple: c:\>taskkill /S 10.123.78.23 /u administrator /PID 5000 tap enter (prompted for pw)
To disable sleep mode completely: Launch gpedit.msc
Navigate to Computer COnfiguration>ADministartive templates>system >power management> sleep settings
Open Policy called allow standby states (S1-S3) when sleeping (plugged in_ and set value to Disabled
intl.cpl *change language
whoami *user logged in
hostname * name of computer
quser USERNAME *last time logged in with password
net user /domain USERNAME *shows AD OU's, last time pw set, expiration date, last logon...
All settings icon, make new folder, rename it: GodMode.{ED7BA470-8E54-465E-825C-99712043E01C} click enter
runas /user:domain\username cmd *run as self/admin well RDC to another users logon
powershell -Command "Start-Process cmd -Verb RunAs" *additional needed line in many Win10 environments run as self/admin well RDC to another users logon
Fix shortcut icons on desktop that were changed to a Lnk extention or other ext, but not the right ext! *Go to start>Run, type regedit. Press enter.
Navigate to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.lnk\. Delete the user choice folder, close regedit, restart
ipconfig /flushdns *clears dns resolution for websites you visit
ipconfig /displaydns | clip * shows dns resolution for websites you visit
nslookup ls -d testoutdemo.com *or any domain this will show you all devices on network if access not protected, most are tho.
To change the timeout limit for activating the screen saver you can run the below command.
reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v ScreenSaveTimeOut /t REG_SZ /d 600 /f
dxdiag && perfmon /rel
Gpupdate /force && gpresult /r
sfc /scannow && restart
Harpy Eagle fist bump
WMIC /NODE:"compnamehere leave commas" COMPUTERSYSTEM GET USERNAME *computer name to user name.
wmic printjob get
wmic printjob list
wmic printjob delete
wmic netlogin
wmic useraccount where name="enteremployeenumberleave commas" get sid
query user
bootrec.exe /fixmbr
bootrec.exe /fixboot
bootrec.exe /RebuildBcd
windows 7 only need: bootrec /rebuildbcd
runas /user:DOMAIN\USERNAME
runas /user:domain\uname cmd resmon or devmgmt.msc appwiz.cpl
netsh interface set interface "Wireless Network Connection" enabled && wmic path win32_networkadapter where NetConnectionID="Wireless Network Connection" call enable
unidentified network fix: ipconfig /flushdns && netsh winsock reset
PsExec \\computername ipconfig /flushdns && netsh winsock reset
ipconfig /allcompartments /all
runas /user:domain\uname cmd
%AppData%\Microsoft\Windows\Recent\ *temp files
net user username /domain
| clip * copies whatever the cmd output is to the clipboard
Gpresult /r *displays cmd gpupdate results in cmd
gpresult /h gpreport *saves the report to the doc folder as a html file
gpresult /r /scope:user
gpresult /r /scope:computer
Gpresult /r > gpresult.txt *makes a text file in doc folder
Gpresult /r |clip *Export output to Windows clipboard
C:\$Recycle.Bin
file explorer paste: "C:\$Recycle.Bin" then tap win key, type show hid>tap enter, uncheck hide protected sys files, now check the admin$hare recycle bin
windirstat *great program to help clean up many hidden gigs of used space, including admin shares
sfc /scannow && exit
Synchronizing machine time with domain controller:
Login as a local account and sync the time with the domain controller using the Net time command.
NET TIME /domain:mydomainname /SET /Y
Remote Desktop Connnection Just open Run from start menu and type mstsc
CMD:control.exe /name Microsoft.NetworkAndSharingCenter
run as admin from user station hold down shift and right click application, run as different user will appear.
Psexec.exe \\compname "C:\ProgramData\launchpath Client\cleanapp.exe" /creds=specifckeycredsgohere== /auto /logpath=C:\Windows\Logs
PsExec \\compname Gpupdate
cmd tsdiscon switch users cmd
psexec -u domain\myID -i -h "\networkdrivepath\Users\myID\Downloads\Graphics-Driver.EXE"
wmic /node:compname product call install true,"" , "\\networkdrivepath\Users\myemployee#\Downloads\printer_driver.exe"
psexec \\compname -c -i -h \\networkdrivepath\Users\myID\Downloads\HPLaserJetNew.exe
psexec \\compname -u domain\myID -c -f \\networkdrivepath\Users\employeeID\Downloads\Printer-DriverNew.exe setup\runmsi.exe /quiet /norestart
netsh interface set interface "Wireless Network Connection" enabled && wmic path win32_networkadapter where NetConnectionID="Wireless Network Connection" call enable
Press Windows+R to open the “Run” box. Type “cmd” into the box and then press Ctrl+Shift+Enter to run the command as an administrator
Reinstall all windows packages from powershell Get-AppXPackage -AllUsers | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
cmd DISM /ONLINE /CLEANUP-IMAGE /RESTOREHEALTH (if sfc isnt working)
type “systemreset” (without quotes). If you want to refresh Windows 10 and install Windows updates, then you should type “systemreset -cleanpc”.
psexec \\compname sfc /scannow
openfiles.exe from cmd can tell if anyone has the shared file open
shutdown /r /m \\comp name
shutdown /r /m /f \\comp name
rdp rdc
CMRC Configuration Manager Remote Control (shared control rdp)
sccm system configuration
Delete Temporary Internet Files:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8
Delete just Cookies:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2
Delete History:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 1
Delete Form Data:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 16
Delete Passwords:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 32
Delete All:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255
Delete All + files and settings stored by Add-ons:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 4351
ipconfig /flushdns
If the command was successful, you will see the message "Successfully flushed the DNS Resolver Cache".
Afterwards, type: netsh int ip reset
Once done, restart your computer.
SHOW INTERFACES gI0/1 STATUS
MTR IS LIKE PING AND TRACERT
IPconfig /registerdns DDNS DHCP update
windump windows monitor network traffic note taken laptop
snort works on both win and lin note taken laptop
tcpdump linux note taken laptop
activity history viewer *windows note taken laptop
GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}
141371110470-81454-46514-82512-99712043140112
09af
a b c d e f
101112131415
Win cmds
cls
ipconfig /allcompartments /all
ipconfig /displaydns
arp -a shows the ip address to mac address mapping table (the address cache)
arp tables allow a system to build frames targeting remote MAC addresses
netsh to clear the arp cache
netstat -a shows detailed info for active conx a way to check for malware...
netstat-s shows tpc/ip statics
netstat -r or route print shows the routing table of the local host
netstat -es interface statistics
nslookup automode look up as many as u want, just type nslookup and enter
how to ping ipv6
ping6 or ping-6
Debian based Linux and Mac terminal
clear
scan a particular port for what applications are using it, example we'll use the standard ssl port: sudo lsof -i:443
to get tcpdump sudo apt-get install tcpdump
help man tcpdump
sudo tcpdump -i eth0 capture everything on netcard
ctrl + c to stop
sudo tcpdump port 21 capture everything on a specific port
switch to win browser to test ftp.hp.com
TCPdump is a packet analyzer that runs in a command line utility. It allows the user to view TCP/IP and other packets as they are transmitted and received over on a computer's network. In this lesson, you will learn about:
Common uses
Options
Expression examples
Common Uses
TCPdump prints the contents of network packets. It can read packets from a network interface card or a previously captured packet file. TCPdump can write packets to standard output or a file.
You can TCPdump to intercept and display the network traffic of another user or computer, including user credentials, the content of packets, and other unencrypted information.
Options
These are some of the many configuration options for TCPdump. For a complete list of options refer to the TCPdump MAN (manual) page.
Option Description
-i any Listen on all interfaces to check for traffic traffic.
-i eth0 Listen on the eth0 interface.
-D Show the list of available interfaces.
-n Don't resolve host names.
-nn Don't resolve host names or port names.
-q Be less verbose (more quiet) with your output.
-t Create a timestamp output humans can read.
-tttt Create a timestamp output that's maximally readable for humans.
-X Show the packet's contents in both hex and ASCII.
-XX Same as -X, but also shows the Ethernet header.
-v, -vv, -vvv Increase the amount of packet information you get back.
-c Only receive a certain number of packets and then stop.
-s Define the snaplength (size) of the capture in bytes. Use -s0 to capture everything unless you are intentionally capturing less.
-S Print absolute sequence numbers.
-e Retrieve the Ethernet header.
-q Show less protocol information.
-E Decrypt IPsec traffic by providing an encryption key.
Expression Examples
Expressions allow you to filter traffic and find exactly what you need.
There are three main types of expression: type, dir, and proto.
The type options are host, net (the network address), and port.
Direction lets you insert the src (source) and dst (destination) commands.
Protocol lets you designate tcp, udp, icmp, ah, and many more options.
Some examples of uses for TCPdump include the following:
Commands are case sensitive.
TCPdump Example Description
tcpdump -D Display the list of interfaces TCPdump can listen to.
tcpdump -n host 192.168.0.1 Capture any packets that list 192.168.0.1 as the source or destination host. Displays IP addresses and port numbers.
tcpdump -i eth0 Listen on interface eth0.
tcpdump -i any Listen on any available interface.
tcpdump -n dst net 192.168.0.0/24 Capture any packets that list 192.168.0.0/24 as the destination network. Displays IP addresses and port numbers.
tcpdump -n src net 192.168.1.0/24 Capture any packets that list 192.168.1.0/24 as the source network. Displays IP addresses and port numbers.
tcpdump -n dst port 23 Capture any packets that list 23 as the destination port. Displays IP addresses and port numbers.
tcpdump -n "dst host 192.168.1.1 and (dst port 80 or dst port 443)" Capture any packets that list 192.168.0.1 as the destination IP and 80 or 443as the destination port. Displays IP addresses and port numbers.
Common name resolution problems include the following:
The DNS server could be down or otherwise unreachable.
There may be a routing problem between the sending host and the DNS server.
The sending host could be configured with the wrong IP address for the DNS server.
Name resolution problems typically have the following symptoms:
You can ping a destination host using its IP address, but not its host name.
Applications that use hostnames fail. This could include:
Entering a URL into a browser.
Pinging the host using the hostname.
Searching for the host by its name.
To troubleshoot DNS name resolution, use the following tools:
ping
tracert (Windows) or traceroute (Linux)
nslookup
dig (Linux)
host (Linux)
Troubleshoot DNS Name Resolution With Commands
The following table lists several ways to troubleshoot with commands:
Command Purpose Example
ping Contacts the DNS server to see if it responds. Be aware that the firewall protecting the DNS server may be configured to drop ICMP packets
in order to prevent DoS attacks; if the server doesn't respond, it is not necessarily down.
ping 8.8.4.4
tracert or traceroute Tests the route between your workstation and the DNS server.
tracert 8.8.4.4
nslookup [host] Queries the IP address of a host.
nslookup www.mit.edu
nslookup Starts nslookup in interactive mode. The default interactive mode query is for A records, but you can use the set type= command to change the query type.
nslookup set type=ns
dig host name
host host name Queries a host. The default query is for A records. You can change the default search by appending one of the record types below to the end of the command:
a—address records
any—any type of record
mx—mail exchange records
ns—name server records
soa—sort of authority records
hinfo—host info records
axfr—all records in the zone
txt—text records
dig www.vulture.com ns
host www.vulture.com -t ns
dig @IP address or host name domain Queries the root server at the IP address or host name for the domain's A records.
You can change the default query type by appending a different record type to the end of the command.
dig @192.168.1.1 vulture.com ns
dig -x IP address
host IP address Finds the host name for the queried IP address.
dig -x 62.34.4.72
host 62.34.4.72
Local computers have a cache of recently resolved DNS names. The cache holds the DNS name and its IP address.
When you use a DNS name, the computer first checks its cache. If the name is in the cache, the corresponding IP
address is used. This can cause problems if a host's IP address has changed. Old values in the cache might continue
to be used temporarily, making communication via the DNS name impossible. To correct this problem on a Windows computer,
run ipconfig /flushdns to delete the local DNS name cache.
putty cisco switch cmd interface
enter global config mode conf t
enter interface config more int fa0/1
set the speed of the interface speed auto
set the duplex setting for the interface duplex auto