Tha fios aig duine sam bith a tha air feuchainn ri inneal brìgheil a ruith san sgòth gun tèid ionnsaigh a thoirt air port RDP àbhaisteach, ma thèid fhàgail fosgailte, le tonnan de dh’ oidhirpean feachd brùideil facal-faire bho dhiofar sheòlaidhean IP air feadh an t-saoghail.
San artaigil seo seallaidh mi mar a nì thu
Ann an Quest InTrust faodaidh tu gnìomhan freagairt a rèiteachadh nuair a thèid riaghailt a phiobrachadh. Bhon àidseant cruinneachadh logaichean, gheibh InTrust teachdaireachd mu oidhirp ùghdarrachaidh neo-shoirbheachail air ionad-obrach no frithealaiche. Gus rèiteachadh seòlaidhean IP ùra a chur ris a 'bhalla-teine, feumaidh tu lethbhreac a dhèanamh de riaghailt àbhaisteach a th' ann mu thràth airson grunn ùghdaran a dh'fhàillig a lorg agus lethbhreac dheth fhosgladh airson deasachadh:
Bidh tachartasan ann an logaichean Windows a’ cleachdadh rudeigin ris an canar InsertionString.
Seo cò ris a tha teacsa tachartas 4625 coltach:
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.
A bharrachd air an sin, cuiridh sinn luach Seòladh Lìonra Stòr ri teacsa an tachartais.
An uairsin feumaidh tu sgriobt a chuir ris a chuireas casg air an t-seòladh IP ann am Firewall Windows. Gu h-ìosal tha eisimpleir a dh'fhaodar a chleachdadh airson seo.
Sgriobt airson balla-teine a stèidheachadh
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
}
A-nis faodaidh tu ainm agus tuairisgeul an riaghailt atharrachadh gus troimh-chèile a sheachnadh nas fhaide air adhart.
A-nis feumaidh tu an sgriobt seo a chuir ris mar ghnìomh freagairt ris an riaghailt, comas a thoirt don riaghailt, agus dèanamh cinnteach gu bheil an riaghailt fhreagarrach air a chomasachadh sa phoileasaidh sgrùdaidh fìor-ùine. Feumaidh an neach-ionaid a bhith comasach air sgriobt freagairt a ruith agus feumaidh am paramadair ceart a bhith air a shònrachadh.
Às deidh na roghainnean a chrìochnachadh, chaidh an àireamh de cheadan neo-shoirbheachail sìos 80%. Prothaid? Abair fear math!
Uaireannan bidh àrdachadh beag a 'tachairt a-rithist, ach tha seo mar thoradh air tùsan ionnsaigh ùra. An uairsin tòisichidh a h-uile càil a 'crìonadh a-rithist.
Thairis air seachdain de dh'obair, chaidh 66 seòlaidhean IP a chur ris an riaghailt balla-teine.
Gu h-ìosal tha clàr le 10 ainmean-cleachdaidh cumanta a chaidh a chleachdadh airson oidhirpean ceadachaidh.
ainm-cleachdaidh
Àireamh de
Ann an ceudadan
rianadair
1220235
40.78
admin
672109
22.46
-cleachdaidh
219870
7.35
contoso
126088
4.21
contoso.com
73048
2.44
rianadair
55319
1.85
frithealaiche
39403
1.32
sgazlabdc01.contoso.com
32177
1.08
rianaire
32377
1.08
sgalabdc01
31259
1.04
Inns dhuinn anns na beachdan mar a dhèiligeas tu ri bagairtean tèarainteachd fiosrachaidh. Dè an siostam a bhios tu a’ cleachdadh agus dè cho goireasach ‘s a tha e?
Ma tha ùidh agad InTrust fhaicinn ag obair,
Leugh na h-artaigilean eile againn air tèarainteachd fiosrachaidh:
Source: www.habr.com