
MS 문서를 기반으로 MS Exchange와 상호작용하는 C# 도구
이 명령줄 POC는 C#을 사용하여 Microsoft Exchange(EWS)와 상호 작용할 수 있는 방법을 보여줍니다. PowerShell 이외의 다른 도구에서도 가능하다는 것을 보여줍니다. 네, 이것은 어떻게 할 수 있는지 보여주는 간단한 POC입니다. 100% 완벽하지는 않습니다. l33t C# 코더 또는 레드 팀 기술을 뽐내고 싶다면 풀 리퀘스트를 열어 주세요 :) 이것은 교육 목적으로만 제공됩니다. 악의적이거나 불법적인 용도로 사용하지 마세요.
Required Inputs (Must be in order shown):
ReadEmailExchange.exe WEBDomain DomainName Password InternalDomainName DUMPItem
Example WEBDomain: webmail.domain.com
Example DomainName: User1
Example Password: SecretPassword
Example InternalDomainName: domain
Options for DUMPItem:
Inbox
Sent
Drafts
Deleted
Skype
Attachments (Will Download Atatchments from the Inbox, DeletedItems, and Sent Items folders)
SendEmail ToEmailAddress~Subject~Body(Body can be file path)~AttachmentLocalFilePath(optional)
All (All == will try to dump all the items above)(I would default to this if unsure)
Optional Inputs:
ReadEmailExchange.exe WEBDomain DomainName Password InternalDomainName DUMPItem NumberOfSearchResultsToReturn
Example NumberOfSearchResultsToReturn (will return a maximum of the number,default 10): 10
Note: NumberOfSearchResultsToReturn must be a int/whole number
Optional Inputs:
ReadEmailExchange.exe WEBDomain DomainName Password InternalDomainName DUMPItem NumberOfSearchResultsToReturn OutputFileNameOrPath
Example OutputFileNameOrPath: C:\file.csv
Note: Program needs permission to write to location
Microsoft.Exchange.WebServices
C# 기반이므로 AMSI가 활성화된 최신 시스템에서는 AMSI가 관여할 가능성이 높습니다.
디스크에 텍스트 파일을 쓸 수 있습니다.
기본 .NET 사용자 에이전트 문자열을 사용합니다 (예: ... .NET CLR ...)
.NET exe가 실행될 때 사용자 계정 폴더 구조에 임시 파일을 이름과 함께 생성할 수 있습니다.
앱의 GUID
코드를 검토하면 더 많은 탐지 기회가 존재합니다.