How to quickly find out what the threat nature of a password protected archive is without getting infected? I have recently received an e-mail from an existing support group e-mail box with the following characteristics:

written in the language used in company's HQ (different from English which is the primary communication language)
had a zip attachment
provides a clear password for the attachment
is a reply of a legitimate e-mail I have received from a colleague a few months ago

This seems to be similar to what is described here, so there is very high chance to have received an infected file. After a couple of hours, our security department sent an e-mail related to similar cases happening inside the company.

I am wondering about how to find out the exact nature of the threat in a secure way. I have tried the following (only the first step inside the company, the rest within a VM):

checked on VirusTotal, but received 0% detection which makes sense since the engines cannot scan the encrypted archive
Checked with the Nanoav which boast about scanning password protected archives, but it does not allow to input the password
opened the archive with 7zip and saw a document inside
extracted the file using 7zip and uploaded the document to VirusTotal => 13+ engines detected something weird.

Do previewing and extracting the archive impose any security risk or is it only the document inside that can be infected? (in this case it seems to employ a macro).

Question: How to quickly find out what exactly the threat nature of a password protected archive without getting infected?

I am wondering about how to find out the exact nature of the threat in a secure way

Doing malware analysis yourself is pretty hard - malware is often designed so that it can't easily be reverse engineered. Your best bet is searching for the VirusTotal results - unfortunately, there may not be any definite information on what your specific malware does exactly. Also, if malware connects back to a server and downloads additional pieces, it might be impossible to tell, as those pieces could change at any time, or depending on the specific target.

  Do previewing and extracting the archive impose any security risk

Unlikely, but possibly. Most run-of-the-mill malware relies on the user actively executing a file that contains code. There are several common ways to do that:

The simplest way is to just provide a .exe. There are some ways to hide the file extension so that it seems less suspicious (Windows has a bad habit of just hiding them)
Using a less-known file format, like .bat or .vbs, that are executable files too
By embedding macros in a Word document (or similar format). If you were to open such a document, Word would ask you if you wanted to execute the unsafe macro contents. Many users are trained to click "yes" on such a prompt, which would lead to executing the malware.

Likely, the encrypted zip is just a way of hiding the malicious contents from automated scanners that might detect a known malware.

But there is another possibility: the Malware might contain an actual exploit for a weakness in the software that you are running. That might be a known vulnerability relying on you using an outdated version (more likely) or even an undiscovered "zero-day" vulnerability (less likely). In that case, just viewing a "harmless" format like a .zip might lead to system compromise (although targeting a much more complex format like .docx or .pdf using a document inside the zip that would have to be opened is probably much more likely).

In any case, using a VM was definitely the safe choice - just make sure to not connect it to the Internet and dispose of it afterwards. By contacting your security department about it you definitely did the right thing - they might have the resources to further analyze the threat, or at least block those specific mails from going through.


How is an ATM secure? I'm curious why an ATM computer is considered secure.  The general adage of "If an attacker has physical access to my machine, all bets are off," seems to not apply in this circumstance (since everyone has physical access to the machine).  Why is this?

I thought of the fact that many have security cameras placed over them, but this doesn't seem sufficient to keep ATMs secure, as there is no one constantly watching the camera feed and looking for suspicious behavior.  The most this could be used for is identifying an attacker after an attack has been attempted.  It seems like this is fairly easily solved through plain clothes, a mask, gloves, etc.

So if this alone isn't or shouldn't be enough of a deterrent, why do we not see ATMs getting hacked for all their cash at 4:00am?  What makes the device so secure?  Is it just a simple risk-reward analysis, where the cash in the ATM isn't worth the effort of the hack?  Or is there more to it which makes the computer secure?

Also, I noted that there have been a couple questions about ATM security (like this one and this one), but mine is about the physical security of the machine, since it violates a common security principle, not anything network related.

I think the assumption here is wrong.  They don't have physical access to the machine.  They have supervised access to a very limited control panel for a machine which is built into a bomb-proof safe, bolted to the ground and hooked up to an alarm system with an armed response force.

Get the machine out of the vault and away from supervision and then yes... all bets are off.


Accidently opened a phishing email, is my computer infected by malware? I was looking through my unread emails when I accidently opened a Paypal phishing one. I thought it was legit because I saw in the preview it was from "Service-Intl@Paypal.com", but I got some doubt after noticing the email was full of grammar mistakes and was using shorted links. Looked at some legit Paypal emails I received and those were from "service@intl.paypal.com". So, I definitively opened a phishing email.

I'm really paranoïd about computer security. I usually use virtual machines to surf the web and open such emails on my daily driver OS, but that time I made the mistake and opened that email directly on.

I know that phishing goals aren't usually to infect computers with malware, but now I feel a bit insecure since I usually don't open emails from unknown senders.

I did a drive image, redeployed it on another computer then run MalwareBytes, SpyBot Search & Destroy as well as a McAfee Antivirus scan. Nothing suspicious was found. Drive image was to avoid installing all those antivirus softwares on my daily driver OS since they usually leave some unwanted files or registry entries after uninstalling.

I grabbed a copy of the phishing email (.eml) to inspect it, there was some links like "paypal=objects.com/digitalassets...", few "t.co" shortened URLs (which would actually redirect to the phishing site) and some links from MailChimp, such as "gallery.mailchimp.com/...". Opened the "t.co" links in a virtual machine, currently broken. Note that the email was been in my mailbox since this January, so links were probably flagged way before I opened that email. Some screenshots of that phishing email are in attachment to that question.

Automatic picture download as well as email preview were turned on. I'm using Windows 10 Mail App.

Considering all of this, should I format my hard drive then completely reinstall my daily driver Windows to be sure I'm safe from malware which could come from opening that email (without clicking links on) ? Or that doesn't worth it ?

My configuration is :
Windows 10 (with all updates),
Windows 10 Mail App,
Windows Defender

You are most likely safe. As you said, the objective of those phishing emails is to trick you into believing their website/email is legit so you interact with them and give them your data. The chances of them injecting malware on your computer that can run without being executed and not being picked up by all those AV solutions that you used are minimal.

That being said, the real problem here is your options. You can not claim to care and worry about computer security and have your email auto load remote content. You should turn it off immediately. Most email attacks, other than phishing, rely on 3 things that you are absolutely under control.

Do not download files that you are not certain about.
Do not auto load remote content.
Do not display emails as original html. Go with either plain text or simple html at least.


Security Appliance Key Generation For devices like decrypting HTTPS proxies, there is often a built-in mechanism for generating a key-pair and CSR.  An admin can then have their in-house authority sign the CSR with a subordinate CA template, and bind the certificate to the CSR in the appliance.  In this case, the private key doesn't leave the appliance (and generally cannot be exported).

The same appliances often provide an option to upload an encrypted private key and certificate.  In this scenario, the admin would use (for example) OpenSSL to generate the key and CSR on a separate machine, procure the certificate, and then upload them.  The advantages in that case are the ability to store the private key for backup, potentially to specify longer key lengths, and add additional information to the CSR that may not be available in the generation wizard on the appliance.  This of course assumes a solid key escrow/backup process.

My question is: Assuming there is a hardened, dedicated, offline machine (or "vault") for generating the key and CSR, which is the preferred method?  From a security best-practice perspective, should the key be generated on the target appliance using the wizard, or the dedicated "OpenSSL" machine?

Generally you should generate key pairs on the device itself. That way your key stays at the location it is used for, minimizing the possibility to attack. Besides that, you can be certain that the certificate is compatible with the protocol. Certificates follow a well established standardized protocol (X509v3) but there certainly will still be implementation differences, if just because of the complexity of the data structure.

There is generally no need to backup . If the key is lost you can simply regenerate a new set of key pair -> CSR -> certificate. This is because you generally trust a higher level certificate than the root certificate. For a professional setup I would certainly not go for a self signed certificate (a certificate chain of length 1). One reason for distributing a certificate would be a load balancing cluster in which you want to reuse the key / certificate - it that is not taken care for automatically.

If you really require special certificate details (a specific name, key size etc.) then you could import the key / certificate using a PKCS#12 key store or similar. However please remember that preciously few people will actually look at the certificates. You're the person securing the infrastructure, after all.

I'd spend most of the time thinking about accessibility of the certificates and of course the validity period of your certificates. It seems you try and follow good crypto practices for this part of the setup. Time to think about the other parts. Generally time spend splitting hairs means that other parts of the system are forgotten.


Is there a security risk using bluetooth computer speakers? I need to get new computer speakers/subwoofer and bluetooth speakers sound great since they would decrease the amount of wires around my desk. Is there a security risk having bluetooth enabled all the time or anytime I would use speakers? I'll stick with wires if there's any unnecessary risk.

Thanks

Yes, enabling Bluetooth will increase your attack surface.  If you do not have Bluetooth enabled, you close a whole series of possible attacks.  There was a series of vulnerabilities disclosed recently which highlight the risk of having Bluetooth enabled.


Does IPSec use IKE or ISAKMP? Does the IPSec protocol suite use IKE or ISAKMP?
RFC 2828 states ISAKMP is the protocol used in IPSec to handle SAs, key management and system authentication. Other sources say IKE is the protocol that used.
From RFC 2828:

$ Internet Security Association and Key Management Protocol (ISAKMP)
(I) An Internet IPsec protocol [R2408] to negotiate, establish, modify, and delete security associations, and to exchange key generation and authentication data, independent of the details of any specific key generation technique, key establishment protocol,encryption algorithm, or authentication mechanism.

Let's clear up some confusion here first. Internet Key Exchange (IKE) is a hybrid protocol, it consists of 3 "protocols"

