Spectre

Spectre is the latest vulnerability discovered in processors which allow amalicious application to trick another application into exposing its memory to read by the malicious application.

This vulnerability affects almost all the processor variants from Intel/AMD/ARM. Which means that all computers both Desktop/Laptop and SBC and all the smartphones are affected by this Vulnerability.

 

More information about this vulnerability can be found at https://spectreattack.com/

CVE-2017-5753 and CVE-2017-5715 are the official references to Spectre. CVE is the Standard for Information Security Vulnerability Names maintained by MITRE.

All OS manufacturers are releasing patches to fix these vulnerability, You can follow below steps to update the OS and patch the vulnerability.

Fix the Spectre on a CentOS/RHEL/Fedora/Oracle/Scientific Linux

Type the following yum command:

sudo yum update

You must reboot your Linux server using shutdown/reboot command:

sudo reboot

Run the following dnf command if you are using a Fedora Linux:

sudo dnf –refresh update kernel

OR

sudo dnf update

Reboot the Linux box:

sudo reboot
.

Fix the Spectre on a Debian/Ubuntu Linux.

Use the following apt-get command/apt command:

sudo apt-get update
sudo apt-get upgrade
sudo shutdown -r 0

Fix the Spectre on an Amazon Linux running on AWS

Just run yum command:

yum update kernel

 

Recently  Mathy Vanhoef of imec-DistriNet has discovered a vulnerability in WPA2 standard which enables a Man in the Middle to sniff and decrypt packets over the wireless network. The details about this vulnerability is provided on https://www.krackattacks.com/

WPA2 is used to secure the wireless communication between the clients and access point. It was considered as unbreakable untill this vulnerability is discovered. Here are the key things you should know about this vulnerability.

The Positive

  • This vulnerability cannot be exploited remotely. The attacker or his device must be close enough to connect to the targeted wireless network to run the attack. This limits the effect of this vulnerability significantly.
  • There has been no reports of this vulnerability being exploited in the wild, yet.
  • This only enables the attacker to decrypt the wireless frames and expose the payload. Is the communication is over HTTPS/TLS the attacker can still not decrypt the payload and all of your communication data is still safe.
  • The vulnerability was discovered many months ago and was communicated to many vendors whose products are vulnerable. So the patches will be available soon.

The Negative

  • This vulnerability effects every client device that uses wireless as the vulnerability is in the WPA2 standard.
  • There are no patches available to fix it at this moment so till the time the device vendor releases a patch the wireless communication is prone to this attack.
  • This enables the attacker to get private information over wireless communication if the payload is sent over plain text/http protocol.
  • Though the HTTPS communication is safe from this attack, it still exposes your DNS traffic which is in clear text.
  • The attacker can modify the DNS traffic and can redirect you to a malicious website.

Things you should do to keep yourself safe from this attack.

  • Keep an eye on any update released by your device vendor, patch the device as soon as an update is available.
  • Do not send any private information like Username/Password, account login, Payment information, personal details over unencrypted connection. Always check of the website you are submitting the details is using HTTPS for encrypting all the communication related to private information.

  • Ensuring this green lock button on the browser is even more important now as the attacker can modify DNS traffic and redirect you to a malicious website. If that is the case you will get a certificate error on the browser. Do not proceed if your web browser warns you about any problems with the website certificate.
  • If possible always use VPN when connected over wireless, so that all the communication over wireless is protected by an extra layer of VPN encryption.
  • For the paranoids, keep yourself from using wireless at all until this vulnerability is patched.

The iptables rules regulate the traffic on a Linux system this also does the source and destination nat for any traffic as configured.

The IPTables Rules can listed by using the command

sudo iptables -L

IPTables rules are processed in a sequence from top to bottom so if a rule is matched for any traffic further rules below the matched rule will not be checked.

If you want to change the sequence of IPtables rules so that certain rules are checked before the other rules, you can use the following method.

1. Export the IPTables rules to a text file

sudo iptables-save > /tmp/iptables.txt

This command will create a text file iptables.txt in /tmp directory, this test file will have all the IPTables rules from all the chains

2. Edit the text file to change the sequence of rules

sudo nano /tmp/iptables.txt

This command will open the iptables.text in nano text editor, or you can use vi or any other text editor of your choice. Edit the iptables rules to change the sequence of rules as required

3. Restore the rules from text file to iptables

sudo iptables-restore < /tmp/iptables.txt

This command will import the rules from the text file to the IPTables.

The new IPtables rules sequence will be applied immediately and does not need a service reload or reboot of the system. You can check the sequence of the IPTables rules using the command

sudo iptables -L

DNS Stands for Domain Name System. DNS is one of the most important part of internet. All the computers on the internet are connected to each other and each one of them has a unique IP address and DNS maps these IP address with their Domain names. It is easier to remember and recall names than a bunch of numbers.

Whenever you try to browse a website on a browser like http://45.76.161.5, the browser uses DNS to get the IP address of the website asknetsec.com and then connects to that IP address and downloads the webpage.

DNS communication works in a server-client model where the client is the computer that needs to resolve a domain name to an ip address and the server is a computer which has the information about Domain name to IP address mappings.

A typical DNS transaction is made up of 2 packets. A request from the client to the server and a response from the server to the client. The request packet consists dns query for the domain name and the response packet consists of answer to that query in the form of IP address for the requested domain name.

Below is a typical DNS request and response packets taken from Wireshark that shows more info on the content of the DNS transaction.

DNS Query

Dns Query packet

 

DNS Response

Dns Response packet

 

 

The DNS query contains the domain name and DNS response contains the IP address associated with that domain name.

A new android Malware has been found by Trend Micro which it claims is a successor to a Dress Code malware found earlier.

This malware uses port 22 to establish a SSH session with its Command and Control (CnC) server owned by the attacker.

As it uses SSH all the data between the Android phone and its CnC server are encrypted which makes it difficult for the enterprise security infrastructure to detect it. Security solutions cannot detect the data inside the encrypted connection unless they are doing Deep Packet Inspection of SSH traffic.

MilkyDoor Vulnerability

                                                                                    How MilkyDoor Malware Works

 

Using this SSH session the attacker can run vulnerability scan on the internal network. This is important as many enterprise allows employees to use their own phones connected to the same network as the internal infrastructure.

MilkyDoor was recently found in over 200 Android applications available through the Play Store.

It is important for the enterprise security gateway solutions to block all ports for the BYOD network except the ports necessary.

To find the your public IP address from command line (CLI) you can use the below commands for Linux and Windows Operating systems.

Linux

curl icanhazip.com

curl canihazip.com/s

These 2 commands will generate web request and show the ip address as the response of the request.

 

dig myip.opendns.com. @resolver1.opendns.com +nocomments +noquestion +noauthority +noadditional +nostats | grep -oE “\b([0-9]{1,3}\.){3}[0-9]{1,3}\b”

This command runs DNS query and show the resolved ip address. The dns query to myip.opendns.com. using the resolver1.opendns.com DNS resolver outputs the public IP address from where the DNS query is generated.

Please note the period (.) at the end of the myip.opendns.com., this makes sure that the DNS suffix is not added to the query and query is absolute.

Windows

nslookup myip.opendns.com. resolver1.opendns.com | find “Address”

This outputs two IP addresses and the second IP address will be your public IP address