SAML stands for Security Assertion Markup Language. It allows for Single Sign On or SSO to a service.
There are three entities or roles involved when using SAML to sign into a service.
Principal or Subject: a.k.a. you, or the person or service logging in.
Service Provider (SP): This is the service you are accessing. It could be email, a website, etc.
Identity Provider (IdP): This is the entity response for authenticating the Principal.
As an example, let’s say you want to log into a new website utilizing your email SSO credentials. You click the SSO login button, you are redirected to the IdP to login. Once authenticated, your device will receive a token which is then passed back to the Service Provider and allows you access to the new website.
This is a very simplified version of what happens when you login using SAML. It may be helpful to know that the Service Provider and the Identify Provider will have needed to be configured to work together before the user attempts to log in.
Unfortunately, encrypting a file on Windows with a simple password is not super simple. While Windows does now support other compression formats (RAR, 7-Zip) it does not support encryption for them.
Currently, Windows natively supports the ZipCrypto algorithm. No AES. Note that the ZipCrypto algorithm is not considered secure, and shouldn’t be used for highly confidential data.
The following method, you will need 7-Zip to create the archive, but you won’t need it for decryption as Windows has built in support for ZipCrypto decryption.
To create the archive, you will need 7-Zip installed. Right click on your file/folder -> 7-Zip -> Add to Archive.
You should be presented with a similar window.
Change Archive format to zip Enter the password Ensure that the Encryption method is ZipCrypto Hit OK to create the Archive.
You can now transfer the password protected archive to a new machine. You’ll be prompted for the password when you extract the archive.
The following is a list of “good to know” legislative acts.
Acronym
Name
Notes
CFAA
Computer Fraud and Abuse Act
First major cyber crime legislation
Federal Sentencing Guidelines (1991)
Responsibility on senior management
ECPA
Electronic Communications Privacy Act of 1986
Made it a crime to invade the electronic privacy of an individual
CALEA
Comm Assistance for Law Enforcement Act of 1994
Amended ECPA. Made wiretaps possible for law enforcement with a court order.
Economic Espionage Act of 1996
Made theft no longer tied to something physical
FISMA
Federal Information Security Management Act
Cyber security requirements for government agencies
DMCA
Digital Millennium Copyright Act
Copyright protection is 70 years + 1st major revision added CD/DVD protections
USA PATRIOT
USA PATRIOT Act of 2001
Gave law enforcement and intelligence agencies broader wiretapping authorizations
Identity Theft and Assumption Deterrence Act (1998)
Made identity theft a crime. Up to 15 years in prison and $250,000 fine.
HIPPA
Health Insurance Portability and Accountability Act (1996)
Regulations for security measures for hospitals, physicians, and insurance companies
HITEC
Health Information Technology for Economic and Clinical Health Act of 2009
Amended HIPPA. Updated privacy/security requirements for Business Associates (BAs), requires a written contract known as a business associate agreement (BAA). BAs are directly subject to HIPPA and enforcement actions like a covered entity. HITECH also introduced new data breach notifications.
GLBA
Gramm-Leach-Bliley Act
Limits services that banks, lenders, and insurance agencies can provide and information they can share with each other
COPPA
Child Online Privacy Protection Act
Seeks to protects children (<13 years old) online
FERPA
Family Educational Rights and Privacy Act
Gives students certain privacy rights. Deals with adults >18, and Children in school <18
ITAR
International Traffic in Arms Regulation
Regulates the export of military and defense related technologies
EAR
Export Administration Regulations
For commercial use, but may have military applications.
Table of Laws and Acts
Trademark, Patents, Copyright etc.
Name
Protection Length
Trademarks
10 Years
Patents
20 Years
Copyright
70 Years after the death of the author
Trade Secrets
Until they are leaked.
Table of Trademarks, Patents, Copyright, and Trade Secrets
-w is watch path -k is a filter key we can use later to search through logs
Now we can search with ausearch
ausearch -k password
Using Preconfigured Rules
There are already some preconfigured rules in /usr/share/audit/sample-rules/
We can copy those to /etc/auditd/rules.d/ and use them.
cd /usr/share/audit/sample-rules/
cp 10-base-config.rules 30-stig.rules 31-privileged.rules 99-finalize.rules /etc/audit/rules.d/
augenrules --load
Note on the 31-privileged.rules file. You’ll need to run the commands in the file which will create a new file. Then we can copy that to “/etc/auditd/rules.d/”
We’ll create a tunnel between two Mikrotik RouterOS routers. Once we have the tunnel connected, we can then route traffic between them.
Note: You can add Preshared keys, but we don’t cover that in this post, just to keep things simple. Check out the following post if you want to add Preshared keys.
Here is how we will want our routers set up. The WireGuard PtP IP is the IP addresses used on both ends of the tunnel. The WAN IP is the IP of each Router. Local IP on Host B is setup to distribute DHCP.
Host A
WAN IP: 172.16.0.1 WireGuard PtP IP: 10.1.1.1/30
Host B
WAN IP: 10.0.0.2 WireGuard PtP IP: 10.1.1.2/30 Local IP: 192.168.0.1/24
We need Host A to be able to access Private IP’s (192.168.0.0/24) behind Host B.
We’ll pretend that the 172.16.0.1 address is a public IP, and Host B, is behind some sort of NAT network.
To create the Point-to-point, or PtP, we will create a WireGuard VPN tunnel, and then add routes from Host A to Host B.
For each Mikrotik we need to create a WireGuard interface, and then a peer. One of the peers needs a keep alive if we are behind a NAT.
Wireguard Setup Overview
Here is an overview screenshot of what our WireGuard settings will look like. Host A is on top, and Host B on the bottom. On the left are the WireGuard interfaces, and the right contains the Peers.
We copy the Public Key from the remote WireGuard interface, to the Public Key on the local Peer. I.e. The Host_B Peer contains Host_A’s Interface Public Key and vice verse
Host A
If you want to, you can use the WinBox GUI to setup and configure the router.
In the Allowed Addresses, put 10.1.1.0/30 and 192.168.0.0/24*.
Finally, put in the Public Key from Host B. Note that we can’t do this until we create the WireGuard Interface on Host B, so you’ll need to come back for this step.
*The Allowed Address sets which addresses work on the other side of the tunnel. If we don’t specify 192.168.0.0/24, then we won’t be able to route to those addresses. If we don’t add 10.1.1.0/30, then our tunnel won’t work at all. Since we only need to route to the 192.168.0.0/24 network from the Host A side, we don’t need this IP range on Host B.
That should be it. Verify that there is a connection. From Host A, ping 192.168.0.1 or any other remote device.
Troubleshooting
Unfortunately, there appear to be some wonky bugs with WireGuard on RouterOS. It does appear to be getting better, but here are a couple things to check if the tunnel is not connecting.
Verify that the Firewall is not blocking WireGuard. You can allow the WireGuard port in the Firewall.
Try disabling and re-enabling the Interfaces and/or Peers
Verify that all the routes for the PtP are in /ip/routes. If not, try manually adding the route (10.1.1.0/30) on the WireGuard interface on both routers.
Add a keep alive if a router is behind a firewall/NAT.
Reboot and or Upgrade the RouterOS version and firmware.
Mikrotik Recently patched CVE-2023-37099 which was a way someone with an admin account, could escalate to a “super admin”, or jail break a router.
It appears the technique has been around for about a year.
Affected versions: < 6.49.7
The good news is that someone would already have to have an account to elevate permissions. If your routers have been using strong passwords or SSH public/private keys and have internet management disabled, then you are probably fine.
Who is this mcuser on ubiquiti devices? Nothing shows up in the radio config file about it, but the user shows up in /etc/passwd
mcuser is used for AirControl2. If we look what is in the passwd file, we’ll notice that there is a ! at the beginning of the hash. Meaning that this password is disabled as the hash is not a proper hash. It’s only 10 characters long instead of the normal 13 for Unix DES hashes.
There is a valid ssh key, so the mcuser can ssh to the device without a password and do what it needs to do. Doing an ls on a device shows the following.
Refer to the following article on removing AirControl Provisioning
This is because a Wireguard preshared key needs to be 256bit (32 byte) base64 encoded key. We have a couple different ways we can generate the correct format.
1. Use Openssl to generate a random 32 byte password
openssl rand 32 | base64
2. Create a 31 character password and base64 encode it