ISAKMP: It's not a key exchange protocol per se, it's a framework on which key exchange protocols operate.
Oakley: Describes the "modes" of key exchange (e.g. perfect
forward secrecy for keys, identity protection, and authentication)
SKEME: Provides support for public-key-based key exchange, key distribution centres, and manual installation, it also outlines methods of secure and fast key refreshment.

So yes, IPSec does use IKE, but ISAKMP is part of IKE.


Startup PIN security considerations for BitLocker I plan to implement Bitlocker encryption on my devices, but I wonder how to achieve the highest possible security against offline attacks.

I understood the following:

I can enable TPM based protection only, which ensures that the drive is encrypted by a key, which is encrypted by the key in the TPM chip
I could add a Startup PIN.

Does this key combine with the key stored in the TPM chip? Clearly having this startup PIN is not enough to decrypt the disk? I would assume so, but I'm unsure...

The same would be interesting for smartcard-authentication. Is there still a second part used from the TPM chip?

In all cases where multiple components are used for BitLocker, there is the possibility of them all being required, and this tends to be the default. This means that combinations of TPM and PIN or TPM and physical key contribute to the composite key used to protect the drive encryption key.

Therefore, unless you specified otherwise (there is a possibility for having just TPM while domain joined, and TPM+PIN if disconnected), you would need either both the TPM and the PIN to be provided, or the full recovery key to be provided, to be able to decrypt the drive. Each of these allows for the decryption of the drive encryption key, which is then used to decrypt the actual data on the drive.


How to find vulnerable PHP parameter such as `.php?id=` as found in Kioptrix 3? This is part of my preparation for OSCP.

According to https://www.vulnhub.com/entry/kioptrix-level-12-3,24/, Kioptrix 3 is vulnerable to SQL Injection.

However, I found that SQLi challenge on Kioptrix 3 is a little bit tricky as the gallery.php?id= parameter is quite "hidden".

http://kioptrix3.com/gallery/gallery.php?id=1&sort=photoid#photos

I've been browing manually and with burp suite, scan it with dirb, but did not see this (Photo id) as shown in the image below untill I read walk through from yeahhub.

Is there any tips to search vulnerable url like this?

I'm not sure what you mean by "it is hidden". Monitoring/testing application routes and parameters should be a focus point in any assessment, plus it's right there in the URL.

You can discover/log URLs/links by browsing the site manually while using Burp Suite, or the "spider" feature, both of which should log all visited links under the "target" tab.

As far as determining if it is "vulnerable", that may take some further investigation. Parameters like that aren't inherently vulnerable, but their existence in CTF problems often signals a SQL injection problem. To determine whether an actual issue exists, you can test it manually or use a tool like sqlmap, which will test all parameters and find vulnerable ones.


Proxying MetaSploit through BurpSuite I was wondering how I would be able to proxy MetaSploit through BurpSuite.

I was to reverse engineer a packet being sent to my ChromeCast, but I have no way of viewing the packet.

Thanks.

Use the PROXIES environment variable (while in msfconsole) :
set PROXIES HTTP:127.0.0.1:8080

Or run Metalsploit with proxychains (config at /etc/proxychains.conf) http://proxychains.sourceforge.net
Notice that using burp is not helpful to inspect protocols other than http.


How can Process Hacker view my password manager's memory without administrative rights? I use Process Hacker as a replacement for Window's Task Manager on my computer.

While looking at the various information available about a selected process, I found the Memory tab. I figured this was a just list of memory locations in use by the selected process, however I noticed the Strings button which searches for strings in memory and was very surprised to find that when searching for strings in memory locations used by KeePassX entries, usernames and passwords show in plain text.

How is it possible for Process Hacker - running with "Limited" elevation (as reported by itself) - to access the memory of another process? I assumed processes could only access memory assigned to them by the operating system and that accessing another process's memory would cause an access violation error.

Process Hacker's optional service has not been installed.

Per its documentation, Process Hacker actually launches a kernel mode driver, KProcessHacker. A kernel mode driver does have access to all memory.

Sources:

https://github.com/processhacker2/processhacker2#kprocesshacker

https://docs.microsoft.com/en-us/windows-hardware/drivers/gettingstarted/user-mode-and-kernel-mode


If PGP is 2048 or 4098, then what is 128-bit encryption? PGP is 2048 bit encryption?
That a whole lot more than 128 bits.
But, I thought 128 bits is more "serious" and "legit"

There are two different concepts at play here:

Key Size is the size of a key on disk, measured in bits. For RSA encryption you tend to see key sizes like 2048 bit, 4096 bit, etc. For Elliptic Curve Cryptography (ECC), you tend to see key sized like 224 bit, 256 bit, 384 bit etc. For AES, 128 bit, 256 bit.

Key Strength is a measure of how much computation an attacker needs to do to break your key (ie compute the private key from the public key). In crypto research papers you tend to see sentences like this:

  Breaking an RSA 2048 key requires, on average, 2112 operations.

This key is said to have "112-bit security".

Symmetric block ciphers like AES tend to have the property that the key length is the same as their security level (note that this will no longer be true once quantum computers are here). Here is a table from NIST that shows relative security levels for various RSA and ECC key sizes.

Of course, as mathematical research progresses and we find more efficient ways of attacking the underlying math, the number of bits of security provided by your 2048-bit key will go down.

Why 128-bit security?

For an intuition on how long it would take you to make 2128 guesses at something, check out this youtube video:

How secure is 256 bit security?

Cryptographers like things that have >= 128-bit security because it's comfortably in the "not in my lifetime" category. When something gets below 80 bits of security we start looking for something bigger to replace it with.


Is giving out login information to a read-only mysql database to the public a security threat? I was looking to give out login information to a read-only mysql database (via phpmyadmin) to the public (the users of my program) to use for reference purposes on a production environment. Would I be risking anything on my side by doing so (assuming all privileges were locked down and the users could literally only read the database)?

Data like: License Validation (Verifying if a user has a license key purchased and if they do remove Copyright Footer) and Data Like: Chargeback or Fradulent Paypal User Emails

My only main concern is having the whole server compromised just because someone knows a username or password for the actual read-only database.

Yes, of course is a potential security threat.  MySQL can always have a vulnerability in it, perhaps something like CVE-2003-0150  MySQL Root Privilege Escalation Vulnerability from many years ago.

New flaws can be introduced with any update, and old flaws can be discovered at any time.

Just because you ask MySQL not to let the user run or create anything doesn't mean MySQL is perfectly effective at doing so at all times and after each update.

And, naturally, if then can execute SELECTs, they can execute SELECT with a cartesian product large enough to choke your server completely via IO and/or CPU load, or use up as much of network bandwidth as they can obtain.

This is not even counting possible fun with transaction isolation level to try and cause locking and deadlocks.  Watch out for temporary tables as well, of course.


Generating and securing gift card codes I'm working for a company that is generating gift card codes which can be used to pay for goods on online stores.
I'm wondering what the most secure way of generating these gift card codes are. The length needs to be 16 characters (though that is negotiable) and can be alphanumeric (though numeric would be more customer friendly).
From what I can see, the most secure way to do this is generate a gift card code of a specific length with the following Java code:
static final String AB = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
static SecureRandom rnd = new SecureRandom();

String randomString( int len ){
   StringBuilder sb = new StringBuilder( len );
   for( int i = 0; i < len; i++ )
      sb.append( AB.charAt( rnd.nextInt(AB.length()) ) );
   return sb.toString();
}

This is taken from the Stack Overflow answer here. I removed the lowercase letters from the string to make it more user friendly. So this produces 36 ^ 16 combinations. Numeric alone would be 10 ^ 16 combinations. I believe numeric alone would be enough but it's often stressed that, given the increasing prevalence of gift card fraud, the string should be alphanumeric. So that's question one: numeric or alphanumeric?
When users use the gift cards on an online store to pay for goods, a call is made to our API which returns the balance and currency for that gift card. Given that the gift card codes are entered on 3rd party servers, these gift cards are now available to people with access to those servers. This is obviously a problem in the case where there is still a balance left after a user has partially redeemed one.
One option would be to, when the call to our API is made (with the gift card code) to get the balance, we return and save on their store a random string which can only be used by the online store when they are billing us - we will match that with the gift card code on our system. The problem with that is presumably the gift card code the user enters on checkout gets logged somewhere in their logs, and is accessible to anyone with access to those logs.
Another option is that we refresh the gift card code after it is partially redeemed. So the user essentially gets issued with a new gift card code for the balance and the previous one is cancelled. This is probably the most secure, but not that user friendly. So that's the second question: how do we secure gift card codes that are only partially redeemed and still have value left on them?
EDIT:
We also have a Check Balance page where a user enters a gift card code and the currency and balance are returned. This presumably creates some additional security concerns.

To prevent fraud, you need a sufficiently low probability of the attacker guessing any valid code.
For 1 million cards, a 10^16 code will be guessed on the average each 10^10 attempts. If your site is completely secure and your API is brute force resistant, numeric should suffice to keep that approach to fraud not cost-effective.

But it's very brittle security, and the hashing protection below will be easy to crack in a database leak with such a small keyspace. IOW, an attacker with access to your DB will be able to brute-force a lot of valid codes. An alphanumeric code will provide more robust security. You can also compromise using a pattern for user-friendliness.

Since in your system the code is effectively both a login and a password, to reduce their leakage you need to change the communication protocol to eliminate transmission and storage of plaintext codes.

The simplest protocol for that would be to store Salt1 and SaltHash1=hash(Code+Salt1), then transmit Salt1 to the client, create Salt2 at the client, generate hash(hash(Code+Salt1)+Salt2) client-side and check it against hash(SaltHash1+Salt2).

