
도메인 내 접근 가능한 네트워크 공유를 열거하는 멀티스레드 C# .NET Assembly
도메인 내 접근 가능한 네트워크 공유를 열거하기 위한 멀티스레드 C# .NET 어셈블리
djhohnstein의 SharpShares 프로젝트를 기반으로 구축
> .\SharpShares.exe help
Usage:
SharpShares.exe /threads:50 /ldap:servers /ou:"OU=Special Servers,DC=example,DC=local" /filter:SYSVOL,NETLOGON,IPC$,PRINT$ /verbose /outfile:C:\path\to\file.txt
Optional Arguments:
/threads - 최대 병렬 스레드 수 지정 (기본값=25)
/dc - 쿼리할 도메인 컨트롤러 지정 (도메인 가입 호스트에서 실행하지 않은 경우)
/domain - 도메인 이름 지정 (도메인 가입 호스트에서 실행하지 않은 경우)
/ldap - 다음 LDAP 필터에서 호스트 쿼리 (기본값=all)
:all - 'primary' 그룹 'Domain Computers'를 가진 모든 활성 컴퓨터
:dc - 모든 활성 도메인 컨트롤러 (읽기 전용 DC 제외)
:exclude-dc - 도메인 컨트롤러 또는 읽기 전용 DC가 아닌 모든 활성 컴퓨터
:servers - 모든 활성 서버
:servers-exclude-dc - 도메인 컨트롤러 또는 읽기 전용 DC를 제외한 모든 활성 서버
/ou - 쿼리할 LDAP OU 지정 (활성 컴퓨터 개체)
예: "OU=Special Servers,DC=example,DC=local"
/stealth - 읽기/쓰기 접근 검사를 수행하지 않고 공유 이름만 나열
/filter - 열거에서 제외할 공유 목록 (쉼표로 구분)
기본값: SYSVOL,NETLOGON,IPC$,PRINT$
/outfile - 표준 출력 대신 결과를 추가할 파일 지정
/verbose - 권한 없는 공유도 반환
execute-assembly /path/to/SharpShares.exe /ldap:all /filter:sysvol,netlogon,ipc$,print$
[+] Parsed Aguments:
threads: 25
ldap: all
ou: none
filter: SYSVOL,NETLOGON,IPC$,PRINT$
stealth: False
verbose: False
outfile:
[*] Excluding SYSVOL,NETLOGON,IPC$,PRINT$ shares
[*] Starting share enumeration with thread limit of 25
[r] = Readable Share
[w] = Writeable Share
[-] = Unauthorized Share (requires /verbose flag)
[?] = Unchecked Share (requires /stealth flag)
[+] Performing LDAP query for all enabled computers with "primary" group "Domain Computers"...
[+] This may take some time depending on the size of the environment
[+] LDAP Search Results: 10
[+] Starting share enumeration against 10 hosts
[r] \\DC-01\CertEnroll
[r] \\DC-01\File History Backups
[r] \\DC-01\Folder Redirection
[r] \\DC-01\Shared Folders
[r] \\DC-01\Users
[w] \\WEB-01\wwwroot
[r] \\DESKTOP\ADMIN$
[r] \\DESKTOP\C$
[+] Finished Enumerating Shares
/ldap와 /ou 플래그는 함께 사용하거나 별도로 사용하여 열거할 호스트 목록을 생성할 수 있습니다.
이 플래그에서 반환된 모든 호스트는 열거가 시작되기 전에 결합되고 중복이 제거됩니다.