What to do in response to a source code and/or database leak by a third party hosting provider? My PHP sourcecode and database (PHPMyAdmin Dump) has been leaked publicly and I believe that the web host I have used for this service are responsible for the leak.

On first appearances, the web host appeared to be very professional, although they were not a well known, large company. I have not had any issues with any other web host I have used.

I believe on my part I used a very secure password for my account. However, I have found data dumps of my application code and database dated 10 minutes after my upload.

Is there anything I can do? What steps can I, or others in my position, take to ensure the safety of our intellectual property and our users' data? What preventative steps can be taken and what measures should I take now I find myself in this position?

There is very little information in your question, so it is difficult to give a concrete answer.

Before your blame the hosting company or even sue them, you should review your own program code, including all libraries and web applications you have installed.

You should especially look for SQL injection, shell code injection, various ways of remote code execution. A common vulnerability in old versions of many common PHP applications is the writing of files with configuration settings or user uploaded files that can be executed as .php files by visiting the appropriate url in the webbrowser.

The OWASP Top 10 and especially the PHP Top 5 of the Open Web Application Security Project are a good starting point.

Furthermore check that the php files are not world readable on the server.

There are two things you could test on your hosting provider. But depending on the legislation, you are in, this may not be a good idea:

Can you look into other peoples folder by going up in the directory tree in the ftp/sftp/ftps/scp program?
Can your PHP programs read files of other people?


Strategies for preventing Social Engineering attacks on my Facebook app Background:

I found that it is not possible to create a fake Facebook account to be an admin for my Facebook app. Or to make a business account the admin for a Facebook app. Here are three stack overflow questions that state I must use a personal Facebook account linked to a real person in order to create an app:

https://stackoverflow.com/questions/10805745/creating-and-managing-a-facebook-app-from-a-business-account
https://stackoverflow.com/questions/7525556/create-facebook-applications-for-a-company-without-a-personal-profile
https://stackoverflow.com/questions/7829679/how-do-i-can-i-create-a-facebook-app-for-my-company-without-using-my-personal-fa

I have heard stories about peoples personal Facebook being hacked via social engineering. If my account were compromised it would also compromise my app.

Question:

Since this question is on the verge of being subjective I will try my best to ask specific questions.

In order to reduce the likely hood of a successful social engineering attack I will want to make it hard to figure out which account is linked to the app. Is it in violation of Facebook's terms and condition to create an account with my name and birthday, but showing a location from which I don't live?
Can I add two factor authentication to access my Facebook app's admin panel?
Does Facebook or any other site have statistics for how often a Facebook app is compromised to social engineering?
Does Facebook offer a program that my company can enroll in that would allow us to manage our app through a non-personal Facebook page?
Are there any documented strategies for protecting my Facebook App from Social Engineering? By documented strategies I am asking about strategies that have been written about and are in use by many companies; I do not intend for this to be an opinionated brainstorming session or a discussion.

Thank you so much for your help!

You didn't state how big is your company or how many people will have access to the Facebook account, so I'll try to answer based on the rather broad information you provided.

First of all - Social Engineering in general isn't too hard to prevent, it all comes down to the training you give to your staff. Teach them that they're not supposed to provide any secret information - account names, passwords, security questions, etc to anyone without receiving your permission. Here's an article that discusses this topic.

Second of all, as was mentioned in the comments - don't use an everyday account. Create an account that will be used purely for managing the page and known only to the staff that are supposed to manage the Facebook app.

Finally, you need to enable as much security as possible. Use a complicated password (I actually wouldn't recommend a Password Manager here if multiple personnel can access it, as that increases the likelihood of one of them being victims of social engineering) with upper case and lower case letters, numbers and special characters (see Computerphile's recent videos on this, they do a good job covering the topic). Also, enable two factor authentication when logging in to the account.


SQL Injection not working when I think it should I am trying to learn about PHP and SQL Injections, so I have created a login form where users introduce their username and password and click the Login button. Later in the server I get the passed parameters using $_POST global variable.

This is the code used to check if user credentials are valid:

$email = $_POST['u_email'];
$password = $_POST['u_password'];

$query = "SELECT * FROM User WHERE EMAIL='$email' AND PASSWORD='$password'";
$result = $mysqli->query($query);
$counter = mysqli_num_rows($result);

if($counter == 1)//Correct Login

The problem is that I think that if a user enters the following text in the username and password fields, the login should be done (although they are not valid values because they do not exist in the DB).

Username: xxx' OR '1'='1/*
Password: */

I think so because that would be translated to:

$query = "SELECT * FROM User WHERE EMAIL='xxx' OR '1'='1/*' AND PASSWORD='*/'";

In other words:

$query = "SELECT * FROM User WHERE EMAIL='xxx' OR '1'='1'";

But the SQL Injection is not working, why?

My DBMS is MySQL.

It's not working because of this:

if($counter == 1)

The injected OR '1'='1' is valid for every single row, and if there are multiple rows in the table, that $counter check will fail.

To get around that, you could do something like this (if I remember my SQL correctly), with anything in $email and this in $password:

' UNION SELECT * FROM User LIMIT 1 --

Nothing will be returned from the first part, but the injected second half of the UNION will get a single arbitrary row.


"Secure" third-party inbox My business sometimes receives emails from our clients that are sent through a "secure" third-party inbox. The client send the message through this third-party service. The third party creates an inbox for me and stores the message there. The third party then sends me an email at my normal address with a link to access the message in the "secure" inbox.

Some examples of providers of this service are Symantec Web Email Protection and Citrix sharefile.com. We collect a lot of payroll information and it seems like many payroll companies like paycor.com use this technique to send payroll data. Paycor appears to send these message through a Cisco service that appends "securemail03" to the front of the domain. You can see the login page here:

https://securemail03.paycor.com

My question is, how is this supposed to make the email more secure? If I accidentally forward an email sent directly to me, one email is possibly exposed to people who weren't supposed to see it, but if I accidentally forward the link to my "secure" inbox, anyone who gets the link has access to all of the messages in my "secure" inbox. What am I misunderstanding?

To clarify, these are not Spam or phishing messages we receive asking us to log in on a fake Dropbox or Google Drive page; they are legitimate emails. Additionally, these are not large emails that are too big to send as an attachment. I don't want answers dealing with other benefits of sending the email through a third-party inbox; I just want to know what the security benefits are.

The piece you're missing is that with these services (at least in my experience) you are required to create a login credential to access the secure service mail box the first time you use that particular service for that particular sender.   Further, the sender (who contracted with the service) can set time limits for the items so that they become unavailable to anyone (including the intended recipient) after a specified period of time.

