Qualchidunu chì hà pruvatu à eseguisce una macchina virtuale in u nuvulu sapi bè chì un portu RDP standard, se lasciatu apertu, serà quasi subitu attaccatu da ondate di tentativi di forza bruta di password da diversi indirizzi IP in u mondu.
In questu articulu vi mustraraghju cumu fà
In Quest InTrust pudete cunfigurà l'azzioni di risposta quandu una regula hè attivata. Da l'agente di cullizzioni di log, InTrust riceve un missaghju annantu à un tentativu d'autorizazione senza successu in una stazione di travagliu o un servitore. Per cunfigurà l'aghjunzione di novi indirizzi IP à u firewall, avete bisognu di copià una regula persunalizata esistente per detectà parechje autorizazioni fallite è apre una copia di questu per edità:
L'avvenimenti in i logs di Windows utilizanu qualcosa chjamatu InsertionString.
Eccu ciò chì u testu di l'avvenimentu 4625 pare:
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.
Inoltre, aghjunghjemu u valore di l'indirizzu di a rete d'origine à u testu di l'avvenimentu.
Allora avete bisognu di aghjunghje un script chì bluccà l'indirizzu IP in u Firewall di Windows. Quì sottu hè un esempiu chì pò esse usatu per questu.
Script per a stallazione di un 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
}
Avà pudete cambià u nome di a regula è a descrizzione per evità a cunfusione dopu.
Avà avete bisognu di aghjunghje stu script cum'è una azione di risposta à a regula, attivà a regula, è assicuratevi chì a regula currispundente hè attivata in a pulitica di monitoraghju in tempu reale. L'agente deve esse attivatu per eseguisce un script di risposta è deve avè u paràmetru currettu specificatu.
Dopu chì i paràmetri sò stati cumpletati, u numeru di l'autorizazioni senza successu diminuite da 80%. Prufittu ? Chì grande!
Calchì volta un picculu aumentu si ritrova, ma questu hè duvuta à l'emergenza di novi fonti d'attaccu. Allora tuttu principia à calà di novu.
In u cursu di una settimana di travagliu, 66 indirizzi IP sò stati aghjuntu à a regula di firewall.
A sottu hè una tavula cù 10 nomi d'utilizatori cumuni chì sò stati utilizati per i tentativi d'autorizazione.
U nome d 'utilizatori
Numeru di
In percentuali
amministratore
1220235
40.78
Admin
672109
22.46
Fammi
219870
7.35
contusu
126088
4.21
contoso.com
73048
2.44
amministratore
55319
1.85
servore
39403
1.32
sgazlabdc01.contoso.com
32177
1.08
amministratore
32377
1.08
sgazlabdc01
31259
1.04
Diteci in i cumenti cumu risponde à e minacce à a sicurità di l'infurmazioni. Chì sistema aduprate è quantu hè convenientu?
Sè site interessatu à vede InTrust in azione,
Leghjite i nostri altri articuli nantu à a sicurità di l'infurmazioni:
Source: www.habr.com