
MS ドキュメントに基づいて MS Exchange と連携する C# ツール
このコマンドラインツールは、C# を使用して Microsoft Exchange (EWS) と対話できることを示す POC です。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 実行ファイルはユーザーのアカウントフォルダ構造内に一時ファイルを自身の名前で作成する可能性がある
アプリの GUID
コードをレビューすれば、さらに多くの機会が存在する