When you access emails via these services, your access is through TLS.   (So is the sender's access if their "side" is configured correctly).

Compared to normal email the sender's information is more secure.

Its not bouncing around "in the clear" over all sorts of potentially malicious email relays.
It is (presumably) encrypted in place in the "service provider" system.
The recipient has to utilize a log in credential to retrieve the message and then does so only over TLS encrypted transport.
The messages can be made to expire.
The service provider logs IP address and other details of each "access" of the information within the secure service portal.

My experience is that these services are inconvenient and take away some of the quick back and forth that makes email worthwhile.   But there can be no doubt that they are more secure than vanilla email.


What are the benefits of encryption for everyday people? In addition to the fact that encryption systems like PGP are notoriously difficult to use, and that encryption doesn't always jive with cloud-based services like webmail, the fact is that most people don't believe that they have secrets that they want to keep from others, or from the government, which would make encryption necessary. How would you explain to a person who is not into security & encryption "for its own sake" (and who isn't totally paranoid) why they would want to have encryption & digital signing in their toolkit of things they can do with their computer?

I think the others covered signing already pretty well, so I'll present my thoughts on encryption.

Possible Reasons for encryption for everyday people

They would (or should) want it because pretty much nobody has nothing to hide. It doesn't have to be anything illegal. If people really think about it, they can come up with an embarrassing secret they do not want just anybody to know about (sex?, drugs?, health? money? discussing my little pony fanfic?). Encryption also might help reduce the effects of stalking.

Or because even innocent mails might sound different to other people (wife/husband, intelligent agency, police, etc), especially if not the whole context is given (for example a quick follow-up to an in-person discussion). Encryption might be easier than trying to put the information in context afterwards.

If they are politically motivated, they might also encrypt to raise the percentage of encrypted mail. If only people who do something illegal (or cheat, etc) encrypt, encryption attracts attention. But if enough innocent mail is encrypted as well, this assumption happens less.

They might also do it because they have to (requirement of their recipient, job requirement, etc).

For most people, these are not good enough reasons, so even if encryption was a lot easier, not a lot of people would do it (except maybe if it was the default in all mail programs, etc).

See also here for examples of sensitive information which should be encrypted and might convince some people.

Who might read their mail

I think everyday people (people who are not "totally paranoid") need to be aware of who might read their mail. It doesn't have to be the government (most everyday people would handwave this away - either as conspiracy theory or something we cannot prevent anyways). But maybe their nosy parents, siblings, roommates, partner, guest, etc. who go to their computer and see that they were not logged out of gmail. Or the creepy neighbor attacking the w-lan hoping to find naught pictures in mail-attachments. Or a criminal hoping for credit card informations. I think if they think about the who more than the what, people might be easier persuaded.

Also, I think one of the main hurdles is that even if people do decide that they want to encrypt, they need to convince all of their recipients to set up encryption themselves. And if they are only a little convinced that they need encryption, it will be extremely hard for them to convince others.


Was the ASP.NET Padding Oracle exploit exposed in an ethical manner?  What could have been done differently? This is a multi-part question....

In regards to the ASP.NET Padding Oracle, (demo link)was that security exploit dealt with in an ethical manner?  What could have been done differently or better?

What are the incentives to handle an exploit in the most ethical manner?

What can the InfoSec industry do to incentivise (financial or otherwise) the proper handling of security issues?

Quite similar question is already here: How to disclose a security vulnerability in an ethical fashion?.

What about current topic and the way how vulnerability was disclosed - not bad, but still, IT security community is in the search of more ethical ways of vulnerability disclosure. Well, researchers could inform (or maybe they have done that, don't know) vendor, wait some days, months, maybe years when the bug is patched. At that time vulnerability could be exploited. Moreover, who said that this vulnerability was not previously exploited by black-hats? When the bug is publicly known, it has no more value on criminal market, it is easier to defend, easier to stop script-kiddies attacks, comparing to skilled black-hats. There are endless topics about FD and RD, with numerous pros and cons.

Taking into account known manner of known vendors response, no surprise that researchers act like that. Remember "No more free bugs" movement.


Whatsapp is adding passwords: what is the threat model that they want to protect their users from? Whatsapp has announced that they are introducing 2FA to their service. Normally, services rely on a password (what you know), and adding 2FA means that they require an additional code sent via SMS to your phone (what you have), but until now Whatsapp has always used the code sent via SMS and no password, so in their case adding 2FA means adding the password. I am trying to understand why, exactly, this should be useful.

In the common scenario (a service that requires a password, like an email provider), if some hackers violate the site and access the user database, they can crack the password hashes and access users' accounts. Adding 2FA prevents this scenario, because even if they can find your password they still need your phone. So far so good. But in Whatsapp's case, what is the advantage?

Until now, those who wanted to access your account needed to steal your phone (and the code to unlock the screen), then they could do everything (including moving the account to another phone, or changing the associated phone number). Now, instead, they'd also need the password. But who would ever want to do this? Normally one who wants to access someone else's Whatsapp account is for example a jealous wife that wants to check whether her husband is cheating on her. If she can use her husband's phone, unlocked, it means she can read every message, and adding the password doesn't prevent her from doing it, so this is not the scenario that they want to prevent. If Whatsapp supported using the same account on more than one device, the jealous wife could briefly take his phone, get the code sent vis SMS, and configure her husband's Whatsapp account on another phone, unbeknownst to him; then she could keep spying on him even when he is away, for example on an alleged "business trip" (maybe he is careful enough to delete all the compromising messages before he comes back, so this trick could let her discover the truth). Here, the password would prevent her from doing it... But Whatsapp doesn't support using the same account on more than one device, so it doesn't matter.

Any attempt to move the account to another phone, or to change the associated number, doesn't make much sense either, as these attacks can't be kept secret: the victims would immediately notice that the account on their phone doesn't work anymore and take some countermeasures, like creating a new one and informing everyone to stop writing to the old one. Quickly, the stolen account would become useless. A password would prevent this, ok, but I don't think this is an important scenario.

Another case where the password could make sense is if the attacker is a skilled one who can intercept the SMS code used as verification. Again, this would make it possible to steal the account, but since Whatsapp doesn't support multiple devices, the victim would immediately notice that the account on his phone has stopped working, and again the attack would be almost useless.

The FAQ says that "To help you remember your passcode, WhatsApp will periodically ask you to enter your passcode." This would help those who don't lock the screen, but if a user doesn't care about locking the screen, why would he enable 2FA then? And the developers even admit that this periodical asking for the code is to help you remember it, not to increase the security.

The most plausible scenario I can think of is: a criminal gang that can intercept SMS messages from all over the world (!!!) steals accounts, moving them to another phone, and then sends the legitimate user an SMS saying "If you want your account back, send us some bitcoins". A password would prevent this, ok. But, seriously, should we worry about this?

So what is a realistic use case in which someone actually benefits from adding the password?

This would mitigate carrier breaches, rogue employees, law enforcement, etc. Mobile carriers have complete control over the user's texts, and can easily take over a Whatsapp account by trying to set up the account on another phone and intercepting the verification text. An additional authentication factor the carrier can't get access to (like e-mail or a password) prevents this.


How do Azure ACS 2.0 security features compare to ADFS 2.0? I'm configuring my relying party (a website) to use either ADFS or Azure ACS 2.0.

ADFS 2.0 has some interesting features such as Token Replay prevention (in the SQL version) and may have other SAML security features as well (which I may not understand)

Can someone distill the differences between ADFS and ACS security risks?

For example:

Is token replay handled differently in each?
Does the difference in protocol support increase or decrease security?
What is more secure OpenID, OAuth, SAML1 or SAML2, etc...
Is encryption and hashing done similarly?
How are key renewals done?  (e.g. ADFS will refresh on an interval)
Can the home realm discovery page be disabled, customized as to not leak IDP's?
...?

This is a great question.  However, there are quite a few differences between ACS v2 and ADFS v2 from a risk perspective.

ACS does not have an IdP, therefore it does not do any authentication, whereas ADFS does.
As far as I understand it, ACS does not attempt to prevent token replays.  It leaves that up to the IdP providing the original token, and the RP.  I cannot definitevely say this is 100% true though as I can't find any documentation on it, but I'm working on a project to test this... will update with results.
ACS supports 3 token types and protocols (WS-Fed, SAML 1.1/2.0, and SWT), whereas ADFS supports only 2 types (WS-Fed. SAML 1.1/2.0).
ADFS supports custom attribute stores.  ACS will only use claims within received tokens.

With all of that being said, I would argue that ACS and ADFS are more complimentary than anything.  ACS works nicely as an endpoint for Azure/Cloud hosted applications, as it can be modified relatively easily to accept other IdP's.  ADFS works well internally, but its a bit of a pain to add IdP trusts.  This gives a security boundary between the application, the environment(cloud et al), and the organization internally.

EDIT: Follow up questions:

In theory SAML 2 is the most secure, but it is also the most complex
More protocol support leads to larger attack surface
Home realm discovery leak (ADFS) -> see here: http://blogs.objectsharp.com/cs/blogs/steve/archive/2011/03/28/plugging-application-authentication-leaks-in-adfs.aspx
Home realm discovery leak (ACS) -> Not as of yet.


Identify Encoding type - decoding base 32/64 I am getting into CTF's and I am attempting to solve a cryptography riddle. I am Having trouble Identifying the encryption type or format of the text in the file.
I have been given a link to download a .rtf file.
https://mega.nz/#!a0RTnCAC!gKQhYKlShCYU4bKT8hz4bWJ36ki1DRqObC8-wRgqujE
The first line in the file seems to be a base64 string, When I decode it I get
"32 - |3 Times A Charm| - 32".
The second chuck of characters Seems to be a  chunk of base32 text, based on reading that  they are composed only of the characters 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567 =' (no 0,1,8,9). But that block of text does not end with any repeating characters, which I read is another characterisitc of base32.

There is also a block of text at the bottom, which I have struggle to gain any information about.

I am curious for those willing to look at the document, can you point me in the direction of topics I should research to understand how to Identify the type of encoding, so that I may extrapolate to find the flag (which usually is formatted like this: flag{this_would_be_the_flag} )

Another thing to note is that when I  open the file in a simple notepad, I see additional characters, some parts seems to resemble styling about the documents? Possibly meta data since its a .rtf file (I think I might be going down the wrong path looking at the file that way)

The top part is clearly base64, (usually you can tell by the == at the end).

After decoding it, the result is 32 -  |3 Times A Charm| - 32.

CTF games and events (like hackthebox.eu, my favorite) usually are multi-step. Meaning this is likely a hint to the next step, not the answer itself.

The extra characters in an rtf are for formatting and are not meant to be included. They are just mostly carriage returns on my notepad.

Finally, you'd have better luck in the CTF forum.

Happy hacking.


Could PKE be used as a better alternative to SRP for authentication? If I understood SRP correctly, its weakpoint is during the registration of a user when sending the verifier to the server.

Let's say the Server knows the PubKey(User) of the User and the User knows the PubKey(Server) of the Server.
For authentication the Server sends a random secret encrypted with the PubKey(User) to the user. The user decrypts the secret with his PrivKey(User) and the encrypts the secret with the PubKey(Server) an send it back. After doing so, the Server decrypts the secret with its PrivKey(Server) compares it to the one sent to the User, if correct, user is authenticated.

Would that be more secure than SRP and giving you the same advantage (not storing user passwords) as SRP?

When you say,

  Let's say the Server knows the PubKey(User) of the User and the User knows the PubKey(Server) of the Server.

you are presenting a much easier problem than SRP needs to solve. Quite simply, if each party already knows the other party's public keys, then we are done. All mutual authentication and key exchange is then easy. No secrets (such as the SRP verifier) would ever need to be transmitted nor would any secrets beyond ones own private keys would need to be stored.

SRP and other PAKEs (Password-based Authenticated Key Exchange) systems become unnecessary in a world in which communicating parties already know each others public keys.


Secure way to update Date & Time of a Linux Embedded Device I have a Linux (4.9.171) machine running on ARM Cortex-A processor. The system has internet connection and talks to my server over SSL. At the first boot, I can configure the date and time to it. However, if my system restarts, it won't have a right time and SSL connection can fail in Certification Path Validation Algo. I need a way to keep my system time up-to date (few seconds precision will be fine).

My system doesn't have RTC and I don't want to use NTP as it is not secure and anyone can be MITM and give me compromised certificates to attack my system.

I also researched about NTPSec and NTS but they aren't mature now.

Is there any standard way for this problem statement?

I can think of two reasonable ways to address this:

Run a VPN, set your NTP client to sync to a server on the other side of the VPN
Look at OpenBSD's implementation of ntpd, from the man page (https://man.openbsd.org/ntpd.conf) :

  CONSTRAINTS

  ntpd(8) can be configured to query the ‘Date’ from trusted HTTPS
  servers via TLS. This time information is not used for precision but
  acts as an authenticated constraint, thereby reducing the impact of
  unauthenticated NTP man-in-the-middle attacks. Received NTP packets
  with time information falling outside of a range near the constraint
  will be discarded and such NTP servers will be marked as invalid.

  constraint from url

  Specify the URL, IP address or the hostname of an HTTPS server to
  provide a constraint. If constraint from is used more than once,
  ntpd(8) will calculate a median constraint from all the servers
  specified.

The description in the man page seems to be exactly what you are asking.

There is a Linux version of OpenBSD ntpd in the form of portable OpenNTPD maintained by Brent Cook : http://www.openntpd.org/portable.html


FIPS compliant passwords protection/encryption? Do FIPS 140-2 or related documens specify how to protect users' passwords with encryption? Are there any well known schemas for storing passwords in lossless manner and lossy manner?

FIPS 140-2 defines standards for cryptographic modules, and related standards specify permitted algorithms which can be validated.  Typically, in these environments, the algorithm used for hashing passwords would be PBKDF2, since that's the only approved key-derivation function of that type.  For symmetric encryption, you would use AES, and I would recommend either the GCM or CCM modes, because they have integrity built in.
Because AES-GCM has catastrophic failure with nonce reuse and the nonce size is not large enough to be picked at random securely, you should use a key-derivation function to derive a new key and nonce for each encryption.
Note that if you don't have regulatory requirements to adopt the FIPS 140-2 technologies, there are other, better algorithms that you should use instead.  Scrypt or Argon2 are much better password hashing functions because they are memory hard; that is, in addition to the CPU cost, they also have a memory cost, making it harder for attackers to use GPUs or ASICs for this purpose.  If your code will run on architectures that don't have hardware AES acceleration, then you may prefer to use ChaCha20-Poly1305 to protect your data, since software AES implementations can be vulnerable to side channel attacks, and ChaCha is much faster on those systems anyway.  For systems with hardware AES acceleration, AES-GCM is probably a fine choice regardless of regulatory requirements.
Of course, as I mentioned, Scrypt, Argon2, and ChaCha aren't approved for government usage, so if you do have regulatory requirements, you'll have to stick with PBKDF2 and AES.
Ideally you will use a standard library for this that combines these primitives in a secure way so that you don't have to think about how to use them correctly.


DHCP vs. Static IP Addressing How do DHCP and Static IP addressing compare, from a security standpoint?  What are the risks/benefits associated with each?

I know the preferred solution between the two will vary with network size and layout, but I'm just looking for a more general explanation of how they compare.

Please answer from a security standpoint alone - disregarding topics such as network overhead and infrastructure costs, unless they directly and significantly affect the Confidentiality, Integrity, or Availability of the system.

DHCP offers do leak some information about a network. The options contained reveal certain details about network layout and infrastructure, which is what DHCP is designed to do. Static assignment offers none of this detail.

The threat here is unauthorized connection to the network. That can be either a device plugging into a live network jack or a wireless client gaining access to a WLAN. Once the unauthorized connection has taken place the ability of the attacker to do anything once they have connected is where DHCP vs. Static comes into play.

DHCP with MAC registration is the most robust DHCP model. It doesn't offer addresses to any MAC it hasn't been told about, so in theory unauthorized devices won't be offered information. The same holds true for static assignment, there is no server to ask for addressing.

DHCP without MAC registration will allow unauthorized devices to consume an IP address.

MAC registration requires all new devices of any type to be registered with the DHCP system which can significantly increase how long it takes for a new device to be functional. Not all network devices have their MAC posted where they can be easily read, so some edge-case devices may require some bench testing to figure out what MAC they're using. Plug-and-go won't work (by design!). Additionally, if existing devices have their network cards swapped out for some reason, technicians will have to remember to re-register the new MAC. Deregistration of old MACs is a critical step of this process, and often missed until a DHCP scope fills.

There are a couple of attacks that make DHCP with MAC registration less useful. If an attacker can place a bridge between an authorized device and its network port (such as a laptop with two NICs) it can figure out that device's MAC address very simply. Any traffic monitored in this way will reveal the MAC address of the authorized device. Most network cards allow changing the MAC address, so all the attacker has to do is change the MAC on one of their NICs, unplug the authorized device, plug their re-numbered device in, and get access on a registered MAC.

On wireless, once an attacker has successfully broken into a WLAN to the point where they can monitor the airwaves; gaining MAC information is similarly easy.

The defense for this is Network Access Control. In order to talk to the network the attached device needs to be able to authenticate at a machine level. This defends against unauthorized devices attaching to a network as it prevents significant network conversation from happening. In the above scenario, the attacker's device would be denied access. Not all devices CAN use NAC, notably network-attached printers, so an attacker can focus on those devices, which means that network-disconnection events need to be monitored on those ports.


Can allowing a web application to move, copy and/or delete files outside of the server root be a security issue? I am new at using and programming web applications, so I wanted to ask a question. Is it safe to execute os commands like copy and mv and delete from a web app that is running on an apache, or does it bring up security issues?More specific I am using django, and I want a view of mine when it is executed to be able to run os commands like copy move etc to folders that reside outside the var/www folder. I know how to use os module but I haven't found from my web search if it is safe to do it.

If user input has no influence on the commands or their arguments, there should be no immediate threat.

But it is always a risk, you might be missing something or there might be (i.e., there are for sure) unknown vulnerabilities in the software you're using (e.g., Django).

What I would do to mitigate those cases would be to:

Verify your permissions. Assure your using the minimum privileges needed for those operations you need (maybe Apache's user has too high privileges for what you need, create another user with less privileges);
Whitelist only the commands you're going to need (block everything else);
Look into setting up a controlled filesystem for those operations (e.g., some sort of 'chroot');
Harden your server (look into Grsecurity and RBAC);
Obviously keep everything patched and updated.


Can the person who buys my old number access my old Viber contacts? I was using Viber on my old phone. I stopped using that SIM card/number and stopped using that phone. I forgot to deactivate my Viber account. When my old SIM card carrier sells my old number to a new person, does that person access my Viber contacts and people I was talking to?

Assuming the platform works similar to WhatsApp or Signal Private Messenger. Viber should only use your phone number as a unique identifier, and no content (contacts or messages) should be stored on the server side.

This seems to be confirmed by Viber such that message backups are done through a cloud service; Google Drive or iCloud. Also, Viber uses end-to-end encryption, so their servers cannot see the content of messages, only metadata.

Consequently, if someone does receive your old phone number, no messages can be seen (as no content is stored by Viber), and the same is applicable to contacts.


Strength of passwords with patterns One of the lesser used techniques for strong passwords is to use patterns or even straight up repetition, so it can be very long while still being memorable.

For example:

Thue-Morse 01101001100101101001 becomes 0110-3223-5445-6776-9889 increment parity 20

Fibonacci 1,1,2,3,5,8,13,21,34,55 becomes 0 0 1 2 4 7 12 20 33 54 one less than fibonacci

Pi digits 3.1415926535 becomes after 3. is 14159 then 26535

Long prefix 11111119 and 19999999 are primes

Repetition aall leetttteerrss aarree ddoouubbleedd eexxcceepptt l

Keyboard layout !@@###$$$$%%%%%^^^^^^&&&&&&&********(((((((((

Not the best examples but you get the idea. So an actual password might look like this:

primes  235  LuA:  LualuA  LualualuA  LualualualualuA

Looks easy for humans, but the guessing algorithm surely doesn't know the connection between primes, 235 and the repetition of lua.

There's a lot of patterns to work off of and a lot of possible mappings/mutations. Mappings can be layered as well. Words can then be inserted, and short prefixes and suffixes added. If the search space still wasn't large enough you could concatenate two of these to square the number of possible passwords. Is it practically unguessable or do these patterns weaken the passwords enough for specialized algorithms to be able to guess them easily?

Their length and usage of non-words should make them immune to any existing password guessing methods as well, so at least they have that benefit.

Extra: how much guessing entropy is actually in one of these passwords? There's not really any data to work off of but we could use Fermi estimation to get somewhat close.

As far as I can tell, the question is:

  They are practically unguessable, right?

The answer is a very strong it depends on the kind of attack you're worried about. Also, in the best case, what you're doing is equally as strong as using a password manager's randomly generated passwords, but almost certainly more effort, right?

@RoyceWilliams' answer pretty much hits the nail on the head:

  Generally speaking, if your method becomes weaker once it is known, you're doing it wrong.

Let's break this down a little farther. There are two types of password brute-force attacks you need to worry about:

Drive-by attacks

Aka "opportunistic". Here the attacker is looking for low-hanging fruit: they are attacking all users of the system in parallel, either looking for a single entry-point into the system (in which case any user will do), or they are looking to compromise as many accounts as they can with minimal effort.

They are unlikely to try any sort of "algorithmically-generated" lists, because they can get what they want simply by trying the 100,000 most common passwords based on this year's breaches. As long as your password is not on one of those "Top X Most Common Passwords" lists, you're pretty much immune already; you really don't need to go the extra effort.

Targeted attacks

Here you, and you specifically, have been selected as a target. Maybe there is data on your account that is of value to their employer, maybe you work for your company's IT help desk and sending a phishing email from your account is more likely to succeed. Whatever the reason, you specifically are being studied.

They will find your social media posts. They will find your post on this site. They will pull up all passwords of yours from previous breaches to study how you invent your passwords. They will write software to generate guess-lists based on everything they know about you. If they know that you like to use mathematical constants, or quotes from Tolkien, or wtv, they will build the appropriate guess lists.

Against a targeted attack, @RoyceWilliams' answer referencing Kerckhoffs's principle is relevant: your scheme needs to be secure even if the attacker knows what the scheme is. You may be clever enough to invent something that passes this test, but I'd bet that whatever you invent will be more effort than just using a password manager with 32-char random passwords. So do that.

These two attack models are meant to be a framework for thinking about the threat landscape, not an exhaustive list of things attackers will do. As @Ben points out in comments, there is a sliding scale in between these two that has some characteristics of Drive-by, and some characteristics of Targeted. Where you put your comfort level is your choice; although if you're considering this at all then, for the minimal extra effort, you might as well go all the way to the top and use a password manager.


NSFW Website loaded on home network then open at work I use my personal laptop at work. Yesterday evening I had a NSFW website open and didnt close the tab in Chrome. At work, I connected to my works network and then immediately closed the tab without reloading or clicking any links on the page. Will my work know which page I visited?

Note, my work has never installed anything onto my machine.

It really depends on what perimeter security your employer has. As you stated there is nothing on your laptop so the only way that the employer could catch this is if there is a firewall or other device at the perimeter tracking all traffic.

If there is such a device it will likely record how much traffic you passed between your machine and that site. This gives you some leverage. You can explain to your employer the situation and the tiny amount of data passed will back that up.

All that being said, it is highly unlikely your scenario triggered any alarms with your security team and I would not worry about it.


What's the chance of two PGP keys being exactly identical? In the real world, millions of PGP keys are created every day, what is the probability (chance) of creating two identical keys? In different places, by different people?

If we assume that your random number generator isn't completely borked, then

  what's the chance of two PGP keys being exactly identical?

can be answered with approximately something raised to the power of negative infinity. Or in other words: it's not going to happen.

We can work this out by assuming that an "average" PGP public key uses a 2048-bit RSA modulus. Because at least the first bit of the modulus must always be 1, the effective modulus length is one bit shorter. (The exact technical and mathematical discussion behind this is a little more involved, but this should be good enough for now.)

I don't know how common semiprimes (products of two prime numbers) are in that range, but let's be generous and put the probability of any random number in that range being a semiprime at 10^-10. 10^-10 is about 2^-33. This is the ratio of natural numbers in the desired range to actual valid RSA moduli in that range.

Hence, the combined effect is to effectively reduce the number of possible moduli by some 34 bits compared to if we were just to pick a number of sufficient length at random. (Because of the magnitude of these numbers, the decimal fractions simply aren't relevant here.)

Hence, we go from 2^2048 to 2^2014 (or thereabouts) possible RSA moduli.

Let's say ten million keys are generated every day. This is probably on the high side, but again, we're playing generous. Again, that's about 2^33 keys. Let's also say that we're doing this for 100 years, and only care whether two keys come out to have the same moduli (we don't need to store them, or compare them to each other, or anything else like that, because all of that adds overhead to our process that is customarily ignored in cryptographic theory). 2^33 * 365 (days) * 100 (years) ~ 2^48. We have shaved an additional effective 48 bits, coming out to 2^1966. Even if we assume billions of keys per day, that only shaves of an additional three orders of magnitude (corresponding to 30 bits) or so.

We conclude that the probability of, over 100 years and assuming that we properly generate ten million keys per day, leading to two keys randomly being generated to have the same modulus thus comes out to about 2^-1966 or 10^-592. The number 2^-1966 can be compared to that by the year 2040, we might just barely be able to count up to 2^138 in ten years. It's a long way up the exponential curve from 2^138 to 2^1966, and we'd still have to actually do something with each counted number (like, say, generate a RSA key).

Even just storing all 2048-bit RSA moduli, assuming the 10^-10 ratio mentioned above, would take about 2^2015 * 2048/8 ~ 10^609 bytes (10^610 bits) of storage. If we could somehow come up with a way of storing one bit per baryon in the entire observable universe and access all that storage instantaneously, then we would need only a measly about 10^530 universes to do this.

If you don't want to take the easy route, then even as hard as it is, factoring the modulus is going to be much, much easier than relying on random chance to give you a duplicate key. And besides rubber hose cryptanalysis, factoring rather than pure random coincidence is the threat you need to worry about. Figures vary between different estimates, but at present, 2048-bit RSA is estimated to give about 100-130 bits of security (2^100 ~ 2^130 work factor) against known methods of attack, which for the time being is sufficient unless your threat model includes long-term efforts by highly funded adversaries, in which case you might want to go with a modulus of 3072-4096 bits (4096 bits RSA providing about 110-140 bits of security, depending on who you ask).


Why is spreading malware.scr instead of malware.exe more common? Both are binaries and I guess that AV products know that .scr files that are not screensavers should be dealt with with "special care".

I see quite a lot of "Document.pdf.scr" malware samples and can't explain why it's better than plain ol' executable...

Probably because user education has focussed on ".exe extensions are bad", so a .scr might have a better chance of being run, especially if the email claimed it was a script to do something useful.


Bizarre series of web errors from vulnerability scanner OpenVAS - is this malicious? A short series of errors just came in from Elmah. They are very peculiar, and I'm unsure as to what they represent and whether they might be malicious.

It amounted to a series of 16 sequential calls to a non-existent web address. In each case the call takes the form /Extranet/Account/non-existent-[seemingly random 10 digit number]. /Extranet/Account is a valid path on the site, but there's nothing which maps to anything like non-existent-[number].

The calls were not hugely rapid, coming in over the course of just over a minute. So it's hard to tell if they were automated

Elmah tells me that the user agent was Mozilla/5.0 [en] (X11, U; OpenVAS 7.0.10) and that the calls originated at an IP in France. OpenVAS is a piece of vulnerability scanning software. I can see nothing in google which suggests it's commonly used for malicious purposes, although I can see how it might be.

If it was malicious, I'm at a loss to explain what they were trying to achieve by making a short series of calls to a non-existent address with a random number appended to the end.

Should I be worried? Does the short duration suggest the responsible parties found something of interest and may be back? If so, is there anything I can do to stop them since I only have the IP of the scanning service itself?

Yes, it probably is malicious. If you are hosting anything on a public IP then scans such as these are an everyday occurrence.

The fact that the user agent hasn't been changed to hide the fact that it is a scanner suggests that it is either a novice or a University research project that ethically is required to advertise scanner use.

The best protection against attacks like these is a multilayered defense involving Web Application Firewalls (WAF), locked down http servers and whole host of other approaches.


How to view which mac addresses are connected to some AP? I set up an open AP. I know I can view mac addresses of connected users via AP's console (local console). this is not what I need.

I use tool like Netstumbler or inSSIDer on my Win 7 machine to see all wifi users in my surrounding area. However, I cannot see which users are connected to which AP.

How can I detect which users are connected to which AP? what tool should I use?

For Windows you can use Kismet, might be a bit less easy to play with like netstumbler, but it records all the APs and all the clients, their beacons and so on.
Also you can export its XML files to several other scripts and programs to get better representation then netstumbler and inssider.

In Linux best answer is aircrack suite: run airodump-ng with the right flags on monitor mode enabled card.

Your screen will be divided into two groups, in the top part you'll see all the AP's your card can see, and at the bottom part of the screen you'll see list of clients, where connected clients will have to their left the mac address of the AP they are connected to.

try
airmon-ng start wlan0 && airodump-ng mon0

where wlan0 is your wifi card

(although just airodump-ng wlan0 will work too)
and of course kismet will work here too.


Adobe PDF File With Embedded Javascript signature in PAN firewall I found many PDFs that are vulnerable, and my Palo Alto firewall categorises them as "Adobe PDF File With Embedded Javascript". And this pdf file contacting a Russian IP address.

What should I do? My recommendation is to delete the file. What's yours?

While PDF files with Javascript might be used with attacks there are also legitimate reasons for a PDF file to have Javascript in it, for example to validate the input within PDF forms.

Because of this it is impossible to say what to do based on only the fact that a PDF contained Javascript. Instead you need to check where these files come from, who the recipient is, if the recipient maybe expected such files, if the source is maybe known for PDF files which contain Javascript for a non-malicious reason etc.


How to explain to a non IT person whether the Internet can be "shut down"? When Donald trump first stated he wanted to "shut down the Internet", a few people asked me if he could do that.

How can I simply explain that the Internet is a Web and not a two way stream?

There are both technical and legal/political barriers to "shutting down the Internet."

The most important concept is that no one owns or controls the Internet.  It is made up of many providers, some global, some local, all interconnected.  The impetus that led to the modern Internet was to design a network that would survive a nuclear attack.  If a part was destroyed, traffic would automatically be rerouted around it.  So there's no one "choke point" that could be shut down. All of the major carriers (and most of the smaller ones) would have to be stopped in order to stop the Internet.

All the providers of the Internet (at least in the US) are private companies, which limits the government's ability to control them. It's difficult to imagine how companies like ATT, Verizon, Google, and Microsoft could be told to stop operating.

Many of these companies also provide telephone service as well as private networking.  Those services and the Internet use the same links and equipment, so shutting down one would shut down the other.  The economic consequences would be tremendous and there would be overwhelming political pressure to keep operating.  Short of a complete overhaul of the American political system, I can't imagine that happening.

I think Trump's comment would be technically, legally, and politically impossible to carry out.  What that may say about his knowledge and abilities as potential president I'll leave to other forums.


Security Risk of Disabling forceguest in non-AD Environment Our application group is looking to deploy a product which requires that we disable forceguest in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa. We are running on a Novell network (I know, I know) and the machines (mostly XP/some 7) are not on a domain. Each machine has two administrative accounts which are password protected, as well as the individual user's account (also an admin) and a general limited account, guest accounts are disabled.

What, if any, are the security risks of disabling forceguest in this environment?

I believe this answers your question: http://www.microsoft.com/technet/security/advisory/906574.mspx

  Windows XP mitigates several security vulnerabilities by preventing users who do not have a valid logon credential from accessing the system remotely. An example of this is the vulnerability that is addressed in Microsoft Security Bulletin MS05-039. However, when you enable Simple File Sharing, the Guest account is also enabled and given permission to access the system through the network. Because the Guest account is a valid account when it is enabled, and is given permission to access the system through the network, an attacker could use the Guest account as if they had a valid user account.


Internet privacy, VPNs, etc. Am I anonymous? I am a member of a forum that recently disabled my account because their system picked up another account from my household.  Anyways their terms of rectifying the situation are pretty invasive to my personal information so I'm wondering...
If I log on and create a new account while using my VPN is there still identifying pieces of data that could already be on my computer from previous logins that would give away my "new identity" as my "previous identity?"
Thanks!

Cookies, local storage, cached data ... are still there and might be used to detect the same user. You can get rid of these (mostly) when using the private mode of the browser though. Browser fingerprinting is still possible though.


number of ciphertext-plaintext pairs needed in double encryption I know in single encryption you would simply require at least 1 pair of plaintext-ciphertext, to carry out an exhaustive key search; you continue trying different keys until one is found that corresponds correctly to the pair you have.

Having more pairs would ideally be better as you could then find out for sure if that key is correct by trying it on the other pairs.

However, when using double encryption with two k-bit keys chosen uniformly at random how many pairs of plaintext-ciphertext would be required to identify the keys K1 and K2 in an exhaustive key search?

At a minimum I can't see why you'd need more than one.

You're essentially just combining the key space by encrypting it twice with two keys.

You simply decrypt the cipher-text with every value in the K2 space, then decrypt every result with every value in the K1 space. When you find a match you have the correct K1 and a K2.


Access control matrix and integrity Can access control matrix in addition to confidentiality provide the integrity of the objects to which access is being controlled?

In theory, yes.  The Biba integrity matrix is the traditional theoretical description of such an ACL.  Unfortunately it turns out to be rather difficult to describe "integrity" in a way that facilitate development of a Biba based system.  I'm not aware of any real world implementations of Biba, although if I remember correctly, the concept was applied to parts of the Trusted Computing Station.


Casual email that includes a P-Card Account number and expiration date - does this violate PCI? We discovered an email sent from one employee to another "loaning" the second employee the use of their PCARD. Email contained their PAN and expiration date. There is no payment application associated with this, just one employee allowing another to use their P-Card to purchase something. This is a violation of our company policy, but does this place us a risk for PCI non-compliance?

From your question it seems the employee was emailing their own card data to someone? That should not be a PCI problem, because the company didn't mishandle card data controlled by the company. I'd say that they should be given a stern talking to because it might show poor judgment, and maybe have a record of that talk, but I don't think it will be an issue for you.

They cloudy bit in this might be, what did the receiver of the email do with the card data? There might be someone who could make a case that it then becomes company controlled data. Was that card EVER used to do a legit transaction with the company as a customer?

Similarly, if a person choses to send all of their own health data to someone, that wouldn't be a hipaa violation either, because that law similarly restricts data being handled by the organization, not by the person who's data it is.


Browser cache, cookies, active logins and other data This question is regarding common browsers, even though I may refer to Firefox settings. Not IE though, I wouldn't expect that to be in any way secure.

I'm seeking to know how secure it is to let the browser leave data on the computer after I close it. For all it's worth, I'm regarding to security as malware not being able to extract your data. A thief sitting on your already-logged-in computer is besides the point.

I'm sure in the past this was definitely not secure. That is why I have kept the habit of having Firefox clear every data upon close (or install an add-on for chrome to do that1). Admittedly though, it's not at all convenient. I wouldn't save passwords, form and search history, browse history etc anyway, but clearing cookies and active logins means I spend some time every time I open a browser just to login to various websites that I commonly visit.

My question is regarding how the browsers (probably needs different answers for each browser) store information and how secure are they? In particular, how secure is the storage of each of these elements?

Cookies
Active logins
Offline website data
Site preferences
Cache

(The terms taken from Firefox settings, where you choose what information to clear upon exit).

1 Is chromium so secure (or so it thinks) that it doesn't need to clear stored data?

P.S. I have seen this question, which seems to be Windows specific. I use both Windows and Ubuntu, so this question is not entirely answered by the other one.

It really depends more on the services you are accessing than on your local system.  If you are not storing passwords, not using persistent logins and the services you are accessing are following good security, then any session cookies on your system should only be good from your current connection and should be useless to a remote attacker.  If your computer is so thoroughly compromised that an attacker could use the cookies from your machine, then clearing won't matter since they could either back them up or simply access your accounts while you are using them.

The main gain from clearing caches is privacy.  It prevents (or at least makes it more difficult) for people to tell what your online activity is at all.  There is some amount of security information leaked too if someone can see that you bank with ABC Bank Corp. and maybe even get your username, but they shouldn't be able to access your account simply from the cache unless someone is doing something very wrong.


Fuzzing C++ application that expects XML file I'm trying to fuzz an application to make sure it is secure. The app does not have any UI and needs to be run via the cmdline:

app.exe myfile.xml

Also myfile.xml looks like this:

<Sample>
<FileLocations tmp_root="PathOfExeFile">
    <Directory path="DirOfExeFile">
        <File id="1" name="filenameonly" hash="filehash" msi_key="filenameonly" remove="1" />
    </Directory>
</FileLocations>
</Sample>

My question is: should I fuzz the file only (and basically try to pass random arguments to it), or should I always pass the same XML file (that I fuzz/edit in before hand)?

Since the time usable for fuzzing is limited it is best to fuzz first the parts which are likely to process possible dangerous input. I don't know the exact use case for the tool but I find it more likely that the XML files used as input can be controlled by an attacker than that the attacker can control the command line. Thus I would suggest you care about the XML first and if you then have still time you can fuzz the command line too.

Apart from that I would suggest to try more intelligent fuzzing instead of random input. Have a look at American Fuzzy Lop.


Legal purposes and advantages for Dark Web I would like to explore the dark web just to experience and understand it, but I'm not really sure what to "do" once I'm there and I don't want to run into anything illegal. What does the dark web offer that the "regular" web doesn't in such a circumstance?

Why would someone want to use the dark web legally when they can use a "regular" web site? What's the advantage (if any?)

The dark web is not a well-defined thing. Often already the torrent protocol is listed there.

Dark web is not for the evil things, and not for the illegal things, it is for the anonymous things. These are not always the same.

For example, posting content to the internet going against the governing ideology of the political system, is often illegal, but it is often not evil.

Or - using the example of the torrent - although it is used mostly to violate the IP laws, the illegal is this violation and not the protocol. Thus, for example, you are free to download free software with torrent (example).

It can be used also as a legal defense against illegal activities. Eavesdropping others private communication is typically illegal, but it is being done quite often. For example, reading this post, your browser opened also TCP connections into the following domains:

scorecardresearch.com
gravatar.com
multiple google domains (googletagservices.com, google-analytics.com)
quantcount.com
quantserve.com
possibly others what I could say only after deactivating my adblocker

Sometimes we all have enough reason to defend against this, to overwhelm the system configuration cost of the tor.

Identity protection is required not only against some "big companies", but it may be needed also against closer attackers. For example, to circumvent some nasty rules/settings/actions of our network provider.

Because from the point, that they are trying to steal1 user data, the darkweb user becomes the defender and the Big, Secure Company becomes the attacker.

1 A lawyer could say, that by clicking some popup on the first visit of some websites you allowed the content provider to steal your data. However, no one can read all the related "general terms and services" and interpret it from the legal system of the home country of the content provider. From this moment, doing this is a misuse of the position of the user, and an "agreement" based on compulsion is invalid.


What is the best setup to keep my email private from both attackers and government agencies? I am attempting to setup a secure and private email account for my company. we currently use gmail which actually requests the emails from a hosting service provider that is configured with our company domain name. I would like to stop using gmail, but our hosting is not very reliable (not as much as gmail can be, but it isn't bad). and it probably isn't very secure either.

I was thinking about having a forwarder in the hosting service, not actually having anything stored in there. just forward, I think a forwarder would have a smaller probability of downtime, since it is only a service in the background of a mainframe and doesn't require storage like a fully functional email account needs.

Then I would have that forwarder send the email to at least another 2 email accounts (redundancy to counter downtime) and then a desktop email client would pull and erase the emails every 5 minutes. (this servers need to be somewhat secure, any recommendations?)

The email client would pull the emails through the TOR network to avoid tracking and everything with PGP of course.

Am I just running around and is there a better way to do this or is this not going to accomplish a private email account anyway?

Am I just running around and is there a better way to do this or is this not going to accomplish a private email account anyway?

It's not going to accomplish privacy from the prying eyes of major governments for a very simple reason: the e-mails sent to your company can be read from the sender's outbox (perhaps even while they are being composed!).

There is no simple way to keep out major governments. It can be done, but it takes a -lot- of effort at both sides of the communication.


Ethicality of websites that test other sites for Heartbleed I realize that this may be more of an opinion type question, but I see a lot of questions on ethics in this forum so I hope mine fits in.

I was reading a BBC article about Heartbleed, and in the article it references couple of sites that can test other websites for presence of Heartbleed vulnerability. The sites' stated purpose is to help users see if a site that they use is currently vulnerable (e.g. test if the site I'm about to purchase from is vulnerable to Heartbleed), which in itself is a good thing.

However, they're essentially sending an attack against a target for which they have not obtained a permission to do pentesting (since any user can test any site they wish).  Does this not, by itself, violate ethical boundaries?

The particular site linked in that BBC article is not launching attacks. It simply is checking the HTTP headers of the website you enter and decides if the site is vulnerable or not based on if it can identify the version of open SSL it is using, the date of the certificate and a database of known vulnerable sites. It does this because this is all public information, attacking it would have legal consecuences like you mention.To answer your question in my opinion there is nothing ethically wrong with testing for it as long as you don´t use or store the information you would obtain by exploiting it, however it would still be illegal.


Hide data from user, but process it in application Is there a way to hide the data that's received somehow from the user? In particular, I have some data that gets send from a webserver to an application. I want the application to process the data, but I do not want that the user is able to see the information.

I thought about this a while and came to the conclusion that it's impossible. If the data is received, the user can always  find a way to get its hand on the data. (e.q if I'm using asymmetric cryptography I can't hide the private key from the user well enough) The only thing that I could do is make it as hard as possible to do so. Am I right or am I missing something crucial here?

If my assumption is correct, are there any things I can do to make this process really hard or is any time that I invest in doing so, a waste of time?

Thanks for your time!

No. People with vested interests and deep wallets have put countless man-hours into solving this problem, even when using specialized hardware, and it gets broken over and over. Some game systems used security chips (10NES, anyone?) which validated cartridges and refused to run the system if the signatures did not match. It did not work out too well. If you find a way to solve this yourself, you have single-handedly obsoleted the entire DRM industry.
https://superuser.com/q/14224/893950
https://skeptics.stackexchange.com/q/4630/47018
Are there DRM techniques to effectively prevent pirating?


when should i use HMAC-based JWT? I read a number of blog posts and found that it is tough to keep the secret-key a secret and if using a symmetric algorithm for JWT creation, the generator has the power to create as well as validate the JWT. This seems a place where it may be misused.

This brings in picture RSA-based (asymmetric algorithm for JWT creation). These JWT seem to be a better choice if we want single authority for JWT creation.

When should one use HMAC-based JWT?

It would be so nice if you could give an example scenario.

You have a server which has a secret key. You want to give another party some type of claim (for example, you could give a user a token saying they're authenticated), so you sign it and hand the signed claim to that party. Then they can present that claim at a later time and you can verify:

Authentication: that you signed it, assuming you didn't share your secret, and...
Data Integrity: that the data has not been altered.

If you're sending a claim that another party needs to verify, then use an asymmetric digital signature algorithm, such as RSA. This is called Non-Repudiation and is not a property of HMACs.

Another example: You're sending another server some data that you expect that server to return to you at a later date, but you need to make sure that server didn't tamper with that data. You can sign it with an HMAC.

Ultimately this question is equivalent to: "What's the difference between MACs and DSAs?" and there is lots more reading under that topic.


Is single quote filtering nonsense? Penetration testers found out that we allow single quotes in submitted data fields, and want us to apply rules (input validation) to not allow them in any value.

While I'm aware that single quotes are popular for SQL injection attacks, I strongly disagree that they should not be allowed as valid input. I am advocating for actually preventing SQL injection by means of using prepared statements (which properly quote the values) instead of filtering out anything that remotely looks like being an SQL fragment.

My case:

Person names can contain single quotes (such as O'Reilly)
Text fields can contain single quotes (such as I'm pretty sure)
Number fields can contain single quotes (EUR 1'000'000)
and many more

I've seen other cases where applying SQL injection prevention rules dicarded valid data for the silliest reasons (name "Andreas" rejected because it contains an AND, and various common words in plain text fields being rejected because they contained the keywords "select", "insert", "update" or "delete").

What's the security professionals' stance on that matter?

Shall we reject implementing input validation for single quotes for the reasons I stated?

You should implement input validation as a defense-in-depth method. So input validation should not be your primary defense against SQL injection, that should be prepared statements. As an additional defense you should restrict the allowed inputs.

This should never ever restrict functionality. If there is a legitimate use case to have apostrophes in input, you should allow it. So you should allow single quotes in name fields, descriptions, passwords, but not in number fields, username fields, license plate fields.

To block single quotes in all input is madness. This breaks functionality of the application and isn't even the correct solution against SQL injection.

Consider the possibility that you misunderstood the pentesting company. If this is seriously their advice, this reflects badly on the pentesting company and I would advise you to search for a pentesting partner that helps to properly secure your software, instead of making it unusable.


Should IBAN and bank details be considered private data and encrypted? To pay off our users, they are asked to enter their IBAN and bank name and bank address. The users are mostly based in Europe.

As far as I know (see also this question) these details can not be used to withdraw money without verification (Direct Debit in Germany?).

Would you encrypt these details? Or in other words, is it considered good practice to especially protect them? (Like you won't store passwords in cleartext but rather as a hash)

As a European, I consider my IBAN to be my private information, just like my email address, real name, home address and IP address. I'd like for you to not store any of them, but if you have to, please encrypt them and make sure my information (it's my information, not yours) is secure.

So to directly answer your question, yes, encrypt it and don't  store the key nor handle encryption/decryption on the server processing user requests.


Using BCrypt to transmit sensitive data in client/server configuration I'm developing a software in which I need to transmit sensitive data (passwords) in a server/client configuration using TCP. All data is encrypted using AES (the symmetric key is unique to each exchange and transmitted using PGP/RSA, this part is secure).

I'd like, for added security, to hash the sensitive data before sending it. The passwords are stored in a sql database. Using SHA-256/512 works wonders, but I'd prefer using BCrypt which is rock-solid in case the database is stolen. However since BCrypt requires the plain password to verify matches and since the check is done server-side, this would require me to send the password in plain text (albeit, AES-encrypted). I've also thought of doing around 1000 hashing iterations of the password using sha-256/sha-512 but I'm unsure if it's really the best idea.

What would be the best way to ensure a fully secure transmission, and a fully secure storage of passwords ?

Without proper transport level security (i.e. a TLS connection) it is not possible to secure an application against man-in-the-middle attackers. Using bcrypt or something else to transfer the password doesn't help the situation. You should have a secure connection between the client and the server, with both encryption and authentication.

Once you have that, there is no problem in sending the password just as is over the secured connection.

Another attack surface is a database compromise, for which the proper solution is to store a bcrypted password instead of a plaintext password in the database.


Can read receipt on sign up and password reset emails be used to enhance security? I recently signed up for a webpage. When I opened the customary "click this link to validate your email and pick a password" email my client notified me that the sender had requested a read receipt. I opted not to send one, and could complete the sign up anyway.

I was a bit surprised, since this has never happend to me before on a similar email. Being of the curious kind, I started to speculate why they request receipts, and how they could be used to enhance security. Maybe it is related to token invalidation, but how?

I fail to understand how they could be used. Perhaps you have any ideas?

The only way I can think of this improving security is that any links/tokens get revoked sooner.

Example: with an password reset email the token may be valid for 1 hour, if a read receipt is received after 6 minutes it would be reasonable for that token to only be valid for another 5 minutes. This reduces the attack window from 1 hour to 11 minutes.


Is it possible to utilize an outbound proxy to upgrade to TLS Given a situation where legacy technology exists from a system and we don't want to do a complete upgrade (.net in this case w/ version that doesn't have any support for TLS 1.1/1.2) as the product will soon be EOL.  However, we are being required to upgrade from TLS 1.0 to 1.1 for some outbound calls.  Is there a proxy setup that would allow for such an activity?

Thanks

Due to the security built into TLS this can not be done by changing the existing TLS handshake in the proxy. Instead a TLS connection between the target server and the proxy and another TLS connection between the proxy and the client must be created. The latter connection cannot get the original certificate from the server, but the proxy must create a new one signed by its own CA. All certificate validations will be done by the proxy, so you need to trust the outbound proxy to do this properly. You also need to configure your application to trust the CA used by the proxy to create the new certificates.

Since TLS is terminated and recreated at the proxy there is no longer an end-to-end encryption. This means, that client certificates will not work in this setup transparently, i.e. you would need to move the sending of the correct client certificate to the proxy. Only few proxies support this.

If you can live with these limitations and if you only care about HTTPS traffic there is a lot of software which can do this. If you have one of the better firewalls or secure gateways the functionality is probably already there in the form of SSL inception capabilities. Apart from that you might use the free squid web proxy or test tools like mitmproxy. But note that especially the test tools not always validate the certificates properly. Also some solutions cannot deal properly with sites using Server Name Indication which makes these products unusable with lots of today's sites.

If your aim is not to deal with HTTPS traffic but with other protocols (i.e. IMAP, SMTP, SIP ... or custom protocols) the choice is much smaller and you might need to develop your own protocol specific version of such a proxy.


How can I spoof source ip address while making a ping request from windows command prompt? I am using ping command to test my website which is running on a local server at the moment.

How can I spoof source ip address while making a ping request from
  windows command prompt?

If you just want to change your local network address (e.g., change from 192.168.1.69 to 192.168.1.70) then you can set a different static IP address in the Windows "Network and Sharing Center". The exact steps depend on what version of Windows you are using, but should be available on google.

If you want to spoof your actual Internet IP address you may have to find and proxy server, log into that proxy server, and then ping from that machine.


What is the purpose of the default header/cookie in an MVC anti-forgery token? I've read that the MVC anti-forgery token defeats CSRF attacks by storing security tokens in a form field and then comparing the default header/cookie value sent automatically by the browser to the field value set by MVC on every request. Since a malicious web site will not know what value to give the field that stores the token, a CSRF attack fails.

So whats the point of storing the token in the header at all? Couldn't you just store the token in a form field on every request manually from Javascript and skip the comparison altogether?

This question applies to me, because I'm creating a single sign on auth scheme for different apps that run on SignalR, ajax requests and ASP.NET forms. I aim to avoid the CSRF attacks by sending the auth token in a custom field for each type of request: hidden field for ASP.NET forms, part of req body for AJAX, and query string for SignalR (with default settings in place to disable cross-origin requests), avoiding default headers and cookies altogether.

ASP.NET MVC uses a variation of synchronizer token pattern. In a typical implementation, syncrhonizer token pattern works by generating a large random token and preserving it in two locations:

Session state (either on server or client)
In a hidden form field

When a form is submitted, server will check that both values match and fail if they don't. This works because an attacker can't get the token value in advance.

ASP.NET MVC slightly modifies this pattern by not using session state, instead using session cookie. Token also contains some additional data depending on whether it is a cookie token or form field token:

    /* The serialized format of the anti-XSRF token is as follows:
     * Version: 1 byte integer
     * SecurityToken: 16 byte binary blob
     * IsCookieToken: 1 byte Boolean
     * [if IsCookieToken != true]
     *   +- IsClaimsBased: 1 byte Boolean
     *   |  [if IsClaimsBased = true]
     *   |    `- ClaimUid: 32 byte binary blob
     *   |  [if IsClaimsBased = false]
     *   |    `- Username: UTF-8 string with 7-bit integer length prefix
     *   `- AdditionalData: UTF-8 string with 7-bit integer length prefix
     */

Both tokens are encrypted and authenticated and thus not readable on the client side. See the implementation of serializer here. Given the anatomy of the token above you can see that they are not even identical on the client side, both will encrypt to two different ciphertexts and can't be validated there.

You can probably change the behavior in a way that cookie is not needed by storing CSRF token server side in session state. But you really need two of them and you really need to compare them to make CSRF protection work.

EDIT

To answer more directly to your original question

  What is the purpose of the default header/cookie in an MVC
  anti-forgery token?

To give a complete solution that will work all the time and for any application.

It even has an ability to protect login pages:

  Anonymous authentication

  The anti-XSRF system contains special support for anonymous users,
  where "anonymous" is defined as a user where the
  IIdentity.IsAuthenticated property returns false. Scenarios include
  providing XSRF protection to the login page (before the user is
  authenticated) and custom authentication schemes where the application
  uses a mechanism other than IIdentity to identify users. To support
  these scenarios, recall that the session and field tokens are joined
  by a security token, which is a 128-bit randomly-generated opaque
  identifier. This security token is used to track an individual user's
  session as she navigates the site, so it effectively serves the
  purpose of an anonymous identifier. An empty string is used in place
  of the username for the generation and validation routines described
  above.

As per your comments, you are wondering whether you can do it without cookie by including encrypted username and expiration date into a hidden form field. The answer would be it depends.

Such token could be stolen with an XSS attack whereas an authentication cookie (or CSRF token cookie) marked with httpOnly couldn't. This would make your solution vulnerable in the time frame of your expiration. Whether this is acceptable or not depends on you and the type of the application. For example, a net banking application wouldn't tolerate any kind of CSRF vulnerability but a simple online game could.

You can avoid CSRF altogether if you don't use cookies for storing authentication tokens.


HTTP Basic Auth and CSRF I would like to know if the Basic Authentication header for site A can be sent from site B when trying to access site A for non-GET requests (which would make the site vulnerable to CSRF attacks).
I tried to call a site on localhost from a HTML file (at file://), and from what I see the Authorization header is sent. Is there a way to make the basic auth header only be sent if it's the same site, or when accessing directly from the browser address bar, like when clicking in a link? I would like to make it work just like the cookie SameSite attribute with the value Lax:

Cookies are allowed to be sent with top-level navigations and will be
sent along with GET request initiated by third party website.

This effectively stops CSRF attacks (not originated from XSS, of course) as long as GET requests ar safe (don't change state) and the browser supports it (most browsers support it already).
I would like to know if there is something similar that I can do for Basic Auth. If it helps, I'm handling the basic auth in nginx.

Like a normal (not same-site) cookie the Authorization header for Basic Authentication is always send with a normal HTTP request when the site is accessed and credentials are known, no matter if cross-site or not. There is no way to specify a different policy for this header.


"MAC function must resist existential forgery under chosen-plaintext attacks", what does that mean? While reading about MAC (Message Authentication Code) I have faced this sentence:

  MAC function must resist existential forgery under chosen-plaintext attacks

but I got confused. What does resist existential mean and what does chosen-plaintext attacks mean? I am new to this field and I need your help so could anybody explain and simplify these two terms?

Explanation with examples would be appreciated.

An existential forgery of a chosen plaintext is having the ability as an attacker to obtain a valid MAC for a plaintext of your chosing, without knowing the key required to generate a correct MAC.

A common vector for this is a timing attack, and that would work like this:

The attacker sends a message, and an HMAC (really just a sequences of bytes the same length as the HMAC) and times the response from the decryption system.
The attacker then sends the same message, and the same pseudo-HMAC repeatedly, with the exception that he now iterates though every (256) possible value for the first byte of the HMAC.
If the decryption system is returning an error immediately on finding a mismatch between bytes, one of these iterations (the one with the same first byte value as calculated by the decryption system) should take slightly longer to return. If the attacker can can detect that difference, he now knows the correct first byte for the correct HMAC for the message given the decryption system's HMAC key.
The attacker sends the same message and HMAC, this time with the known correct first byte, iterating over the second byte, until again, he finds the byte that causes the decryption system to take slightly longer to respond with an error. The attacker now knows the second byte of the correct HMAC.
Rinse and repeat for every successive byte in the HMAC, until a valid HMAC has been derived for the attacker's chosen message, sans key.

This is why HMAC comparison needs to be constant-time, comparing all the bytes of the submitted HMAC to the calculated HMAC before returning a response. This way, no matter the position of any incorrect bytes, the time to error will always be equal. The attacker no longer has a way to tell what or where the incorrect bytes are.

And most of this answer is copied directly from my answer to: Timing attack against HMAC in authenticated encryption? hence the references to HMAC specifically.


sqlmap unable to find SQL injection vulnerablitity so i just started up with sqlmap to learn sql injection vulnerability on my application. Here I followed steps as per some tutorials.

So this are the steps which i followed :

sqlmap.py -u "http://www.myurl.org/dis/data.php?id=3" --dbs

Console displays :

[11:19:45] [INFO] testing connection to the target URL
[11:19:46] [INFO] testing if the target URL is stable. This can take a couple of
seconds
[11:19:47] [INFO] target URL is stable
[11:19:47] [INFO] testing if GET parameter 'id' is dynamic
[11:19:48] [INFO] confirming that GET parameter 'id' is dynamic
[11:19:48] [WARNING] GET parameter 'id' does not appear dynamic
[11:19:49] [WARNING] heuristic (basic) test shows that GET parameter 'id' might
not be injectable
[11:19:49] [INFO] testing for SQL injection on GET parameter 'id'
[11:19:49] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[11:19:56] [INFO] testing 'MySQL >= 5.0 AND error-based - WHERE or HAVING clause
'
[11:19:59] [INFO] testing 'PostgreSQL AND error-based - WHERE or HAVING clause'
[11:20:01] [INFO] testing 'Microsoft SQL Server/Sybase AND error-based - WHERE o
r HAVING clause'
[11:20:04] [INFO] testing 'Oracle AND error-based - WHERE or HAVING clause (XMLT
ype)'
[11:20:06] [INFO] testing 'MySQL inline queries'
[11:20:07] [INFO] testing 'PostgreSQL inline queries'
[11:20:07] [INFO] testing 'Microsoft SQL Server/Sybase inline queries'
[11:20:07] [INFO] testing 'Oracle inline queries'
[11:20:08] [INFO] testing 'SQLite inline queries'
[11:20:08] [INFO] testing 'MySQL > 5.0.11 stacked queries'
[11:20:11] [INFO] testing 'PostgreSQL > 8.1 stacked queries'
[11:20:13] [INFO] testing 'Microsoft SQL Server/Sybase stacked queries'
[11:20:58] [WARNING] using unescaped version of the test because of zero knowledge of the back-end DBMS. You can try to explicitly set it using option '--dbms'
[11:21:27] [WARNING] GET parameter 'id' is not injectable
[11:21:27] [CRITICAL] all tested parameters appear to be not injectable. Try to increase '--level'/'--risk' values to perform more tests. Also, you can try to rerun by providing either a valid value for option '--string' (or '--regexp')
[11:21:27] [WARNING] HTTP error codes detected during run:
500 (Internal Server Error) - 5 times

I need to know :

Why its not able to get the database ?
What does this means '--string' (or '--regexp') ?

Lets try to add --level=3 --risk=3 to you sqlmap command. If you increase the risk and level, then sqlmap tries more clever stuff to find and exploit. It means sqlmap will try to not only visible sql injection potential but also blind stuf..

Again same result you can add * to your vulnerable parameter in order to identify if sqlmap is posting to correct parameter or not


Storing key store passwards I am building an application that uses keystores as a way to securely store RSA keys and certificates.

Obviously, I need a password to retrieve my private key.

What is the proper way to store this password? I know, for example that burying it in the code is not a good idea.

I could find something useful until know and I need if for school.

Thanks

So there are several ways to answer this question, but ultimately it's going to depend on your requirements and what you have available to you.

The simplest solution is to never store the passphrase and manually
input it when required (at service start.)  That can seem onerous but
if the service is stable you're not likely to enter it often.
If you have a physical device, or if you have the ability to have
host affinity (keep your virtual machine on the same physical machine
all the time.) You can likely take advantage of a Trusted Platform
Module embedded in your device.  It's possible to store symmetric
keys in a TPM (a good breakdown is here:
https://security.stackexchange.com/a/51341/2678) it's not any more
secure really than a passphrase on disk to an active attacker, but it
is stored separately than the disk if it were to be
stolen/compromised it would require more than a simple disk copy to
discover.
The better option is you could actually store the RSA keys in the TPM
itself and the TPM can handle the keying operations instead of
holding them in a keystore directly.  If the daemon you're using can
support PKCS11 this is the best supported way.  (See Virtual
Smartcards: https://frankmorgner.github.io/vsmartcard/virtualsmartcard/README.html)  Also the Java docs: https://docs.oracle.com/javase/8/docs/technotes/guides/security/p11guide.html

These are definitely not the only ways you can do this, but it should give you some ideas.


How to write bug in proper format I want to know the proper format in which a bug about a particular site should be written. It's a localized question. Is it legal to report a bug or will it be considered spam?

Jan Doggen is right: just writing an email which explains the steps to reproduce the bug, the expected result, and the actual result is enough.

If you want a slightly more structured format, I suggest you to take a look at the Facebook bug report form and to read these Google guides.

If you want to be more accurate when describing the impact, you could read the CVSS 3.0 scoring criteria (https://www.first.org/cvss/specification-document) and then use this calculator.


How to be sure content was generated on a specific software? I am developing an open source software. This software generates content that is sent to a server for publishing. Anyone can get this software and generate content.

The API for publishing at the server is also public. (Can be changed if necessary).

Is there a way I can make sure the content was generated with this software and not any other tool?

My first guess would be to sign content generated with "my" software. I can't stop anyone else of signing the code the same way.

Thanks

No there is no way to future proof the content output of an open source product against mimic software acting as an impostor.  By definition, any open source project can be forked to do exactly the thing about which you are concerned.

You can (must) address this issue with trust rather than technology.   Trust is precisely the opposite of an API.  Trust relies on humans making risk decisions rather than code somehow watermarking output.


Why won't pdf2john extract the password hash of this encrypted pdf? Getting blank results New to the community, and to JtR and Hashcat as a whole, but after searching for a few days I couldn't find a solution to this specific problem.

I have a password protected PDF file that I'm trying to crack to prove to a friend of mine that it can be done (or not as the case may be).

The problem is this:
I run pdf2john.pl on the file and put it out to a .txt or hash file. However, all I get is "name.pdf: " and nothing where the hash should be. Am I doing something wrong, or does pdf2john not work for this instance?

Does it work when you try to encrypt and crack a PDF yourself?

Here is a rundown on encrypting and cracking it with the tools you described:

Get a sample PDF file sample.pdf.
Encrypt it. I'm using qpdf with the password abc123.

$ qpdf --encrypt abc123 abc123 256 -- sample.pdf sample_encrypted.pdf

Extract the hash.

$ ./pdf2john.pl pdf-sample_encrypted.pdf > pass.john

(I used pdf2john.pl from here.)
Crack the hash.

$ john pass.john
Loaded 1 password hash (PDF [MD5 SHA2 RC4/AES 32/64])
Will run 4 OpenMP threads
Press 'q' or Ctrl-C to abort, almost any other key for status
abc123           (sample_encrypted.pdf)
1g 0:00:00:35 DONE 2/3 (2018-04-12 13:37) 0.02787g/s 585.4p/s 585.4c/s 585.4C/s 123456..franklin

Use the "--show" option to display all of the cracked passwords reliably
Session completed

If it works when you encrypt it following these steps, but not with the file you got, consider that the file may be corrupt or encrypted with an unsupported method. Ask your friend how he encrypted it and try to reproduce it with his approach. Ultimately, without access to the file it's hard to pin down out where exactly you went wrong.


Gmail Account Password Compromised Twice In Two Weeks I have an many Gmail accounts and I've never had any issues like this. I created a new Gmail account for a new website I created. It has the same name as the website, e.g. something.com and something@gmail.com

Its password has been compromised twice in the last two weeks. The first time it was compromised, I changed the password to something that is over 40 characters long and contained every type of character in it. Yesterday evening, it was compromised, too. The problem is if the most powerful supercomputer were to make an brute force attack, it would take forever for it to guess it right, assuming Google doesn't stop it from making trillions of guesses every second.

What's even more confusing is that I created the account a month ago. It receives no mails whatsoever, and no human or machine knows the address of this mail because I never used it for anything. It just exists there. There are two machines that were logged in to it: my desktop and smart phone. My desktop does not seem to be compromised in any way. My smart phone is outdated, and does not receive any more OS updates because the hardware is not capable of running the newer versions. I am also logged in to all my other mail account on this phone, but I did not have any problems with the others security-wise. I also did not enter my password anywhere except when I was alone in my room, so it is not possible for anyone to see me entering that password. I only entered it once, when I changed my password two weeks ago anyways.

The login attempt seems to be made from US according to Google, but the IP address' origin seems to be Brussels, Belgium and it also looks like the IP belongs to Google. The following are two IPs that Google informs me of:

2a00:1450:400c:c0c::214
2a00:1450:400c:c0c::21f

My question is that how in the world they knew what my password was? Could these be fake warnings from Google, just to get me to change my password?

The problem appears to be related to redirecting my mails to another e-mail of mine. Because I have many e-mails, instead of trying to check all of them, I redirected all of them to my main e-mail account through POP3. Gmail sees POP3 unsafe, even though it is the only way to do it. This also explains why IPs belong to Google.

There is still the question why it happens once in two weeks while mails are being checked many times a day, but it makes more sense than someone figuring out the password.


Cryptography as an ecosystem I was thinking about a thought experiment.
Let's imagine a world full of crackers such that whenever you encrypt something there will be someone who will try to crack your cryptographic key through bruteforce.
Suppose furthermore that we are using secure key based cryptography where keys are randomly generated by the creator such that on average it will need unsustainable computational power to crack it (not much different from reality).

Suppose that in the initial state of our system all crackers use a rudimentary algorithm that starts from 0 and searches the key one by one by bruteforce.
Now let's imagine that we want to encrypt our message in the mentioned world, we run our RNG and we get 10 (a low value). For the hypothesis above we are absolutely certain that if we encrypt the message with 10 as key it would be immediately cracked. So we need to drop 10 and basically we have to raise the floor of our RNG, reducing the key space size, or to shift it completely.
When most encrypters will end up adopting these measures as a consequence crackers will start to change their starting point for bruteforce and I guess we will get some kind of predator-prey process.
Now I know it's not a specific question but I was wondering if there is any scientific literature about this phenomenon, if it has a name and basically if there is any kind of reference to something similar somewhere.
I googled things like "Cryptography game theory" and similar but did not really find anything pertinent.

Any usable random source for keys will give you keys that are as randomly distributed across the whole key space as possible.

Thus, the expectation value for "an attacker tries this key in their N-th attempt" is N=|key space|/2.

If you have knowledge of your attacker's search order, you can of course exploit that. But in practice, it's always going to be worse to restrict your key space (or change the uniformity of key generation), because you then give your attacker, who previously had 0 bit of info on your key, some amount of bits of certainity about your key.

Best case is that the slow down in attack is linear to the secrecy you've lost, but realistically, you weaken your overall system, because from a non-uniformity of the key bits follow non-uniformities in the ciphering process, and suddenly you're converting a cipher against which the best attack is a brute-force one, into one where you can make statements about the plaintext from the ciphertext without even knowing the key completely.

So, no, don't do that.


Multiple outbound TCP/8333 connections containing the EICAR test string An IPS / IDS / UTM detects 50 connections from a single client containing Virus/Worm Eicar test string within half an hour. The destinations are IP addresses all around the world on port TCP/8333.

A real infection shouldn't send EICAR test files, but would rather be detected as the real threat. On the other hand, no human should be voluntarily doing this either. What's happening? False positive?

What's the traffic? The TCP port 8333 is used by Bitcoin cryptocurrency and VMware Server Management User Interface. Of these two, Bitcoin is the suspect as it's a peer-to-peer network.

Why would Bitcoin send out EICAR strings? The Bitcoin blockchain is distributed to every full nodes. In addition to money transfers the blockchain can contain messages and files. Someone indeed have uploaded the EICAR string to blockchain lately, and that wasn't even the first time:

Jan 26, 2019 9:16:13 AM, block 560154, transaction f842b99ae150...
Nov 27, 2016 2:13:13 AM, block 440742, transaction 4a3282204dc3...
EICAR is not the only virus signature that have caused false positives and harm.

Because the information on the blockchain is public, the messages aren't encrypted for confidentiality, but signed for integrity. That's why the string was sent out in plain text, exposing it for detection.

Probably the detections centralized within half an hour because the node had just downloaded the block 560154 and, therefore, became a source for other nodes downloading the same height of the blockchain. This will happen again occasionally, when someone requests for block 560154 or 440742. Or when someone repeats the prank.

Why IPS detected it while virus protection didn't? EICAR test file has a strict specification:

  Any anti-virus product that supports the EICAR test file should detect
  it in any file providing that the file starts with the following 68
  characters, and is exactly 68 bytes long:

  X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*

In the Bitcoin blockchain this string is in the middle of a huge file: it's not starting the file and the file is not exactly 68 bytes long. An IPS system on a firewall on UTM monitors the TCP packets instead of files. If there is a signature to detect this string, it can be anywhere in the TCP stream.