Modsecurity - OWASP CRS 901001 Ubuntu 18.04
Apache/2.4.29
ModSecurity for Apache/2.9.2 (http://www.modsecurity.org/); OWASP_CRS/3.0.0
modsecurity-crs 3.0.2-1

This is a new server.  The following message appears in modsec_audit.log in every entry:

--c2d2e910-H--
Message: Warning. Operator EQ matched 0 at TX. [file
"/usr/share/modsecurity-crs/rules/REQUEST-901-INITIALIZATION.conf"]
[line "56"] [id "901001"] [msg "ModSecurity Core Rules setup file has
not been detected. Threat detection and blocking may be nonfunctional.
Please ensure to make a copy of the setup template crs-
setup.conf.example, and include your crs-setup.conf file in your
webserver configuration before including the CRS rules."] [severity
"WARNING"]

me@www:~$ apache2ctl -t -D DUMP_MODULES |grep security2_module
 security2_module (shared)

As shown above, the module is loaded.  My Apache conf has an <IfModule security2_module> stanza that includes:

IncludeOptional /usr/share/modsecurity-crs/owasp-crs.load

The file owasp-crs.load has:

Include /etc/modsecurity/crs/crs-setup.conf
IncludeOptional /etc/modsecurity/crs/REQUEST-900-EXCLUSION-RULES-BEFORE-CRS.conf
Include /usr/share/modsecurity-crs/rules/*.conf
IncludeOptional /etc/modsecurity/crs/RESPONSE-999-EXCLUSION-RULES-AFTER-CRS.conf

me@www:~$ ls /etc/modsecurity/crs/crs-setup.conf
/etc/modsecurity/crs/crs-setup.conf

As the warning states, crs-setup.conf can't be found though the file exists in the specified location.  However, the system seems to be working properly.  For example, in crs-setup.conf if I remove all HTTP methods from ID 900200 then I get a HTTP 403 Forbidden which is expected based on how I have the system configured.

Your thoughts and experience are appreciated in helping to resolve this.

Thank you.

After further research and testing I've come to the conclusion that this is a spurious message which can safely be ignored in my situation.  My system is otherwise working as intended and expected.


Can I tell if my USB flash drive has been plugged into other computers? Can I tell if my USB flash drive has been plugged into other devices?

Unless your USB drive has some special features for this (I'm not aware of any drives doing so), there is an easy answer: you can't know whether it was connected to another computer, unless the operating system wrote to it. For example, Mac OS X likes to write some meta information for Finder, their file system explorer, to any disks it gets hold of.

There are special forensic tools and hardware solutions to fully prevent this, though; and simply read-only mounting the drive also will not leave any traces (eg. using Linux).


Can I make my online server more secure using Docker? I had my online web server ransacked, they got in through my hosted WordPress site and privilege escalated from there.

I am wondering, if I put the WordPress in a Docker, would that go a decent way to mitigating the risk of WordPress exploits?

As p2k said, docker won't help your Wordpress' problem. But if you mean mitigating the risk of privilege escalation the answer should be yes, probably.

One of the main feature of containers (LXC, openVZ, Solaris Zones, etc) is  exactly this: privilege separation. Docker is just a generic framework over different containers (and qemu, or even chroot!). This way, your docker based system will never be more secure than the foundation you've chosen for it. If you're using LXC (with or without docker) you will get the security level of your LXC implementation (which is somewhat incomplete, you must use apparmor or SElinux in order to be safe).

With container technology you can stop the attacker at the gates. But your gate (wordpress) will be wasted. However it's much simpler to restore your website (container) than a whole compromised machine.

Nonetheless, if you run your webserver and db server under a well designed apparmor settings, and you keep basic security rules (no write access anywhere unless required, patch often, use WAF like mod_security, etc), you can reach decent security level anyway without the overhead of using containers.


Do we need to use separate IP ? I want to open and forward SSH port to one of our internal computers.

Problem is - it will use the same IP address as PCI-DSS environment (where the HTTPS payment gatway is running)

Basically firewall will forward port 22 to ssh server, port 443 to PCI-DSS environment

Is it compliant with PCI-DSS?

I'm not 100% certain, but I believe that as long as you isolate the SSH system from the payment gateway you are fine.  The fact they are using the same IP outside doesn't matter since port forwarding is simply directing the traffic to two separate networks.  I believe the network separation is the important part and port routing doesn't directly impact that.


Is this regular expression vulnerable to DoS? FindBugs flagged the following email address validation regex as vulnerable to DoS:

^[\w!#$%&'*+/=?`{|}~^-]+(?:\.[\w!#$%&'*+/=?`{|}~^-]+)*@(?:[a-zA-Z0-9-]+\.)+[a-zA-Z]{2,6}$

Here's an easier to read version that substitutes CHARS for \w!#$%&'*+/=?`{|}~^-:

[CHARS]+(?:\.[CHARS]+)*@(?:[a-zA-Z0-9-]+\.)+[a-zA-Z]{2,6}

Based on my reading of the OWASP ReDoS page, this isn't actually vulnerable. I can't see a way to ambiguously apply the pattern, because the repetition inside the groups doesn't apply to the period character, which ought to result in a canonical application of the pattern.

Have I misunderstood the threat here? Can anyone spot a way to abuse this pattern?

Tricky one! I can't seem to trigger the exponential complexity this (\.[CHARS]+)* pattern should introduce. I can make it be a little slow with a huge string (a few megabytes), but I guess that is to be expected with any regular expression. In Python:

import time, re
t=time.time()
print(re.match(r'^[\w!#$%&\'*+/=?`{|}~^-]+(\.[\w!#$%&\'*+/=?`{|}~^-]+)*@(?:[a-zA-Z0-9-]+\.)+[a-zA-Z]{2,6}$', 'a.'+'xb'*2500000+'test@example.com'))
print(time.time()-t)
t=time.time()
print(re.match(r'^[\w!#$%&\'*+/=?`{|}~^-]+(\.[\w!#$%&\'*+/=?`{|}~^-]+)*@(?:[a-zA-Z0-9-]+\.)+[a-zA-Z]{2,6}$', 'ax'+'.b'*2500000+'test@example.com'))
print(time.time()-t)

In the first test, we supply a long string where the xb pattern is repeated. This matches just the first part (namely, [CHARS]+) and not the second (namely, (\.[CHARS]+)*)). The second test does the opposite: it repeats the '.b' pattern which matches the second part a lot of times (where the backtracking should be) and not the first.

As output, you can see the difference in time it takes:

0.06872129440307617
0.3483853340148926

Both strings are equally long, so the pattern does take some more time.

Usually, one would use the second pattern and then make the end not match, so remove the .com part or something. The regex engine would start to backtrack and take exponentially longer with each iteration. I'm not sure why that does not happen here.

So far as I can see, you might be safe by just limiting the input length to a few kilobytes. But I am probably just too stupid to trigger it; using a pattern that is known to be vulnerable is just asking for someone to come along and figure it out ;-)


Can one be infected just by reading an e-mail I have heard several people say that you shouldn't even open e-mails that look suspicious, as you might be infected by a virus of some kind. Is there any validity to this? I suppose that some e-mails show a web page, which could be infected, but I don't think most e-mail clients would allow the page to run scripts, would they?

Infection from malware in emails comes from bugs in email software. Namely, when you "open" the email, you instruct your email software to process the email data in order to turn it into something which can be displayed. With all the paraphernalia of fonts and HTML and images and scripts, this processing has become quite complex, and thus there are bugs, and bugs can sometimes be abused into actual vulnerabilities.

In that sense, opening an evil email is akin to browsing an evil Web site.


Protected APIs for public clients without end-user authentication A simple question which I cannot find any guidance on the RFC6749 (or related) spec.
I have an eCommerce public client (SPA & mobile), where I want to postpone as much as possible the authentication process (possibly registration too for new customers). I will only ask the customer at the end of his purchase journey to authenticate and place the order.
Meanwhile, before the authentication, this public client needs to call back-end REST APIs which are OAuth2 protected.
So how can I perform correct and secure calls to the APIs?

system to system calls -> Client credentials grant type -> NO, because of the public client (only confidential clients are allowed in this type)
public client BCP-> Authorization code grant type with PKCE? -> NO, because no end-user authentication/consent

Does somebody have a similar case? Can you see a pattern to make this secure enough within the OAuth2 framework?

I think you should refere to the current draft of OAuth for Browser-Based Apps:

9.3.  Client Impersonation
As stated in Section 10.2 of OAuth 2.0 [RFC6749], the authorization
server SHOULD NOT process authorization requests automatically
without user consent or interaction, except when the identity of the
client can be assured.

In my understanding, it is currently not recommended to not show a consent page, what is your plan, if I understood your question right, since the consent page is what protects public clients against client impersonation. This applies indepentent of the used grant type or the extension (e.g PKCE) you use.

If you would have previously  processed an authorization request of a specific client (your description reads like you did not) and you use fixed redirect URIs, you could use the redirect URI to identify the client:

If authorization servers restrict redirect URIs to a fixed set of
absolute HTTPS URIs, preventing the use of wildcard domains, wildcard
paths, or wildcard query string components, this exact match of
registered absolute HTTPS URIs MAY be accepted by authorization
servers as proof of identity of the client for the purpose of
deciding whether to automatically process an authorization request
when a previous request for the client_id has already been approved.


Is it possible to secretly monitor/backdoor hardware? I've recently gained an interest in anonymity and the technical aspects of it.

Is it possible for hardware to be bugged and monitored? I.e, can a seller of a processor bug it in order to report what I am doing or is this purely done in the software? Is this done for common hardware?

TLDR: Can the hardware be compromised?

Yes, if an attacker has physical access to your computer it is no longer your computer. While it's theoretically possible to implement spying directly in silicon on a modern CPU, a modern x86-based CPU is extremely complicated. An attacker would be better off using a peripheral device that uses something like USB which exposes certain interrupts in an easily-accessible port on the back of every machine.

Such devices already exist:

The USB Rubber Ducky

(source: shopify.com)

  Nearly every computer including desktops, laptops, tablets and smartphones take input from Humans via Keyboards. It's why there's a specification with the ubiquitous USB standard known as HID - or Human Interface Device. Simply put, any USB device claiming to be a Keyboard HID will be automatically detected and accepted by most modern operating systems. Whether it be a Windows, Mac, Linux or Android device the Keyboard is King.

The Lan Turtle

(source: shopify.com)

  The LAN Turtle is packed with features for remote access, man-in-the-middle and network recon. Everything the LAN Turtle does is a module, and you can download new ones right to the device from the module marketplace. Keen on writing a module? Code one in bash, python, or php with a dead simple API.

These are only a few examples of malicious hardware, there are countless more in existence. As a bonus, check out the BadUSB research. This project entails using an ordinary USB 2.0 flash drive and turning it into a malicious device to attack any computer it's plugged in to.

Another possible attack vector is the PCI express interface. Many more interrupts are available to that interface, however compromising a machine's PCIe bus entails opening it and inserting a card instead of plugging in an innocuous little flash drive.

While these devices you see here are specifically designed to be used by people to attack other people, it is well within the realm of possibilities for a state actor to approach a tech manufacturer to insert backdoors into their hardware. For example, a government agency could approach a sound card manufacturer to implement an interface on their PCIe chipset to allow remote interaction with the target device. This includes things like directly dumping memory chunks and all kinds of nasty things.

Furthermore, even if a device is not intentionally designed with malicious intention, a device with an insecure firmware updating procedure can become a victim to malware (similar issue to the BadUSB exploit). A piece of malware can exploit an insecure firmware updating process to turn a specific peripheral into an attacker on the inside. See this Defcon talk for more information.


What guarantees does perfect forward secrecy make with respect to compromise of a private key? With perfect forward secrecy, if an attacker gains access to a certificate private key, my understanding is that all traffic previously encrypted using that private key remains safe from decryption.

But does perfect forward secrecy provide any guarantees with regards to future traffic encrypted using the compromised private key?  Does the degree of vulnerability change with periodic regeneration of Diffie-Hellman parameters?

Of course, compromise of a certificate private key exacerbates a variety of MITM attacks and must be replaced as soon as possible, but in cases where the compromise might not be discovered for some time, what level of secrecy is provided during the interim between the compromise and the replacement of the private key?

If information was directly encrypted to the compromised key, it's not forward secret.

Forward secrecy generally works by having the long term keys (the ones that have the greatest chance of being compromised) used for authentication only. These are used during a key agreement protocol which generates a set of ephemeral keys which are actually used to encrypt and decrypt data. These ephemeral keys are then discarded after use, and new ones are generated when needed.

In TLS, the cipher suites that provide forward secrecy are the ones with DHE or ECDHE in the name. For example, TLS_RSA_WITH_AES_128_GCM_SHA256 is not forward secret, while TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 is forward secret. The difference is how the RSA key from the certificate is used in the key exchange part of the handshake.

In the non-forward secret TLS_RSA_WITH_AES_128_GCM_SHA256, keying material is encrypted to the RSA key. If that RSA key is later compromised, that keying material can be decrypted, and the TLS traffic is exposed.

In the forward secret TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, the RSA key is used to authenticate the Diffie-Hellman key exchange, from which keying material is derived. Even if the RSA key is stolen, the keying material for that session is safe, because the RSA private key was not used for encryption of keying material.

From this, it should be easy to see that if an RSA key is compromised but not detected, then it can still be used to break some future sessions with forward secrecy enabled. A client would connect to the MITM, trust it because it has the right key, and the session key will actually be negotiated with the MITM, leaking supposedly private info. If the client connects to the real server with forward secrecy turned on, then the attacker gets nothing, because they still can't use the stolen RSA key to break the Diffie-Hellman key exchange. If forward secrecy is turned off, connections to a server with a compromised key can still be snooped on by the attacker with access to the private RSA key in the same way they could decrypt past sessions.


Should ettercap make the targets this slow? I recently started experimenting with ettercap, however, I quickly noticed that when I try and arp poison targets they can almost never communicate with each other.

Is this normal?

My computer is a macbook air with 1.4 Ghz cpu (Core 2 Duo). When I checked the execution cap it was around 50%.

What can I do to make arp poising usable? I need to give a presentation on this soon.

ARP poisoning causes the traffic between those hosts to be forwarded through you, as part of the man in the middle attack.

This causes performance degradation on the targets for a few reasons:

There is increased latency due to the added network hop.
Your network card has to send and receive 2 to 4 times as much data as normal, since you're acting as a relay for both upstream and downstream traffic.
You have to commit the incoming packets to a system memory (RAM) buffer. This isn't so much of a problem on modern machines, but for embedded devices the memory bandwidth is tiny.
Your CPU has to process the packets in real-time.

From your scenario, it looks like the biggest bottleneck is the CPU. It's running at 50% because the program is using a single thread to handle the processing and you have two cores. As such, it's running all out and not quite keeping up with the traffic. To be fair, 1.4GHz isn't very fast, especially if you consider that it's running this operation at the equivalent of one core. The easiest solution is to get a faster computer to do the ARP poisoning. The harder solution is to re-write the ARP poisoning tool to use multiple threads to handle the packet processing workload.


Are Thunderbolt-enabled computers without Thunderbolt ports vulnerable to Thunderspy? Could these two attack scenarios exploit the recently publicized vulnerability?

Using a Thunderbolt adapter like an USB-to-Thunderbolt adapter on a computer without any Thunderbolt port
Temporarily replacing hardware (mainboard) with hardware that has Intel's Thunderbolt port

And if one or both would work: what would be a reliable way to protect against this on such computers (Thunderbolt-enabled or Thunderbolt not disabled and hardware-replaceable)?

Using a Thunderbolt adapter like an USB-to-Thunderbolt adapter on a computer without any Thunderbolt port

Probably not. The attack relies on the Thunderbolt controller's access to internal system buses, combined with custom firmware that lets it read and write data from memory at will. Going through another bus, such as USB, will probably break this chain.

  Temporarily replacing hardware (mainboard) with hardware that has Intel's Thunderbolt port

If you can convince anyone to use your hardware, the game is up anyway. What stops you from virtualizing the OS they want to run? This would give you access to read the memory at will, purely trough software.  This is often referred to as Blue Pill rootkit, after the Matrix movies.

Note that if the TPM is used as part of the protection scheme, the TPM is located on the mother board, and swapping this out will lead to a blank TPM.


Is there a reason why I should not use the HaveIBeenPwned API to warn users about exposed passwords? There's lots of talk about the HaveIBeenPwned password checker which can securely tell users if their password appears in one of their known data dumps of passwords.

This tool has a publically available API behind it which websites/apps/etc are free to use to allow their users to check their passwords, but from what I can see all the listed applications are specifically email/password checker tools.

Never have I seen or heard of a user entering a password into a website while creating an account and it then gives them an error message detailing that their chosen password can be found in a well-known data breach.

If I were to create a website, would it be a bad idea to automatically check my user's passwords against HaveIBeenPwned's tool as an additional safety precaution and to require them to pick a password which the site doesn't know about?

Latest recommendations from the NIST (SP 800-63b Section 5.1.1.2; see here or here for a summary) actually suggest checking user passwords against lists of known compromised passwords, so doing just that is actually in line with current best practices.  It's also much better than requiring passwords to meet certain "rules" (which the NIST now recommends against).  HIBP is just one way (and probably the simplest way) of doing this in practice.  It only requires sending off the first 5 letters of the hash of the password, so actual risk to users is practically zero.  So yes, please feel free to do it if desired.

As for why a particular organization might not do this, I'm sure that varies wildly from site-to-site, but I think it's a safe bet that it boils down to the usual suspects:

Security is an area where many like to skimp, and implementing such a system takes additional effort.
It takes time for new best practices to become common knowledge for institutions
It takes even more time for institutions to get caught up with best practices
Every developed feature has costs: money in terms of engineering time to develop and maintain, lost users who don't understand or wish to follow the rule (h/t @Woohoojin), etc.  Organizations may not consider the added benefits to be worth the costs.

To be fair, none of my systems do this yet, so you can add me to #3 or #4.

Item #4 is worth a bit more mention.  The costs of implementing this are obvious—it takes developer time to build and maintain any feature.  The benefits are much harder to quantify.  Of course when it comes to security issues, many companies make the mistake of assuming benefits are zero and therefore skimp on security (see point #1).  However, this is one feature in which the benefits are likely small.  There are often real costs to a business related to the compromise of user accounts (more customer support, perhaps rolling back transactions, etc...), but as long as the compromise was due to the user's own mistakes (in this case, by choosing compromised passwords), a business is unlikely to see any direct liability and therefore will probably avoid any larger costs.  As a result, features like this may not be worthwhile for all businesses to implement—it's always up to each business to weigh for themselves potential costs and benefits.


will my ISP know my connection between systems in same network? lets say im connected to internet via broadband. My public IP is 117.223.23.5 . my question is if i connect to other pc in 117.233.23.0/24 network will they be able to monitor my data packets? if ping one of the system will they know?

Your public IP is owned by your ISP, which means that the other IPs in your network are also owned by your ISP. Even if the other IPs are not owned by the same ISP, the packets still travel over your ISP's network to reach the other network.

So, yes, they will see everything, because they are handling the traffic.


Host-based security architecture for web server network I am begining with network security and after studying for a while about often used technologies I got to this architecture for my home server (sorry it is not in english).

I considered 3 basic general security principles for this 2:

Defense in-depth (many security barriers backing each other up)
Choking point (a narrow channel through which the attacker must pass)
Minimum privilege (any object should only expose the necessary and nothing else)

A restriction is that I can use no other physical machines at first. There are also no other machines in this subnetwork. All those components should be kept in the same ubuntu server. The components are mainly based on 3:

Firewall (iptables) > implemented in order to protect the network against external threats.
IDS (Snort) > establishes rules for network monitoring in case the external attacker bypasses the firewall
fwsnort > a tool to convert snort rules into iptables rules
psad > a tool for iptables log monitoring with e-mail alerting resource
Honeypots (Artillery) > along many other functionalities, Artillery is used here as a honeypot to deceipt attackers and allow me to get info about them.

Some questions:

Will this architecture be effective?
Are honeypots a good idea?
If so, should I run them on a VM?
Can I guarantee QoS? Or will my server be overloaded?
What else am I missing (about anything related)?

I have recently implemented this solution and tested it using 3 VMs. The attacker uses Kali, the web server uses Ubuntu 14.04 and the honeypot actually uses HoneyDrive 3. I had to change it a little bit.

So basically what this architecture does is receive a packet, check it agains the firewall (iptables) rules and log it. Fwsnort converts Snort rules into iptables rules, making the firewall a kind of IPS. The log monitor (psad) then analyses the log, identify malicious IPs and block then. From this point on, every incoming packet from these IPs will be forwarded to the Honeypot.

Here are the main rules that do it:

###### forwarding ######
ipset create banned_nets hash:ip hashsize 4096

iptables -t nat -A PREROUTING -p tcp -m set --dport 8181 -j DNAT --to-destination $HONEYPOT_ADDR:443 --match-set banned_nets src
iptables -t nat -A POSTROUTING -p tcp -s $HONEYPOT_ADDR --dport 443 -j SNAT --to-source $SERVER_ADDR:8181

iptables -t nat -A PREROUTING -p tcp -m set -j DNAT --to-destination $HONEYPOT_ADDR --match-set banned_nets src
iptables -t nat -A PREROUTING -p udp -m set -j DNAT --to-destination $HONEYPOT_ADDR --match-set banned_nets src

iptables -t nat -A POSTROUTING -p tcp -m set -j SNAT --to-source $SERVER_ADDR --match-set banned_nets src
iptables -t nat -A POSTROUTING -p udp -m set -j SNAT --to-source $SERVER_ADDR --match-set banned_nets src

echo "[+] Activating IP forwarding"
echo 1 > /proc/sys/net/ipv4/ip_forward

I had to update the tricky part of forwarding blocked IPs. At first, psad would only drop packets incoming from blacklisted IPs. These IPs are listed in auto_blocked_iptables text file. So I wrote a script to get these IPs and insert them in an ipset. I called this the update_daemon With this feedback mechanism the firewall is able to forward packets by checking their origin with the ipset elements.

Here is how I did it:

#!/bin/bash
#ipset banned_nets must already exist

AUTO_BLOCKED_IPTABLES_PATH=/var/log/psad/auto_blocked_iptables

update_set(){
    ipset flush banned_nets

    grep -E -o '^([0-9]{1,3}[\.]){3}[0-9]{1,3}' $AUTO_BLOCKED_IPTABLES_PATH |      while read -r line ; do
         echo "Processing $line"
        ipset add banned_nets $line
    done
 }

while true #run indefinitely
do
     inotifywait -e modify $AUTO_BLOCKED_IPTABLES_PATH | update_set
done

The hole project is available at 2.

So answering my own questions:

Will this architecture be effective?
Yes, it does forwards pre identified attackers to a honeypot, then protecting the server.
Are honeypots a good idea?
Honeypots seem to be an interesting idea. With a honeypot we can better understand the attacker, his methods, main targets, exploits, wordlists and a lot more.
If so, should I run them on a VM?
According to 3, running honeypots in VMs does is a good idea. Since honeypots are supposed to be low interactive, they do not require too much hardware resource. On the other hand, the system gets vulnerable to vulnerabilities in the honeypot software and in the VM itself.
Can I guarantee QoS? Or will my server be overloaded?
I did not test sufficiently the system for QoS. Still it seems to me the forwarded traffic will increase data flow.
What else am I missing (about anything related)?
Forwarding is not so simple as it seems the server must act as a transparent proxy and the update_daemon was a tricky part, since it dynamically monitors a file.
Also, the solution does not shows good results when suffering DoS attacks. In this case the best option seems to be removing the honeypot and just dropping the attacker. This partial solution is also available at GitHub.

You will find more information at 2 and 4


ASLR bypass with info leak Working through the Modern Binary Exploitation course from RPI here. I'm having trouble with an example on exploiting ASLR which is supposed to use a memory leak to gain information about the stack to then calculate the offset for a system call. Here's the code:

#include <stdio.h>
#include <string.h>

/* gcc -pie -fPIE -fno-stack-protector -o aslr_leak2 ./aslr_leak2.c */

int main(int argc, char * argv[])
{

char leaky[16];

if(argc < 2)
{
    printf("Please provide two arguments.\n");
    return 1;
}

memcpy(leaky, argv[1], 16);

printf("Leaky buffer: %s\n", leaky);
printf("another round? : ");
fgets(leaky, 64, stdin);

return 0;
}

Doesn't look like a format string exploit to get the memory leak, so I'm not sure how it's supposed to work. If I'm understanding correctly, I should get some information from the first print which helps me to overwrite the return pointer to create a ROP gadget from.
Yes, I can run this inside of GDB if I wanted to, but I want to be able to not do that.

Providing 16 chars as first argument, you'll fill up the leaky buffer. As there is no space for a terminating null, the subsequent printf will echo your 16 characters and will continue to print whatever is on the stack until it encounters a terminating null character. This is your info leak. Addresses of ROP gadgets can then be calculated relative to your leaked address/es.


How to investigate an unknown 1.5GB file named "sudo" in my Linux home directory? I found a file in my home directory named "sudo". It's 1.5GB in size and I have no idea where it came from.

-rw-r--r--  1 foo foo 1598296064 Aug  9 11:22 sudo

Does anybody have any tips on how to proceed investigating this file? I fear that my computer may be compromised but I still want to know what I'm dealing with.

Here's what I've done so far:

Running file sudo shows `sudo: data'.
Running strings sudo showed a large amount of random data.
Running which sudo points to the sudo file in /usr/bin/sudo

If it's an executable binary I plan to run it but might transfer to a virtual machine before I do that. I have limited gdb knowledge so at least I can inspect it.

You probably made it by accident with a botched shell command. I've done stuff like that myself. As a result it is probably filled with innocuous data. Here are a few reasons why I would guess it is not malicious:

1.5 GB would be an extremely large virus. Since viruses are usually transmitted over a network, smaller is better.
It isn't executable.
Malware typically hides much better than this.
file thinks it is just a data file.

Of course none of that proves that it isn't malicious (a.k.a. viruses don't have to be small, just because it isn't executable doesn't mean it might not be part of a malicious payload, and sometimes they don't bother hiding), but I suspect this is harmless. This is probably too old, but I would see if your bash history goes to the day/time in question.

I realize I haven't given you any hints on how to analyze the file, but you've already hit the main helpers (file and strings), and they haven't helped!  A file filled with random data from an errant command would explain what you are seeing, and likely has a better chance of generating a file named sudo in your home directory than malware does, IMO.


largely accessible encrypted passwords Suppose your university has a centralized ldap server used to authenticate all students, teachers and staff for all services provided by the university (email, exams, taxes...) Suppose that in the computer lab it is possible for every authenticated user to issue an ldapsearch and get all the data of all people in the university: students, teachers, technicians... Suppose the data contains also the fields: sambaLMPassword and sambaNTPassword with the encrypted password of each person.

Now suppose you are a little worried (you are a teacher and think that maybe the students could crack the system and stole passwords) so you speak with the technical staff of the university and they say something along the following lines:

we know this since a long time, but the password hashes are needed by some old service we need to keep;
anyway the passwords are encrypted and it is illegal to brute force them;
and our students are not so smart to understand that they can obtain and decrypt them;
however, please, keep this secret.

Would you be reassured by the answers? What would you do next?

Educational institutions are often required to obtain and maintain compliance and certification in numerous cybersecurity standards.  Maintaining a weak cipher suite or broken encryption may put them out of compliance, which could be uncovered on their next audit.

When I see "NT password" I get very worried-- Windows passwords can be cracked in about 13.6 seconds.  A sambaNTPassword is just an MD4 hash, which is a hashing algorithm that is horribly broken and has been for well over a decade.

That being said, these systems should be under occasional audit and will eventually get caught and addressed if possible (or a waiver and other mitigations will need to be put in place, e.g. a second factor of authentication that protects administrator accounts). So if you choose not to do anything, it doesn't mean they won't fix it...eventually.

If they are purposefully concealing this vulnerability during compliance audits,  this is not technically illegal, but they can lose their various certifications if they get caught, and open themselves up for civil liability if they get hacked.

As for this comment

  and our students are not so smart to understand that they can obtain and decrypt them

^ Is a ridiculous statement from someone who is forgetting that the younger generation bypasses their elders by several orders of magnitude when it comes to things like this.  This guy found vulnerabilities in the XBox at age five!!!!  (He now works for Microsoft security)

  however, please, keep this secret.

I would not agree to that, but be polite about it.  You should be clear that you are not willing to lie to cover someone else's mistakes.

  What would you do next?

Personally, I would treat this as a "teachable moment" (remember that you are still a student) and express that you would like to learn more.  See if you can arrange a meeting with one of the university's cybersecurity compliance officers-- these are the folks that sign the forms that swear and affirm that they are maintaining compliance, and who regularly work with auditors.  Once you bring it to his or her attention, you can safely say you did everything you could do, and it will be their job to take it from there.


Deanonimizing VPN/tor traffic What a VPN does is take the encrypted traffic from the client, decrypt it and forward it to the server, while tor bounces the traffic in multiple nodes decrypting a layer at each node.

I have some questions about the security of these systems:

Regardless of whether the VPN holds traffic logs or not, an entity that has the power to do so can not request logs from the ISP, and even if it gets inbound encrypted traffic, it compares the size of incoming traffic and the outgoing one and see which one matches? Once you understand what inbound traffic is, you can get the IP of the affected client, right?

This same thing can not be done with tor even if it requires more steps?

If a private VPN is used, then there is only 1 user connected, getting the incoming logs you only see a connection, so even without correlating the size of the packages, you can easily understand who is connected to the VPN and being the only one that was done with the IP of the VPN he did it, so the private VPNs is less anonymous than the public trusted ones, right?

This question may seem similar to the others, but I do not think, the other questions are shown how the solution could be tor, but the problem seems to me that there is also with tor, later I would like understand if it is true that private VPNs are much safer than public ones, in short, I think my question is more general, I'm sorry for the bad english, but I help me with the translator.
And my question has nothing to do with Differences between using Tor browser and VPN

... it compares the size of incoming traffic and the outgoing one and see which one matches? Once you understand what inbound traffic is, you can get the IP of the affected client, right?

To do this kind of correlation an attacker would need to have access not only to the endpoint of the VPN but also need to sniff near the entry points, i.e. at the ISP level. This is complicate already and likely only on the reach of government agencies. But it gets even more complicate if VPN endpoint and entry are in different countries with different laws and which might not like to help each other. And with a typical VPN provider used by many users the attacker would either have to do mass surveillance or need to have some idea already which client he needs to monitor for activity.

But if all this is given such correlation is possible. See Could logless VPNs be traced? for more details.

  This same thing can not be done with tor even if it requires more steps?

Tor works differently and the traffic from the same client passes through different nodes and also different exit nodes. Also fingerprinting at the level of the IP stack is no longer possible and timing and size analysis are made way harder too. This and more makes it likely practically impossible for an attacker to demask a user this way although association was done in some theoretical and simplified scenarios. See Why is Tor safer than a proxy? and Differences between using Tor browser and VPN and Tor traffic correlation attacks by global adversaries and How do traffic correlation attacks against Tor users work? for more details.

  If a private VPN is used, then there is only 1 user connected, ..., so the private VPNs is less anonymous than the public trusted ones, right?

A VPN with a single user cannot provide any kind of anonymity if the attacker is able to detect the entry point in the VPN and is able to associate this entry point with a specific user. If the attacker is a government agency and has already an idea which user this might be and only needs some proof then this can likely be done since these agencies can usually require cooperation by the ISP. Insofar it is easier as with a VPN used by lots of users.


How does a shared vault in password managers such as 1Password work? The password manager 1Password has a feature where multiple accounts in a group ("family") can share login information with each other.
From my understanding, a password manager is never supposed to know my passwords because they are encrypted with my master password before being sent "to the cloud".
How then can I decrypt / see the password that a family member shares with me through the Shared Vault without 1Password decrypting it?
If all passwords are encrypted with my private master password, how can it be possible that another user can decrypt it without me or the password manager knowing the master password of the other person?

Disclosure: I work for 1Password and had a hand to play in the design of exactly what you are asking about.
What you are after is described in more detail in the 1Password Security Design document. I will leave out some details here so that I can focus on the essential part of the question.
1Password works with the notion of vaults, and vaults are what people share. A vault will have a number of items in it. Each vault has its own randomly generated vault key that is created by the users client when the vault is created.
Let's suppose that Alice has created a vault $V$, and the vault key for it is $V_k$. For synching and sharing the encrypted items in the vault are sent to our server. Note that we never have the vault key, so we can't decrypt the items in the vault (or even the name of the vault).
Each individual has a public/private key pair as part of what we call their "personal keyset". So Alice has a public/private key pair which we will call $A_p$ for the public key and $A_s$ for her private key which she keeps secret. Bob will have his public/secret key pair $B_p$ and $B_s$.
The magic of public key encryption is that anyone can use Bob's public key to encrypt something to him, but only Bob, with is access to his secret key can decrypt it. Alice's and Bob's key pairs are generated by the 1Password client running on their own machines when they first set things up so that we never see their private keys. (Their private keys are encrypted with keys derived from the Master Password.)
When Alice shares a vault, say vault $V$ with Bob, she encrypts the vault key $V_k$ for that vault with Bob's public key, $B_p$. Let's call the result of that encryption the message, $m$
$$
m = E_{B_p}(V_k)
$$
Alice's 1Password program running on her machine will then send $m$ up to the server. We can't decrypt $m$ because we don't have Bob's private key, $B_s$. But we can deliver $m$ to Bob the next time his 1Password client connects to the server. We can also allow for Bob to receive the encrypted items of that vault.
Now Bob can use is private key to decrypt $m$
$$
V_k = D_{B_s}(m)
$$
Bob can then decrypt the items in the vault using the vault key, $V_k$. All of the encryption and decryption is happening in Bob's and Alice's 1Password apps running on their machines, and all the server does is pass encrypted objects between them that it, the server, cannot decrypt.


IP Addresses not showing up in Facebook login history A few of my husbands friends (we believe) have been logging into his Facebook and messenger. They are in the Netherlands and we live in the US, however, he used to live there and they know his password. But when we check the log in history, only my local IP addresses show up.

Is there a way they can hide their IP address? Does Facebook only show most used IP addresses? How can we find out for sure?

Let me split your question into three different questions.

  Is there a way they can hide their IP address?

Yes it's possible to hide your real address from other people or companies. You just need to use a VPN and switch to your desired location. It's that simple. If you want to read more about VPNs I got an interesting article here

  Does Facebook only show most used IP addresses?

No, Facebook lists all logins chronologically. You just need to login and navigate into the settings. After that go to "Your Facebook Information" > "Access your information" > "Security and Login Information" > "Logins and Logouts" now you can navigate down and on the last entry you will see a list of all logins. Maybe this helps you.

Note: I think you can't find the full log because you are only at Security and Login but there is only a list of currently logged in devices!

  How can we find out for sure?

If you find different IP addresses and login timestamps in this log you will know that you didn't log yourself in. Maybe you could look up these IP addresses and see that it's not even in your country, but don't trust it. As mentioned before it's possible to use a VPN to make it look like the IP is from your location.


Why would an organization like the DoD prefer to use its own Root Certificate(s)? While browsing some US military and governmental sites, I noticed their HTTPS connection to rely on DoD Root Certificates. As most of us know, web browsers are pre-loaded with a default set of root certificate authorities which usually does not include the DoD Medium Assurance and Class 3 Root Certificate Authorities among its list of Intermediate and Trusted Root CAs. As a result, web browsers do not recognize the DoD as the Certificate Authority and pop up according warnings.

As most related sites show and explain (eg at
http://mrmc.amedd.army.mil/index.cfm?pageid=ssl and/or http://www.dau.mil/faq/pages/dodcerts.aspx and/or http://www.forge.mil/Faqs.html#faqs14) the expected certificate(s) can be installed manually or via an install tool; but that obviously expects the user to put in time and efforts, while fiddling with things I personally wouldn’t expect a “user/client” to have to fiddle with in the first place. Especially, since downloading the root certificate (or using the installers) seems to be open to several (MitM) attack vectors.

At first glimpse, this doesn’t seem to be all too different from creating your own root certificate and forcing your users to download and install your self-signed certificates so that they can browse your (civilian) website securely and without nagging warnings. Normally people thinking along these lines are trying to be – let’s just call it – “cheap”, but I doubt that’s a valid reason when we’re talking about US military sites. I bluntly assume that the DoD doesn’t have money problems that would prevent them from buying certificates from well-established CAs (like the rest of us do).

This makes me wonder… what are the potential advantages for an organization like the DoD that might explain why they’re using their own root certificate(s)? Or – looking at it from another angle – are there any disadvantages if an organization like the US Department of Defence would rely on the typically known and used “public” Root CAs?

They do rely on generally available CA root certs for sites that are expected to be generally avaiable to the public over HTTPS.  See https://www.army.mil for one prominent example.

However, the DoD has a significant internal CA infrastructure and they perfer to leverage that instead for sites that either aren't intended to be served over HTTPS at all (like your https://mrmc.amedd.army.mil/ example, where HTTPS requests are simply 30x'ed back to http) or sites that are designed for internal use by folks on DoD equipment like http://www.dau.mil (which requires a CAC [DoD-issued smartcard] for authentication as well) or http://www.forge.mil/.


How long does information stay vulnerable/available on a public network? The title basically says it all, but I'll provide a hypothetical for clarity.

Bob is on vacation and needs to check his bank account. He logs into his bank's website using a username and password on the hotel's public, wireless connection. Alice is monitoring the network, and can intercept this information and use it for malicious purposes.

But what if Alice doesn't arrive at the hotel until a week after Bob has been there? With enough poking around, could Alice retrieve the username and password Bob sent a week ago?

Do various factors, such as being on a wired connection, using HTTPS (which I certainly hope a banking website is), or using a VPN/TOR affect this?

Note: While I have a formal education in computer science, I'm relatively new to the information security scene, as well as the SE community (this is actually my first post!) So please bear with me, any comments or advice is appreciated.

To answer the stated question- if Alice doesn't arrive at a hotel until a week after Bob has left- or, really, if she arrives at the moment just after Bob finishes his sensitive business- then it is unlikely that whatever nefarious activities Alice undertakes- in the context of targeting guests- will compromise Bob.

Schneiers first law notwithstanding, it would be unusual for a hotel to be capturing and storing traffic, and it would also be unusual for Alice to target that particular repository of data, should even she know of its existence. People currently at the hotel are going to be much more interesting targets, as their presence offers more opportunities to enable them to be compromised.

Phishing in general is far and away the most common method of compromise, and most compromises that occur are, from the perspective of the attacker, simply opportunistic commercial transactions. Guests staying at a hotel can reveal a lot of information about themselves that can be employed to convince them to open an email with an appealing and seemingly trustworthy offer- one that perhaps even appears to have been sent directly from hotel staff. Not to belabor the metaphor but hotel ponds are well stocked.

Of course, sensitive information about Bob will be stored in the systems the hotel uses to conduct its business, which include software to store and manage payment data as well as guest contact information, preferences and any notes made about their stay by hotel staff. Should Alice target and compromise these systems then Bob's information would be exposed to her.

On the general topic of hotel hygiene- for all intents and purposes, internet services at a hotel are like other shared services like pools and restaurants- amenities targeted to a captive audience. Cleanliness, quality, and other attributes are not necessarily competitive requirements. Internet services are no different.

Hotels have also always drawn elements looking to take advantage of guests- who are unfamiliar with the area, who aren't staying long, who have schedules and logistical constraints that prevent them from following up on inconveniences, and who on vacation often have their guard down.

Of course, you are not likely to be robbed at a large hotel in a major US city, and you are similarly not likely to have your credentials stolen. But if you are inclined to take precautions, you are not crazy for doing so.

From a practical perspective:

If you have a sensitive service provider who for some reason does not require https, find another service provider
If you travel and frequently have to do business over public or hotel wifi, for email and other sensitive accounts find providers who support 2FA https://twofactorauth.org/
If you have to check credit card or bank accounts from a hotel and don't have 2FA and you are worried about it, prefer getting a network connection from your phone by tethering over using the hotel network, either wired or wireless. It likely doesn't make a difference in any specific case, but generally speaking cell data networks are more safe.
Tor and VPN are not better than https on the specific issue of protecting credentials. All of those tools protect the content of your communications. What Tor and VPN also do is prevent someone monitoring network traffic from knowing whom you engaged with in those communications. With https, someone watching network traffic can tell that you had a session with Bank of America that started at 2pm and lasted for 15 minutes, though they can't tell what credentials and other data you exchanged. With VPN, someone watching network traffic can only tell that you connected to your VPN provider at 2pm, not whom you communicated with over the VPN. Only your VPN provider knows that. And with Tor, outside of state actors, no one monitoring the network has any idea what you did.


How likely is it that a video I downloaded is infected and contains a virus? How likely could it be? And if it did contain a virus would I be able to notice anything strange going on?
To give context, I downloaded 2 videos on an iPhone from a person online and saved them in my camera roll. However my iPhone was not updated to the latest iOS. And now I am wondering if those videos are infected, could they compromise my camera roll?
How feasible would it be for anyone to just attach malware to a video?

Any video format can weaponized if there is a vulnerability in the code responsible for parsing given file format.
You should keep your OS and media software up to date in order to minimalize possibility to be exploited.
Even if video is "infected", but your app is up to date, you should be safe. As long as malicious video file is not exploiting 0-day vulnerability.


Spoof coordinates sent by a GPS tracker device Is there any way to change the GPS coordinates with fake ones? Eg. make a GPS tracker with a GSM modem for car tracking report fake coordinates for a short period of time before returning back to normal.

Depending on how creative you want to get (and how much money you want to spend), there is a lot you can do with SDR (software defined radio) in terms of broadcasting GPS data using tools like the HackRF One and the BladeRF. The reality is that any SDR device that has transmit capability should (in theory) be able to spoof GPS data. Many devices, including handhelds, smartphones, and tablets still implicitly trust GPS data.

More info on spoofing with SDR:

Talk at BlackHat
RTL-SDR (a good reference site in general)
DEFCON 23 Presentation Slide Deck
Open Source Project on GitHub

Remember, to be legal, you technically need a HAM Radio Operator's License to transmit.... technically.


What's safest way to run WhatsApp? For work I have to use WhatsApp. I agree with EFFs concerns about WhatsApp and personal data (harvesting it and shoveling it into Facebook), and perhaps even its security.

I thought it would be possible to run WhatsApp on my PC in a sandboxed environment. I created a bootable USB with Remix OS because getting WhatsApp to work anonymously on that seems fairly easy. But Remix was so slow I can’t consider that viable.

I am looking for a lightweight solution. (I am running Lubuntu.) But if there is none, then I can figure out how to work with a more powerful machine. What do you suggest?

You don't need to go that much. Just install any Android emulator on your computer, install WhatsApp on the emulator, and start WhatsApp. When it asks your number, you can give your own number, get the authentication code via SMS and input it on WhatsApp inside the emulator.

The emulator is a VM, so it's a sandbox. If the primary concern is WhatsApp sending private data from the phone to Facebook, the emulator will have no private data. Just install only WhatsApp and nothing else, so there's little to no data to be leaked.


Why is it bad to use your browser's password manager? I keep hearing various security-minded people saying that using your browser's password manager is a bad idea because it's not safe. How true is this?

I know that Safari uses the system keychain to store data and I suppose that Chrome and Firefox have a similar setup. Are there attacks in the wild against a browser's password manager?

The biggest problem with saving your passwords in your browser is that it's not hard for someone who gains access to your computer to also access all your passwords.

In Chrome, for example, you (or anyone who hacks into your computer) can just go to the browser's settings and click on the show button in the preferences tab to reveal any saved password.

There are some tools that will reveal the passwords stored in the browsers.

http://www.nirsoft.net/utils/web_browser_password.html

WebBrowserPassView can't retrieve passwords that are encrypted with a master password, though. That makes Firefox the most secure of these three browsers when it comes to password management, because you can encrypt and password-protect your logins in Firefox with one master password.

If you don't set the master password in Firefox (which is not enabled by default), though, you are re vulnerable to the same security issues if your computer gets into the wrong hands.


How to decrypt a microSD card after a factory reset of the device used to encrypt it? Two month ago, I encrypted my Micro SD card in my Android device (Samsung Galaxy S5) for security purposes, and yesterday I forgot to decrypt it whilst removing the card I and factory resetting the device. Is there any way to decrypt it by using the same device, if I set all the settings the same?

Hope you didn't format your sd card yet.
I did the same thing with my S7 edge but managed to fix the problem.
Headphone jack stopped working so Samsung support recommended a factory reset to rule out software problem.
After backing up with the smart switch program and factory reset were performed, the files on the sd card couldn't be read properly.
The file names/folder structure were all there but when you tried to view an image or read text nothing was readable (the files were the same size as before the reset).
Here's what I did:

On a PC: Copy (the encrypted and unreadable) contents of the sd card from the phone to your harddrive
On the phone: Settings -> Storage -> Sd Card -> Format sd card (this erases all the data on the sd card but don't worry you have a copy on the PC)
On the phone: Settings -> Security -> Encrypt sd Card (should be real fast since it's an empty sd card)
On the PC: Copy the contents of the sd card onto the phone
On the phone: Settings -> Security -> Decrypt sd card (edit: this may take a while depending on how much data was on the card)

After that I was able to view all the files I had on the sd card!


how to secure my login user id and passwords specially for facebook i think they hack me with facebook  cookies.

i dont get what exactly is going on with me. every time i get the login notification from another ip location.i want to secure my cookies and i wanted to get the ip address of the person who ever login me with my email id.

i want to secure my all logins

i dont even get the ip and dont know how to secure myself.

if someone can helped  me in this i wll be thankful.

God bless you, please help me i am in trouble from some days.

Basic steps to securing your Facebook account:

Use a strong password
Link to a mobile device
Enable HTTPS
Enable login notifications
Enable login approvals
Check active sessions for suspicious activity


How is private key protected in Java JKS keystore file? I have been reading about JKS Java keystore, but didn´t find details about the format.

The store password is just to verify the integrity of the file?
How does the private keys are protected?

details about [JKS] format.

This is implemented by sun.security.provider.JavaKeyStore
(source in mercurial)
but is pretty simple and based on Java's Data{Output,Input}Stream conventions:
4-byte magic number, 4-byte version number, 4-byte count of entries; a variable number of entries each containing 4-byte type, length+(modified)UTF name, 8-byte timestamp, length+encoding+certcount for a privatekey, and type (in practice always X.509)+length+encoding for the/each certificate; and at the end hash of password plus preceding data for integrity check.

  The store password is just to verify the integrity of the file?

Yes. The JCA API, and the JKS format, allows each privatekey to be encrypted with a separate password, which can be different from the store password. keytool for example allows you to specify a key password, but defaults it to be the same as the store password. However, some programs cannot cope with differing key and store passwords; in particular, those using the default trustmanager and/or keymanager for SSL/TLS (and thus HTTPS) so in those cases the same password must be used for both store and key(s).

  How does the private keys are protected?

Each privatekey is PBE+hash using a 'proprietary' scheme in sun.security.provider.KeyProtector
(source in mercurial) and formatted in the file as a PKCS#8 EncryptedPrivateKeyInfo.


What tools and techniques do we have at disposal to manually search for rootkits? I use tools from sysinternals for various tasks (ex. process monitor), but I'm not sure if these programs can be used to manual rootkit detection since rootkit processes can be hiden.

Are there any trusted tools which could help.
I'm not looking for automated solutions software such as AV scanners, since scanners can't detect new threats, if you have reference to thechnical article that should be ok too.

By the definition of rootkit they likely have full control of your system all the way down at the lowest levels, and therefore any commands you run to "check" for a rootkit may themselves be compromised and returning you faulty data.

Traditional ways may be to hash every file on the system and diff them with a known good system and see what system files don't match.

A lot of things happen in memory now though so you may need to do a memory dump and compare the contents of currently running processes and libraries with known good copies ... and comparing what is in memory for a process to what is on disk for that same process.

Also at a driver or boot level similar validity checks may need to be performed.

Another option is analyzing network traffic leaving the system and seeing where it's coming from. For example, if Windows Explorer is talking to Russian IPs you may have found your rootkit.

In summary though if a rootkit is found or suspected there is generally no 100% solid way to remove them ... instead the system will likely need to be rebuilt.


OWASP ESAPI PHP implementation for XSS attacks I searched extensively for good materials for prevention of XSS attacks using OWASP ESAPI, but could not find any beginner material. Can some one please give me an example how this works?

your best bet for this would be probably to look at the other OWASP ESAPI implementations to see how they've handled it, which should at least give you the approaches to look at, even if you then need to translate that over to PHP.

In terms of information you could look at this post about the Java ESAPI implementation which is, AFAIK, the most mature one about.  There's another post here which also looks at XSS and ESAPI.


Does using both GPG encrypted files and encrypted filesystem make sense? For a few years i stored my personal text files encrypted using an asymmetric key through GnuPG. Now i thought that it is a good idea to also encrypt my hard drive partition. Does it make sense to use both filesystem encryption (via, say, dm-crypt) and encryption via GPG for separate files? If this is unnecessary, what should i stick with for personal encryption of textual data?

I want to be able to use version control system and text processing tools on these files and also optionally apply steganography to conceal the existence of the files from intruders altogether.

I use GNU/Linux.

If your requirement is,

  I want to use version control system with these files and possibly
  apply steganography to conceal the existence of the files from
  intruders altogether.

then of course GPG'ing single files only isn't enough. You should encrypt and maybe even plausibly-deny the whole partition with something like TrueCrypt. Does this make sense? Only you can tell.

Once the partition is encrypted and hidden, does it make sense to have the files encrypted one by one? This depends on how a hypothetical attacked might gain access to the system.

The first level of access would be partition access.

This may be gained through straight key recovery (e.g., rubber hose attack, post-it attack) for a standalone system; on a connected system, once you allowed partition access to access your disk, the partition could be readable to a number of services with access to and from the outside, and this access could be compromised.

In a scenario which your level of wariness makes look farfetched, you might have forgotten a network share with weak password. Once the disk is unlocked, the share would then allow access to the plaintext files.

This, I think, is the only scenario wherein double encryption makes sense. The lead pipe attack scenario would naturally imply that access to the second layer might be secured with another judicious application of the same pipe, unless you went to the extremes of supplying a dead-man or kamikaze access (e.g., the unlocking mechanism on the external 'undeniable' partition also triggers a background filling of the partition, thereby trashing the hidden partition) AND the attacker hadn't thought of doing a low-level backup copy of the encrypted medium. The combined likelihood of these two events makes this a dark horse, in my opinion.

A more likely variation of the remote access scenario is that you have the need to run some service on the system, you need this service to have read access to some files that must be kept on the encrypted partition, you can't move these files to a separate, expendable and maybe even unencrypted partition, AND this service has a security vulnerability of which you are unaware.

To protect against this possibility, I believe you have no recourse except to doubly encrypt the files. Of course the service can't have access to the same encrypted files with the same general key, or exploiting the service would secure secondary level access to everything: you will have to use two separate keys, and if the same files need to be access from within and outside the service, you'll have to maintain two separate copies - or use two separate keys from outside the service, i.e.:

INNER ACCESS (key1) ---> file1_1, file2_1 <--- SERVICE (key1)
INNER ACCESS (key2) ---> file3_2, file4_2

or

                         file1_1, file2_1 <--- SERVICE (key1)
INNER ACCESS (key2) ---> file1_2, file2_2,
                         file3_2, file4_2

However, this all depends on your situation. There's no one-size-fits-all guideline that I know of...


Is HTTPS based on a private key on the user side? Is HTTPS it based on private key on user side?

Where does the user get the private key in the first place?

Suppose the user gets the private key by downloading a browser (Chrome, Firefox), then isn't hackers able to intercept the key by man-in-middle attack?

Suppose private key comes from Windows OS registration number, then does this mean hackers can intercept private keys of all Linux browser downloads by man-in-middle attack because Linux does not have registration number?

Suppose the private key is based on timer function, then isn't it easy to brute force the private key?

If HTTPS is not based on the user's private key, then isn't HTTPS very unsafe?

Generally, a symmetric key is negotiated on the fly, and securely exchanged between the browser and the server.  One protocol that enables people to do this (Diffie-Hellman key exchange) is explained in this excellent youtube video: http://www.youtube.com/watch?v=3QnD2c4Xovk.

The random data for that is derived using any number of methods; it's certainly not static, and it generally won't have much to do with the current time.  The classic example is to use the number of microseconds from the time, which is something that knowing the time of day to the second won't help.  Other sources include the timing of certain events (keypresses and disk accesses, as common in linux), the number of photons reflected by a semitransparent mirror at some moment (quantum-derived entropy like many SSL accelerators use), or the action of a metastable oscillator (the intel DRBG), and several other things.  This random data is collected each time it is required, though in practice it can sometimes be stored in a pool for later use (which can be a vulnerability also, but that's another topic).

Since the key is quite random, you need to do a lot of bruteforce to get it.  If you maximized the amount of entropy you could  use for your key, and the cipher used a 256-bit key (AES-256, etc.), you would have to try a lot of times (2^256 * 0.50 attempts would give you a 50% chance of recovering the key).  In practice, a lot of people use less entropy than this and construct the rest of the key deterministically, which means that if they used only 64 bits of entropy that formula would change to 2^64 * 0.50, as long as you knew exactly how the key was being generated.  For DH key exchange like I mentioned above, the math is actually a little more complex because you have to account for the fact that you're choosing two random numbers and not one.

This is a lot of keys, and the odds of most attackers breaking one by bruteforce before you've stopped using it are very minimal.


Can a known MD5 hash limit the search space for SHA1 collisions? For a course in game theory, we are dealing with BitTorrent and alternative strategies (roughly alternative clients) we can employ to maximize our download speed. One strategy is to over-report the pieces we have and upload junk data.

Clients very quickly learned to deal with that, but looking at the spec I noticed that while each piece is checksummed/hashed using SHA1, the entire file (or all the files) are sometimes checksummed using MD5.

And that made me wonder if the fact that we sometimes have a MD5 hash of an entire file would make it easier to find collisions for individual pieces using SHA1?

No.

MD5 and SHA1 are largely unrelated. Knowledge about one does not confer any knowledge about the other.


Is java Client vulnerable by POODLE? I have a Java based application (running on java 5 or higher) that establishes an SSL connection towards an Apache tomcat 7.0.47 on java 7.

From what I understand, to exploit POODLE you need a client that explicitly does out-of-protocol downgrading. Something that web browsers do all the time, but very few other clients do. So I wonder since both sides (server & client) are java based and not web browser if my application is at risk because of POODLE vulnerability?

POODLE is a vulnerability in the SSLv3 protocol, specifically in how it handles padding for block ciphers (RC4, being a stream cipher, isn't vulnerable, but it has its own weaknesses).

Do the client and server talk to each other using SSLv3?
Can a man-in-the-middle attacker coerce them into talking using SSLv3?

If the answer to either of the above questions is "yes", then the client/server pair is potentially vulnerable.  Actually performing the attack depends on the details of how the client and server work.


Password recovery tool over telnet or http basic auth In my feeble attempt to secure my router, I disabled the service login and either

changed the "admin" login and the password, or
changed only the password for the "admin" login

Normally, I would hard-reset the router, but this one is special and on loan with various settings for a limited trial (contains SIP settings, tweaked timeouts etc).  The tech guy from ISP told me it'll cost a callout to reconfigure the trial router all over again, so I'm stuck with password recovery.

If I browse to the gateway address, it comes up with an auth request, not a webpage, but a "this server requires a username and password" type.
I can telnet to the gateway, which ends up with 3 tries at login.

Computers on this network: OSX Lion and Windows (XP/8).

What tools can I use?  I looked around and I could be wrong but JTR looked like it attacks a hash file rather than cracking over telnet.

As Jeff stated, THC-Hydra is a good application of choice. I'll try to cover the basic usage for your situation.

You will need a dictionary file unless you want to bruteforce every single character possible.

In the examples change the following fields:

dictionary file: Your password file
ip address: The router
protocol: Either telnet or http-head. Incase of https just type https-head and add -S
username file: A file with a list of usernames to bruteforce

Known username with dictionary attack:

hydra -l admin -P <dictionary file> -e nsr -f <ip address> <protocol>

Known username with bruteforce attack.

Generate 3-8 char long password with both cases and numbers:

hydra -l admin -x 3:8:aA1 -e nsr -f <ip address> <protocol>

Unknown username

hydra -L <username file> -P <dictionary file> -e nsr -f <ip address> <protocol>

Ofcourse reading the manual will tell you this aswell.


Properly masking credit cards I'm wondering if the following masking of credit card would be considered PCI compliant.

######??????####

# Is plaintext
? is redacted

Expiration date is available in plaintext

Is it reasonably feasible to infer the original unmasked # using the combination of the 10 available digits along with the expiration date?

Typically, it's just the last 4 that are shown to the customer, sometimes the first 6.

From the PCI DSS 3.4 Standards

  Never store the personal identification number (PIN) or PIN Block. Be
  sure to mask PAN whenever it is displayed. The first six and last four
  digits are the maximum number of digits that may be displayed. This
  requirement does not apply to those authorized with a specific need to
  see the full PAN, nor does it supersede stricter requirements in place
  for displays of cardholder data such as on a point-of-sale receipt.


Is a password manager better than an encrypted file for storing passwords? For any passwords other than websites I log into regularly (such as Gmail, Facebook, etc.), I use apg to generate a random 20 character password.  I then add that password and a username or email address to a text file I keep stored in an encrypted VeraCrypt volume (password for that exists solely in my head).

In light of the Collection #1 breach, I'm planning to go through and change some of my passwords, and I'm wondering about the benefits of using a password manager such as Encryptr or Gnome Keyring.  I usually use Mint with Cinnamon.

Is storing passwords in an encrypted file considered adequate for most peoples' needs?  Even if it is, are there other benefits to using a password manager?

Having an encrypted text file with passwords in it is certainly better then having common/reused passwords or an unencrypted file.

A good password manager is, however, incrementally better, in the following ways (off the top of my head)

Better memory management - it can prevent passwords being left in computer memory which can be snaffled by other processes/users.
It only exposes the needed password, not all of them.
(Sometimes) Browser integration makes life easier
Many eyes - a program designed specifically for password management, and audited, likely has stronger processes in place to ensure good hygene.
Cross-platform compatibility, arguably easier to merge records and manage in a cloud environment/from multiple locations.

You might want to look at Keepass and other variants, and the kdbx format.  (And how well its supported).  I use that under Linux (I assume you use linux as you mention APG)


What are some security measurements that can be taken with Windows Phone? In corporate security it's often important to have confidential information, such as email, encrypted on your phone. How does Windows Phone (not Windows Mobile) cope with these issues?

Unlike iPhone and Android who have (flawed) full disk encryption, there is no option in the latest version of Windows Phone 7.5 to encrypt your whole device.

Windows Phone 8 however will have a lot of improvements (security wise) but they will still need to be proofed in the field. However the full disk encryption will be handled by Bitlocker, which has proven itself on Microsoft's desktop OS Windows 7.

Unfortunately there are little or few security measurements in place to keep your data private in case of theft.

Some apps that can be used to keep your things private:

GOOD for enterprise

Windows Phone has a built in feature to erase the phone from a distance. Which can be useful, but is often way too late if no other form of data security is used.


What is your approach to handling Guest Internet access? Suppose you're a company that uses a web proxy to block objectionable content on your corporate network, and this technology may cause issues with some 3rd party VPNs.  Or perhaps this 3rd party is working on a project that IT should not manage or be involved in for political reasons.

How would you handle a request from a visiting vendor, or contractor, who needs unrestricted internet access?

Under what conditions would you need to exempt them from monitoring?

Would you handle certain visitors differently than others? How would you handle financial auditors (PWC) for example?

What technical solution would you employ, and how would you manage access to that solution?

[Edit]

If your solution involves using Wireless to solve the above issue, how do you prevent abuse from internal employees who may simply associate to your access point and download content.  Is it not a concern today until someone abuses it?

We provide an open guest wireless network that only blocks categories like porn, gambling and racist.  The corporate network blocks a little more, like social networking, but the guest network can't access internal resources.  Nobody gets "unrestricted" access, we always block sites categorized as malicious.  If there is a specific site categorized wrong we are willing to change it, but any site blocked needs to be reviewed individually.  If a vendor doesn't like it they can supply their own cellular network card.

All common types of VPNs are open outbound on our network.  In our environment if a vendor is on-site and needs to connect to their corporate network that's fine; if we didn't trust them we wouldn't hire them.

Auditors connect to the guest wireless network.  If they need data from a system they tell us what query or report is desired and we run it.  At no point are they given direct access to any of our systems.

To more directly answer your question, if the IT systems used conflict with a project that IT is not supposed to be involved with or know about I'd say that project needs their own internet connection.  They would also need to be off the corporate network if they are running independent of the main security system and I'd guess they are operating outside of your policies around system security (unless you have a lot of these and put it in the policy).


Looking for open source crawler/spider & scanner Until now I managed to look into Webscarab, Webscarab-NG, IronWASP & Burp extender.

Unfortunately, except IronWASP, that refused to compile from the GIT source, none of the projects matched my criteria (Webscarab lacked the scanner, so does Webscarab-NG & Burp extender is indeed very nice, but not open source).

Do you know about any other open source projects that might work?

Wapiti (python) and Skipfish (C/C++) are both good open source scanners that are not bad.   My biggest complaint is that they are overly simplistic,  for instance Skipfish doesn't actually have an html parser,  instead it uses a system of overly simplistic regular expressions.  Wapiti uses Python's html parser,  which is better,  however Wapiti isn't actively maintained.   Skipfish's biggest problem is that it will DoS web application with the traffic it produces,  so I wouldn't run it on a production system.

I studied both of these projects when building my scanner Sitewatch,  we provide a free service and its better than any open source web application scanner I am aware of.


SSL Wildcard certificate to issue anther certificates Let's say, that I buy an *.example.com SSL certificate. I want now to generate  subcertificates and include the *.example.com certificate in a trust path:

host1.example.com, with an alternate name rr.example.com
host2.example.com, with an alternate name rr.example.com
host3.example.com, with an alternate name rr.example.com

The questions are:

Will those subcertificates be recognized by the web browsers and another clients if the *.example.com cert is recognized?
Should I need to regenerate all the subcertificates when the major cert expires, or would I be able to prolong the *.example.com one leaving the rest intact, or issue a new *.example.com and sign my subcertificates with this one?

I'm actually searching for a cheap way to migrate my network from self-signed certificates to the signed ones, that's why every server should have a different certificate and not a shared one. Besides, it should be also easier in maintenance if one of those keys leak.

Unfortunately the PKI model as implemented in the browsers does not enforce a restriction of the domains you can sign with a CA, thus any sub-CA can sign any domain it wants. That's why no CA trusted in the browsers will issue such a sub-CA anymore (at least officially, they still might issue them to allow some agencies to mount man-in-the-middle attacks).
So you will not be able to buy a sub-CA which is only able to sign domains below example.com.

Even if you would be able to buy such a certificate the subject does not matter, e.g. it can be *.example.com or whatever. The subject is only used to find the issuing CA by matching the issuer name in the leaf certificate with the subject name of the known CAs when validating the trust chain.

Apart from that, a certificate is not signed with the certificate of the CA, but with its private key. So if the certificate of the CA expires you can just issue a new certificate with the same public/private key pair and subject and you don't need to re-issue all the certificates signed by your CA. But usually the validity of a CA is much longer than the one of the certificates issued by the CA. So you usually don't re-issue a new CA certificate because its not valid any more, but because the private key got compromised or it got too weak (e.g. replace 1024 bit keys with 2048 bit). In this case the public key changes so you need to re-sign the certificates issued by the CA.


Does changing one's last name offer some protection against identity theft With the recent hack at Equifax where names, addresses, SSNs, etc are now likely in the hands of criminals, would changing one's last name be protective from impersonation similar to how one would change one's password if it is compromised?

This assumes that Equifax has cleaned up its vulnerability and thus if your last name is registered as one that is different from the one in the hands of criminals, the criminals using one's old last name wouldn't get past the first page of say a credit card application.

Same protection would apply for changing one's address. Of course the SSN can't be changed unfortunately.

Is this sound reasoning or is there some obvious factor I'm overlooking?

It sounds like an idea, but there is a few things that I want to point out here,

Changing a last name officially takes a while

It really does take a while, please see  this link. It also depends, if you have like a thousand employees, would you make all of them fill out the form and wait for a response from the SSA? Would it be convenient? You should answer that question yourself.

Second and most important, social engineering attacks

After you've done the first process, it comes to securing the last names from the attackers since they already have all of the information about the workers but the last names.

It is very easy to get the last names under this circumstance

When your workers are out to get a drink, the attackers could act like a friend, start a conversation, ask to see their ID that they don't believe their age, and they could see the new last name there. Or the easiest, just ask for their full name.

They could steal their wallets,

follow them home, hack their personal pcs in their houses and know what they're all up to from there.

There is also tons of  social engineering attacks that could be made to know the last name of a person. It is easy.

So as an answer, no it is not worth it but it may depend. You could change the last name of a CTO or some high ranked worker, and tell him about the situation, so that he is very very very much careful on not giving away any info to a stranger. He should not be pulling out his ID in public. That's how it could be reasonable from my point of view.


Cross site scripting and the use of http-only cookies? I have been a developer and now I am trying to look at XSS from the point of view of a developer. I was thinking of a particular case of reflected XSS . Let us say we have a vulnerable website and if an attacker can trick the users to click on a malicious link he can get their session tokens by using document.cookie

I was wondering that if the website starts to use http-only cookies (I suppose this will make it impossible to access the session tokens by the use of JavaScript. Am I missing out a point?) but still remains vulnerable to script injection in such a case what are the options left for the attacker? What are the other ways of exploiting this vulnerability?

There are two major attack patterns that can be explored by an attacker armed with an XSS vulnerability that affects an application that uses HTTPOnly cookies.

First and foremost an attacker can use an exploitation method similar to the Sammy worm.  In this attack pattern the XSS payload uses an XMLHttpRequest to read a CSRF token and perform an action as if they where the victim.  Common actions would be, adding a new administrative user,  changing your password (or email address to perform a password reset)  or even transfer funds.  Any action that the authenticated session can perform,  you should be able to perform with JavaScript by reading CSRF tokens.

The second attack is leveraging a trusted domain.  Lets say the target is  https://sometrustedbank.com.  That HTTPS looks pretty shinny to informed users,  but an attacker can modify any content on this page by assigning document.body.innerHTML to any value.   An attacker could conduct a very convincing phishing attack where by a helpless victims are directed to https://sometrustedbank.com and asked to divulge personal information (and deep dark secrets).  In this case the content is king,  and a user is unaware that this content originates from an attacker.

In short; enable HTTPOnly Cookies, but know that this security feature was never indented to stop XSS.


Privacy concern about file modification on SSDs We all know that files which are deleted from a modern system usually don't get erased immediately from memory, which is a security risk in itself.

However, this question focuses on a different topic: suppose that a file on the system, which is plaintext, stores for a short amount of while sensitive information (e.g. crypto keys in it). Then, the contents of the file are modified and the sensitive information removed from it.

Assuming no program read the file while it contained that information and assuming no backups of the file were made by the text editor while it was being changed (since it's simply the "nano" unix utility), are there any ways that the sensitive information can be extracted from the storage medium after the file was modified by removing the keys from it? How would this information be extracted and where is it stored?

Assume the partition where the file is held is, like I said, in plaintext and the storage medium is an SSD. As a threat model, assume the attacker has physical access to that SSD after the modification of the file was made but the computer itself is turned off (so no extraction from RAM or caches or other suspicious stuff).

If it's relevant, also assume the partition is ext4 (although it would be interesting to hear this answer for other systems as well).

Not an expert but I think that unless trim is turned on and given enough time to do its work:

The average user can not recover them.
An expert user has chances to recover them
A "pro" with capacity to desolder the memory chips and read them directly can very likely read them unless significant efforts are made to ensure the sector containing the data is physically erased.


OpenSSL version causes PCI Compliance failure We have a client on AMI Linux (Amazon), which is currently using OpenSSL 1.0.1k-15.99.

As far as I can tell Amazon is very good about backporting security patches as per this page: https://alas.aws.amazon.com/ And they have stated in more than one place that they in fact do and will continue to do so per this thread: https://forums.aws.amazon.com/thread.jspa?messageID=759633#759633

The PCI compliance scan failed my client, presumably becasue the version of OpenSSL reported is 1.0.1k. I assume this becasue they list a bunch of CVEs that I know have been patched in the version currently running.

Unfortunately, the scanner's methodology is very opaque, and I can't get a straight answer as the the specific cause of the fail, and neither the credit card processor nor the scanner's tech support are helpful.

If the distro provider backports all the relevent patches to the version they have baked in, is there an actual security risk?

PCI DSS section 6.2 states:

  6.2 Ensure that all system components and software are protected from known vulnerabilities by installing applicable vendor supplied
  security patches. Install critical security patches within one month
  of release.

Does my installation of Amazon's latest patches which include their patches to OpenSSL 1.0.1k (which I apply weekly) satisfy this requirement?  Or does application of the AMI patches not "count" and they require OpenSSL from the actual "vendor", in this case https://www.openssl.org/ ?

I've asked all these questions of the scanner / credit card processor PCI compliance team and have not received any definitive answers (or really, any answers at all - they don't seem to know the difference between an expired SSL cert on the server and old versions of OpenSSL), and my client is getting antsy.

What is the standard procedure to ameliorate this?  I really am not confident in my ability to compile OpenSSL from source, for example.

Until you can either get a clean scan or have your PCI-QSA sign off on proof that you are compliant the responsibility is on you to meet compliance requirements regardless of real-world security implications.

Compliance does not equal security and security does not equal compliance.

That said, typically an organization will document both vendor proof that a certain CVE found on a scan is addressed by a specific patch/application sub-version as well as proof that all systems in a PCI-Zone have that version of code applied (depends on what the remediation actually involves).

The QSA can then attest that the ASV scan finding is actually a false-positive.

Your question is also leading into another issue: What if there is a major known vulnerability and the vendor won't patch it? When this is the case you may have to come up with your own remediations to address the vulnerability. You also run into the case where someone could argue that yes your distro's latest version may only be X but the latest version of OpenSSL (or insert application here) is Y. In this scenario, you are responsible for the application level patches staying current in addition to the operating system patches. Therefore by not bringing the individual package up to date, you are out of compliance.

Per compiling OpenSSL I think you'll find it's not particularly hard but do test it on another system first (not production).

Ultimately you still need to consult your QSA (assuming you have one) as they can provide very specific guidance that may help you. A good QSA can save you time here too. The card processor may not want to advise you in the event there is a lawsuit later. Again, ask your QSA.

From a strict security standpoint ignoring all the compliance stuff: Always make sure your attack surface is tightly patched to the most current patch release and where possible add additional controls for defense in depth. Tools like Fail2Ban might be your friend here. Likewise, keep in mind that patching doesn't solve your security problems you really need additional controls to protect your data. Likewise, meeting any given compliance standard won't give you good security architecture. You really need to design security deep into your solution and not just try to meet a basic compliance guideline or vendor patching levels.

Keep in mind that whether you are the data custodian or the data owner you have direct responsibility to keep the system protecting this data (or access to it) as secure as reasonably possible. Just relying on patching isn't enough.

Security and compliance are sometimes competing goals. Sadly these two are not always aligned and it's not uncommon to see money spent by businesses taken away from things that would actually secure data and have it spent on things that make an organization "compliant" (sometimes this process even increases risk). Be careful not to confuse these two goals. You have a compliance problem AND a security problem these are not one in the same. If you keep these two goals separate you'll come up with good solutions for both easier than if you try to solve both with the same solution every time. It's great when one solution fixes them both but this won't always happen the way you want it to.

Finally, DO address this with your distro provider too. Adding pressure on them to keep up with security patches where possible will help prioritize security efforts.


Is malware altering my destination ip Something strange is happening to my internet requests and I don't have the knowledge to know why it's happening.

I've suddenly started to be directed to google france whenever I do internet searches so I looked up my IP and ip location to see where google thought I was positioned and it turns out that my ip address had changed, the new ip address now belonged to a server in france, a server of an isp that is not my isp.

I checked the ip of my home router and the router's ip  didn't match the new ip. I have two windows machines, one running w10 and the other w7, the problem happens on both machines. I also have android tablets and I have checked my ip on these tablets and the correct ip is returned with the correct location and the correct isp. all tablets and pcs are connected to the local network which  should in theory share the same IP address(?).

I downloaded wireshark so I could see what was being sent and where, and I can see that packets are continually being sent and received by the ip address of the server in france.

To confuse things, this morning I looked up my ip on both pcs again and the correct ip, location  and isp was returned however I checked wireshark and packets were still being sent and received to the ip of the server in France.

Is it possible that some malware is routing traffic to this server in France, and it has infected both my pcs through the network?

I don't use a vpn and don't have one configured. I checked in the windows settings and none were being used. I have scanned with avast and malwarebytes and they have turned up nothing. I'm currently running a microsoft safety scanner but it's not showing anything yet.

I just can't understand what is going on, but then again I have very limited knowledge of security and networking. Does anybody have more of a clue? I've been reading about Mitm attacks and thought this sounds similar.

I have seen this happening on some machines, with different target IPs (last one was in Texas, of all places: the actual server should have been in Northern Italy, not even on the same continent).

Verify your network configuration and manually set the DNS entry to Google's 8.8.8.8, and see whether this continues to happen or not.

What happened in my cases was that something had hijacked the routers, thanks to the fact that the users had left them with remote access enabled and trivial passwords (but I am advised that there somethings that can brute force entry or exploit router vulnerabilities), and reprogrammed the DNS sent via DHCP to the internal network so that DNS queries were routed to a rogue server.

The rogue server then replies to "most" DNS queries with the address of another rogue server, which is then able to hijack all of your communications. Google mail, home banking site, and so on. HTTPS encrypted connections will receive faked signed certificates, which may trigger a browser security alert... or not, depending on the browser.

I would carefully review the logins you've used while being hijacked, and consider those passwords compromised.

If the DNS trick works, your router is in all likelihood compromised also; I'd reset it to factory and secure it, unless you already secured it when you installed it, in which case it must be considered vulnerable and replaced with a new model, or its firmware updated if possible. You may want to Google your router's make and model and keywords such as "vulnerability", "botnet", "CVE".


Why is donaldtrump2020 considered a strong password on some online password checkers? He is the president of USA, and known all across the globe. With USA going to elections in 2020, should donaldtrump2020 be considered a strong password, as I found out upon checking with some online password checker? It stated that this is a strong password with no sequential numbers/symbols/alphabets etc.

Shouldn't there be a process that checks for well-known terms/phrases/names/events as well?

Is there an online utility that would tell if a password:

Does not contain alphabets/numbers/symbols in sequence. Ex. abc 456 @#$
Does not contain phrases/well-known celebrities/countries/places.
Does not contain mathematical/chemical/physics formulae.

Often online password checkers aren't comparing the given password against popular terms or phrases. This is because this would require having a dictionary of all relevant permutations of said term/phrase and having a complete one isn't feasible in most situations. Often the only metric for the strength is the entropy of the password, and that has been well covered, so I won't add to it.


Cookies not cleared after logout in website, is this a security bug? There is a website with logout button, when I click on logout it just redirects me to login page. If I manually enter the dashboard URL in url bar im still logged in. Is this a security bug for that website and is there any CWE or CVE assigned to this kind of bug?

Short answer: maybe.

Depending on the actual implementation, this is a small risk as @multithr3at3d mentioned. Believe it or not, this is common behavior. Many companies have internal battles over security vs. usability, and at a certain point, the company will make a decision to accept a certain level of risk.

Some things to consider

Exactly how long is the cookie expiration set for?
Does the session persist even after the user has closed their browser? (this is a bigger issue)
What is the application actually doing? Banking apps require a higher level of security than cooking websites, clearly.

I am not advocating weak security practices. Rather, I'm just trying to illustrate how application owners may make decisions like this.