Tag: users


Get Windows Users with C# and WMI

class SystemUser { public enum AccountType { DUPLICATE_ACCOUNT = 256, NORMAL_ACCOUNT = 512, INTERDOMAIN_TRUST_ACCOUNT = 2048, WORKSTATION_TRUST_ACCOUNT = 4096, SERVER_TRUST_ACCOUNT = 8192 };   public AccountType Type { get; set; } public string Caption { get; set; } public string Description { get; set; } public bool Disabled { get; set; } public string Domain …


Get local system users

Use the following code to retrieve local system users and some of their properties, using WMI and Management namespace . Method public List<User> GetUsers() { try { List<User> users = new List<User>(); foreach (ManagementObject mo in (new ManagementObjectSearcher(new SelectQuery("Win32_UserAccount"))).Get()) { users.Add(new User { Name = mo["Name"].ToString(), Caption = mo["Caption"].ToString(), IsDisabled = Boolean.Parse(mo["Disabled"].ToString()), IsLocalAccount = Boolean.Parse(mo["LocalAccount"].ToString()), …

Brute-force, Enumeration

SMTP Users enumeration

* Open your BackTrack machine * GoTo Applications->BackTrack->Information Gathering->Network Analysis->SMTP Analysis * Choose smtp-user-enum * Execute: ./smtp-user-enum.pl -v -M RCPT -u info@example.org -t mail.example.org./smtp-user-enum.pl -v -M RCPT -u info@example.org -t mail.example.org -v Verbose -M mode Method to user for username guessing (RCPT here) -u user Check if this user exists -t host SMTP server


Show logged in users and what they are doing

Open your terminal and issue the command ww yes! just type w. It’s just so simple! Output: 18:11:03 up 1:01, 3 users, load average: 0.58, 0.59, 0.94 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT username tty7 17:31 1:00m 2:20 0.20s gnome-session – username pts/0 :0 17:35 31:32 48.29s 48.10s /opt/Adobe username pts/4 :0 17:39 …

Microsoft Windows, Microsoft Windows Server 2003, Microsoft Windows Server 2008, Windows 7

Get a list of currently logged in users in Windows Server

To get a list of currently logged in users in your Windows Server, open a cmd console and issue the following command: query sessionquery session You will get a response like this: X:pathtosomewhere>query session SESSIONNAME USERNAME ID STATE TYPE DEVICE services 0 Disc >console my_user_name 3 Active rdp-tcp 65536 Listen   X:pathtosomewhere>X:pathtosomewhere>query session SESSIONNAME USERNAME …