That remains vulnerable if your database is compromised, as the attacker only really needs a list of valid SaltHash1 to make purchases through your API. It's also slow as you have to hash all valid codes to check one.

To make it more robust, you can rather transform all the codes with a PBKDF like Argon2id, which is a slow and irreversible function, and only store the result. Using a slow function ensures an attacker with a leaked database cannot easily brute-force all 10^16 codes to find all that fit and simulate a legit user. You still have to trust the stores not to store the code and enforce HSTS (https-only) connections.

It's impossible to make this system secure against a rogue store that logs user input - if they have the complete code, they by definition own the card. The only defense is to only permit code redemption through a form loaded directly from your server (it can be embedded in a third-party page). If you do that, no one but the user and your PBKDF ever sees the code; the store just gets your validation response.


How safe is password based key derivation in the case of long password? I am encrypting files inside a device and store it. So I need to maintain the same key throughout the life cycle of the device. For key derivation I use EVP_bytestokey() of OpenSSL.

The problem in password based key derivation (PBKD) is that the attacker can guess the password if that password is from user. But in my case I am using some long system based number (not from user) as a passphrase. Is this a right way?

Does modifying the encryption key in my code (say like left shifting or right shifting the key) help in security?

How about storing the salt in the code (hard coding)?

The problem in password based key derivation (PBKD) is that the attacker can guess the password if that password is from user. But in my case I am using some long system based number (not from user) as a passphrase. Is this a right way?

A password is "a secret key that fits in the user's brain". The main attribute of a secret key is its secrecy, which is a measure of how much attackers don't know it. Generally speaking, attackers are (assumed to be) super-smart, so the only thing they do not know is pure randomness.

The main problem with passwords is that human brains are not good at storing randomness (they are also very poor at producing randomness). This is what makes passwords weak: attackers can try to find the password through "guessing", which basically means trying out all combinations of human-compatible randomness.

PBKDF2, like other password-hashing functions, is meant to make the weakness of passwords more tolerable, by making each guess more expensive (for both the attacker and the normal user).

If, in your application, the password is not really entered by a user but by a machine, then you can use a "password" with a lot of randomness (machines are much better than humans at remembering long sequences of random numbers), at which point password hashing may become quite useless.

  Does modifying the encryption key in my code (say like left shifting or right shifting the key) help in security?

It helps about as much as dancing with a teapot on your head while chanting the glory of Huitzilopochtli will help you guess the next winning lottery numbers.

(If Huitzilopochtli is really amused by your ritual, he may grant you some benefits, but he is not really known for his sense of humour.)

  How about storing the salt in the code (hard coding)?

The salt makes sense in conjunction with password hashing: it is one of the methods by which passwords (which are inherently weak, see above) can be tolerated. If your "passwords" are not really passwords, then password hashing and salt are irrelevant.

Conversely, when a salt is relevant, then its main and only point is never to be reused -- hardcoding the salt in the code does the exact opposite.

Thus, one can say that hardcoding a salt value is either a bad idea, or a very bad idea, depending on the context.


Is it considered a CSRF if it requires a unique identifier which is not a CSRF token - not tied to the user session? Consider an end point such as below. Let's imagine that this endpoint updates an address of the signed in user, changing the zip code. The address to update is identified by the address ID (kUj3Nkg10).

http://example.com/address-update/kUj3Nkg10/?zipCode=1234

Importantly, the identifier is an alphanumeric string, not an incremental integer. If it was an incremental integer, then it feasibly could be predicted. The alphanumeric can't reasonably be predicted or guessed.

To clarify, in the example, the address ID was randomaly generated, but once it exists, it never changes. The ID is not based on any specific user or address data.

Also, an address update is just one example, it doesn't really matter what the request actually does. It could be updating a phone number, or removing an email address. The key is that this alphanumeric is used to identify the entity and that no CSRF token is present.

Argument for considering it a CSRF

A CRSF token only lives and remains valid for the current session (or possibly even shorter). The unique ID in question remains the same (probably forever). Therefore a CSRF token should be used. It's possible that the identifier could be used elsewhere in the app, and made available for another user to see.

Argument for not considering it a CSRF

The attacker is unlikely to ever obtain the unique ID. It could be close to being as difficult to obtaining an actual CSRF token itself.

OWASP defines a CSRF as:

  Any application that accepts HTTP requests from an authenticated user without having some control to verify that the HTTP request is unique to the user's session.

I think the above example satisfies the OWASP definition, because the address ID is not unique to the user's session.

OWASP reference

There are CSRF prevention techniques that do not rely upon a session-bound CSRF token,  after all there is more than on way to skin a cat.  When considering a CSRF protection system,  look for any shortcut that doesn't exist with the commonly used CSRF synchronization token pattern. There are three concerns with this proposed CSRF protection system.

Expiration - CSRF is also called "session riding",  in some sense a CSRF token is a lot like a session id,  most importantly they both must expire.  The concern is that an attacker is permitted to guess the exact value of the CSRF token over an unlimited period of time.

Recovery from attack -  XSS can be used to obtain any value on any page using an XMLHTTPRequest(),  which includes CSRF tokens.  Once the attacker has the CSRF token, they are permitted ride on the victim's session indefinitely,  because it never expires.

Referer Information leakage - Sending the CSRF token in the URL is risky behavior.  If at any point an attacker can control the href of an <a> tag or the src of an <img> tag, then an attacker can force browsers into loading content from a web server controlled by the attacker,  thus allowing the attacker to log the HTTP referer,  which will contain the CSRF token of the victim.


Generate Rule using John the Ripper I'm new in it, so can you help me to generate following rule.
It should match less then 6 lowercase, uppercase or digital character and than have word password.
For example

  applepassword
  Homepassword
  dog1password

I decided make it in three lines. So, for lower case I'm trying this

[List.Rules:Pass]
   /?l <6 password

But it is not working

Thank you in advance.

I found answer

[List.Rules:Pass]
   /?l <6$p$a$s$s$w$o$r$d


MasterCard wants to replace passwords with selfies; how does this improve security? MasterCard is aiming to replace passwords with selfies. Link 1 Link 2 Link 3

  The Identity Check Mobile application will allow customers to complete purchases without the need to enter a password or PIN, measures the company hopes will make them more likely to complete purchases as well as improving security.

How exactly does this improve security? For example, this question suggests that facial recognition is not very secure.

MasterCard states their facial recognition application is more secure than passwords. How have they achieved that?

As I made clear in my answer to the linked question, I am not a fan of biometrics, and I think that current research agrees with me that especially face recognition is a poor authentication mechanism.

That being said, passwords have their problems too. Users are quite bad at choosing good passwords, users reuse passwords, and users write passwords on paper or in textfiles. The first problem may be mitigated with password rules, but password rules may also make it worse. The other problems can only be mitigated by educating users, which is expensive and error-prone.

These problems do not exist with biometrics. The security is completely in your hands, there is no way for the user to screw up.

As stated in the press release, the new feature is linked to an app, so it is fair to assume that the authentication mechanism is based on two factors (what you have - your phone - and what you are - your face - ).

Because the process uses 2FA, using biometrics may be secure enough. While it may seem that banking should be more secure than other transactions, historically, they were rather weak (4 digit pins for cards, passwords limited to 8 chars or less, and so on). Any security breaches were handled differently (transactions reversed, etc). The talk about "improving security" is likely just marketing.


How do I clearly distinguish between groups of formal and informal models? I'm currently studying for the CISSP exam and would like to ensure that I'm using proper terminology when referring to models.  I'm a little confused because I'm coming across generic and specific labels; all of which seem to be referred to as "models".

For example, there are terms like Information Flow, State Machine, Non-Interference.  Likewise, there are terms like Bell LaPadula and BIBA.  Are these all referred to as  "models"? Or is there a term used for the official/formal models?

Information flow, state machines and non-interference are more like 'theoretical concepts'.

You can say that the Bell LaPadula model is an implementation of an information flow concept and BIBA is a model build on a state machine concept.

I don't know if this helps.


Does KRACK mean that wifi cafes will never be safe again? The more I read about KRACK, the more granular my questions become, and the harder it is to find answers.

My understanding is that both wireless clients and WAPs need to be patched to obviate the KRACK vulnerability in any particular wifi handshake. But there's some nuance to this (c.f. To sufficiently protect against KRACK is patching the client, the AP, or both, required?).

So if the client is patched, what if you don't know whether the WAP is or isn't? Doesn't this mean that one can never trust anonymous wifi cafes again, since there's no way to know whether they've patched their WAPs?

Does KRACK mean that wifi cafes will never be safe again?

This is based on the false assumption that Wi-Fi cafes were ever safe. That is simply a false assumption.

  So if the client is patched, what if you don't know whether the WAP is or isn't? Doesn't this mean that one can never trust anonymous wifi cafes again, since there's no way to know whether they've patched their WAPs?

Public Wi-Fi is often open (i.e. no encryption) or use a PSK that is distributed to all customers. Not saying there aren't some using WPA2-Enterprise, but I personally haven't seen any.

KRACK creates an opportunity to determine the WPA/WPA2 PTK/GTK so traffic can be decrypted and possibly manipulated by an attacker. If your client is patched, this will significantly limit what the attacker can see or do.

With Open Wi-Fi you have no encryption. With PSK (where the attacker also knows the PSK and can capture the 4-way handshake), you don't have reliable encryption because anyone around has the capability to decrypt your traffic. Either case presents an easy opportunity for an attacker to create a MitM situation. In other words, you are already totally exposed and are not safe in any sense; all before KRACK was ever found or publicized.

