Friday, 25 February 2022

Firepower FMC delete stuck deployments from CLI

 Sometimes you get a deployment running for hours and you cannot clear the state even with an FMC reload.

Login to FMC CLI and perform the following

expert

sudo su

Now check that the task is actual there using the following command

OmniQuery.pl -db mdb -e "select status,category,hex(uuid),body from notification where status=7;"

Use the following command to clear the pending deployment

OmniQuery.pl -db mdb -e "update notification set status=13 where status=7;"

If you want to delete the task use the following command, replacing the uuid value with the one that you want to delete

OmniQuery.pl -db mdb -e 'delete from notification where uuid=unhex("bb0bba970b4c4423927b8f7d237edd0b");'

Friday, 10 December 2021

Cisco IOS DHCP with VRF

 Configuring a Cisco router as DHCP Server for a VRF, you must use the "vrf" keyword in the pool and in the excluded ranges.

ip dhcp excluded-address vrf INFO 172.23.11.1 172.23.11.10
ip dhcp excluded-address vrf INFO 172.23.11.250 172.23.11.254
ip dhcp pool INFO_VL112
 vrf INFO
 network 172.23.11.0 255.255.255.0
 default-router 172.23.11.254
 dns-server 1.1.1.1 8.8.8.8
 domain-name lab.local
 lease 0 2

 

 In order for DHCP requests to be served the following commands must be entered on DHCP Server Router


For remote devices:
ip dhcp use vrf remote

For locally connected clients:
ip dhcp use vrf connected

Wednesday, 8 December 2021

Firepower Delete Notifications from CLI

 Run the below script to get notifications from FMC and delete the ones that you want


1) OmniQuery.pl -db mdb -e "select status,category,hex(uuid),body from notification where status=11;"
2) OmniQuery.pl -db mdb -e 'delete from notification where uuid=unhex("<insert the uuid that the first command returns here");'
3) OmniQuery.pl -db mdb -e "select status,category,hex(uuid),body from notification where status=11;"

Wednesday, 23 June 2021

Open Source Security intelligence feeds

 List of open source security intelligence feeds to be used by various security products like Firewalls, IPS/IDS etc.

Credit goes to: https://logz.io/blog/open-source-threat-intelligence-feeds/

1 Emerging Threats

Developed and offered by Proofpoint in both open source and a premium version, The Emerging Threats Intelligence feed (ET) is one of the highest rated threat intelligence feeds. ET classifies IP addresses and domain addresses associated with malicious activity online and tracks recent activity by either. The feed maintains 40 different categories for IPs and URLs, as well as a constantly updated confidence score

2 Dan.me.uk

Dan is a collection of 10 tools that together report on IP and domain information. It includes info on IP subnets, the TOR status of IP addresses, DNS blacklists, IP address checking for autonomous systems, and node lists.

3 CINS Score

The CINS Score is supported by Sentinel. Like ET’s confidence score, the CINS Score rates IP addresses according to their trustworthiness. They add data about suspected or confirmed attacks from those IPs in the form of frequency, nature and breadth. They also try to create ‘personas’ around the sorts of attacks those IPs are tied to: scanning, network or remote desktop vulnerabilities, malware bots, or command-and-control servers.

4 Blocklist.de

Blocklist.de pays attention to server attacks from SSH, FTP, email and webserver sources. Their site claims to report an average of 70,000 attacks every 12 hours using a combo of the abusix.org database, Ripe-Abuse-Finder, and Whois information.

5 AlienVault OTX

AlienVault Open Threat Exchange (OTX) is the company’s free, community-based project to monitor and rank IPs by reputation. It generates alert feeds called “pulses,” which can be manually entered into the system, to index attacks by various malware sources. While some pulses are generated by the community, AlienVault creates its own as well that automatically subscribes all OTX’s users. Most pulses are automatically API-generated and submitted via the OTX Python SDK. This example, SSH bruteforce logs 2016-06-09, shows the indicators, geoip of the attacks, and a full list of the IPs used. It also links to reports in other pulses that include the same IPs.

