Ang sinumang sumubok na magpatakbo ng virtual machine sa cloud ay lubos na nakakaalam na ang isang karaniwang RDP port, kung iniwang bukas, ay halos agad na aatakehin ng mga alon ng password na brute force na pagtatangka mula sa iba't ibang mga IP address sa buong mundo.
Sa artikulong ito ipapakita ko kung paano
Sa Quest InTrust maaari mong i-configure ang mga pagkilos sa pagtugon kapag na-trigger ang isang panuntunan. Mula sa ahente ng pagkolekta ng log, nakakatanggap ang InTrust ng mensahe tungkol sa hindi matagumpay na pagtatangka ng pahintulot sa isang workstation o server. Upang i-configure ang pagdaragdag ng mga bagong IP address sa firewall, kailangan mong kopyahin ang isang umiiral nang custom na panuntunan para sa pag-detect ng maraming nabigong pahintulot at magbukas ng kopya nito para sa pag-edit:
Ang mga kaganapan sa mga log ng Windows ay gumagamit ng isang bagay na tinatawag na InsertionString.
Ito ang hitsura ng teksto ng kaganapan 4625:
An account failed to log on.
Subject:
Security ID: S-1-5-21-1135140816-2109348461-2107143693-500
Account Name: ALebovsky
Account Domain: LOGISTICS
Logon ID: 0x2a88a
Logon Type: 2
Account For Which Logon Failed:
Security ID: S-1-0-0
Account Name: Paul
Account Domain: LOGISTICS
Failure Information:
Failure Reason: Account locked out.
Status: 0xc0000234
Sub Status: 0x0
Process Information:
Caller Process ID: 0x3f8
Caller Process Name: C:WindowsSystem32svchost.exe
Network Information:
Workstation Name: DCC1
Source Network Address: ::1
Source Port: 0
Detailed Authentication Information:
Logon Process: seclogo
Authentication Package: Negotiate
Transited Services: -
Package Name (NTLM only): -
Key Length: 0
This event is generated when a logon request fails. It is generated on the computer where access was attempted.
The Subject fields indicate the account on the local system which requested the logon. This is most commonly a service such as the Server service, or a local process such as Winlogon.exe or Services.exe.
The Logon Type field indicates the kind of logon that was requested. The most common types are 2 (interactive) and 3 (network).
The Process Information fields indicate which account and process on the system requested the logon.
The Network Information fields indicate where a remote logon request originated. Workstation name is not always available and may be left blank in some cases.
The authentication information fields provide detailed information about this specific logon request.
- Transited services indicate which intermediate services have participated in this logon request.
- Package name indicates which sub-protocol was used among the NTLM protocols.
- Key length indicates the length of the generated session key. This will be 0 if no session key was requested.
Bukod pa rito, idaragdag namin ang halaga ng Source Network Address sa text ng kaganapan.
Pagkatapos ay kailangan mong magdagdag ng script na hahadlang sa IP address sa Windows Firewall. Nasa ibaba ang isang halimbawa na maaaring gamitin para dito.
Script para sa pag-set up ng firewall
param(
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[string]
$SourceAddress
)
$SourceAddress = $SourceAddress.Trim()
$ErrorActionPreference = 'Stop'
$ruleName = 'Quest-InTrust-Block-Failed-Logons'
$ruleDisplayName = 'Quest InTrust: Blocks IP addresses from failed logons'
function Get-BlockedIps {
(Get-NetFirewallRule -Name $ruleName -ErrorAction SilentlyContinue | get-netfirewalladdressfilter).RemoteAddress
}
$blockedIps = Get-BlockedIps
$allIps = [array]$SourceAddress + [array]$blockedIps | Select-Object -Unique | Sort-Object
if (Get-NetFirewallRule -Name $ruleName -ErrorAction SilentlyContinue) {
Set-NetFirewallRule -Name $ruleName -RemoteAddress $allIps
} else {
New-NetFirewallRule -Name $ruleName -DisplayName $ruleDisplayName -Direction Inbound -Action Block -RemoteAddress $allIps
}
Ngayon ay maaari mong baguhin ang pangalan ng panuntunan at paglalarawan upang maiwasan ang pagkalito sa ibang pagkakataon.
Ngayon ay kailangan mong idagdag ang script na ito bilang isang tugon na pagkilos sa panuntunan, paganahin ang panuntunan, at tiyaking naka-enable ang kaukulang panuntunan sa real-time na patakaran sa pagsubaybay. Dapat na pinagana ang ahente upang magpatakbo ng script ng tugon at dapat ay may tamang parameter na tinukoy.
Matapos makumpleto ang mga setting, bumaba ng 80% ang bilang ng mga hindi matagumpay na pahintulot. Kita? Ang galing!
Minsan ang isang maliit na pagtaas ay nangyayari muli, ngunit ito ay dahil sa paglitaw ng mga bagong mapagkukunan ng pag-atake. Pagkatapos ang lahat ay nagsisimulang tumanggi muli.
Sa loob ng isang linggong trabaho, 66 na IP address ang idinagdag sa panuntunan ng firewall.
Nasa ibaba ang isang talahanayan na may 10 karaniwang mga username na ginamit para sa mga pagtatangka sa pagpapahintulot.
username
Numero
Sa mga porsyento
administrador
1220235
40.78
admin
672109
22.46
gumagamit
219870
7.35
contoso
126088
4.21
contoso.com
73048
2.44
administrador
55319
1.85
server
39403
1.32
sgazlabdc01.contoso.com
32177
1.08
administrateur
32377
1.08
sgazlabdc01
31259
1.04
Sabihin sa amin sa mga komento kung paano ka tumugon sa mga banta sa seguridad ng impormasyon. Anong sistema ang ginagamit mo at gaano ito kaginhawa?
Kung interesado kang makita ang InTrust sa pagkilos,
Basahin ang aming iba pang mga artikulo sa seguridad ng impormasyon:
Pinagmulan: www.habr.com