The only way that KRACK might make such public Wi-Fi more vulnerable is if the site is using WPA2-Enterprise (i.e. setting up usernames/passwords for clients). But if a site is putting that much effort into providing secure access for customers, then odds are good they will put the effort into patching it as well.

End result though is still the same. Public Wi-Fi shouldn't be considered safe.


Why OpenSSH had so many security vulnerabilities? Looking at the CVE security vulnerabilities statistics of OpenSSH server (http://www.cvedetails.com/product/585/Openbsd-Openssh.html?vendor_id=97), I'm wondering why OpenSSH had so many bugs than other SSH server like Tectia (https://www.cvedetails.com/product/3377/SSH-Tectia-Server.html?vendor_id=120).
Is it only because of OpenSSH is free and open-source?

Found bugs for OpenSSH will have larger impact as it is the most popular SSH implementation nowadays. On one side, it is useful as it means security professionals pay more attention to OpenSSH so that developers can update the system more often. As long as sysadmin always keep their software updated and patch them whenever there are known vulnerabilities, then it's good.


What should I do when my boss asks me to fabricate audit log data? My boss just asked me to create a fictitious log entry to say that a user's account was updated before it was, to win a dispute.

I feel this is not right because I am trying to start a career in working with data technology. Whether or not I get caught, the integrity of my data will be questionable, and my character compromised.

What would be the best way to handle this?

I have a far more professional company wanting to pick me up, and they are willing to hold the position for me until I finish the project at my current job. We are roughly a month out; should I cut and run now?

Sorry this is a little off topic, but I know some established professionals frequent here, and just need to know the best way to go about handling this with character.

  This question was IT Security Question of the Week.
  Read the Mar 30, 2012 blog entry for more details or submit your own Question of the Week.

Ask your boss to put the request in writing before you do it.

Make sure to keep a copy of the request in your own personal files. Ideally a paper copy at home, or maybe an email in your own personal email account.

You say that you already have a better job to go to, so just give your notice now and leave the company as soon as the notice period is up. Presumably you have a notice period? A contract of employment?

If you don't have a better job to go to, then find one as fast as you can.


Installed some software over a public insecure wireless network -- should I consider myself compromised? A couple months earlier, I made the mistake of downloading some software over an insecure wireless network and running it without checking its integrity. I am now considering reinstalling my system, as I am worried it might be compromised.

Should I consider myself compromised?

EDIT: Just to clarify: no credentials were transmitted over the network, except by means of HTTPS connections. The attack I am worried about is that the binaries I installed may have been tampered with. How likely is this? Would you reinstall in this situation?

There are a few critical details missing.

What OS were you using?

Many platforms provide or require code signing, but you don't tell us what platform you're using.

OSX will by default only run signed binaries. Windows displays the CN of the signing certificate if present (or something like that--I can't remember the precise behavior). iOS will only ever run signed binaries from the App Store unless jailbroken. Android is similar, except you can disable this. Many Linux package managers (like apt) use PGP signing to enforce signed package installation.

So if you're using such a system, you're probably safe.

What transport did you use to download the software? You seem to imply HTTP, but this is a somewhat critical detail.

VPN'ing to some machine in a shared datacenter, as suggested in a prior answer, seems like a poor way to mitigate your exposure to an untrusted wifi network--how do you determine that you trust the (still unencrypted) connection between the datacenter machine and the software repository? The only way you can really establish trust in what you download is code signing or fully end-to-end transport layer encryption.

On the other hand, reinstalling is probably a waste of time. The odds of someone serving backdoored software on any given wifi hotspot are quite small. I wouldn't lose sleep over it.


What goes into an average incident response process for a corporate network? I'm trying to brush up on the more process-orientated and policy-orientated side of security, and am interested in incident response. I understand that most security-competent businesses have some kind of basic security incident response process that governs how they deal with security incidents within their corporate network.

What elements need to be considered as part of a standard incident response process? Are there any specific areas that should be focused on, such as forensic integrity of evidence? Is this the sort of thing that varies wildly depending on the organisation and incident types, or are there a lot of common elements?

A basic set of processes should include the following high level categories:

Threat analysis - this should include all types of threats; natural disasters, terrorist attack, foreign espionage etc and should be reviewed annually to understand and prepare for likely incidents. These threats should be mapped to incidents and these mappings should feed into the development of incident response procedures. This is the key preparatory stage.
Classification of incidents - classification should be owned centrally, and should be the responsibility of the business. This classification should include impact and likelihood thresholds, along with escalation requirements. This will help determine how incidents are responded to, with what urgency, and with what sort of resolution expectations.
Operational procedures - communication and escalation procedures should be formalised and documented for each business unit. These need to include named individuals or teams, service levels, response times, and communication protocols within and outside the team and organisation. The teams involved will depend on classification of the incident, but each team will require operational procedures to meet standard requirements for communication, measurement, integrity and resilience.
Post incident review - post incident review should be formalised and mandatory for all incidents. This should include a complete impact assessment to help the organisation understand the incremental, long term and intangible costs of the incident.
Final closeout - closeout should include recording of incident resolution time and activities, as well as the comparison with the expected outcome so that improvement can be made.

I think, from the wording of the question, that you are most interested in the Operational Procedures section, so I'll drop down a level here:

Operational Procedures will include items like:

Retention of all information recorded by the incident team from the beginning of the incident to at least the closeout. Beyond that time, retention will be according to corporate or regulatory requirements.
Putting a hold on all log rotation - instead of following the normal log rotation cycle, logs dating back a defined amount (this may be an hour, a day or longer) will be made available to the investigation team.
As any incident could be a criminal incident, no matter what it first looks like (As an example, tectonic exfiltration - opportunistic theft of hardware occurred during the chaos caused by the earthquakes in New Zealand) the recording of data should be as complete as possible, and recorded to storage that is Write-Once, Read-Many if possible, and forensic rules should apply.
Identification of activities to rapidly remediate and get back to Business-as-Usual, as well as activities to fully investigate the root cause of the incident.
Internal and External incidents may be dealt with very differently (for example an employee who has stolen critical data may just be fired and walked off the site, but evidence that a competitor has been carrying out industrial espionage may be passed to the police, or may be quietly hidden - these decisions will have business outcomes so need to be discussed at the level of the Chief Risk Officer or equivalent)

Remember that every item or activity is a cost option, so we very rarely see all of these carried out. The first to go is usually the forensic recording of data or activities, as a business suffering a major incident may be losing money every minute the incident continues. The driver is likely to be getting back up to normal operating procedures first, followed by an investigation after the fact.

For a couple of specifics on Computer Security Incident Response, check out this IETF document and this CERT document.


Should I use the root account on my Digital Ocean server? I have set up an SSH key with Digital Ocean that is automatically added to any servers I create. Is it okay to use this root account for SFTP and daily use or should I create another user account and avoid using the root account?

It's generally advisable to not use the root user for everyday tasks, so I would recommend creating a different user account.


How do major sites prevent DDoS? As far as I know, I have never heard of or seen any large scale web sites like Amazon, Microsoft, Apple, Google, or Ebay ever suffer from DDoS. Have you?

I have a personal philosophy that the bigger you are, the more of a target you are for such attacks. Imagine the brownie points you would get if you could bring down a major website.

Yet, such sites have always remained sturdy and seemly invincible. What security measures have they implemented and can these be applied to smaller businesses?

They generally have a very layered approach. Here are some things I've either implemented or seen implemented at large organizations. To your specific question on smaller businesses you generally would find a 3rd party provider to protect you. Depending on your use case this may be a cloud provider, a CDN, a BGP routed solution, or a DNS-based solution.

Bandwidth Oversubscription - This one is fairly straightforward. As you grow larger, your bandwidth costs drop. Generally large organizations will lease a significantly larger capacity than they need to account for growth and DDoS attacks. If an attacker is unable to muster enough traffic to overwhelm this, a volumetric attack is generally ineffective.

Automated Mitigation - Many tools will monitor netflow data from routers and other data sources to determine a baseline for traffic. If traffic patterns step out of these zones, DDoS mitigation tools can attract the traffic to them using BGP or other mechanisms and filter out noise. They then pass the clean traffic further into the network. These tools can generally detect both volumetric attacks, and more insidious attacks such as slowloris.

Upstream Blackholing - There are ways to filter UDP traffic using router blackholing. I've seen situations where a business has no need to receive UDP traffic (i.e. NTP and DNS) to their infrastructure, so they have their transit providers blackhole all of this traffic. The largest volumetric attacks out there are generally reflected NTP or DNS amplification attacks.

Third Party Provider - Even many fairly large organizations fear that monster 300 Gbps attack. They often implement either a DNS-based redirect service or a BGP-based service to protect them in case they suffer a sustained attack. I would say CDN providers also fall under this umbrella, since they can help an organization stay online during an attack.

System Hardening - You can often configure both your operating system and your applications to be more resilient to application layer DDoS attacks. Things such as ensuring enough inodes on your Linux server to configuring the right number of Apache worker threads can help make it harder for an attacker to take down your service.


It is actually expected that they would all have the same MAC address - MAC addresses do not survive the hop from router to router, so what you are seeing is likely the MAC address of your ISP's router (the closest MAC to your router).


Why does the OAuth2 spec recommend that client credentials not be passed in the request body? The OAuth 2.0 spec states that when authenticating with a client password, you may pass the client_id and client_secret using either:

the Authorization header, using the HTTP Basic authentication scheme, OR;
the request body.

The spec recommends not using the request body, stating that this method should be limited to only those clients that are unable to use the HTTP Basic authentication scheme.

https://tools.ietf.org/html/rfc6749#section-2.3.1

What is the rationale for this recommendation?

Both methods are acceptable, most likely for compatibility with existing implementations at the time that either used one or the other.

However, only the HTTP Basic authentication was then made mandatory to implement by authorization servers so adding the additional recommendation to not use the optional one was probably intended as a way to get everyone using the same method.

In relation to why the decision pended to HTTP Basic and not the request-body I would say that the fact that the history of OAuth 2.0 includes ties to OAuth WRAP is a decisive factor.

As additional info:

  Use of the Authorization header is RECOMMENDED, since HTTP implementations are aware that Authorization headers have special security properties and may require special treatment in caches and logs.

(source: OAuth Web Resource Authorization Profiles (OAuth WRAP))

  Authorization headers are recognized and specially treated by HTTP
  proxies and servers.  Thus, the usage of such headers for sending
  access tokens to resource servers reduces the likelihood of leakage
  or unintended storage of authenticated requests in general, and
  especially Authorization headers.

(source: OAuth 2.0 Threat Model and Security Considerations (RFC 6819))


Is there a generic list of IT Risks that can be used as a reference to prepare an IT Risk Assessment report? I am working on my first IT Risk Assessment assignment and even though I have the steps required and understanding of the system I am working on, I was wondering if there was a list of generic IT Risk associated with Different IT Systems. That is because one does not have to start from scratch for every assessment he starts. Given that IT Risk Assessments have been conducted for a long time now it is only logical that there must be a list compiled by someone by now that can be used as a reference. For example, if I am working on a client server type of application assessment, I can refer to all risks associated with the client and the server.

Searching google did not result in any result I was interested in but I could be searching the wrong term. I would be grateful if someone could refer me to such a resource.

Thank you.

As you suspect, this is an issue of terminology. You're probably looking for lists of vulnerabilities, but to be safe I'd like to explain a little bit more.

I'm afraid the whole thing is rather complicated, but worth it in the end!

Before I begin, I should point out there are many different approaches to Information Security that may have their own terminology (I'm an ISO 27000 man myself.) So other answers may use different wording.

So, you have your system that you are working on, and you want to protect it from harm - that's what Information Security is, the systematic protection of information from harm.

For harm to happen, there have to be two things. A "threat", which is someone who will cause harm (either deliberately or by accident), and a "vulnerability" which is a way that the threat can do harm.

Two examples:
Your competitor ("threat") accesses your system via SQL injection ("vulnerability") in order to steal your customer list ("harm" - specifically a "loss of confidentiality")

Joe in shipping ("threat") can't figure out how your system works ("vulnerability") and always puts in the wrong value for widget crank setting. ("harm" - specifically "loss of integrity").

You can find lists of threats and lists of vulnerabilities online.

Threats tend to be easier to figure out yourself though - who might realistically want to harm your system? Who might accidentally harm your system?

So mostly you find lists of vulnerabilities. The OWASP top ten is a great place to start.

Where does risk come into this, then? Risk is a measurement that combines the likelihood of a threat exploiting a vulnerability with the harm that would come about if they did.

Risk assessment is used to figure out which threat and vulnerability combinations have a risk higher than you want to accept, so you know that you need to "treat" them - do something about them.

For example, if your competitors are all honest, and you are carefully handling your SQL input, and everyone knows who your customers are anyway, then the risk in example one is very low and so not worth worrying about. (Well, not worth spending money on, at least.)

Alternatively, if Joe is careless and the wrong widget crank setting will make your product catch fire, then the risk is high, and you need to do something about Example 2 ASAP.

Here's the thing though - each risk assessment is pretty much unique because the threats and vulnerabilities you face are in a unique combination. Something like the OWASP list is not a short-cut. It's more a list of things you should check to make sure you haven't missed any of them.


Was my phpMyAdmin hacked? On a server of mine I have a current version of phpMyAdmin running. Unfortunately (my bad I knew I had to delete this folder for security after installation, I simply forgot... dangit) I still had the setup folder still in the phpMyAdmin's root directory, so anybody who accessed my server with http://example.com/phpMyAdmin/setup.php had access to the setup site.

Today I found this in my nginx access.log files (excerpt):

SOMEBADIP - - [02/Mar/2016:21:03:22 +0100] "GET //phpMyAdmin-3.1.1.0-all-languages/scripts/setup.php HTTP/1.1" 301 185 "-" "-"
SOMEBADIP - - [02/Mar/2016:21:03:22 +0100] "GET //phpMyAdmin-3.0.1.0/scripts/setup.php HTTP/1.1" 301 185 "-" "-"
SOMEBADIP - - [02/Mar/2016:21:03:22 +0100] "GET //phpMyAdmin-3.1.2.0/scripts/setup.php HTTP/1.1" 301 185 "-" "-"
SOMEBADIP - - [02/Mar/2016:21:03:22 +0100] "GET //phpMyAdmin-3.1.2.0-english/scripts/setup.php HTTP/1.1" 301 185 "-" "-"
SOMEBADIP - - [02/Mar/2016:21:03:22 +0100] "GET //phpMyAdmin2/scripts/setup.php HTTP/1.1" 301 185 "-" "-"
SOMEBADIP - - [02/Mar/2016:21:03:22 +0100] "GET //phpMyAdmin-3.1.2.0-all-languages/scripts/setup.php HTTP/1.1" 301 185 "-" "-"
SOMEBADIP - - [02/Mar/2016:21:03:22 +0100] "GET //phpMyAdmin-3.1.0.0/scripts/setup.php HTTP/1.1" 301 185 "-" "-"
SOMEBADIP - - [02/Mar/2016:21:03:22 +0100] "GET //phpMyAdmin3/scripts/setup.php HTTP/1.1" 301 185 "-" "-"
SOMEBADIP - - [02/Mar/2016:21:03:22 +0100] "GET //phpMyAdmin-2/scripts/setup.php HTTP/1.1" 301 185 "-" "-"
SOMEBADIP - - [02/Mar/2016:21:03:22 +0100] "GET //phpMyAdmin-3.0.1.0-english/scripts/setup.php HTTP/1.1" 301 185 "-" "-"
SOMEBADIP - - [02/Mar/2016:21:03:22 +0100] "GET //phpMyAdmin-2.9.2/scripts/setup.php HTTP/1.1" 301 185 "-" "-"
SOMEBADIP - - [02/Mar/2016:21:03:22 +0100] "GET //phpMyAdmin-3.0.0.0-all-languages/scripts/setup.php HTTP/1.1" 301 185 "-" "-"
SOMEBADIP - - [04/Mar/2016:05:02:58 +0100] "GET //phpMyAdmin/scripts/setup.php HTTP/1.1" 301 185 "-" "-"
SOMEBADIP - - [26/Feb/2016:10:10:58 +0100] "GET /phpMyAdmin/scripts/setup.php HTTP/1.1" 301 185 "-" "ZmEu"

This looks like the attacker used a script, to scan my main domain for the folders listed above. What I don't understand is, why does he use // rather than / because http://example.com//phpMyAdmin/setup.php would directly end in an invalid path / redirection.

Second of all I was using a subdomain for phpMyAdmin, no folder structure which renders this attack completely useless because there is no such folder structure on my server that the attacker's script tried to find.

What I am currently wondering is, what could potentially happen if a attacker has success with such an attack on phpMyAdmin? What could he do with it?

Those log entries look like normal scanning activity.

You can also notice that the scanner did not target your setup specifically, because multiple versions and directories are tried. And as you said, none of those actually exist in your setup.

  What I don't understand is, why does he use // rather than /

That's likely a bug in their scanning software (eg resulting from having a list of URLs, some of which have trailing slashes, and having a list of paths to scan, some of which have leading slashes).

They may not have noticed it, as it doesn't matter in many cases, as // is interpreted as / by many setups.

  What I am currently wondering is, what could potentially happen if a attacker has success with such an attack on phpMyAdmin? What could he do with it?

That really depends on the version. Here is an overview over some vulnerabilities in phpmyadmin. Note for example that the setup script was vulnerable to code execution in previous versions.

  I still had the setup folder still in the phpMyAdmin's root directory

Removing install folders is always a good idea, as the scripts are no longer needed and just provide an additional attack surface. Additionally, some developers don't bother coding them securely, as they could instead suggest that users delete them.

Still, phpmyadmin should be secure even if the script is not deleted (although looking at the list of fixed vulnerabilities, you can see that that was at least not always the case in the past). It's more important that you have a current version.

  Was my phpMyAdmin hacked?

We really can't tell you that with just the info you provided. The logs definitely do not tell us that, as they are just normal background noise.


Can session data be manipulated without access to source code When implementing a web-based application, how secure are any session variables against manual manipulation beyond the scope of my code?

i.e. when a user is authenticated, if I were to initialise a session variable authenticated as true I am then able to perform a simple boolean check against the session, and the user's authenticated status, prior to performing any sensitive operation.

However, would it be possible for me to initialise a session variable authenticated and set this to true without actually passing a security check? Essentially, could somebody fool my app in to thinking the user was authenticated, when in fact they aren't?

yes, trivially.  If I understood correctly the session variable will be at points sent back from client-side?

Have a go with tamperdata.


HTTP Host Header redirect traffic Recently, I've seen periodic floods of traffic to my web servers with various Host headers that do not belong to us. The traffic appears to come primarily from China and a decent number seem to think we're a BitTorrent tracker. They come from a wide variety of IPs and User Agents.

Example BitTorrent tracker request (anonymized):

GET /announce?info_hash=%B8%86%E1hJ%A7%1Dm%AAvL%0F%CF%F3%F7%03%95%A8%AB%AF&peer_id=%2D5F21100%2D%04%0DA%DE%3D%D9f%A4%0Aw%A7%2A&ip=112.84.xxx.xxx&port=13777&uploaded=1150728262&downloaded=1150728262&left=2292077&numwant=200&key=937&compact=1 HTTP/1.0
Host: open.tracker.thepiratebay.org
User-Agent: Bittorrent
Accept: */*
Connection: closed
X-Forwarded-Proto: http
X-Forwarded-For: 112.84.xxx.xxx

Example TypeKit image ping request:

GET /p.gif?s=1&k=yoe7ink&ht=sh&h=get.adobe.com&f=7180.7181.7182.7184&a=204670&_=1422582942577 HTTP/1.1
Host: p.typekit.net
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:35.0) Gecko/20100101 Firefox/35.0
Accept: image/png,image/*;q=0.8,*/*;q=0.5
Accept-Language: zh-cn,en-us;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate
Referer: http://get.adobe.com/cn/flashplayer/completion/aih/?exitcode=0&re=0&type=install
X-Forwarded-Proto: http
X-Forwarded-For: 27.189.xxx.xxx

Note that the web servers in question are behind a load balancer (Linode NodeBalancer), so the X-Forwarded-For and X-Forwarded-Proto headers are expected; they correspond to the original requests to the load balancer.

As far as I can tell, the web server is not acting as an open proxy. The response to these requests is simply a 302 redirect:

HTTP/1.1 302 Found
Date: Fri, 30 Jan 2015 01:56:00 GMT
...
Location: http://open.tracker.thepiratebay.org/guide
Status: 302
Vary: Accept-Encoding
Content-Length: 108
Connection: close
Content-Type: text/html; charset=utf-8

You are being redirected.

The switch to /guide is provided by the Rails application that normally runs on these servers. It normally redirects some types of 404 traffic to http://ourdomain.com/guide.

I have two questions about this:

Why are we receiving this traffic? What possibly can someone gain by using our servers to generate large numbers of HTTP redirects? It doesn't seem like they are pulling off an XSS attack on the unvalidated Host header.
What do I do about it? Can or should I reconfigure Apache to reject requests where the Host header doesn't match a domain we own? Is there a way to figure out who is sending this traffic our way? Should I get a new IP for the load balancer?

What you are describing, are very similar to what I have read in a recent news article.

It is about a bug in the Great Firewall of China, where it has supposedly been upgraded, where it can blast random sites with requests that it should have blocked.

Read the article here if you are interested.


Bypassing rate limit on home router I'm studying Info Security and was poking around my home router (it's a cheap one) with a python script trying to brute force the admin password for the web interface (it uses HTTP basic and the server is micro_httpd).

I discovered that when passing the auth header in with the initial request I was able to bypass the rate limiting feature on the router and hit it with 10k / min requests no problem, eventually getting the password out.

Does this sound like a genuine vulnerability worth a report or this to be expected of this level device?

Its the kind of router that might be in use at cafe hotspots and the like so I could easily see how it could be exploited if people use a reasonably weak password for the admin interface.

Check if there is a new firmware for you router. If there is, get latest version and test again (the manufacturer may have patched it already). If the vulnerability still exists or there is no version newer than yours, then yes, report it.

Usually, in the mid-to-low models, updates are more rare and vulnerabilities are patched only at large time intervals.


MalwareBytes Quarantine MalwareBytes has the ability to quarantine or to quote MB:

  At that time, they were removed from the disk location where they were
  stored, placed in quarantine, and modified so that they could not pose
  a threat to your computer.

What exactly does MalwareBytes do so that a file "could not pose a
threat"? What I'm looking for are the technical details of how it's
done.
Is it possible for malware to indicate to MalwareBytes that it's quarantined when in fact it isn't?

To extend the answer of Can malware be dangerous even when quarantined?

AV quarantine is served as :

Audit zone : let user to audit to decide whether to send the potential malicious file to AV company for further inspection.  You shouldn't send a infected document if you think the document itself contains some sensitive data.
False positive does happens, you can recover the file from quarantine and may choose to report false positive or add the file to the exception list inside AV.
It is packed & encrypted  in non-executable format and inaccessible for all uncompressed tools.  So this will prevent an redundant detection and also abuse by malware. Nevertheless, depends on AV implementation, the quarantined folder should not be "exception safe haven" for malware (if they discover it) to hide the payload.


Does GDPR apply to generic service providers? Let's say you have a general Cloud service to create PDFs from content or even a data storage. Neither services are meant to process PII data (in the sense of GDPR), still - as the content is not controlled by the service - you do not know what's in the data.

Do you need to adhere to the processes of GDPR?

Technically, the Data Controller is responsible for making sure all processes are GDPR compliant. That means that whoever uses your service needs to make sure that they are being compliant. If they need you to be compliant, then they need to engage you. You can decline to become compliant if that does not meet your goals.

But, if you knowingly process personal information (like user accounts?) then you need to be compliant (for EU PII).


Secure way of sending an email attachment in a user-friendly manner In the last months I very often was in a position where I needed to send an email attachments with sensitive content to someone whom I didn't know well personally (so that I could talk to them how set up encryption), but about whom I knew that they had little IT background and barely knew how to operate a mail client. I'm not an expert myself, but I do know there is such a thing called PGP and with some time&pain I can get it to work.

(Imagine the receiver to be a non-tech person from a big company who little no time to deal with encryption and me being an non-IT engineer, who is technically minded, but does not have deeper IT/infosec knowledge and wants to protect his privacy as much as is possible.)

Because it is not clear to me that the email that I send will be send via TLS between server (and it is also not clear to me why I should trust those intermediate servers), it seems a very bad idea to a pdf with send sensitive content as a standard mail attachment.
Out of desperation I have resorted to uploading the pdf on a file sharing platform (which we shall assume to be trusted, so that my data is safe there). Then I send the download link to that file via (unencrypted) mail. The link has an expiration date and is password-protected and I'm sending the password along the link; this may seem stupid at the first glance, but please read along.

In this way the receiver of the email can still easily access the file without further IT knowledge on his side, but my privacy is slightly enhanced: Whiile I know that if someone would be after me and is intercepting my mail, it would still be very easy for him to get his hands on my pdf, if he is fast enough to download it before the link expires (which is usually a few days). But my threat model is not about protecting against that type of attack, but rather about protecting myself against automatic data collection & hoarding (think, e.g., government authorities snooping on subway cables).
I would assume, since getting the pdf involves some human action, such as filling in a password, that even if my data is collected, it will take too long until a human looks at at and by that time the link will have expired.

My question is:

Is this a good solution for my very moderate threat model described above? My file sharing platform doesn't use Captchas when one introduces a password to download a file. I assume that, if they would, that I would be 100% secure against such automated data collection, since even if such software would also automatically extract the password from the mail (which I doubt would happen, because if you hoard millions of mails that have passwords in them, you would need a very large amount of computational power to run automated NLP algorithms on them, to get the correct string that is the password, perhaps more than is available), it could not go past a Captcha?
Do you know any other way to securely send the email attachment (including any improvements to my solution above), so that the receive can still download it with minimal IT knowledge and time investment?

(Note that there was another question here regarding sending of links in mails, but my use case is different and more specific.)

In the past when dealing with non-technical people, or people in environments that preclude them from installing custom software, the lowest common denominator fallback has always been Encrypted Zip.

Nearly everyone has the builtin ability to double click an encrypted zip and enter the password.

This begs the question of how to exchange the password. Typical possibilities include:

Direct phone call
a Separate email

Hinted: The name of the person's cat we talked about
Direct content- Password:   OpenSessamee
An email from a third party


Bad torrent experience: How can I punish a miner owner? I have downloaded a program from torrent tracker. After installation I've found that bitcoin miner has been installed on my PC as well. My electricity bills are huge now and I don't want to pay for it.

How can I punish owner of that miner? Can I tell police about the case or some other institution? And what is the probability that police will take this case?

First off, you shouldn't be using pirated software. I would suggest running an antivirus scan and see what it finds, and can remove.  If you can't get rid of the bitcoin miner, either with antivirus, manually deleting it, or another way, you will probably have to re-install your computer.  As other posters have commented, there is very low likelihood that the police would take the case.  It would be like someone going to the police saying the drug dealer cheated me (e.g. you would possibly be in trouble too).

Probably the best way to punish the miner owner is to clean up your computer, and not use torrent sites in the future.  Also encourage others not to use torrent sites.  People are usually in it for profit, so if they are giving you free software, what else are they giving you?  Probably malware to get access to your banking info, in this case a bitcoin miner, etc...  If enough people listen, and stop using torrent sites, then business will probably dry up for the crooks!


Shibboleth user attribute encryption How does Shibboleth guarantee that 3rd parties do not get access to user attributes contained in SAML 2.0 assertion exchanged between IdP and SP?

Is it correct that all user attributes are encrypted when transferred from IdP to SP? Are the user attributes encrypted with a symmetric key which is also included in the assertion but encrypted with the public key of the SP?

The best I could dig up was here:

https://wiki.shibboleth.net/confluence/display/SHIB2/FlowsAndConfig#FlowsAndConfig-4IdPIssuesResponsetoSP

It looks like security is provided by:

IdP limits what it gives to the SP based on how it'll be transmitted
Yes, for SAML 2.0 assertions, the IdP encrypts it's response to the SP

The way this is written, it sounds like encryption is provided specifically on SAML 2.0 assertions, not on everything.  And I'm specifically reading the Shibboleth 2.0 documentation as that seems to be what supports SAML 2.0.


What are the risk of providing identity in my application, rather than using a provider? In our multi tenant SaaS software application we intended to use Microsoft Identity Platform (Azure AD) for user authentication and providing the claims for authorization within the application.  We are facing a lot of difficulties managing and getting the correct claims throughout the stack and are now considering providing our own identity and web tokens (through a library like Microsoft.AspNetCore.Identity).
This means we would still rely on Azure AD for the authentication, but then use our own (synchronised) identities to manage application roles, permissions, etc and store these in the application database.
Q: What are the security risks we will be exposed to when we provide our own identity rather than use a service for these, keeping in mind we would still use a service for the authentication?

But, the biggest issue stems from not leaving the identity up to the experts that have studied the numerous standards and security policies. Sure, you could learn all of it yourself and implement it securely, but it will be time and resource consuming. That's just the tradeoff you have to make (as it is with many SaaS solutions).
If you're storing the identities in your application database, you open the door to a hacked application leading to hacked identities. Versus if it were separate, you could have better encapsulation there. Bad practices in storing passwords or passing them over unencrypted protocols could lead to stolen identities.
*I'm biased as I work for an Identity Provider, but I've tried to be completely open and honest here.


Is it possible to modify your user agent http header for malicious use? The Google crawl bot uses the user agent "Googlebot", and I am wondering if this knowledge can be used maliciously.

Let's say in a random website, the Googlebot user agent is allowed to access an admin panel, could this be considered a vulnerability, or is this just simply impossible?

Yes. You should research what exactly goes in an HTTP request.

The user agent is easily changed as it is set by the client. There are many tools that allow you to change your user agent for your browser. If you are using curl, you can also just craft your own HTTP request and set the user agent to whatever you like.

If a web application depends on a user agent for security purposes, this is 100% vulnerable.


What can an attacker do with a stolen SSL private key? What should the web admin do? What can an attacker do with a stolen website certificate and key?

What should the website admin do upon learning this?

Attack Vectors

If an attacker uncovers your SSL private key, you are minimally vulnerable to the following attacks:

1) Traffic Eavesdropping

To the attacker, everything being sent over SSL can be decrypted and should consequently be thought of as cleartext. This means passwords, credit card numbers, and other Personal and Private Information is vulnerable to being either harvested or leveraged against you as the attack escalates.

2) Man-In-The-Middle