6 Abuse.ch Feodo Tracker

This abuse.ch offering focuses on botnets and command-and-control infrastructure (C&C). The blocklist is an amalgamation of several minor blocklists with attention paid to Heodo and Dridex malware bots. There were 5,374 entries as of 03-03-2020.

Of course, the name itself is a direct response to an older trojan virus called Feodo, which was a successor to the Cridex e-banking trojan. (to which both Dridex and Heodo both trace their source code). Feodo Tracker also tracks an associative malware bot, TrickBot.

7 Abuse.ch URLhaus

The first of two projects from Swiss website abuse.ch, URLhaus is a depository of malicious domains tied to distributing malware. The database can be accessed via a URLhaus API, allowing you to download CSV collections of flagged URLs, those site’s respective statuses, the type of threat associated with them, and more. Ready-made downloads include periods of recent additions (going back 30 days), or all active URLs.

The full URLhaus dataset—as updated every 5 minutes—is automatically and immediately available for CSV download. It also includes a ruleset suited for use in Suricata or Snort. URLhaus also offers a DNS firewall dataset that includes all marked URLs for blocking.

 

Tuesday, 18 May 2021

Windows NPS error codes

 Values:
00: IAS_SUCCESS
01: IAS_INTERNAL_ERROR
02: IAS_ACCESS_DENIED
03: IAS_MALFORMED_REQUEST
04: IAS_GLOBAL_CATALOG_UNAVAILABLE
05: IAS_DOMAIN_UNAVAILABLE
06: IAS_SERVER_UNAVAILABLE
07: IAS_NO_SUCH_DOMAIN
08: IAS_NO_SUCH_USER
09: The request was discarded by a third-party extension DLL file.
10: A third-party extension DLL has failed and cannot perform its function.
16: IAS_AUTH_FAILURE
17: IAS_CHANGE_PASSWORD_FAILURE
18: IAS_UNSUPPORTED_AUTH_TYPE
19: No reversibly encrypted password is stored for the user account
20: Lan Manager Authentication is not enabled.
21: An IAS extension dynamic link library (DLL) that is installed on the NPS server rejected the connection request.
22: The client could not be authenticated because the EAP type cannot be processed by the server.
23: Unexpected error. Possible error in server or client configuration.
32: IAS_LOCAL_USERS_ONLY
33: IAS_PASSWORD_MUST_CHANGE
34: IAS_ACCOUNT_DISABLED
35: IAS_ACCOUNT_EXPIRED
36: IAS_ACCOUNT_LOCKED_OUT
37: IAS_INVALID_LOGON_HOURS
38: IAS_ACCOUNT_RESTRICTION
48: IAS_NO_POLICY_MATCH
49: Did not match connection request policy
64: IAS_DIALIN_LOCKED_OUT
65: IAS_DIALIN_DISABLED
66: IAS_INVALID_AUTH_TYPE
67: IAS_INVALID_CALLING_STATION
68: IAS_INVALID_DIALIN_HOURS
69: IAS_INVALID_CALLED_STATION
70: IAS_INVALID_PORT_TYPE
71: IAS_INVALID_RESTRICTION
72: The user cannot change his or her password because the change password option is not enabled for the matching remote access policy
73: The Enhanced Key Usage (EKU) extensions, section of the user or computer certificate are not valid or are missing.
80: IAS_NO_RECORD
96: IAS_SESSION_TIMEOUT
97: IAS_UNEXPECTED_REQUEST
112: The remote RADIUS server did not process the authentication request.
113: The local NPS proxy attempted to forward a connection request to a member of a remote RADIUS server group that does not exist.
115: The local NPS proxy did not forward a RADIUS message because it is not an accounting request or a connection request.
116: The local NPS proxy server cannot forward the connection request to the remote RADIUS server because either the proxy cannot open a Windows socket over which to send the connection request, or the proxy server attempted to send the connection request but received Windows sockets errors that prevented successful completion of the send operation.
117: The remote RADIUS (Remote Authentication Dial-In User Service) server did not respond.
118: The local NPS proxy server received a RADIUS message that is malformed from a remote RADIUS server, and the message is unreadable.
256: The certificate provided by the user or computer as proof of their identity is a revoked certificate. Because of this, the user or computer was not authenticated, and NPS rejected the connection request.
257: Due to a missing dynamic link library (DLL) or exported function, NPS cannot access the certificate revocation list to verify whether the user or client computer certificate is valid or is revoked.
258: The revocation function was unable to check revocation for the certificate.
259: The certification authority that manages the certificate revocation list is not available. NPS cannot verify whether the certificate is valid or is revoked. Because of this, authentication failed.
260: The message supplied for verification has been altered.
261: NPS cannot contact Active Directory Domain Services (AD DS) or the local user accounts database to perform authentication and authorization. The connection request is denied for this reason.
262: The supplied message is incomplete. The signature was not verified.
263: NPS did not receive complete credentials from the user or computer. The connection request is denied for this reason.
264: The Security Support Provider Interface (SSPI) called by EAP reports that the system clocks on the NPS server and the access client are not synchronized.
265: The certificate that the user or client computer provided to NPS as proof of identity chains to an enterprise root certification authority that is not trusted by the NPS server.
266: The message received was unexpected or badly formatted.
267: The certificate provided by the connecting user or computer is not valid because it is not configured with the Client Authentication purpose in Application Policies or Enhanced Key Usage (EKU) extensions. NPS rejected the connection request for this reason.
268: The certificate provided by the connecting user or computer is expired. NPS rejected the connection request for this reason.
269: The Security Support Provider Interface (SSPI) called by EAP reports that the NPS server and the access client cannot communicate because they do not possess a common algorithm.
270: Based on the matching NPS network policy, the user is required to log on with a smart card, but they have attempted to log on by using other credentials. NPS rejected the connection request for this reason.
271: The connection request was not processed because the NPS server was in the process of shutting down or restarting when it received the request.
272: The certificate that the user or client computer provided to NPS as proof of identity maps to multiple user or computer accounts rather than one account. NPS rejected the connection request for this reason.
273: Authentication failed. NPS called Windows Trust Verification Services, and the trust provider is not recognized on this computer. A trust provider is a software module that implements the algorithm for application-specific policies regarding trust.
274: Authentication failed. NPS called Windows Trust Verification Services, and the trust provider does not support the specified action. Each trust provider provides its own unique set of action identifiers. For information about the action identifiers supported by a trust provider, see the documentation for that trust provider.
275: Authentication failed. NPS called Windows Trust Verification Services, and the trust provider does not support the specified form. A trust provider is a software module that implements the algorithm for application-specific policies regarding trust. Trust providers support subject forms that describe where the trust information is located and what trust actions to take regarding the subject.
276: Authentication failed. NPS called Windows Trust Verification Services, but the binary file that calls EAP cannot be verified and is not trusted.
277: Authentication failed. NPS called Windows Trust Verification Services, but the binary file that calls EAP is not signed, or the signer certificate cannot be found.
278: Authentication failed. The certificate that was provided by the connecting user or computer is expired.
279: Authentication failed. The certificate is not valid because the validity periods of certificates in the chain do not match. For example, the following End Certificate and Issuer Certificate validity periods do not match: End Certificate validity period: 2007-2010; Issuer Certificate validity period: 2006-2008.
280: Authentication failed. The certificate is not valid and was not issued by a valid certification authority (CA).
281: Authentication failed. The path length constraint in the certification chain has been exceeded. This constraint restricts the maximum number of CA certificates that can follow this certificate in the certificate chain.
282: Authentication failed. The certificate contains a critical extension that is unrecognized by NPS.
283: Authentication failed. The certificate does not contain the Client Authentication purpose in Application Policies extensions, and cannot be used for authentication.
284: Authentication failed. The certificate is not valid because the certificate issuer and the parent of the certificate in the certificate chain are required to match but do not match.
285: Authentication failed. NPS cannot locate the certificate, or the certificate is incorrectly formed and is missing important information.
286: Authentication failed. The certificate provided by the connecting user or computer is issued by a certification authority (CA) that is not trusted by the NPS server.
287: Authentication failed. The certificate provided by the connecting user or computer does not chain to an enterprise root CA that NPS trusts.
288: Authentication failed due to an unspecified trust failure.
289: Authentication failed. The certificate provided by the connecting user or computer is revoked and is not valid.
290: Authentication failed. A test or trial certificate is in use, however the test root CA is not trusted, according to local or domain policy settings.
291: Authentication failed because NPS cannot locate and access the certificate revocation list to verify whether the certificate has or has not been revoked. This issue can occur if the revocation server is not available or if the certificate revocation list cannot be located in the revocation server database.
292: Authentication failed. The value of the User-Name attribute in the connection request does not match the value of the common name (CN) property in the certificate.
293: Authentication failed. The certificate provided by the connecting user or computer is not valid because it is not configured with the Client Authentication purpose in Application Policies or Enhanced Key Usage (EKU) extensions. NPS rejected the connection request for this reason.
294: Authentication failed because the certificate was explicitly marked as untrusted by the Administrator. Certificates are designated as untrusted when they are imported into the Untrusted Certificates folder in the certificate store for the Current User or Local Computer in the Certificates Microsoft Management Console (MMC) snap-in.
295: Authentication failed. The certificate provided by the connecting user or computer is issued by a CA that is not trusted by the NPS server.
296: Authentication failed. The certificate provided by the connecting user or computer is not valid because it is not configured with the Client Authentication purpose in Application Policies or Enhanced Key Usage (EKU) extensions. NPS rejected the connection request for this reason.
297: Authentication failed. The certificate provided by the connecting user or computer is not valid because it does not have a valid name.
298: Authentication failed. Either the certificate does not contain a valid user principal name (UPN) or the value of the User-Name attribute in the connection request does not match the certificate.
299: Authentication failed. The sequence of information provided by internal components or protocols during message verification is incorrect.
300: Authentication failed. The certificate is malformed and Extensible Authentication Protocl (EAP) cannot locate credential information in the certificate.
301: NPS terminated the authentication process. NPS received a cryptobinding type length value (TLV) from the access client that is not valid. This issue occurs when an attempt to breach your network security has occurred and a man-in-the-middle (MITM) attack is in progress. During MITM attacks on your network, attackers use unauthorized computers to intercept traffic between your legitimate hosts while posing as one of the legitimate hosts. The attacker’s computer attempts to gain data from your other network resources. This enables the attacker to use the unauthorized computer to intercept, decrypt, and access all network traffic that would otherwise go to one of your legitimate network resources.
302: NPS terminated the authentication process. NPS did not receive a required cryptobinding type length value (TLV) from the access client during the authentication process.

Wednesday, 2 December 2020

VPN IPSEC Replay errors

 Sometimes you see erros like this on a Cisco router.

 %IOSXE-3-PLATFORM: R0/0: cpp_cp: QFP:0.0 Thread:000 TS:0002185922034562192 %IPSEC-3-REPLAY_ERROR: IPSec SA receives anti-replay error, DP Handle 13, src_addr <A.A.A.A>, dest_addr <B.B.B.B>, SPI 0x3caaaeb7

 

If you know that these packets are legitimate packets from your VPN endpoints, it means that some mechanism changes the order of the packets and these causes packet drops on the receiving end. 

In order to overcome this one can apply the following command in order to increase the IPSec receive window.

crypto ipsec security-association replay window-size 1024


Cisco Reference:

https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/sec_conn_dplane/configuration/15-mt/sec-ipsec-data-plane-15-mt-book/sec-ipsec-antireplay.pdf