{"id":20208289,"url":"https://github.com/cubiclesoft/getsidinfo-windows","last_synced_at":"2025-09-22T00:31:23.063Z","repository":{"id":145129040,"uuid":"361220801","full_name":"cubiclesoft/getsidinfo-windows","owner":"cubiclesoft","description":"Dumps information about Windows Security Identifiers (SIDs) as easy-to-consume JSON output.  MIT or LGPL.","archived":false,"fork":false,"pushed_at":"2021-10-26T15:37:17.000Z","size":206,"stargazers_count":8,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-14T05:35:11.460Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cubiclesoft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-24T17:10:18.000Z","updated_at":"2024-07-07T10:36:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"5fa8664c-8d4b-4335-93f5-0e11d21051ec","html_url":"https://github.com/cubiclesoft/getsidinfo-windows","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cubiclesoft%2Fgetsidinfo-windows","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cubiclesoft%2Fgetsidinfo-windows/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cubiclesoft%2Fgetsidinfo-windows/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cubiclesoft%2Fgetsidinfo-windows/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cubiclesoft","download_url":"https://codeload.github.com/cubiclesoft/getsidinfo-windows/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233808770,"owners_count":18733600,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T05:34:57.414Z","updated_at":"2025-09-22T00:31:17.669Z","avatar_url":"https://github.com/cubiclesoft.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"Get Windows SID Information Command-Line Utility\n================================================\n\nDumps information about Windows Security Identifiers (SIDs) as JSON.  Released under a MIT or LGPL license.\n\nLearn about SIDs, this tool, and much more:\n\n[![Windows Security Objects:  A Crash Course + A Brand New Way to Start Processes on Microsoft Windows video](https://user-images.githubusercontent.com/1432111/118288197-0574ec00-b489-11eb-96e5-fab0f6149171.png)](https://www.youtube.com/watch?v=pmteqkbBfAY \"Windows Security Objects:  A Crash Course + A Brand New Way to Start Processes on Microsoft Windows\")\n\n[![Donate](https://cubiclesoft.com/res/donate-shield.png)](https://cubiclesoft.com/donate/) [![Discord](https://img.shields.io/discord/777282089980526602?label=chat\u0026logo=discord)](https://cubiclesoft.com/product-support/github/)\n\nFeatures\n--------\n\n* Command-line action!\n* Dumps the results of the LookupAccountSid()/LookupAccountName() and NetUserGetInfo() Windows APIs as JSON.  Easily consumed by most programming and scripting languages.\n* Pre-built binaries using Visual Studio (statically linked C++ runtime, minimal file size of ~112K, direct Win32 API calls).\n* Windows subsystem variant.\n* Unicode support.\n* Has a liberal open source license.  MIT or LGPL, your choice.\n* Sits on GitHub for all of that pull request and issue tracker goodness to easily submit changes and ideas respectively.\n\nUseful Information\n------------------\n\nRunning the command with the `/?` option will display the options:\n\n```\n(C) 2021 CubicleSoft.  All Rights Reserved.\n\nSyntax:  getsidinfo.exe [options] SIDorAcct [SID2orAcct] [SID3orAcct] ...\n\nOptions:\n        /v\n        Verbose mode.\n\n        /system=SystemName\n                Retrieve information from the specified system.\n\n        /file=OutputFile\n                File to write the JSON output to instead of stdout.\n```\n\nExample usage:\n\n```\nC:\\\u003ewmic useraccount get name,sid\nName                SID\nAdministrator       S-1-5-21-1304824241-3403877634-2989090281-500\nDefaultAccount      S-1-5-21-1304824241-3403877634-2989090281-503\nGuest               S-1-5-21-1304824241-3403877634-2989090281-501\nT2                  S-1-5-21-1304824241-3403877634-2989090281-1003\nWDAGUtilityAccount  S-1-5-21-1304824241-3403877634-2989090281-504\n\nC:\\\u003egetsidinfo S-1-5-21-1304824241-3403877634-2989090281-1003 S-1-5-32-544\n{\"S-1-5-21-1304824241-3403877634-2989090281-1003\": {\"success\": true, \"sid\": \"S-1-5-21-1304824241-3403877634-2989090281-1003\", \"domain\": \"MY-PC\", \"account\": \"T2\", \"type\": 1, \"net_info\": {\"full_name\": \"\", \"comment\": \"\", \"user_comment\": \"\", \"password_age\": 5855194, \"password_expired\": 0, \"bad_passwords\": 0, \"num_logons\": 4, \"priv_level\": 1, \"flags\": 66081, \"auth_flags\": 0, \"home_dir\": \"\", \"home_dir_drive\": \"\", \"profile\": \"\", \"script_path\": \"\", \"params\": \"\", \"workstations\": \"\", \"last_logon\": 1612641291, \"last_logoff\": 0, \"acct_expires\": -1, \"disk_quota\": -1, \"units_per_week\": 168, \"logon_hours\": \"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\", \"logon_server\": \"\\\\\\\\*\", \"country_code\": 0, \"code_page\": 0, \"primary_group_id\": 513, \"internet_identity\": false, \"reg_profile_path\": \"C:\\\\Users\\\\T2\"}},\n\n\"S-1-5-32-544\": {\"success\": true, \"sid\": \"S-1-5-32-544\", \"domain\": \"BUILTIN\", \"account\": \"Administrators\", \"type\": 4}}\n\nC:\\\u003egetsidinfo MY-PC\\Guest\n{\"MY-PC\\\\Guest\": {\"success\": true, \"sid\": \"S-1-5-21-1304824241-3403877634-2989090281-501\", \"domain\": \"MY-PC\", \"account\": \"Guest\", \"type\": 1, \"net_info\": {\"full_name\": \"\", \"comment\": \"Built-in account for guest access to the computerdomain\", \"user_comment\": \"\", \"password_age\": 0, \"password_expired\": 0, \"bad_passwords\": 0, \"num_logons\": 0, \"priv_level\": 0, \"flags\": 66147, \"auth_flags\": 0, \"home_dir\": \"\", \"home_dir_drive\": \"\", \"profile\": \"\", \"script_path\": \"\", \"params\": \"\", \"workstations\": \"\", \"last_logon\": 0, \"last_logoff\": 0, \"acct_expires\": -1, \"disk_quota\": -1, \"units_per_week\": 168, \"logon_hours\": \"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\", \"logon_server\": \"\\\\\\\\*\", \"country_code\": 0, \"code_page\": 0, \"primary_group_id\": 513, \"internet_identity\": false}}}\n```\n\nThe second command dumps information about two SIDs - one user account and the BUILTIN\\Administrators group.  The third command dumps information using an account name instead of SID.\n\nWindows Subsystem Variant\n-------------------------\n\nWhile `getsidinfo.exe` is intended for use with console apps, `getsidinfo-win.exe` is intended for detached console and GUI applications.  Starting `getsidinfo.exe` in certain situations will briefly flash a console window before displaying the error message.  Calling `getsidinfo-win.exe` instead will no longer show the console window.\n\nThere is one additional option specifically for `messagebox-win.exe` called `/attach` which attempts to attach to the console of the parent process (if any).\n\nMore Information\n----------------\n\nThe Windows registry also contains several SIDs not available using the 'wmic' tool and associated user profile paths on the local system:\n\n```\nC:\\\u003ereg query \"HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList\" /s /t REG_EXPAND_SZ\n\nHKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList\\S-1-5-18\n    ProfileImagePath    REG_EXPAND_SZ    %systemroot%\\system32\\config\\systemprofile\n\nHKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList\\S-1-5-19\n    ProfileImagePath    REG_EXPAND_SZ    %systemroot%\\ServiceProfiles\\LocalService\n\nHKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList\\S-1-5-20\n    ProfileImagePath    REG_EXPAND_SZ    %systemroot%\\ServiceProfiles\\NetworkService\n\nHKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList\\S-1-5-21-1304824241-3403877634-2989090281-1003\n    ProfileImagePath    REG_EXPAND_SZ    C:\\Users\\T2\n```\n\nSIDs, such as BUILTIN\\Administrators (S-1-5-32-544), are known as \"Well-Known SIDs.\"  Microsoft publishes [a mostly complete list of Well-Known SIDs](https://docs.microsoft.com/en-us/troubleshoot/windows-server/identity/security-identifiers-in-windows).\n\nRelated Tools\n-------------\n\n* [GetTokenInformation](https://github.com/cubiclesoft/gettokeninformation-windows) - Dumps information about Windows security tokens (SIDs, privileges, etc) as JSON.\n* [CreateProcess](https://github.com/cubiclesoft/createprocess-windows) - A powerful Windows API command-line utility that can start processes with all sorts of options including custom user tokens.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcubiclesoft%2Fgetsidinfo-windows","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcubiclesoft%2Fgetsidinfo-windows","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcubiclesoft%2Fgetsidinfo-windows/lists"}