Part of the reason to use an SSL certificate is to uniquely authenticate yourself to the clients connecting to your server. If the private key is stolen, a hacker can create a Man-In-the-Middle attack where data flowing either from the server-to-client or client-to-server is modified in-transit. This could be done to ask a user to reauthenticate (and thereby surrender their password), ask for a credit card number, or implant malware into file downloads.

As you can see, if someone has compromised your SSL certificate, they can quickly escalate the attack to either gain unauthorized access to your system or attack you or your users.

How to Recover

If a private key compromise is suspected, one should add the SSL Certificate to the Certificate Revocation List (CRL). This will alert other participants in the Public Key Infrastructure (PKI) that the certificate in question can no longer be trusted. In order to do this, you will usually need to login to the account you created with the Certificate Authority (CA) who issued the SSL Certificate or otherwise notify them of the suspected breach. Godaddy provides instructions for this online, as does Network Solutions.

With the SSL certificate revoked, you will need to again go through the process of generating a new certificate and private key in order to re-enable SSL services for your web site or application.

If your site has been breached, I would recommend recovering in the following steps:

Shutdown the compromised service. It is generally not advisable or ethical to leave yourself or your users at risk while you fix things.
Revoke the SSL Certificate. By adding the certificate to the CRL, you're notifying the world that it can no longer be trusted. This should be done as soon as possible.
Determine the cause of the Breach and Patch the Problem. It will do you no good to revoke and reissue the certificate if you don't know how you were compromised in the first place. Try to figure this out so that before you put everything back online you aren't simply compromised again. Fix the issue.
Generate a New SSL Certificate. As mentioned above, you'll need to generate a new certificate in order to bring things back online securely.
Resume Services. After you've addressed the root cause of the security breach, revoked the certificate, and generated a new cert from scratch, you should be good to bring things back online.
Notify Users / Stakeholders. It is considered a best practice to provide full disclosure and notify those who may have been damaged by the breach of what happened. In some industries (such as healthcare) this may even be required by law. However, at this point you should defer to corporate/government policy for specifics.


