No announcement yet.

Windows - The net command

  • Time
  • Show
Clear All
new posts

  • Windows - The net command

    This is a small list of examples on how to use the Windows net command. It is not only useful for Windows administrators but also for pentesters and hackers. If you don't know them you might find a few of them useful to you. Let this also be a reminder that - attackers use them too.

    net localgroup administrators /add <username>    // Adds user to local administrators
    net group "domain admins" /domain        // Show members of the Domain admins group
    net user <user> <password> /add            // Add a new local user with a password to the system
    net user Administrator                // Show information on Administrator. This can be done with other users as well
    net view \\<ip> /all                // Show shares on target hos with stated IP address
    net localgroup "Remote Desktop Users" <domain>\<user> /ADD    // Add an AD user to the local RDP group
    net localgroup "Remote Desktop Users" <user> /ADD        // Add a local user to the local RDP group
    net group /domain                // Show AD Groups
    net start                    // Show services that will start automatically on boot
    I hope you find at least a few of them useful. There are lots more. If you have any useful ones that are missing, feel free to let me know. It is greatly appreciated.
    Certified Security Geek