понедельник, 28 сентября 2020 г.

Revocation function was unable to check revocation because the revocation server was offline

 An error occurred during an attempt to build the certificate chain for the relying party trust certificate %cert% identified by thumbprint %thumbprint%. Possible causes are that the certificate has been revoked, the certificate chain could not be verified as specified by the relying party trust’s encryption certificate revocation settings or certificate is not within its validity period.

Revocation status for a certificate in the chain for CA certificate 0 for %server% could not be verified because a server is currently unavailable. The revocation function was unable to check revocation because the revocation server was offline. 0x80092013 (-2146885613).

Active Directory Certificate Services did not start: Could not load or verify the current CA certificate. The revocation function was unable to check revocation because the revocation server was offline. 0x80092013 (-2146885613).

a: Once we found this very well written article it was all clear.

Boot up the offline root ca
open an elevated command prompt
run: certutil -crl
It will issue a new CRL file here: C:\Windows\System32\CertSvr\CertEnroll\
Copy that file to 2 places
\\%appserverhostingyourpkiwebsite%\CertEnroll
\\%issuingCAServer%\c$\Windows\System32\certsrv\CertEnroll
Then we were able to start the 'Active Directory Certificate Services' service on the Issuing CA server and all the certificates issued by that CA were valid again.

source

Active Directory Certificate Services denied request 420 because The request contains no certificate template information. 0x80094801 (-2146875391 CERTSRV_E_NO_CERT_TYPE).

Fix:

certreq -attrib "CertificateTemplate:webserver" -submit cert.req

Спасибо https://thomasheinz.net

воскресенье, 27 сентября 2020 г.

The certificate status could not be determined because the revocation check failed after migrating CA

После переноса CA самоподписанные сертификаты стали отображаться как невалидные. Перевыпуск сертификата - не помогло. Решение нашел на https://www.petenetlive.com.
netsh winhttp show proxy
 

 
 
 

понедельник, 3 августа 2020 г.

Exchange ActiveSync, доступ дальше своего почтового ящика

+1 пункт к проверке exchange web services, unc и wss пути никуда не делись.
Павел, спасибо.



2013+
Get-ActiveSyncMailboxPolicy | fc *acc*
Get-ActiveSyncMailboxPolicy | Set-ActiveSyncMailboxPolicy -WSSAccessEnabled $false -UNCAccessEnabled $false

2010-
Get-MobileDeviceMailboxPolicy | fc *acc*
Get-MobileDeviceMailboxPolicy | Set-MobileDeviceMailboxPolicyy -WSSAccessEnabled $false -UNCAccessEnabled $false

четверг, 30 июля 2020 г.

Корректировка переменных среды для другого пользователя

Запустить командный интерпретатор cmd от нужно пользователя (проверить тот ли пользователь можно командой whoami)
Выполнить rundll32 sysdm.cpl,EditEnvironmentVariables
Корректировка нужных переменных среды

Либо изменить пути в HKEY_USERS\%SID%\Environment
SID можно узнать командой wmic useraccount where name='username' get sid
Папки проводника меняем в HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders или через HKEY_USERS\%SID%\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders

понедельник, 20 июля 2020 г.

CVE-2020-1350





fix:
$RegPath = "HKLM:\SYSTEM\CurrentControlSet\Services\DNS\Parameters"

New-ItemProperty -Path $RegPath -Name TcpReceivePacketSize -Value 0xFF00 -PropertyType DWORD

Restart-Service DNS
revert changes:
$RegPath = "HKLM:\SYSTEM\CurrentControlSet\Services\DNS\Parameters"

Remove-ItemProperty -Path $RegPath -Name TcpReceivePacketSize

Restart-Service DNS

понедельник, 15 июня 2020 г.

MS Exchange #550 5.1.1 RESOLVER.ADR.ExRecipNotFound; not found ##

Получатель не найден
IMCEAEX-_O=Company+20Ru_OU=EXCHANGE+20ADMINISTRATIVE+20GROUP+20+
28QWDIBOVB23TGFLT+29_CN=RECIPIENTS_CN=mailbox9b2485@company.ru
#550 5.1.1 RESOLVER.ADR.ExRecipNotFound; not found ##
Конвертируем X500 в читаемый формат через IMCEAEX to X500 Converter /зеркало/
и добавляем нужному адресату X500-адрес.
Либо очищаем кэш outlook.

воскресенье, 14 июня 2020 г.

Публикация Exchange Web Services через pfSense с HAProxy

Исходные данные:
corpmail.company.ru как имя Exchange-сервера во внутреннем и внешнем DNS.
Извне corpmail.company.ru (A) = 46.46.46.46
Внутри corpmail.company.ru (A) = 10.65.10.65
Адрес на внешнем интерфейсе pfSense = 46.46.46.46
Порт 443 не задействован извне другими службами. 
У нас есть внешний сертификат, содержащий corpmail.company.ru в subject alternative name. Либо используем Lets Encrypt с пакетом acme.
У нас есть установленный пакет HAProxy.