Security risk: Digitally sign communications for SMB I have a computer (Windows) on a network where an industrial process is controlled. There is an option in Local Security Policy >> Local Policies >> Security Options >> "Microsoft network client: Digitally sign communications (always)".

By default, this option should be Disabled on Windows machines but all computers that we receive from the vendor has this feature Enabled, so I can only assume that it is intentional. In order to backup to a NAS, I had to disable this feature.

My question is what might the security concerns be considering that this machine is on a local network where an industrial process is being controlled. From Microsoft's website, I get the impression that it prevents man-in-the-middle attacks that modify SMB packets. Is this the full story?

Indeed, Microsoft Technet lists MITM prevention as the sole use of this setting. And a digital signature does just that: to prove the authenticity of a digital message. If your network is trusted and MITM scenarios are really (!) not possible, it can be disabled.

Apparently there's also a performance decrease involved when it's enabled. So, if you're disabling it for performance reasons: you're trading performance for security.


Where do you get the DigiCert CRL distribution point? If you look at a DigiCert certificate: https://baltimore-cybertrust-root.chain-demos.digicert.com/info/index.html, you can see that it has the following:

Key:
  Size: 2048 bit RSA
  Key Usage: Certificate Sign, CRL Sign
  Basic Constraints: CA:TRUE

