diff --git "a/stack_exchange/IS/Information Security 2017.csv" "b/stack_exchange/IS/Information Security 2017.csv" new file mode 100644--- /dev/null +++ "b/stack_exchange/IS/Information Security 2017.csv" @@ -0,0 +1,104952 @@ +Id,PostTypeId,AcceptedAnswerId,ParentId,CreationDate,DeletionDate,Score,ViewCount,Body,OwnerUserId,OwnerDisplayName,LastEditorUserId,LastEditorDisplayName,LastEditDate,LastActivityDate,Title,Tags,AnswerCount,CommentCount,FavoriteCount,ClosedDate,CommunityOwnedDate,ContentLicense +146899,1,146900,,1/1/2017 1:34,,25,7158,"

I logged onto my VPS this morning to find millions of failed login attempts for the root user and other users that don't even exist. I took the below measures to try and obfuscate the attackers efforts which (have been going on for months).

+ +

Question(s)

+ +
    +
  1. Is this an appropriate response?
  2. +
  3. What more can be done?
  4. +
  5. Is there anything valuable I can do with a list of these IPs?
  6. +
+ +

System info for a Centos7 vps

+ +
uname -a
+inux vm01 3.10.0-327.22.2.el7.x86_64 #1 SMP Thu Jun 23 17:05:11 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
+
+ +

step 1

+ +

Created a script to grab all the IP addresses that failed to login from the secure log. (/var/log/secure)

+ +
# get_ips.sh
+grep ""Failed password for"" /var/log/secure \
+| grep -Po ""[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+"" \
+| sort \
+| uniq -c
+
+ +

step 2

+ +

Write a script to create firewall rules to block the ip address that are found from the script in step 1. This script is ip_list_to_rules.sh

+ +
#!/bin/bash
+# ip_list_to_rules.sh
+# script to parse output of get_ips.sh and create firewall rules
+# to block ssh requests
+
+if [ -z $1 ]; then
+  echo ""arg1 must be path to a list of the form <COUNT> <IP>\n""
+  exit
+fi
+
+LIST=$(readlink -f $1)
+SSH_IP=$(echo $SSH_CLIENT | head -n1 | awk '{print $1;}')
+
+echo ""Reading IPs from ${LIST}""
+echo ""SSH Client IP will be ignored (${SSH_IP})""
+
+while read COUNT IP; do
+
+  echo ""Creating rule for ${IP}""
+  firewall-cmd --direct --add-rule ipv4 filter INPUT 1 -m tcp --source $IP -p tcp --dport 22 -j REJECT
+  firewall-cmd --direct --add-rule ipv4 filter INPUT 1 -m tcp --source $IP/24 -p tcp --dport 22 -j REJECT
+
+done<<<""$(cat ${LIST} | grep -v ${SSH_IP})""
+
+ +

step 3

+ +

Run it all and save rules.

+ +
./get_ips.sh > attack_ips.list
+./ip_list_to_rules.sh attack_ips.list
+firewall-cmd --reload
+
+ +

Update

+ +

Below are the measures I took from the answers.

+ +
    +
  1. Disabled root logins
  2. +
  3. Changed SSH port
  4. +
  5. Install & configured fail2ban
  6. +
  7. Disable password authentication & enable public key auth
  8. +
+ +

I didn't actual do 4 because I usually connect through chrome secure shell client and AFAIK there isn't public key support.

+",134886,,134886,,1/1/2017 16:08,1/2/2017 18:35,How to respond to a SSH brute force attack on a single VPS?,,8,5,13,,,CC BY-SA 3.0 +146903,1,,,1/1/2017 3:29,,1,5270,"

A https website, which is not under my control, leads to an error message SEC_ERROR_REVOKED_CERTIFICATE in Firefox 51. +The CRL (url embedded in the certificate) does not distrust the sites certificate. +openssl s_client has no objections, neither do other TLS capable clients (Firefox 50, MS Edge).

+ +

Q: What would be a canonical way to figure out what happened here, just making firefox tell me what the problem is? (workarounds see below)

+",,user88348,,,,3/1/2017 10:39,How can SEC_ERROR_REVOKED_CERTIFICATE in firefox be further examined?,,1,2,,,,CC BY-SA 3.0 +146905,1,,,1/1/2017 3:29,,4,992,"

A few minutes ago, there was a terror attack on a nightclub in Istanbul/Turkey(Thoughts and prayers to the victims and families), usually, the Government limits most of the communications apps traffic and they already block the most popular VPN services.

+ +

However, this time they blocked the Telegram App traffic, so I started my own VPN connection (OpenVPN), still nothing and every other app and the rest of the internet connection works normally, maybe there a problem with server, started my paid VPN connection, nothing, another one, still nothing, different internet provider, no traffic what so ever to the Telegram and the rest of the traffic going in/out normal.

+ +

Is there any method to target an encrypted traffic that is inside VPN tunnel?

+",134891,,5400,,12/14/2017 12:31,12/14/2017 12:31,"Can a Government block a specific app traffic, even with a VPN running?",,2,2,,,,CC BY-SA 3.0 +146906,1,,,1/1/2017 3:58,,2,148,"

In the film Citizenfour, around the 33:33 mark, Edward Snowden said

+ +
+

I mean, you could literally shoot me or torture me, and I could not disclose the password if I wanted to. + Um... You know, I have the sophistication to do that

+
+ +

How can it be possible ?

+",10972,,10972,,1/1/2017 4:11,1/1/2017 5:35,How to protect ourself to divulge information,,1,1,,1/1/2017 16:48,,CC BY-SA 3.0 +146911,1,,,1/1/2017 5:19,,5,205,"

Just curious if it is possible to get malware through a trusted site hosting an HTML 5 player.

+ +

I would imagine since Chrome is in a sandbox, nothing download to your computer?

+",123700,,,,,3/2/2017 6:41,Malware through HTML 5 player,