понедельник, 20 апреля 2020 г.

How to open lagre pst file in MS Outlook (up to 90Gb)

Добавить руками в реестр:
HKEY_CURRENT_USER\Software\Microsoft\Office\%outlook.verison%\Outlook\PST
REG-DWORD (32 bit)
hex-формат
WarnFileSize = 81920
WarnLargeFileSize = 81920
MaxFileSize = 92160
MaxLargeFileSize = 92160

суббота, 4 апреля 2020 г.

среда, 11 марта 2020 г.

powershell, merge 2 text files


$file2 = Get-Content "C:\app\src\bad_daily.txt"
Add-Content "C:\app\_txt\bad_regular.txt" "`r"
Add-Content "C:\app\_txt\bad_regular.txt" $file2
del "C:\app\src\bad_daily.txt"

источник
источник

суббота, 29 февраля 2020 г.

Очистка временных файлов, powershell

Когда сроки выполнения задачи 3-5 минут.

Remove-Item "$env:USERPROFILE\appdata\roaming\1C\Файлы\УправлениеТорговлей\*" -force -recurse
Remove-Item "$env:USERPROFILE\appdata\local\1C\1cv8\*" -force -recurse
Remove-Item "$env:temp\*" -force -recurse

среда, 19 февраля 2020 г.

Kaspersky Endpoint. Kavremover. Local users and groups = error loading type library dll

Использование kavremover актуальной версии приводит к тому, что локальные пользователи и группы более невозможно открыть через mmc.

Что помогло:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\TypeLib\{97d25db0-0363-11cf-abc4-02608c9e7553}]

[HKEY_CLASSES_ROOT\TypeLib\{97d25db0-0363-11cf-abc4-02608c9e7553}\1.0]

@="Active DS Type Library"

[HKEY_CLASSES_ROOT\TypeLib\{97d25db0-0363-11cf-abc4-02608c9e7553}\1.0\0]

[HKEY_CLASSES_ROOT\TypeLib\{97d25db0-0363-11cf-abc4-02608c9e7553}\1.0\0\win32]

@="C:\\WINDOWS\\System32\\activeds.tlb"

[HKEY_CLASSES_ROOT\TypeLib\{97d25db0-0363-11cf-abc4-02608c9e7553}\1.0\FLAGS]

@="0"

[HKEY_CLASSES_ROOT\TypeLib\{97d25db0-0363-11cf-abc4-02608c9e7553}\1.0\HELPDIR]

@="C:\\WINDOWS\\System32"

Спасибо:
http://forum.oszone.net/thread-134442.html
https://forum.kasperskyclub.ru/index.php?showtopic=64552
https://community.kaspersky.com/produkty-kaspersky-dlya-biznesa-31/ne-udalyaetsya-kes-11-shtatnym-instrumentom-posle-ispolzovaniya-kavremvr-ne-dostupna-osnastka-local-user-and-groups-6821

суббота, 15 февраля 2020 г.

IPsec between pfSense and Kerio Control

Kerio Control side:
Passive.
Type:IPsec.
Preshared key: pfsense random key.
Local ID: Kerio Control external IP address.
Remote ID: pfSense external IP address.
Phase 1: 3des-sha1-modp1536 - change to more stronger and repeat with pfSense.
Phase 2: aes128-sha1 - change to more stronger and repeat with pfSense.
Remote networks: pfSense local networks.
Local networks: Kerio Control local networks.
Confirure traffic policy.

pfSense side:
Phase1:
Key Exchange version: IKEv1.
Internet Protocol: IPv4.
Interface: WAN.
Remote Gateway: Kerio Connect external IP address.
Authentication Method: Mutural PSK.
Negotiation mode: Main.
My identifier: My IP address.
Peer identifier: My IP address.
Pre-Shared Key: generate random Key.
Encryption Algoritm: 3DES - SHA1 - 5(1536 bit) - select more stronger, like in Kerio Control.
Lifetime (Seconds): 10800.
Disable rekey:No.
Margintime: Empty.
Responder Only: empty (if Kerio will active, select this checkbox).
NAT Traversal: Auto.
Dead Peer Detection: No.
Phase2:
Mode: Tunnel IPv4.
Local Network: Address/Subnet за pfSense.
NAT/BINAT translation: None.
Remote Network: Network/Address за Kerio Control.
Protocol: ESP
Encryption Algoritms: AES128 - SHA1 - select more stronger, like in Kerio Control.
PFSkey group: Off.
Lifetime: 3600.
Automatically ping host: IP address behind Kerio, if needed.
Status - IPsec - Connect.
Configure NAT (if manual) and firewall (if needed).