There is no CRL distribution points listed here. Where would I get the CRL distribution URL for this certificate?

Thanks!

The certificate you referenced is a root certificate. Root certificates do not include a CRL distribution point, because root certificates cannot be revoked.

The CRL distribution point URL you are looking for is included in (all) certificates issued by that root certificate. You can use tools like crt.sh to search for a certificate issued by that root. Then choose a certificate that was issued by that root and inspect it to get the URL of the CRL distribution point.

Here is the CRL distribution point URL you are looking for:
http://crl3.digicert.com/Omniroot2025.crl


How does the website "whatsmyrouterip.com" detect the LAN router IPaddress and the LAN device IP address as well as the WAN gateway router IP address? The http://whatsmyrouterip.com/ website can be used to resolve the public internet WAN IP address of a gateway router. However, it also shows the the private lan IP address of the gateway router and the private lan address of the device sending the request (e.g laptop).

How does the site get access to the private lan IP addresses given that the NAT source IP address of the page request is that of the gateway router? HTML headers?

E.G. Gateway router public IP address: 257.59.201.1. Gateway router private  LAN address 192.168.1.1. Laptop private LAN address 192.168.1.25.

The site is HTTP so all this information is submitted in clear text.

The site just tries some typical IP addresses for routers to see if something is there. Typically the router is either at the IP address xx.xx.xx.1 or xx.xx.xx.254 where the IP address is from the range of private IP addresses. It tries these and some other addresses in the range of the local network(s). Which local networks these are seem to be determined using WebRTC (thanks for schroeder@ to pointing this out - see his comment for more information).

This behavior can be traced if using the developer tools in the browser and looking at the requests taken:

If there is some kind of response when accessing HTTP on these IP addresses it is assumed that this is the admin interface of the router. It cannot actually read the content to check if this is a router but just checks based on the timeout of the request if it was successful or not. Thus, if there is some non-router at such IP it will guess wrong (as it does on my system) and if the routers admin interface is on some address outside the local network it will fail to find it this way. But it will work for the typical setups users have at home.


Can an end-entity certificate with SHA-1 be issued by an intermediate CA that has SHA-256? Just curious - if I'm using an end-entity (leaf) certificate that has a SHA-1 signature, does that mean that ALL certificates in the chain also must use SHA-1?

Yes it can. The algorithm used for signing a certificate by the issuer is independent from the algorithm which was used to sign the issuers certificate itself.


Why check your email in haveibeenpwned rather than regularly changing your password regardless of any leaks? There's a lot of news right now about haveibeenpwned but I don't understand why people need a service like that in first place. If you're a security conscious user, you'd change your passwords regularly on any website that matters (banking, email, paid services) and thus leaks would not affect you in the first place. By 'changing your password' I refer to creating a randomly generated password string for each service, not the enforced changing of passwords in corporate environments.

So why are people so interested in using haveibeenpwned? Why not follow the right security practices regardless of any leaks?

Your question contains several false assumption:

  If you're a security conscious user, you'd change your passwords regularly on any website that matters

According to my password manager I have more than hundreds of accounts and most of them would do harm to me if compromised. Changing all of them regularly (like every 90 days) is a huge amount of work. So I use strong passwords generated by the password manager instead. But some services still save passwords in clear text.

  and thus leaks would not affect you in the first place.

Let's say I would change every password every 90 days. There is still the possibility that there are 89 days where my account is compromised and the attacker has time to do anything including changing my password. When you know your account is in the list, you can act instantly.

  Why not follow the right security practices regardless of any leaks?

See previous point.

  So why are people so interested in using haveibeenpwned?

To know which accounts are affected and to figure out which service got hacked/where the accounts came from.

With this knowledge:

I can change the password instantly.
I know which service is less trustworthy for sensitive data, money, ... and I might close my activity at this service.
If this service has a messaging system I know to be more alert of messages from "friends" because the account might be stolen.
I know which of my data might be compromised (data at the hacked service).


What fundamental problems are solved by using a Key Encrypting Key (KEK)? I've read several questions regarding KEKs but have not quite found one that comprehensively addresses why we would choose to use a KEK. This excellent answer by Mike Ounsworth explains how KEKs allow users to change PIN/password easily without waiting for an entire filesystem to be re-encrypted. I also found another answer that talked about KEKs providing a means to protect keys kept in a secure module, but I'm not quite clear on the underlying problem this solves.

