
Собирает метаданные объектов Active Directory, членство в группах, сеансы, ACL и доверительные отношения для построения карты путей атак в BloodHound в рамках оценки безопасности.
Последняя сборка SharpHound всегда доступна здесь.
Чтобы определить версию SharpHound, совместимую с развёрнутым экземпляром BloodHound CE, войдите в веб-интерфейс BloodHound CE и нажмите ⚙️ (Настройки) → Download Collectors. Затем нажмите кнопку «Download SharpHound» в интерфейсе или используйте отображаемую версию SharpHound, чтобы загрузить подходящий release-бинарник. Либо соберите бинарник SharpHound из соответствующего release-коммита.
Обратитесь к разделу о SharpHound в составе документации BloodHound Community Edition.
Для сборки этого проекта с помощью .NET SDK выполните следующее:
dotnet restore
dotnet build
По умолчанию проект собирается против следующей предварительной -dev версии
библиотеки SharpHoundCommon
(отслеживающей ветку v4).
Если вы хотите собрать проект против локальной копии библиотеки, убедитесь, что свойства _CommonLibPath и _RPCPath указывают на нужные DLL, и выполните dotnet build -p:CommonSource=Local.
Если CommonLibsVersion уже содержит предварительный тег (например, 4.6.0-rc1),
то эта точная версия используется как есть для источников Stable и Dev.
dotnet build # Dev (по умолчанию)
dotnet build -p:CommonSource=Stable
dotnet build -p:CommonSource=Local
dotnet build --tl:off # Чтобы увидеть журналы разрешения CommonLib
SharpHound предназначен для работы с .Net 4.7.2. SharpHound должен запускаться из контекста доменного пользователя — либо напрямую через вход в систему, либо другим способом, например через RUNAS.
Ниже перечислены аргументы командной строки, поддерживаемые SharpHound. Дополнительные сведения об этих параметрах можно найти в документации по сбору данных BloodHound CE.
-c, --collectionmethods (Default: Default) Collection Methods: Container, Group, LocalGroup, GPOLocalGroup,
Session, LoggedOn, ObjectProps, ACL, ComputerOnly, Trusts, Default, RDP, DCOM, DCOnly, UserRights,
CARegistry, DCRegistry, CertServices, WebClientService, NTLMRegistry,SMBInfo,LdapServices
-d, --domain Specify domain to enumerate
-s, --searchforest (Default: false) Search all available domains in the forest
--stealth Stealth Collection (Prefer DCOnly whenever possible!)
-f Add an LDAP filter to the pregenerated filter.
--distinguishedname Base DistinguishedName to start the LDAP search at
--computerfile Path to file containing computer names to enumerate
--outputdirectory (Default: .) Directory to output file too
--outputprefix String to prepend to output file names
--cachename Filename for cache (Defaults to a machine specific identifier)
--memcache Keep cache in memory and don't write to disk
--rebuildcache (Default: false) Rebuild cache and remove all entries
--randomfilenames (Default: false) Use random filenames for output
--zipfilename Filename for the zip
--nozip (Default: false) Don't zip files
--trackcomputercalls (Default: false) Adds a CSV tracking requests to computers
--zippassword Password protects the zip with the specified password
--prettyprint (Default: false) Pretty print JSON
--ldapusername Username for LDAP
--ldappassword Password for LDAP
--domaincontroller Override domain controller to pull LDAP from. This option can result in data loss
--ldapport (Default: 0) Override port for LDAP
--secureldap (Default: false) Connect to LDAP SSL instead of regular LDAP
--disablecertverification (Default: false) Disable certificate verification for secure LDAP
--disablesigning (Default: false) Disables Kerberos Signing/Sealing
--skipportcheck (Default: false) Skip checking if 445 is open
--portchecktimeout (Default: 500) Timeout for port checks in milliseconds
--skippasswordcheck (Default: false) Skip PwdLastSet age check when checking computers
--excludedcs (Default: false) Exclude domain controllers from session/localgroup enumeration (mostly for
ATA/ATP)
--throttle Add a delay after computer requests in milliseconds
--jitter Add jitter to throttle (percent)
--threads (Default: 50) Number of threads to run enumeration with
--skipregistryloggedon Skip registry session enumeration
--overrideusername Override the username to filter for NetSessionEnum
--realdnsname Override DNS suffix for API calls
--collectallproperties Collect all LDAP properties from objects
-l, --Loop Loop computer collection
--loopduration Loop duration (hh:mm:ss - 05:00:00 is 5 hours, default: 2 hrs)
--loopinterval Add delay between loops (hh:mm:ss - 00:03:00 is 3 minute)
--statusinterval (Default: 30000) Interval in which to display status in milliseconds
--localadminsessionenum Specify if you want to use a dedicated LOCAL user for session enumeration
--localadminusername Specify the username of the localadmin for session enumeration
--localadminpassword Specify the password of the localadmin for session enumeration
-v (Default: 2) Enable verbose output. Lower is more verbose
--help Display this help screen.
--version Display version information.
CommonSource (по умолчанию: Dev) | Разрешённый пакет |
|---|
Dev | Предварительная версия (например, 4.6.0-rc1) или следующий патч -dev* (например, 4.6.1-dev*) |
Stable | Текущая CommonLibsVersion (например, 4.6.0) |
Local | Локальные DLL SharpHoundCommon |