Hot Take Windows Command code

orthonovum

Level 3
Verified
Jun 17, 2017
106
bitsadmin ftw when pentesting. Most people don't know it exists. Can be useful when you don't have a browser installed or at your disposal ;)
 

TheJokerz

Level 7
Verified
Well-known
Jan 7, 2016
311
This is awesome, thanks to all those who contributed! I wish I had more to add.

I use net use a lot at work.

net use H: \\someshareddrive\somefolder\someotherfolder /p:Y

This will map drives, you can also remove mapped drives

net use H: /delete
 

TheJokerz

Level 7
Verified
Well-known
Jan 7, 2016
311
Windows wmic command line command

Wmic is not very well known command, you can do tons of stuff with it, I use it for network setup.

Code:
wmic nicconfig where DHCPEnabled=TRUE call SetDNSServerSearchOrder ("208.67.222.222","208.67.220.220")
Setup DNS Servers on DHCP Enabled Network (OpenDNS)

Code:
wmic nicconfig where macaddress="D0:17:C2:D0:30:DC" call EnableStatic ("10.10.10.12"), ("255.255.255.248")
wmic nicconfig where macaddress="D0:17:C2:D0:30:DC" call SetDNSServerSearchOrder ("84.200.69.80","84.200.70.40")
wmic nicconfig where macaddress="D0:17:C2:D0:30:DC" call SetGateways ("10.10.10.10")
Setup IP, Gateway and DNS Servers based on the MAC address (it is more practical than using a name)

You can also use wmic to get serial number of pc for dells, lenovo ect.

wmic bios get serialnumber
 

About us

  • MalwareTips is a community-driven platform providing the latest information and resources on malware and cyber threats. Our team of experienced professionals and passionate volunteers work to keep the internet safe and secure. We provide accurate, up-to-date information and strive to build a strong and supportive community dedicated to cybersecurity.

User Menu

Follow us

Follow us on Facebook or Twitter to know first about the latest cybersecurity incidents and malware threats.

Top