What are the underlying issues/forces that would motivate selecting a KEK architecture?

You already gave one reason. People use a KEK to allow them to change their password (or other credentials that are used to derive the password) without re-encrypting a large amount of data. Another more subtle reason is that it allows multiple, distinct keys to be equally valid. For example, you could have a hard drive used by three people encrypted with three different keys, without needing each user to share their keys. It could also be used to allow one person to authenticate using different credentials, e.g. a keyfile on a USB stick, or a memorized password. This is implemented by having multiple copies of the master key encrypted with a different KEK and stored alongside each other.


Cannot turn off XSS filter in Chrome I am using the following command to launch Chrome:

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --args --disable-web-security

to turn off XSS auditor in chrome in Windows 7, but failed to do so. Below is the screenshot, and any help is appreciated!

I am fairly sure your answer lies in the error message.

  The auditor was enabled as the server sent neither an 'X-XSS-Protection' nor 'Content-Security-Policy' header.

I guess Google wants you to be super-duper sure that you want to allow XSS. Try running a local server that returns either of these headers:

X-XSS-Protection
Content-Security-Policy

This can be pretty annoying if you are trying to do a simple demonstration using a locally created file, but it is in our best interest, I guess. It may be that Firefox/IE are worth a shot if you just want to see/show how XSS works, but don't want to set up an http server.

EDIT: also make sure you close all instances of chrome when you run a command line.


A customer support of where my company host a VPS on asked me login detail, is this standard procedure? We host our web application on a VPS, I maintain LAMP environment there to fulfill our client needs (I work on relatively small SaaS service provider), I also set up a script to backup the system regularly at night.
Our company had just upgraded all of our Linux VPS to specification of 5gb ram, 5 vcpu, 100gb ssd, etc., this is because my client complain about slow database processing, I thought it might have to do with low specification our VPS had before.
Still, the database problem persist, so my boss asked me to debug the mysql process on each VPS we have. From this I found that only one out of five core seem to be used, this also happens to another VPS.
I suspect that the provider enforce a CPU limit, so I headed out to their customer support to clarify this, first they asked me list of each VPS IP Address, so I handed them that (though I felt strange as why they couldn't do this by themselves ?). They say they will follow up my complain through email (I reached them via live chat on their website).
This morning an email from them landed on our company account, they asked for and I quote.

Dear Sir or Madam
To follow up from our previous conversation, we need to access your VPS, please give us your port, user, and ssh password.
We expect your replies.

This really surprised me as why do they need this information just to answer my question regarding their CPU policy, now I could never handing them this sensitive information. But is it really normal for an VPS support to request this information ?

No, this is not normal at all.
If you need to give them access, create a new account for them that exists only for as long as they need access. Only give them as much access as they need.
But they should have resource monitoring from the VPS side and shouldn't need local access to the server.


Best encryption mechanism for message storage/exchange in client/server application So I am building a client/server system that is similar to email idea where clients exchange messages through the server with the following main requirements (note that the clients are pre-registered to the server and they have to authenticate themselves before any message transmission) :

Each message should be encrypted and no one is able to read it except the sender and receiver.
The encryption time should not take long
The message should be stored encrypted on both the client and server sides(message encrypted once created even if client choose to store it and sent it later: Encryption at the application layer).

I proposed three solutions to accomplish that and I am still studying the pros and cons of each solution if you don't mind helping me:

A-   Using symmetric key encryption with the server
Each client has a shared secret key with the server
Sender A encrypts their message with their shared secret key KA > server decrypts the message with KA and re-encrypt it with receiver B shared secret key KB  > receiver B decrypts the message with his shared key KB

The challenge in this solution is the server having to decrypt then encrypt the message again. is it secure or not? why?

B- Using hybrid symmetric and asymmetric key encryption with the server

Server stores 2 different types of key for each registered client

Shared Key between server and client
Public Key of client

•   When Sender A wants to encrypt a message to Reciever B

A communicate with server and get B public key Bpk using server shared secret Ka-s
A generates a shared secret for him and B and encrypts the message with it Ka-b(message)
A encrypts the generated shared secret with B public key and appends it to the encrypted message  Ka-b(message), Bpk(Ka-b)

•   When B receives an encrypted message

B gets Ka-b by decrypting it using his private key Bpri(Bpri(Ka-b))
B decrypts the message using the shared secret Ka-b

The challenge in this solution is the overhead to encrypt the message where the sender have to generate a key every time he wants to send a message.

C- Using symmetric without server involvement:

Each registered client have a shared key with any other registered client.
If A wants to send message to B, he can fetch Ka-b stored shared key and encrypt the message with it then upload it to server.

In this solution the server won't be able to read the message thus less security required on the server.

The challenge here is storing all keys on each client application and managing the keys (synchronization between two clients when renewing an expired shared key )

Is there any better solutions to accomplish both requirements with high security?

Problem with A - Anyone with access to the server can decrypt the message because a copy of all symmetric keys is stored on the server. Plaintext of message may be stored in server RAM temporarily when re-encrypting message

Problem with B - Why not immediately Bpk(Message)? Why use an additional session key Ka-b(message), Bpk(Ka-b). For both methods, B is unable to authenticate A or guarantee the integrity of the message. Anyone else can also request Bpk from the server. Maybe you could do ApriK(sha1(message)), Bpk(message). So when B receives the message, he can use his private key to decrypt the message, request Apk from the server, decrypt the message hash and compare it with the message he received.

Problem with C - key management issue due to large number of keys. Total no. of keys in system = (n)(n-1)/2. Handshake problem. Non repudiation is also a problem when symmetric keys are used. A can claim that he never sent the message to B. B crafted the message himself using the symmetric key which is known to him.


Why do major sites(Facebook, Google, etc) still send passwords unhashed? QUICK SUMMARY:

It seems like modern websites, for security's sake, should all have the client hash their own passwords before sending them to the server, who will rehash them, in order to avoid leaking the original password(likely reused across different sites), and also to make decryption necessary on an individual basis, rather than simply decrypting a single SSL key.

ORIGINAL QUESTION:

Just did a quick check to make sure, and I was amazed to see that major websites appear to still be sending passwords in their original format for logins, albeit over SSL/TLS. I understand that they are hashing and salting/peppering them before putting them into the database. However, I still see an issue with that.

It seems as if hashing all passwords with a site-unique salt on the client-side before sending them, and then hashing the hash would be substantially more secure for the clients, especially in light of recent news:

  The NSA and its allies routinely intercept such connections -- by the millions. According to an NSA document, the agency intended to crack 10 million intercepted https connections a day by late 2012. The intelligence services are particularly interested in the moment when a user types his or her password. By the end of 2012, the system was supposed to be able to "detect the presence of at least 100 password based encryption applications" in each instance some 20,000 times a month. (Emphasis added)

While I understand that from an efficiency perspective, having the client hash the password is unnecessary, I'm more interested in the fact that hashing the original password would mean that even if the data were intercepted, either on the server, pre-hashing, or during the connection and then decrypting the SSL, it would only be useful for logging into the website it was intercepted for.

I'd assume that should be a major concern considering lots of people people reuse passwords, yet these massive sites still are sending the original password and hashing it on their end. Is there a technical reason behind this, or is it just old practice that should ideally be changed?

EDIT FOR CLARIFICATION: I am not suggesting that these sites begin doing all the hashing on the client-side and just throw it into their DB as-is, they should definitely hash/salt the hash. My suggestion is that the client hashes the password so that the server has no idea what the original data was, and therefore the same password can be reused, and a compromise on one website would not mean a compromise to your password across other sites.
As a nice bonus, it would also limit the access discovered by malicious proxies to the sites logged into, rather than handing them your password.

We have to distinguish between following two scenarios:

1) A determined hacker tries to get the passwords

In this situation SSL usually provides enough protection, well implemented SSL is very hard to break. As soon as the attacker could successfully start a ManInTheMiddle attack, the client side hash would not get more protection anyway, because the attacker could easily remove the (JS) script, which is calculating the hash.

2) An automated attack is started

Should there be an organisation which is capable of reading SSL traffic, calculating a client side hash would increase their costs, because in an automated attack they would only see the hash of the password. As soon as their interest for a site is big enough though, they could write code to automatically remove the script of this site.

If they have the hash only, they could still try to brute-force this hash. Since you will probably use a fast hash client side (SHA*), brute-forcing should be relatively easy. Using a slow hash (PBKDF2 or BCrypt) is difficult to implement, with a slow client side language like JS. Even if you would calculate a slow hash client side, you had to reduce the time on the server-side, because you don't want let the user waiting too long. Trading server-side hashing with client-side hashing would decrease security, because server-side hashing can be done faster (more rounds) than client-side hashing.

➽ This means you could make their life harder, but you could not stop them if their interest is big enough. If the user is security aware and chooses a very strong password, a client side hash could help, but this user would propably not reuse the password.


Handling CSRF tokens on pages longer than the PHP session limit I have a page that is open (i.e. requires no login) and allows users to give quick feedback. This page is available on a single shared PC or tablet. The form itself has a CSRF token on it.

Problem is that the time between people submitting responses could be longer than the PHP session time. Solutions seem to be:

using a meta refresh to reload the page every 15 mins (could refresh
while someone was giving feedback, so not great)
remove the CSRF token protection (so reducing the security)
adding a javascript timer on the page to only reload the page after 15 mins or no mouse or keyboard input.

Is there another way of dealing with this?

Given that the page is before login and is low risk I have taken the advice of @sliverlighFox and removed the CSRF from the form which resolves the issue.