MySQL BACKRONYM (CVE-2015-3152) only affects MySQL client? I read the CVE-2015-3152 (https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-3152) named BACKRONYM (http://backronym.fail/), and what I understood (ELI5 style) was the following:

Attacker sniffs the network looking for packages from a MySQL client to a MySQL server.
Attacker replies to MySQL client tricking it into think the MySQL server is replying "hey, I don't support SLL, send me thing in plain text please!".
MySQL client resends the package, but now in plain text.
Attacker is able to read your username  password in plain text.

This basically means that I would only need to update the server which is the MySQL client  and configure it to enforce SSL, is this conclusion right?

PS: Please assume I have 2 different servers on different networks and Server#1 has the MySQL master/server and the Server#2 has the MySQL slave/client which connects to Server#1 to query stuff. Also I would only care about fixing this vulnerability (so if updating the client fixes the issue, I'm fine).

That's right, the issue lies in the database client, but you don't need to configure it. The problem is that when you tell it to connect using SSL, via "--ssl" or some other option that implies its usage, the client tries to use it, but will still try to connect via plaintext if the server tells it that it is not configured to use SSL. The fix just enforces the client to ONLY connect IF the server accepts the usage of SSL (when that "--ssl" or some other option that implies it is used).

Original advisory: oCERT


This is 2015. Has SHA1 been exploited or cracked yet? went to Qualys SSL lab and tested one web site. One of the findings says the site is signed with weak algorithm SHA1withRSA and I did some research all are saying we should change to SHA-2. may i know if SHA1 has really been hacked or cracked or exploited yet to warrant a change to SHA2?

thanks

As of 2017, SHA-1 should no longer be considered secure. Google and Marc Stevens' group at CWI reported success with collision attacks against the full, non-reduced-round SHA-1, based on Stevens' more limited 2015 results referenced in Nicola Miotto's answer. For the Google announcement, click here.

This does not mean SHA-1 is fully broken, but just compromised. There are three types of attacks on hash algorithms, in order of increasing difficulty/complexity:

Collision Attack: Find any two distinct inputs x and x' that hash to the same output: h(x) = h(x').
Second Preimage Attack: Given some input x and its hash value h(x), find another input x' that also hashes to h(x); i.e. h(x) = h(x')
First Preimage Attack attack: Given a hash value y, find an input x such that x hashes to y: h(x) = y.

The findings only report success with the first scenario. Collision attacks allow an attacker to present two different files as having the same hash signature, thus pretending that they are the same file. This attack has limited utility, and cannot, for example, be used to decrypt SSL/TLS traffic or reverse hashed passwords into their plaintext equivalents. However, if CAs are not careful to add randomness as required after MD5 was similarly broken for collision an attacker might be able to alter a valid certificate to a different identity and/or rights and thereby forge certificates and/or signatures, and if they can also MitM traffic, to impersonate SSL/TLS servers.


Can I use Honey Encryption in place of MD5? The MD5 hashing algorithm is a one-way cryptographic function that accepts a message of any length as input and returns as output a fixed-length digest value to be used for authenticating the original message.The MD5 hash function was originally designed for use as a secure cryptographic hash algorithm for authenticating digital signatures.

Honey Encryption algorithm can give us the functionality of securing the data as well as making us aware of any threats well in time.

Both of these are one kind of encryption technique. So is it possible to use Honey encryption in place of MD5?

No, not directly.  The concepts are almost diametrically opposed, so you would need build an entirely new system. But you shouldn't be using MD5 either.  For password hashing you should be using a slow hash function with a variable work factor, like bcrypt, and for general cryptographic hashes, a more modern and stronger function such as SHA-2.


Is there a way to generate a Yubikey OTP without touch? I'm trying to automate an authentication canary in a workflow that includes a mandatory Yubikey OTP (the 44-character unique password).  Is there a way to configure a single Yubikey in such a way that I can generate the Yubikey long-touch OTP via script or API call without requiring touch?

Even if there were, you have effectively bypassed the one useful feature of the Yubikey: external verification is required for access to the TOTP token.

If you control the workflow then perhaps switch to another OTP mechanism where you can use the secret programmatically. Or remove OTP for a limited set of circumstances dictated by your threat model, e.g. for one user from one IP.

If you don’t control the workflow then consider hacking the Yubikey with an Arduino, a USB controlled switch or similar. The “button” is simply a capacitive sensor.


tunnelling HTTP request through DMZ from a secured area In my topology I have a secured area where all the servers are. There is also a DMZ with a few reverse proxy servers. I now need to make one of the servers in the secure area open to make HTTP calls to the Internet (to a specific IP address).

I can think of two possible implementations:

tunnel at the router level
set up a forward proxy in the DMZ

Which way would be preferred?

A normal proxy (aka forward proxy) is an infrastructure service. I mean it's a service "somewhere underneath" your customer/business service. Just like internal DNS or monitoring or iLO/iDRAC.

How much separation is needed from the hostile world? Much vulnerability appears at the point where your systems listen. Manage that first, think about other reasons later.

Allowing a normal proxy to listen to requests from DMZ adds risk. Since the financial cost doesn't change much, I'd say place it deeper.

Deeper could mean in web application server segment, but it would be best to place it in separate infrastructural segment (depending on cost).

Having resolved the listener part, now the connector part. It follows you can "tunnel at the router level", which is probably better known as "route that traffic".


Is it possible to decode an encoded PEM SSL certificate without OpenSSL in CLI? It is said that PEM certificates are encoded with ASCII (Base64), excluding labels.
Let's take this certificate as an example.

-----BEGIN CERTIFICATE-----
MIIEMjCCAxqgAwIBAgIBATANBgkqhkiG9w0BAQUFADB7MQswCQYDVQQGEwJHQjEb
MBkGA1UECAwSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRow
GAYDVQQKDBFDb21vZG8gQ0EgTGltaXRlZDEhMB8GA1UEAwwYQUFBIENlcnRpZmlj
YXRlIFNlcnZpY2VzMB4XDTA0MDEwMTAwMDAwMFoXDTI4MTIzMTIzNTk1OVowezEL
MAkGA1UEBhMCR0IxGzAZBgNVBAgMEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UE
BwwHU2FsZm9yZDEaMBgGA1UECgwRQ29tb2RvIENBIExpbWl0ZWQxITAfBgNVBAMM
GEFBQSBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczCCASIwDQYJKoZIhvcNAQEBBQADggEP
ADCCAQoCggEBAL5AnfRu4ep2hxxNRUSOvkbIgwadwSr+GB+O5AL686tdUIoWMQua
BtDFcCLNSS1UY8y2bmhGC1Pqy0wkwLxyTurxFa70VJoSCsN6sjNg4tqJVfMiWPPe
3M/vg4aijJRPn2jymJBGhCfHdr/jzDUsi14HZGWCwEiwqJH5YZ92IFCokcdmtet4
YgNW8IoaE+oxox6gmf049vYnMlhvB/VruPsUK6+3qszWY19zjNoFmag4qMsXeDZR
rOme9Hg6jc8P2ULimAyrL58OAd7vn5lJ8S3frHRNG5i1R8XlKdH5kBjHYpy+g8cm
ez6KJcfA3Z3mNWgQIJ2P2N7Sw4ScDV7oL8kCAwEAAaOBwDCBvTAdBgNVHQ4EFgQU
oBEKIz6W8Qfs4q8p74Klf9AwpLQwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQF
MAMBAf8wewYDVR0fBHQwcjA4oDagNIYyaHR0cDovL2NybC5jb21vZG9jYS5jb20v
QUFBQ2VydGlmaWNhdGVTZXJ2aWNlcy5jcmwwNqA0oDKGMGh0dHA6Ly9jcmwuY29t
b2RvLm5ldC9BQUFDZXJ0aWZpY2F0ZVNlcnZpY2VzLmNybDANBgkqhkiG9w0BAQUF
AAOCAQEACFb8AvCb6P+k+tZ7xkSAzk/ExfYAWMymtrwUSWgEdujm7l3sAg9g1o1Q
GE8mTgHj5rCl7r+8dFRBv/38ErjHT1r0iWAFf2C3BUrz9vHCv8S5dIa2LX1rzNLz
Rt0vxuBqw8M0Ayx9lt1awg6nCpnBBYurDC/zXDrPbDdVCYfeU0BsWO/8tqtlbgT2
G9w84FoVxp7Z8VlIMCFlA2zs6SFz7JsDoeA3raAVGI/6ugLOpyypEBMs1OUIJqsi
l2D4kF501KKaU73yqWjgom7C12yxow+ev+to51byrvLjKzg6CYG1a4XXvi3tPxq3
smPi9WIsgtRqAEFQ8TmDn5XpNpaYbg==
-----END CERTIFICATE-----

I tried to decode this data with ASCII (Base64) decoders but to no avail:

MIIEMjCCAxqgAwIBAgIBATANBgkqhkiG9w0BAQUFADB7MQswCQYDVQQGEwJHQjEb
MBkGA1UECAwSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRow
GAYDVQQKDBFDb21vZG8gQ0EgTGltaXRlZDEhMB8GA1UEAwwYQUFBIENlcnRpZmlj
YXRlIFNlcnZpY2VzMB4XDTA0MDEwMTAwMDAwMFoXDTI4MTIzMTIzNTk1OVowezEL
MAkGA1UEBhMCR0IxGzAZBgNVBAgMEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UE
BwwHU2FsZm9yZDEaMBgGA1UECgwRQ29tb2RvIENBIExpbWl0ZWQxITAfBgNVBAMM
GEFBQSBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczCCASIwDQYJKoZIhvcNAQEBBQADggEP
ADCCAQoCggEBAL5AnfRu4ep2hxxNRUSOvkbIgwadwSr+GB+O5AL686tdUIoWMQua
BtDFcCLNSS1UY8y2bmhGC1Pqy0wkwLxyTurxFa70VJoSCsN6sjNg4tqJVfMiWPPe
3M/vg4aijJRPn2jymJBGhCfHdr/jzDUsi14HZGWCwEiwqJH5YZ92IFCokcdmtet4
YgNW8IoaE+oxox6gmf049vYnMlhvB/VruPsUK6+3qszWY19zjNoFmag4qMsXeDZR
rOme9Hg6jc8P2ULimAyrL58OAd7vn5lJ8S3frHRNG5i1R8XlKdH5kBjHYpy+g8cm
ez6KJcfA3Z3mNWgQIJ2P2N7Sw4ScDV7oL8kCAwEAAaOBwDCBvTAdBgNVHQ4EFgQU
oBEKIz6W8Qfs4q8p74Klf9AwpLQwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQF
MAMBAf8wewYDVR0fBHQwcjA4oDagNIYyaHR0cDovL2NybC5jb21vZG9jYS5jb20v
QUFBQ2VydGlmaWNhdGVTZXJ2aWNlcy5jcmwwNqA0oDKGMGh0dHA6Ly9jcmwuY29t
b2RvLm5ldC9BQUFDZXJ0aWZpY2F0ZVNlcnZpY2VzLmNybDANBgkqhkiG9w0BAQUF
AAOCAQEACFb8AvCb6P+k+tZ7xkSAzk/ExfYAWMymtrwUSWgEdujm7l3sAg9g1o1Q
GE8mTgHj5rCl7r+8dFRBv/38ErjHT1r0iWAFf2C3BUrz9vHCv8S5dIa2LX1rzNLz
Rt0vxuBqw8M0Ayx9lt1awg6nCpnBBYurDC/zXDrPbDdVCYfeU0BsWO/8tqtlbgT2
G9w84FoVxp7Z8VlIMCFlA2zs6SFz7JsDoeA3raAVGI/6ugLOpyypEBMs1OUIJqsi
l2D4kF501KKaU73yqWjgom7C12yxow+ev+to51byrvLjKzg6CYG1a4XXvi3tPxq3
smPi9WIsgtRqAEFQ8TmDn5XpNpaYbg==

How can I decode it without OpenSSL? How to prove that this code is ASCII (Base64) ?
Could you help?

PEM files are base64 encoded binary data, this is a defined standard (so there's nothing to prove here). The reason for this encoding is spelled out in the intro of RFC 7468:

  A disadvantage of a binary data format is that it cannot be
  interchanged in textual transports, such as email or text documents.
  One advantage with text-based encodings is that they are easy to
  modify using common text editors; for example, a user may concatenate
  several certificates to form a certificate chain with copy-and-paste
  operations.

The header (and associated footer) is used to denote what the enclosed data is.

As for the binary encoding, this is the DER or BER encoding of ASN.1 data, again as mentioned in the RFC:

  Several security-related standards used on the Internet define ASN.1
  data formats that are normally encoded using the Basic Encoding Rules
  (BER) or Distinguished Encoding Rules (DER)

Because these encodings output binary data, you're unlikely so see much of interest when dumping it, save maybe a few strings.

To decode without openssl, you'll need another tool that can handle DER (or BER) decoding as well as ASN.1. There are libraries available for those in most languages and there are likely to be other command line tools out there. But since you'll need an external tool, might as well use openssl.

PS: friendlier description of PEM is available on wikipedia.


What is the name for "imperfect" verification options? Let's say users log into a system using a voice-print. Software can read the input from the microphone, compare it to the stored sample, and tell the user "There is a 97.5% similarity to the voice-print stored on file", granting access depending on how sensitive it is. Due to the imperfections in microphones, air pressure chaos, and limited accuracy vocal-folds, no matter how hard the user tries, he will never be able to match his voice-print stored on file with complete accuracy.

On the other hand, if your security system uses a password string, you are able to require the password to be 100.0% correct, as it is possible for a user to perfectly replicate a password they have entered in the past.

What is the name of this type of "imperfect password", that the user cannot reasonably replicate with 100% accuracy? This would include finger/palm prints, retinal scans, voice-prints, and facial recognition.

Probabilistic or statistical authentication are probably the best fit, the alternative to deterministic authentication. (Though technically, there's a degree of probability involved when password hashes are used, rather than plaintext passwords, let's just ignore that for now.)

Biometric implies a probabilistic system, but the converse is not true, e.g. knowledge-based challenge response, recognition/CAPTCHA or signature/gesture systems.

There a useful PDF paper (thesis) on the topic of biometric probabilistic models here:
http://infoscience.epfl.ch/record/111855/files/EPFL_TH3954.pdf

Other related terms used in this context are: non-deterministic, stochastic, biometric hash, qualitative, intra-personal variability.


Can canvas hash be used to track me and ruin my anonymity? I have heard there is a fingerprinting method that traces internet users based on browser data. I believe it is called "canvas HTML hash".

This hash is unique, as I understand? Or does it change depending on what?

Imagine someone uses one VPN server for "googling", a different VPN server for "amazon-buying", etc...
Obviously when on Amazon her real-life name/ID is known.  Does that mean that she would also be identified when she is on YouTube with a different VPN server (but the same web browser)? Does canvas fingerprinting destroy anonymity?

Can someone clarify how this canvas fingerprint hash works?

Canvas Fingerprinting
The technique you are referring to is Canvas Fingerprinting.  It is one of many possible methods available for website operators to try to identify and track users without cookies.  The reason for this, of course, is because cookies can be cleared, or even "tricked" by things as simple as switching to a private (aka incognito) window.  The idea here is that the website uses javascript to try to look at something more permanent than cookies.
For a very short summary, Canvas Fingerprinting asks your browser to draw a standard picture, and then takes a hash of the results.  Different operating systems, browsers, hardware, etc... will result in slightly different images. As a result the hope is that one particular user will always have the same hash (even if, for instance, switching to an incognito window) while different users will have slightly different hashes, allowing the website to continue to track users even if they clear all their cookies.
Can you be tracked?
In practice canvas fingerprinting isn't perfect, and there probably aren't enough different combinations of "things" to uniquely identify users based on canvas fingerprinting alone.  However, canvas fingerprinting is only one possible avenue to uniquely identify users, and more intelligent browser fingerprinting can be very successful in identifying users.  Here is a website that actually measures how "unique" your browser configuration is, and therefore whether or not you can be tracked without cookies: https://amiunique.org/fp.  You'll notice that canvas fingerprinting is something they check, but it is only one of literally dozens of data points they use to determine uniqueness.
In all likelihood you can be reliably identified and tracked without cookies.  This doesn't mean that YouTube knows who you are just because Amazon does.  However, (to use them as an example), it does mean that if YouTube wanted to, they could continue to track you even if you log out, clear your cookies, and switch to Incognito Mode.  Note that I only use this as an example: I have no idea if YouTube or any particular service provider attempts to perform such tracking.
VPNs
Finally it's worth a mention that a VPN has little bearing on this conversation.  A VPN just changes your IP address, which isn't something that is typically used for tracking anyway - for many users an IP address changes frequently.  Also, switching to a VPN doesn't provide you any anonymity for services you were already using, since they can continue to track you easily if you don't clear your cookies.


Industrial security — resources for ISO27k compliance, social-engineering trend reports I'm attempting to compile resources on industrial IT security from a non-technical standpoint as it pertains to the U.S petrochemical industry. This is for my final research paper as an undergraduate student enrolled in BAISc (Information Systems Security).

My paper will be primarily structured around developing policies for employees, as well as access control.

I'm looking for online resources for:

Viewing historical data of social engineering attacks as they pertain to said industry
(I currently have data from Anti-Phishing Working Group (APWG) for the following time period: Q4 Nov. '04 - Q4 Dec. '10)
Viewing overviews of ISO 27000-series regulatory compliances (Wikipedia?)

At the moment, I'm using the following resources:

SANS Institute Publications
API Security Guidelines (2005)
ICS-CERT publications
Department of Homeland Security publications
Lecture notes on risk analysis
Audits of Canadian electricity generating companies by the Office of the Auditor General of Ontario
Reports from Siemens, NERC

you might want to consider taking a look in The Repository of Industrial Security Incidents which covers in industrial control systems as a whole and breaks down the data by specific industry.  I'm not sure if it will specifically cover Social Engineering attacks though


Could these special characters be used in a password? To use a good password, I was thinking about adding special characters.
I remember that some login services don't allow all characters.
Perhaps it depends also on the keyboard layout.

Could these special characters be used in a common password?

+ @ * # ç % & / ( ) = ? ^ ! [ ] { } - _ : ; > < | , .

Special characters don't add as much to security as you might think.  They increase the number of possible characters, but the most powerful multiplier comes from password length.

Let's say you have a very limited character set consisting of [A-Z][a-z][0-9], giving you 62 possible characters.  Therefore a 10 character password has 62^10 possible passwords, or 8.3*10^17.  Now add 10 special characters, and the number of possibilities goes to 72^10 possible passwords, or 3.2*10^18.

Choosing an 11 character password from the simple set, you have 62^11 possible passwords, or 5.2*10^19, which is another order of magnitude stronger than adding symbols to a 10 character password.

Of course, if you're picking only dictionary words, even with symbol substitutions, John the Ripper will likely shred the password in short order.  Pick long passwords that aren't dictionary words, and you'll make a real difference in your security.


Steganography to hide text within text Are there any steganography algorithms which are capable of hiding a (optionally encrypted) text message within another innocuous text message?
The scenario I envisage is that I would like to carry on an email conversation, which to a man in the middle looks completely innocent, even upon close scrutiny; but which infact contains the true message well hidden within the visible text.
I am aware of this technique being used to hide text within media files, however this sounds to me like it would be both cumbersome and suspicion-arousing to the man-in-the-middle if every message and its response has a media file attachment.
I don't currently have anything worth hiding and I am not doing anything illegal, but I value my privacy and I am very interested in cryptography.
An example would be:

Sender apparent message: Hi there Bob. How was your weekend? Mine was ... more text ... ciao
Sender real message: Did you find the password I requested?
Receiver apparent message: Pretty good. I caught up with ... more text ... ciao
Receiver real message: Yes, it was "password"

Yes, there exists algorithms that hide messages inside messages that can look quite innocent. Take for instance spammimic. It gives the possibility to hide your message inside a typical looking spam message.

A google search for "Steganography hiding text in text" gives you more research and examples around this.


Find out how my server is being used for DDOS attacks I got an email from Amazon that my Amazon EC2 server is being used for DDoS attacks and they have closed all ports except SSH. This is tragical for me but I have not been able to find out how and where this attack is running. I can not find anything in cron jobs. I am using ssh key-pairs to connect to the server so it is unlikely someone can have hijacked the root account. I did have FTP on the server but I changed to SFTP now. Could it be a PHP page being used for this and how do I find the source? is it possible someone has used a root kit without the root user access?

It could be that someone is indeed using your instance either by rootkit or through some malicious PHP scripts. Your system is compromised now. Nuke it from orbit and restore from a trusted state (backup).

Make sure to keep your server updated and use long, complex password hashes. Disallow root login (only allow login by key for instance). Install a HIDS (host based intrusion detection system) and a rootkithunter. OSSEC is a good choice on Linux.


Help with viewing hidden registry entries Like the title says, I need help with viewing hidden registry entries that are not normally accessible through the default windows regedit.

To start off, my friends son tried downloading a free game but was instead blasted with a Trojan.VBS.Autorun.ag, along with Trojan.Downloader.Generic, and some other various adware.  There were no security warnings, popups, or indication of infection.  The only reason I knew to look for something was because his son called me over to check his other game he was playing out.  When he was done, he was on youtube and I noticed an online support tab in his browser which was a huge Adware red flag.

I found a few viruses, removed them, but after searching more, realized the same virus was reappearing in different locations located in the temp dir.  Sometimes in the Temp, others in temp\is-H8O4M.tmp <---This is actually a folder not a .tmp file, the folder contained another copy of c11w.exe and cuii.exe both are Trojan.VBS.Autorun.ag

hkey_local_machine software microsoft windows currentversion run
to see what reg entries were in the key, well there were absolutely no entries in here at all. Not even legit application entries.  So my guess is the entries are being hidden from regedit.

My question is: What tools are useful for either extracting hidden keys and entries for later examination, or for opening the registry in such a way that the keys can be displayed?  Are there any programs out there that can help me? Also, if I escalate privileges to system lvl when opening regedit will that help?  Any push in the right direction is appreciated.  Thanks in advance.

I recently had a problem like this only yesterday (although the adware was transmitted to mine through a web server). A useful way to get rid of it and find it in the key, that I've personally found helpful, is to download an adware cleaner (like adWcleaner), as they show you where the viruses are being generated from, and also give you the option to remove them.

On a side note: if you want to find the IP of the server transmitting the virus (if the virus transmits data through a webserver), download Norton, as it will say An intrusion attempt by "website" was blocked, along with the IP which you can then Nmap, for the TCP server.


Impact of the response content-type on the exploitability of XSS I've come across an API of a web application I'm testing, which reflects with unescaped, unencoded, user-controlled data for some requests. However, the response includes the header Content-Type: application/json;charset=UTF-8.

The response body is simply a JSON, like the following:

{"name":"foo","title":"bar"}

I did try to perform a simple XSS (classic <script>alert(1)</script>), but the script isn't executed.

{"name":"<script>alert(1)</script>","title":"bar"}

I've read through this question, but they do not seem to discuss the impact of the content-type header.
OWASP seems to flag the reponse-type as "good" in this article.

My question is if the Content-Type header in the response has an impact on the exploitability of XSS and possibly other vulnerabilities?

My question is if the Content-Type header in the response has an impact on the exploitability of XSS and possibly other vulnerabilities?

Yes, the content type makes a difference. XSS only applies to documents that are capable of running active (script) content in the first place.

A page with the MIME type application/json can't contain active content. To the browser it's just data. The situation would be similar with text/plain, text/javascript, image/jpeg, etc.

XSS would be possible with a MIME type of e.g. text/html, image/svg+xml, text/xml and many others. In some cases, vendor-related types such as application/x-shockwave-flash may have an XSS potential, too.


Does a website have to ask permission in order to access the microphone and webcam? Unless there are settings in your browser, whether Windows, Linux or Android, unless expicitly allowed, is it standard design to require user interaction (allowance) in order for a webpage to access the microphone and webcam? What security measures are in place to prevent undesired or even accidental access?

What is the standard process for doing this, both by the rules and maliciously? I'm guess Javascript.

That's correct. HTML5 exposes getUserMedia API to access media resources on the host.

See here for a reference implementation. This is the code in action: https://webaudiodemos.appspot.com/input/index.html

In terms of what the spec say about the security, quoting from this website:

  Security

  Some browsers throw up an infobar upon calling getUserMedia(), which gives users the option to grant or deny access to their camera/mic. The spec unfortunately is very quiet when it comes to security.

  Permission dialog in Chrome:
  If your app is running from SSL (https://), this permission will be persistent. That is, users won't have to grant/deny access every time.

This is the issue to implement permission support in the spec itself: https://github.com/w3c/permissions/issues/62

However in practice, all standard browsers ask for permission via a popup box (or a infobar) before accessing the media resources. Hence, so far as one is using a modern browser, it should ask for permission.

If one is using a non-standard browser, modified version of chromium shell, or desktop based electronjs/nwjs apps, then it could be possible that the browser doesn't ask for permission, but again in such a case all other security gaurantees that modern browsers provide (eg. XSS auditor, CORS, Same origin policy etc.) goes for a toss.


What is Pixie dust attack on router? I read an article on this site,
but didn't get what I wanted so my concerns are:

How does pixie dust attack work?
What is the flaw that only certain routers contain to being vulnerable for Pixie-Dust attack?

A Pixie-Dust attack works by bruteforcing the key for a protocol called WPS. WPS was intended to make accessing a router easier, and it did - for attackers.

A WPS Pin consists of 8 digits - two Pre-Shared-Keys or PSKs. Each PSK has half the pin. To understand how a Pixie Dust attack works, you'll need to understand how the requests to the AP work:

1. Computer sends - EAPOL Start

2. Router sends - EAP-Request for the Identity

3. Computer sends - Responds with the Identity

4. Router sends - EAP request

5. Computer sends - EAP response
...

And it loops these requests a few more times before the credentials are sent.

However, during this process, your computer has been given the following:

Diffie Hellman Public key of the Enrolee
Diffie Hellman Public key of the Registrar
Two hashes - of the WPS PIN
Enrolee nonce and a derived authkey

;
Now in order to successfully bruteforce the previously mentioned PSKs, you'll need two more nonces - which are supposed to be randomly generated. And this is the most important part - since the random numbers are not really random but are derivations of the hashes (or are just zeroes) then we can bruteforce this key, even on a slow system! It will work if the implementation on the router is bad (which it is in most cases) and you should be able to find a list of vulnerable routers on the internet.

tl;dr: We bruteforce a badly generated key because of a flaw in how the random numbers are generated in many routers.


How to determine hashes/second in password cryptanalysis I'm working on my dissertation concerning cryptanalysis on password hashes. As part of my research, I aim to crack a number of passwords with John the Ripper and rainbowcrack-mt.

I'd like to determine and analyse some statistics on the passwords I crack. One thing I'd like to know is how many hashes per second the cracking application (john or rainbowcrack-mt) are testing per second. I tried searching for something suitable, however I can't seem to find any tool that allows me to extract such information.

I yet have to test out a tool called Pipal, however, this tool (from what I've read) is used to analyse password characteristics after they have been cracked.

For John the Ripper, @dr jimbob gave you the information: see the benchmarks page and use the --test command-line flag to make your own measures.

For rcracki-mt, the situation is a bit different. This uses a rainbow table which is a specific kind of look-up table containing, in a size-optimized structure, a lot of precomputed password hashes. Thus, the bulk of the hashing occurs when the table is built (with some other software), not when it is used. There is some hashing at usage time, but less, and hashing is not the only parameter in cracking speed.

Indeed, a rainbow table can be characterized by the number N of password hashes it virtually contains (i.e. there are exactly N distinct passwords which the table can crack; it will always succeed for one of these N passwords, and always fail for all others), and by its "internal chain length" t. The chain length is chosen when the table is built. The average costs are:

Table size: N/t chain ends.
Attack cost: t lookups, t2 hashes to compute.
Table building cost: about 1.7*N hashes, and a complete sorting step over the N/t chain ends.

A "chain end" is a sequence of bits of length a bit above log N, say a dozen bytes each. Depending on some technical details, you can save a factor of 2 in some places, which can matter in practice but does not change the big picture.

Rainbow tables are a variant of an older method with a clearer name: Hellman's Time/Memory Trade-Off. This points out that through the chain length chosen to build the table(s) (the t parameter), you save space (storage size is divided by t) but you increase usage cost (with a simple big table of precomputed hashes, you do one lookup and no hash; with the rainbow table, you do t lookups and t2 hashes for each attacked password hash). The trade-off is really between the available CPU for table building, the size of the hard disks, the available CPU at attack time, and the time taken for each lookup. Lookups are often the bottleneck at attack time: a mechanical hard disk will tolerate about one hundred accesses per second (these are not sequential at all). Of course, SSD offer vastly faster lookups, but are also quite more expensive per stored gigabyte, so the trade-off balance shifts.

Summary: for rainbow tables, "how many" passwords per second is the result of a combination of a several tunable parameters (chain length, but also number of tables and split between tables) and encompasses different hardware characteristics (CPU, disk size, disk technology...) for both the table building and the table usage. There is no simple answer; it really takes a lot of thinking and a lot of tuning with actual hardware -- and, of course, any actual performance result is subject to fast obsolescence due to shifting technologies.

It must be pointed out that rainbow tables are completely defeated by salts (as employed by any decent password hashing function). When salts are properly applied, only brute force with no precomputation can be used by attackers, and with no way to attack several password hashes in parallel; so you are back to John the Ripper.


Is it advisable to tie different capabilities to different session tokens? Let's say you're creating a banking web application with mobile apps. A bank user has permissions "transfer money" and "view balances." When a user logs in, we can create a session token (typical random string, stored in the database on the server and in a cookie or device storage on the client) with "view balances" permissions that lasts 24 hours.

However, "transfer money" is more sensitive so we could create a separate session token that expires in only 1 hour. If a user visits the site again in 12 hours, they'd still be able to view their balances, but they'd have to re-auth with the backend to transfer money. Then, for the next hour they could transfer money at will.

Is it advisable to create multiple session tokens with different expirations and different capabilities that co-exist in the client application? Is there a better solution?

I have come across similar approach in complex applications which are microservice based. If different teams handle these services, having different session ID's tied to different capabilities can be a way forward. However it is not an elegant solution. The ideal approach should be to use the session for identification. The access control to a particular functionality can however be handled at the server side as a part of your authorization logic.

When a request comes in for making transfers have a server side logic to check for the following.

Whether the user is authorized to perform transactions?
Whether they have a session ID which was issued <12 hours ago?


Are iPhones immune to deauth attacks? I was today rumbling a bit with wireless security, and more specific in creating Fake Access-Points to make Wi-Fi users enter their password on a phishing-page (by using the Fluxion tool).

One of the steps require you to deauthenticate the user(s) in order to capture the handshake. When I launched this deauth-attack the Windows-computers and Android-phones connected to that network were indeed disconnected; however my iPhone connected to the same network was not getting affected at all! It's MAC-address was not even shown in the Xterm Fluxion showed. I retried it with different tools but iPhone was never affected.

So, is iPhone somehow 'secured' against deauth attacks?
And why aren't deauth packets authenticated by the Access Point to avoid these deauth attacks are not possible?

No, iphone is not secured against this. It is a fundamental flaw in the WiFi protocol that this can happen. You need to be able to deauth clients before they are properly authenticated for other reasons, that is why this has to happen in plain text. Most likely you encountered one of the following ( from the aircrack documentation):

-Wireless cards work in particular modes such b, g, n and so on. If your card is in a different mode then the client card there is good chance that the client will not be able to correctly receive your transmission. See the previous item for confirming the client received the packet.

-Some clients ignore broadcast deauthentications. If this is the case, you will need to send a deauthentication directed at the particular client.

-Clients may reconnect too fast for you to see that they had been disconnected. If you do a full packet capture, you will be able to look for the reassociation packets in the capture to confirm deauthentication worked


Why OpenSSH deprecated DSA keys There was a question RSA vs. DSA for SSH authentication keys asking which key is better. Basically all answers were more in a favour of RSA over DSA but didn't really tell that DSA would be somehow insecure.

Now however DSA was deprecated by OpenSSH and is later going to be entirely dropped: https://www.gentoo.org/support/news-items/2015-08-13-openssh-weak-keys.html

The information states:

  Starting with the 7.0 release of OpenSSH, support for ssh-dss keys has been disabled by default at runtime due to their inherit weakness.
  If you rely on these key types, you will have to take corrective
  action or risk being locked out.

  Your best option is to generate new keys using strong algos such as
  rsa or ecdsa or ed25519.  RSA keys will give you the greatest
  portability with other clients/servers while ed25519 will get you the
  best security with OpenSSH.

What makes DSA keys inherently weak?

This is a good question. The dedicated page from OpenSSH only says:

  OpenSSH 7.0 and greater similarly disables the ssh-dss (DSA) public key algorithm. It too is weak and we recommend against its use.

which is no more detailed than the "inherit weakness" from the announce. I did not find any published explanation about these weaknesses except some unsubstantiated weaselling that talks of "recent discoveries". Thus, it is time for some sleuthing.

In the source code of OpenSSH-6.9p1 (Ubuntu 15.10 package), for the key generation tool ssh-keygen, I find this remarkable bit of code:

    maxbits = (type == KEY_DSA) ?
        OPENSSL_DSA_MAX_MODULUS_BITS : OPENSSL_RSA_MAX_MODULUS_BITS;
    if (*bitsp > maxbits)
            fatal("key bits exceeds maximum %d", maxbits);
    if (type == KEY_DSA && *bitsp != 1024)
            fatal("DSA keys must be 1024 bits");

The OPENSSL_DSA_MAX_MODULUS_BITS is a constant from OpenSSL's headers, that define it to 10000. So the first four lines check that the requested key size, at generation time, can actually be handled by the key generation process. However, the next two lines basically say: "regardless of the test above, if the key is DSA and the size is not 1024, niet."

These 6 lines are, in themselves, a sure sign that whoever developed that code did not completely agree with himself with regards to key sizes. This code was probably assembled incrementally and possibly by different people. The source of the "1024" can be traced to the actual DSA standard (called "DSS" as "Digital Signature Standard"), FIPS 186-4. That standard was revised several times. In its first version, DSA was mandated to use a modulus whose size was between 512 and 1024 bits (and should be a multiple of 64, presumably to simplify the task for implementers). A later version acknowledged the increases in technological power and mathematical advances, and banned any size other than 1024 bits. The modern version of FIPS 186 (the fourth revision, as of early 2016) allows the modulus to have size 1024, 2048 or 3072 bits.

It can thus be surmised that ssh-keygen refuses to use a modulus size different from 1024 bits because someone, at some point, read the then-current FIPS 186 version that mandated exactly that, and nobody bothered to update ssh-keygen when the FIPS standard was amended. Regardless of how this spectacular piece of programming schizophrenia came to be, the raw result is that most if not all SSH keys of type DSA in use today rely on a 1024-bit modulus.

The next piece of the puzzle is the Logjam attack. Logjam is basically about noticing that when a client and server agree to use weak crypto, they can be attacked. This is an attack on SSL/TLS, not SSH. However, the Logjam article does not stop at (rightfully) bashing SSL/TLS implementations for using a 512-bit modulus for DH; it also dedicates some talking space to "state-level adversaries". That part mostly says something which was already known, i.e. that breaking discrete logarithm modulo a 1024-bit modulus (something which would allow breaking both DH and DSA) is right now horrifyingly expensive, but not impossible with regards to our current knowledge of the problem and available technology (similar to breaking RSA-1024, and quite unlike breaking a 2048-bit DH or DSA, which are beyond the feasible with current Earth resources).

To receptive ears, this all sounded like "OMG we are all pirated by the NSA !" and the publicity around the Logjam issue (which is very real) trailed in its wake a substantial amount of hysteria on the subject of 1024-bit DSA keys, included when they are used in SSH.

An extra point was that using DSA requires generating, for each signature, a new random value, and the quality of the generation of that value is of paramount importance. Some implementations have failed spectacularly, leading to private key leakage (notably for some "Bitcoin wallets"). This characteristic of DSA is shared with its elliptic-curve version ECDSA. It can be fixed. But it instilled the idea that DSA signatures can be tricky to do properly (and ECDSA signatures equally, but elliptic curves are cool and nobody wants to ban them).

These parameters, taken all together, explain the ban. This can be viewed as a case of OpenSSH developers being proactive in their notion of security and are ready to force users to use strong crypto. Another way of seeing the very same sequence of decisions is that OpenSSH developers blundered badly at some point because of some poor reading of FIPS 186, and then sought to cover it in the equivalent of dumping at sea the corpse of the inconvenient husband.

Note that breaking your DSA key would allow the attacker to impersonate you, but not to decrypt recorded sessions. While it can be said that switching to an ECDSA key would be a good idea at some point (it saves a bit of bandwidth and CPU), there is no cryptanalytic urgency to do so. You will still have to do it, because otherwise you may be locked out of your servers because some packager was too zealous in the deprecation policy.


How to leak an email without revealing my identity? I'm a faculty member at a university and I want to leak to students an email sent between the administration and faculty members concerning ethical transgressions against the student body as a whole.

I don't want to reveal my identity in the process because it puts my job in danger. One the one hand, I have a list of student emails and a vague idea that I can use some sort of mail service to copy-paste the email contents to all of them. On the other hand, I'm worried that if I set up an easy to use and anonymous email account, through protonmail lets say, and copy-paste the email contents it will be flagged as spam.

What's the most practical way for me to "forward" this email to all of the students, without revealing my identity or having the email flagged as spam?

Do:

Use a private computer
Use a VPN (Tor if you prefer.)
Create a new yahoo account (using the VPN)
Copy and past the body of the email
Send
Close the yahoo account.

Do NOT:

Use the university's internet
Use a university computer
Forward the email.
I repeat. Do NOT "forward" the email.

The final do not is most important. The email sent to you has a header. The header contains to: and from: information plus a few other things it sounds like you don't want to reveal. Once you have sent the email, never login to that account again, it's best if the account is closed.


Facebook password lowercase and uppercase Recently I logged into my Facebook account and then noticed that my caps lock was on. So I tried to log in again with and without capslock on. I got in both times. Then I tried to log in with the first letter of my password in uppercase and the rest in lowercase. Again, I got in. How is this even possible? Does Facebook keep a cookie for the password or something?

This is simply Facebook trying to provide a better user experience for those users who may have Caps Lock enabled, or whose devices automatically capitalize the first letter of the password.

I don't think there are any cookies per your question. It is likely that the password hashing and storage is as standard as you would expect. The alternate passwords are probably generated from the password submitted, via the login form, and not stored as alternates on the back end.

It appears that they are only flipping a-zA-Z, and not a mix of incorrect case. They are also checking against a capitalzied first character as pointed out by PwdRsch in the comments.

While this may increase the online brute force attack surface, if you use a password of high entropy, it's pretty unlikely that this would prove to be much of a security risk in my opinion.

i.e:

Password: aBcDeF123
Works:    AbCdEf123  // Flipped Case
Works:    ABcDeF123  // Caps First Char
Doesnt:   ABCDEF123  // Mixed Case
Doesnt:   AbCdEf!@#  // Shifted Numbers


Validating XSS Vulnerability in Rest API I am performing security testing on a Rest API and it is a POST method. I injected a XSS script in a body parameter and the API responded with '400 Bad Request' error, but the response displays the XSS script that I have injected in the request payload.

If the response is '200 OK' and if the response body displays the XSS script, then I would have concluded this as a vulnerability, because the XSS script would have been stored and reacted when the respective page is opened in a web browser (if the web application is also weak in security). However, in this case, the response is '400 Bad Request', so do I need to still consider this as a vulnerability?

In your case, you perform a POST request and the response give you back your script, it's called a self-XSS.

That's not very useful and not a serious vulnerability in itself, beaucause the purpose of an XSS attack, is to be executed on other user, other accounts, not only yourself.
It can be transformed in a traditionnal XSS vulnerability if your API provide some sort of error management system, that could display the message without any sanitisation.


Is the GTK or MIC in the unencrypted portion of a WPA protected frame? In order to decrypt traffic you must have all 4 portions of the WPA Handshake. In WPA protected data frames, is there an unencrypted portion of that frame that has some sort of identifiable value to compare against a user's handshake?

For example, if I had a 4-way Handshake could I check a protected frame to see if it matches my handshake without actually using the handshake to decrypt the frame?

Answering the title question, NO.

They MIC is only sent over the 2nd and 3rd frame of the 4WHS and the GTK only in the 3rd frame.

And about comparing anything in the 4WHS to any unencrypted portion of a WPA/2 packet is just like @user1451340 said in the comments, only the origin/destination, but these are common for ANY handshake.

What you can do is get an ARP Packet (These are size fixed so you can know which are ARP) and try to decrypt it with the GTK found on the 3rd frame, and if it works, there you got it. Good luck and I hope this helps.


Downloaded "DHL" fraud email to Linux, action needed? Yesterday I ordered a package and today received an email from "DHL". I downloaded an attachment from the email and clicked it. It opened a htm page. (I did not fill out any information.)

I now realize it was malware.

I run Linux/Ubuntu. This link says this type of malware only affects Windows. I am busy and a complete reinstall would take valuable time.

Do I need to do anything? Can I do anything less than a reinstall (including /home) of the system?

This does not look like malware but "only" like phishing: the attacker tries to steal login credentials from you by claiming that these are needed to proceed. These kind of attacks are very common and try to phish credentials to login to various web mail accounts or whatever the gullible victim is willing to  enter in order to continue. I've got a lot of these mails myself.

Thus, while there might be also some malware inside the mail it is unlikely that you got infected since you only clicked on a HTML page attached to the mail (that's what I assume from your description) and you did this on Linux. While HTML attachments are also used to deliver malware this is usually done by embedding Javascript which downloads the malware from inside the page or rarely which embeds the malware directly. But these scripts then relies on Windows specific functionality (windows scripting host) to execute the malware and this does not usually work on Linux. It might maybe work if you are using Wine though to execute Windows programs in Linux but you probably need to have some really strange setup which makes HTML pages open with a Windows based browser instead of the Linux native one.

Of course, there might still be some attack going on which uses some previously only bugs and specifically targets Linux to delivers the payload. But unless you are a high-value target it is unlikely that such precious exploits are wasted on you, given that getting or creating this kind of yet unknown exploits is hard and can cost a lot of money.

To summarize: you are likely not infected. But maybe be more careful in the future anyway.


Can visiting website infect computer? I have heard online that simply visiting a website can infect a computer. I had an instance recently where someone I know sent me a link but misspelled it. The misspelled link lead to a malicious website.
The misspelled link was:
WARNING WEBSITE MIGHT BE MALICIOUS
http://ww1.vassarstat.net

Which is a misspelling of www.vassarstats.net
I went there three times, each going to separate websites (Note I've only included domains):
WARNING WEBSITES MIGHT BE MALICIOUS
http://briana.ttnrd.com/

http://iyfnzgb.com/

http://ww25.vassarstat.net/?z

I checked all on virus total and all came clean except http://iyfnzgb.com/
The results came as follows: https://www.virustotal.com/gui/url/ca060e0539d6866b634598b82bd0d64a82f8826779ec610a38e7939344ce398f/detection
For background information, I was using Google Chrome and had uBlock Origin installed. uBlock Origin gave the regular redirect warning however I thought the website was legit and ignored said warning. Once redirected, the website was completely blank. I'm guessing uBlock considered the content block-able or perhaps chrome blocked it. I am running macOS Big Sur. Chrome is up to date.
After the contact I ran Malwarebytes and checked Chrome for unusual activity (such as altered homepage, search engine, and extensions). Everything seemed normal.
Has my computer been comprised? What further steps should I take or have I done everything I should do?

Install the "NoScript" plugin for Chrome which could add an extra layer of security by preventing drive-by attacks.
And the question whether your device is compromised would be hard to tell, keep an eye on unsual behaviour within your browser, keep your a/v up to date and if you have the ability to sniff your network traffic, you could examine whether there is C2 traffic.


Vulnerability concerning allowed anonymous ciphers found on PKI A VA/PT report shows the following for my PKI:

  The SSL service permits the use of one or more anonymous ciphers, which an attacker may take advantage of via a man in the middle attack. The anonymous ciphers should be disabled.

What does it mean and how do I mitigate it?

Since your question is very vague, I can but guess.

Anonymous cipher means, that the key exchange happens without any authentication taking please, meaning the no (server) certificate is used in the process. But without any authentication, the DH key exchange can easily be attacked by a MitM.

To mitigate this, you have to reconfigure your server software, whatever it may be. Look for the configuration setting where you can enter the allowed cipher suites. if you just want to get rid of the anonymous cipers, you must only disallow the DH_ANON mechanism. Preferably it would be, to put in a whitelist of acceptable cipher suites.

A good guide for the specific settings of popular server software plus a list of acceptable cipher suites is provided by the friendly people of bettercrypto


How to get rid of DNS Unlocker on Windows I have found several online guides about removing DNS Unlocker but I haven't been able to complete any of the steps because no suspicious files, programs, etc. show up when I look for them. Google Chrome is very heavily infected with most pages opening new ad tabs whenever I click anywhere on the page.

I am using Windows XP SP3. I have had AVG Free for years which failed to prevent DNS Unlocker from being installed on my computer (one-two weeks ago).

Is there a program that can remove it or a series of steps that I can take manually?

There is no common guide to remove DNS Unlocker, but maybe on of the following might help:

Check the extensions 'Add-ons' and disable any suspicious one.
Clear browsing history and cached data.
Clear Host cache in Google Chrome chrome://net-internals/#dns
Check your Programs and features and remove DNS Unlocker from there.

Besides that, you need  to upgrade your Windows. Windows XP is out-dated and obsolete. Try to use more secure version of Windows OS.


What port state to expect from Nmap when scanning ports that are open only to specific IP addresses My firewall has a few ports open but traffic is only forwarded when coming from specific IP addresses (whitelisted).

When scanning these ports with nmap from a non whitelisted IP address, what state would I see those ports to be in, filtered, closed or open?

It really depends on the firewall configuration, but almost every one will give back the default Port Closed message. If the default firewall behavior is to drop the package, it will be dropped. If is to send a RST package, you will receive a RST.

I am not aware of any firewall that responds with a Port is open, but not for you message.


Asian websites don't use HTTPS In America and Europe, HTTPS is quite popular, but in most Asian countries it isn't. The majority of China, Japan and Korea's top websites don't use HTTPS.

Are they using another method to protect the privacy and integrity of the exchanged data?   If so, what method?

I do not know Chinese but by looking at qq.com I see that the login page is on HTTPS. This is just an example that the HTTPS pages may not be the front ones. You will find the same case in some "portal type" European sites (wp.pl being one example): the front page (with information) is on HTTP and any sensitive one (email for instance) is on HTTPS.

To answer you edit: SSL gives you easily two practical mechanisms:

the ability to check if the server you connect to is actually the one you expect to connect (a mismatched certificate would be an alert)
the ability to encrypt your traffic to the site

You could roll out your own mechnisms in your application to cover both use cases. It just does not make much sense: you would probably do it wrong and it would cost you a lot of resources to have a reasonable implementation.

In the typical case of the few pages I checked from the list you mention, no other such mechanism is used (i.e. it is either HTTP or HTTPS).


Are SIM proactive commands secure? A SIM card can initiate some communication with a mobile device with so called "proactive commands" (chapter 6 of http://www.etsi.org/deliver/etsi_gts/11/1114/05.04.00_60/gsmts_1114v050400p.pdf). Using these commands, SIM card applet can request the OS for current system time or sending SMS to a specified number and much more.

Question:

Is there any OS protection in Android or iOS of these proactive commands? Is it possible for an attacker to create an application, which hijacks the SIM-Phone communication and provides the SIM card with incorrect data? Is there any "firewall" that ensures that the OS is the only entity allowed to communicate with SIM over proactive commands?

EDIT : I have found a patent for secure proactive commands (http://www.google.com/patents/US8744406), but I do not have a clue if some UICC vendor uses it in the real world.

UPDATE: Could I use Android Access Control Enforcer as such a firewall for Android (https://code.google.com/p/seek-for-android/wiki/AccessControlIntroduction)?

Broadly, the design of Unix-like operating systems (in particular Linux, on which Android is based, and Mac OS X) means the OS is by design the only software entity that's allowed to communicate with the SIM. (I say 'software' because other hardware isn't quite so limited.) So I don't think this is something you need to worry about.

Or, phrased another way: yes, the 'firewall' you describe already exists. It's one of the most fundamental features of an operating system kernel.


Suspicious SMS about activated phone service Not long ago I had heard that someone from my family had an suspicious situation with SMS service.

What happened was this person receive message like

Service 'Play music on calls' have been enabled. To turn off this service,
send message ENABLE to number xxx-xxx-xxx

First lets start off that this person did not turned on any service manually, and I never experienced anyone to have service like that turned on automatically - it always was optional and was turning on through text like ENABLE.
Also for me it was seemed suspicious that you have to send message ENABLE to turn off service, and the number was 9 digit which is not used for services like this in this specific country, where most of such services are 4 up to 6 digit long.

The person with this have went to local office of this mobile operator, and the young lady (about 20-25 years) in there and looked like on idiot, and said that you need to send this message to turn it off, without checking number and anything else.

Then this lady sent message ENABLE to this number and then return message was sent something like:

To turn off service you need to send back this randomly generated key: XXXXXX

The lady in there send this key back to this number, however I have no more informations, did she also accepted something else as well etc.

Unfortunately this is also suspicious for me, because I never heard of service which would require you to send back randomly generated key, to be turned off.

The service apparently was disabled, however there are various problems now such as it seems problematic to make incoming call to this member of family.

Also later on I have checked this number on internet and there was opinions that it is malicious number, not specific for such services.

I got few questions:

What could be attackers point in such attack - the attacker did not get any personal data etc. so it doesn't seems to be phishing.
What type of attack this could be
What should be done in such case and how to explain it to older person which have no knowledge about social engineering and how it works.

Also this family member want to go back to the same local office of mobile operator, which I think is a bad idea due to what happened last time. I think that this person should call the main customer services from this mobile operator.

Please note that I have no idea which tags give to this question.

This seems to me like it very much could be a cramming operation or a premium SMS scam.  The US has cracked down on both practices in recent years, but they haven't disappeared completely, and of course, the situation is different in other countries.  It would be wise to monitor future bills to make sure that there's no extra charges resulting from this.

(It could also be legitimate, not that I'd make that assumption based on the ignorance of an entry-level worker at the phone provider.)

At the very least, if this is malicious, by responding, your family member verified that it's active number, and that the current user is relatively easy to scam.  That's information that's valuable to scammers.

As to how you address that, your guess is as good as anyone's. I agree that going back to the same clueless idiots that didn't help the first time isn't a great idea, and that the phone company's customer service line would probably be a better approach. Having said that, if there was an easy, one-size-fits-all solution to not getting scammed, people wouldn't still fall for basic scams that have been around for decades, but they do, so don't get your hopes up.


Benefit of converting credential fields to password fields I've come across a few sites (but not many, https://www.bankofamerica.com made me think of this) that convert the credential fields to password fields that were not masked fields (e.g. Username field) before transmitting (e.g. using javascript). What is the benefit of this?

The only benefit is that, presumably, the username field is no longer clearly visible in the browser. That might help prevent shoulder surfing though it seems a stretch to me.

I can't think of  any other potential benefit.


ModSecurity is behaving funnily in apache2.4 on ubuntu 14.04 I am trying to put modsecurity in apache 2.4.7 a reverse proxy for a tomcat applcation. For a normal request it's throwing lots of logs about allowed methods even though the method used is get.

[Wed Mar 11 10:35:33.187404 2015] [:error] [pid 26124:tid 140113409455872] [client 41.66.208.198] ModSecurity: Warning. Match of "within %{tx.allowed_methods}" against "REQUEST_METHOD" required. [file "/usr/share/modsecurity-crs/activated_rules/modsecurity_crs_30_http_policy.conf"] [line "31"] [id "960032"] [rev "2"] [msg "Method is not allowed by policy"] [data "GET"] [severity "CRITICAL"] [ver "OWASP_CRS/2.2.8"] [maturity "9"] [accuracy "9"] [tag "OWASP_CRS/POLICY/METHOD_NOT_ALLOWED"] [tag "WASCTC/WASC-15"] [tag "OWASP_TOP_10/A6"] [tag "OWASP_AppSensor/RE1"] [tag "PCI/12.1"] [hostname "pentest.mydomain.com"] [uri "/favicon.ico"] [unique_id "VQAadQoAAGwAAGYM9ykAAABE"]
[Wed Mar 11 10:35:33.187627 2015] [:error] [pid 26124:tid 140113409455872] [client 41.66.208.198] ModSecurity: Warning. Match of "within %{tx.allowed_http_versions}" against "REQUEST_PROTOCOL" required. [file "/usr/share/modsecurity-crs/activated_rules/modsecurity_crs_30_http_policy.conf"] [line "78"] [id "960034"] [rev "2"] [msg "HTTP protocol version is not allowed by policy"] [data "HTTP/1.1"] [severity "CRITICAL"] [ver "OWASP_CRS/2.2.8"] [maturity "9"] [accuracy "9"] [tag "OWASP_CRS/POLICY/PROTOCOL_NOT_ALLOWED"] [tag "WASCTC/WASC-21"] [tag "OWASP_TOP_10/A6"] [tag "PCI/6.5.10"] [hostname "pentest.mydomain.com"] [uri "/favicon.ico"] [unique_id "VQAadQoAAGwAAGYM9ykAAABE"]

But according to posts at security.stackexchange and serverfault I should not have run into that issue.

I do have the following in /usr/share/modedurity-crs/modsecurity_crs_10_setup.conf

#
# Set the following policy settings here and they will be propagated to the 30 rules
# file (modsecurity_crs_30_http_policy.conf) by using macro expansion.
# If you run into false positves, you can adjust the settings here.
#
SecAction \
   "id:'900012', \
    phase:1, \
    t:none, \
    setvar:'tx.allowed_methods=GET HEAD POST OPTIONS', \
    setvar:'tx.allowed_request_content_type=application/x-www-form-urlencoded|multipart/form-data|text/xml|application/xml|application/x-amf|application/json', \
    setvar:'tx.allowed_http_versions=HTTP/0.9 HTTP/1.0 HTTP/1.1', \
    setvar:'tx.restricted_extensions=.asa/ .asax/ .ascx/ .axd/ .backup/ .bak/ .bat/ .cdx/ .cer/ .cfg/ .cmd/ .com/ .config/ .conf/ .cs/ .csproj/ .csr/ .dat/ .db/ .dbf/ .dll/ .dos/ .htr/ .htw/ .ida/ .idc/ .idq/ .inc/ .ini/ .key/ .licx/ .lnk/ .log/ .mdb/ .old/ .pass/ .pdb/ .pol/ .printer/ .pwd/ .resources/ .resx/ .sql/ .sys/ .vb/ .vbs/ .vbproj/ .vsdisco/ .webinfo/ .xsd/ .xsx/', \
    setvar:'tx.restricted_headers=/Proxy-Connection/ /Lock-Token/ /Content-Range/ /Translate/ /via/ /if/', \
    nolog, \
    pass"

I have used libapache2-modsecurity package and here is what is in the /etc/apache2/mods-enabled/security2.conf file

 <IfModule security2_module>
    # Default Debian dir for modsecurity's persistent data
    SecDataDir /var/cache/modsecurity

    # Include all the *.conf files in /etc/modsecurity.
    # Keeping your local configuration in that directory
    # will allow for an easy upgrade of THIS file and
    # make your life easier
    IncludeOptional /etc/modsecurity/*.conf
    Include /usr/share/modsecurity-crs/activated_rules/*.conf
 </IfModule>

Is there anything I am not doing well? I would appreciate if any one could shed some lights in there for me.

Thanks in advance

From what I can see from the answer you linked to, the name of the file should be modsecurity_crs_10_config.conf. In your post, you say that yours is instead called modsecurity_crs_10_setup.conf.

Two other possible problems I see are that your setvar lines all have spaces before them whereas the answer does not (but I highly doubt that would cause problems). Also, your tx.allowed_request_content_type is separated by | instead of .

Changing those would make your file:

#
# Set the following policy settings here and they will be propagated to the 30 rules
# file (modsecurity_crs_30_http_policy.conf) by using macro expansion.
# If you run into false positves, you can adjust the settings here.
#
SecAction \
"id:'900012', \
phase:1, \
t:none, \
setvar:'tx.allowed_methods=GET HEAD POST OPTIONS', \
setvar:'tx.allowed_request_content_type=application/x-www-form-urlencoded multipart/form-data text/xml application/xml application/x-amf application/json', \
setvar:'tx.allowed_http_versions=HTTP/0.9 HTTP/1.0 HTTP/1.1', \
setvar:'tx.restricted_extensions=.asa/ .asax/ .ascx/ .axd/ .backup/ .bak/ .bat/ .cdx/ .cer/ .cfg/ .cmd/ .com/ .config/ .conf/ .cs/ .csproj/ .csr/ .dat/ .db/ .dbf/ .dll/ .dos/ .htr/ .htw/ .ida/ .idc/ .idq/ .inc/ .ini/ .key/ .licx/ .lnk/ .log/ .mdb/ .old/ .pass/ .pdb/ .pol/ .printer/ .pwd/ .resources/ .resx/ .sql/ .sys/ .vb/ .vbs/ .vbproj/ .vsdisco/ .webinfo/ .xsd/ .xsx/', \
setvar:'tx.restricted_headers=/Proxy-Connection/ /Lock-Token/ /Content-Range/ /Translate/ /via/ /if/', \
nolog, \
pass"

If none of the above works in fixing the problem, I suggest simply trying to upload the snippet directly from the answer and see if that works for reassurance:

#
# -=[ HTTP Policy Settings ]=-
#
# Set the following policy settings here and they will be propagated to the 30 rules
# file (modsecurity_crs_30_http_policy.conf) by using macro expansion.
# If you run into false positves, you can adjust the settings here.
#
SecAction "phase:1,id:'981212',t:none,nolog,pass, \
setvar:'tx.allowed_methods=GET HEAD POST OPTIONS', \
setvar:'tx.allowed_request_content_type=application/x-www-form-urlencoded multipart/form-data text/xml application/xml application/x-amf', \
setvar:'tx.allowed_http_versions=HTTP/0.9 HTTP/1.0 HTTP/1.1', \
setvar:'tx.restricted_extensions=.asa/ .asax/ .ascx/ .axd/ .backup/ .bak/ .bat/ .cdx/ .cer/ .cfg/ .cmd/ .com/ .config/ .conf/ .cs/ .csproj/ .csr/ .dat/ .db/ .dbf/ .dll/ .dos/ .htr/ .htw/ .ida/ .idc/ .idq/ .inc/ .ini/ .key/ .licx/ .lnk/ .log/ .mdb/ .old/ .pass/ .pdb/ .pol/ .printer/ .pwd/ .resources/ .resx/ .sql/ .sys/ .vb/ .vbs/ .vbproj/ .vsdisco/ .webinfo/ .xsd/ .xsx/', \
setvar:'tx.restricted_headers=/Proxy-Connection/ /Lock-Token/ /Content-Range/ /Translate/ /via/ /if/'"


How does the flow option of Snort work? For example, flow:established is detecting only for packets with sessions connected.

Then, the server is rejecting packets to received after the session is disconnected?

Simply, flow is a non-payload detection rule option utilizing the Stream preprocessor (formerly Stream5, Stream4).  I recommend reading the following documentation:

Snort Manual § 3.6.9
Stream5 README File

To answer your question:

  For example, flow:established is detecting only for packets with sessions connected.

I'd like to expand on this.  TCP connections use a 3-way handshake (3WHS).  The client sends a SYN, the server responds with a SYN+ACK, and then the client replies with an ACK.

Image from: http://blog.wangyizhe.net/2015/10/TCP-3-way-Handshake/

When using flow:established in a rule, you're telling Snort not to bother looking at [typically] the first three packets in a TCP stream.  This is done because normally there is no content (Application Data) inside.

When not to use established in your flow option:

When writing a signature that does not use TCP (e.g. UDP, ICMP, IP)
When writing a signature that is designed to target packets inside the 3WHS.

  Then, the server is rejecting packets to received after the session is disconnected?

Remember, Snort is not a server; it is a Network Intrusion Prevention/Detection System (NIPS/NIDS).  The only way it will reject packets is if you have it configured and running in an inline configuration (NIPS).  If not, it can only observe traffic and cannot actively reject or drop packets.

Assuming you had Snort configured and running in inline mode, if you were to write a rule like:

drop tcp any any -> any any (msg:"Dropping packets"; flow:established; sid:1; rev:1; )

... The rule would fire on any TCP packet that was seen after the initial 3WHS.  This would appear to both the client and server as a successful connection, but no data would be transferred, because Snort would be dropping packets.

Remember that Snort is a detection engine, so don't think of it in terms of sending/receiving data or initiating/establishing connections.  Think of it as a passive observer (or in the case of an IPS, a bouncer at a nightclub).

For more information on flow or the Stream preprocessor, please read the documentation I linked to above.

Hope this answers your question!


Decrypt signature file based on plaintext I have 2 text files used by an application.
One is a very large "schema" array (approaching 100,000 lines, JSON format).
The other is a .txt.sig file generated somehow from the contents of the schema file, which is  used as a check by the application to verify the schema file's composition.

If you modify even one character in the schema file, it is detected as corrupt based on the contents of the signature file.

Is there any way to determine how the .sig file contents are generated from the plain text without some sort of key? I would like to create a new .sig file that matches up with a modified version of the schema file for tinkering purposes.

I can link to the Schema file if there is any possibility based on the info I have.
It's too large for Pastebin or else I would include it here.

Thanks in advance for your input.

Contents of cipher text:

ᅝ雐喐弱㿤쪓鐒✉桦Ⲍ垧㇓鋳쓿㚣�뼀⭥켟ಾ퍋薨슥紙缏ிㄾࣻ탕㕾潎쭲㥊귕헔譗䢲鳐ᴍ畽៦뺎瑎쾩鵘嵘貔⨣Ṩᷢ추퐅踥믟顱ꎨ浈軰岗

Although you are not explaining what the verification process is, it looks like the .sig file is a digital signature, guaranteeing data integrity, authentication and  non-repudiation: it means that, as long as the verification is affermative, anybody knows that the file hasn't been changed by a third party, and that the signer signed the file, with no uncertainty (the verifier knows the identity of the signer).
The signature uses a hash function (public) and a private key (by definition, non-public). Then, if you want the verification process still working after your changes you should ask the signer to digitally sign the changed file, producing a new .sig file.
No other person can do that, unless the private key of the signer is broken.

Of course you could digitally sign the changed file by yourself and get a new .sig file: in the case, the verification will work, but the verifier will know that the signer is you, and not the original signer.

All the above features are built-in in the digital signature, by design.

A fair description of digitally signing can be found here: https://en.wikipedia.org/wiki/Digital_signature
In many cases it is based on a hashing function of the SHA family is used (https://en.wikipedia.org/wiki/Secure_Hash_Algorithm) with the RSA cryptosystem (look for it on wikipedia, stackexchange is saying I can't post a 3rd link)


Difference between Non-discretionary and Role-based Access control? What's the difference between Non-discretionary access control and Role-based Access Control? In CISSP book both mentioned in the different paragraph as in different entity. But In some other place (Cisco Learning Resource) it is said that,

  Non-discretionary access control is also known as RBAC.

So is there any difference between them (if yes then what are they) or they are same?

RBAC can be discretionary access control, with anyone in the role granting it to you, or mandatory access, with only the security officer granting the role upon application from a manager.

The latter is more common, so the book probably just conflated the two.


Can a Tor exit node be reliably identified? So with my knowledge of Tor, I know that exit nodes are where packets escape the Tor network and enter the "traceable" internet; ie. you can link an attack to an exit node but not the source of the attack within the Tor network.  If I notice my server is getting attacked by exit nodes, can identifying as many exit nodes and blocking their IP addresses be enough to stop exit node attacks?  Is identifying as many exit nodes as I can and taking measures against them a feasible countermeasure; or do the exit nodes shuffle around/mutate/change too often that, no matter what, exit nodes will continue to attack me?

It sounds like what you're trying to do is block all traffic from Tor exit nodes.  This is exactly opposite of what shady sites like Silk Road do, in that they allow traffic only from Tor exit nodes.  Either configuration is easily done because all Tor exit nodes are published.  See these two StackExchange articles about how to do this:

Quick and easy answer:
https://stackoverflow.com/questions/9780038/is-it-possible-to-block-tor-users

More in-depth answer:
Block all BotNets and TOR addresses from accessing our site


Is it safe storing revision history on production servers? Currently we use at my workplace svn export <svn_repo>. This takes a long time and I have been playing with the idea to keep the revision history on the production server so we can simply fetch the updates.

In practice I was thinking to have a checkout folder with the code. Once I want to deploy I simply svn up and then copy the contents (without .svn) to a release folder on the same server. Is this safe? The organization I work with works with the government so security is a very big issue.

As I read this post, I'm shaking. Probably because I ate way too many carbs after avoiding them for a while, and I'm experiencing a bout of hypoglycemia... but probably because the idea of this genuinely terrifies me.

Remember, this is an Information Security site. Sometimes the answer you get isn't the answer you want.

You claim to be working for the government.
You're using your real name on this website. A little digging shows exactly who your employer is, among other things. Further digging, I'm able to find extra information on other things.
You're thinking of a potentially insecure setup, and this leads me to worry about the fact that you might be able to touch production servers in such a way, and checkout/import from PRODUCTION servers which may have been hit by malware previously.

You might be well-served by visiting a wikipedia article on Operational Security.

Why can this be a problem?

A production environment is usually front-facing, meaning that's what your customers/clients/users will see. Let's assume you have the following environments:

Development
Testing
Production

Checking out the code from production, which could've been modified in the event of a successfully exploited vulnerability - either in your web application(s), or your web server itself - and then debugging it locally, means that you may end up infecting your entire enterprise.

Your development team usually has access to a lot of critical things. Now that you're debugging it locally, you may be able to spread hidden malware across your entire infrastructure! Development, test, production, etc. From there, your attacker can do pretty much anything they want.

You need clear separation of concerns. Putting your repository onto your production server is just asking for trouble. If your production server gets hacked, you may be able to mitigate the damage if it's limited to just itself.

However, as soon as you let it break out of it's little closed environment, you could be in for a world of trouble. Keep in mind, attackers are looking for any tiny thing they can exploit. This is why I genuinely believe you should not put your SVN on your production server.

Example Pwnage Diagram

I made a crappy diagram in MS Paint to explain this better. Assume that once you debug, an infection occurs and starts propagating.


How to protect from caller-id spoofing? Yesterday, I listened about caller-id spoofing and was left astonished as its misuse can result in severe consequences for victim.

Please tell me how to protect myself from this prank and is there anyway to recognize that it is a fake call?

You've already taken the most important first step to protecting yourself, and that it to recognize that caller-id information can be spoofed, and is not entirely trustworthy.  The second step is to apply that knowledge, and stop relying on caller-id.  If someone calls you and asks for personal information, even if the caller-id appears to be the legitimate number for an organization you trust, don't assume that it's true.  Call them back at a number that you can independently verify is correct.

As to recognizing when caller-id is being spoofed, generally no, you can't.  If there were a fail-safe way to do this, then swatting would be impossible, and we know from experience that it is not.


NOOPs are the tip-off for the snort rules. A file transfer is likely not to have NOP slides, but in this case, it might be a false positive:

WANG2..JFIF

What you may have here is a ping from one Windows machine to another. Part of the ping payload is a jpg of the word: Microsoft.

This type of traffic has triggered other people to be suspicious, as well.

But, it would be nice to have the packet trace instead of the ASCII translation of the hex.


Should OIDC introspection endpoint be used to validate the JWT access token? My resource server exposes an API that expects JWT access tokens obtained using OpenID Connect.

So far the validation in the resource server side consisted on using the Realm public key to validate the JWT access token signature and check some other parameters suchs as expiration time.

Since the access token is a JWT, I already have information about the user (sub, role claims etc). So I wouldn't need to invoke the introspection endpoint to get it.

However the introspection endpoint also anwers with the active state of a token. Does it make sense to use it as another step in the JWT access token validation process? Is it really necessary or should I consider it valid just checking the signature and the other claims?

Is the tradeoff of the added latency to invoke just another endpoint to validate worth it?

It depends on your threat model and the implementation of the Authorization Server. The principal reason to check with Authorization Server is to know if the access token has or has not been revoked. From oAuth token revocation spec (RFC 7009):

  OAuth 2.0 allows deployment flexibility with respect to the style of
  access tokens.  The access tokens may be self-contained so that a
  resource server needs no further interaction with an authorization
  server issuing these tokens to perform an authorization decision of
  the client requesting access to a protected resource.  A system design
  may, however, instead use access tokens that are handles referring to
  authorization data stored at the authorization server. This
  consequently requires a resource server to issue a request to the
  respective authorization server to retrieve the content of the access
  token every time a client presents an access token.

  While these are not the only options, they illustrate the implications
  for revocation.  In the latter case, the authorization server is able
  to revoke an access token previously issued to a client when the
  resource server relays a received access token.  In the former case,
  some (currently non-standardized) backend interaction between the
  authorization server and the resource server may be used when
  immediate access token revocation is desired. Another design
  alternative is to issue short-lived access tokens, which can be
  refreshed at any time using the corresponding refresh tokens.  This
  allows the authorization server to impose a limit on the time revoked
  when access tokens are in use.

  Which approach of token revocation is chosen will depend on the
  overall system design and on the application service provider's risk
  analysis.  The cost of revocation in terms of required state and
  communication overhead is ultimately the result of the desired
  security properties.

Translation: if you're worried about token revocation, you should contact Authorization Server. The Introspection endpoint is the standard way of doing so.


Time zone settings and leakage of location When you set up your clock in Linux systems and select a timezone:

How easily can sites access this information? Can they do it through Javascript? Can they do it if Javascript is blocked?
Where else is this information leaked?

Yes, it's possible to retrieve information about the local system time and timezone from JavaScript. A script might fetch that and post it back to a server via Ajax or other measures. Your browser may also provide headers that include timestamps, so detection might be possible even when JavaScript is disabled.

It's impossible to iterate through all the potential ways that timezones and timestamps can be leaked, but here's a quick list:

JavaScript
Flash, Java, etc. plugins.
HTTP headers
Cache detection tricks
Cookie tricks (e.g. setting a cookie to expire at a fixed date, then see when it expires)

All in all, though, I wouldn't be too worried. Timezones are a very weak identifier of location. I'd be much more worried about IP-based geolocation, ping triangulation, direct access to location services, etc.


How can websites know that I accessed them before if I use a VM and different IP? I created a virtual machine with a clean Windows install on it. On that PC I create a virtual switch and I link it to one of my Wi-Fi boards. I disable IPv4 and IPv6 on that connection so I am not able to connect to the internet from the main PC, only from the virtual machines. I create a hotspot from a phone and connect to it.

Then I create another virtual machine with a clean Windows install on it. I connect it to the same virtual switch that is linked to the Wi-Fi board that has IPv4 and IPv6 disabled, and I create a hotspot from another phone.

Different phones with different IP's.

I created a user account on a certain web site from one virtual machine, and when I want to create another account from the second virtual machine the web sites said that there is a security problem and my new account could be linked to another account. Asking about it they said that the devices from which I am trying to connect might have been used by another user.

How do they know?

Tricky question! It will be hard for us to give certain answers, we may only guess that they might employ fingerprinting techniques that match in both VMs. For example, the VMs might both have have the same operating system, user agent string, set of fonts, give the same canvas fingerprint, have similar CPU performance, etc. It might also be that they found the local IP address to be in the same range, if that was obtainable via WebRTC.

If you did the IP routing correctly (such that the IPs that you used are not the same), and the VMs are indeed clean (so there are no cookies or localStorage), and it's not a very esoteric setup (so your user agent by itself is already unique), then as far as I know, they can only rely on fingerprinting techniques.

You say you 'registered': maybe the email address domain matched as well? When all these factors are combined, it may give a pretty accurate result.

Note that the VMs can very easily become unclean. If you checked that the IP addresses differ by going to tell_me_my_ip_please.com, that website might have tracking scripts. A Like button from Facebook, Google Analytics, an embedded YouTube video, advertisements, etc. are very widely used and can all track you. If you did this to check that it works and then clone the VM, you now have two linked VMs. If you did not, then they'll not be able to link the VMs directly, but they may also do the fingerprinting and combine the information of "no cookies, using this operating system and browser, from this country, etc." into a profile like "probably a white male from Belgium". This information is often reported to website owners, and could also loosely link your visits. It's a little more far fetched, but could be an additional datapoint on which they based their decision.

You might get a better answer if you are able to share the software/website you were trying to use, but from your question it sounds like it's a small, commercial party that might see this post and identify you, so I assume you can't share that.


How to store chat conversations on my website? I am making a site where members are able to have one-to-one chats, and I'm not sure how should I process conversation texts. Should I store the text in a .txt file or directly in a database?

I also wonder whether I should encrypt the text in some way, so that if someone gets over the database, he or she won't get a plaintext of my members' conversations. Members on my site sign up to hang out with other people for fun, so I don't think there is any super secret stuff in their conversations. However, I just wanted to add that layer of security, and in the same time get experience if I will need to keep text submitted by users secret in the future.

Don't worry about encryption.  It doesn't matter (from a security perspective) whether it is in a .txt file or in a database.  Instead, the single most important thing you can do for your users' security and privacy is:

Don't retain the data any longer than you absolutely have to!

People have certain expectations about chat.  They expect that online chatting is like chatting offline (on your porch, or something): that there is no permanent record being routinely kept of all chats.  Folks probably expect that chats will ordinarily be kept private.  So, don't violate their expectations.  Don't keep records of their chats.  Delete all records after some reasonable time (say, after a day; or as quickly as you can).  Then, if you are compromised, the damage will be modest, and you won't have to go to your users, head in tail, admitting that the hackers have gained access to all of their past chats, for all time.


What is the maximum depth for child keys in the TPM device? How many levels of child keys may be used in the real TPM device? Are there any limitations?

Recently, I've read one interesting answer:

  The Storage Root Key (SRK) is used to wrap TPM protected keys which
  can be stored outside the TPM. That data stored outside the TPM can be
  decrypted by passing it back through the TPM again for a decryption
  operation.

  Keys wrapped by the SRK can themselves be used to wrap other keys,
  too. This method of wrapping can be used to create a key hierarchy of
  parent key and child keys. To load a child, first load its parent.
  Once the child is loaded, the parent key can be unloaded from the TPM
  to free up TPM chip resources.

Taking mentioned into account I can conclude, that depth of child keys is unlimited.


CloudFlare benefits or drawbacks Anyone running a webserver would agree, security can be a hustle and tedious job. Recently I came across a service claiming to help with that -- CloudFlare.com. There's plenty of benefits listed on CloudFlare's own website, however I'm interested if there are any potential drawbacks switching your DNS to theirs. A few blog comments had some cautious remarks about CF's system being too aggressive and flagging even site owners.

Aren't there any benefits in having your own name servers, perhaps from SEO stand point?

Also they talk about caching content on multiple servers... What if your content is not static?

Trying to get as much info as possible before making a decision. Any insight would be highly appreciated.

Thanks.

Thought I would jump in here.

"A few blog comments had some cautious remarks about CF's system being too aggressive and flagging even site owners"

We use a variety of data sources that indicate potential threats, which can lead to some false positives in data. If you're concerned about too many visitors getting challenged, you can do the following:

-Adjust your CloudFlare security settings to low or medium (high is fairly restrictive). This can be done by going to: settings->CloudFlare settings->Basic Security->Change to low or medium.

-You also have the option of whitelisting IPs, IP ranges & countries in your 'Threat Control' panel.

"Also they talk about caching content on multiple servers... What if your content is not static?"
We wouldn't impact dynamic content at all (those changes would appear immediately).

"perhaps from SEO stand point?"

CloudFlare should be good for SEO because we help speed up delivery of your pages (our IPs are also whitelisted with Google).

There are tons of tips and things to consider on our blog as well.


Secure connection failed (OCSP) I've been getting a lot of failed connections lately, namely from Facebook and now Google (German site works, French does not). This happened to other sites as well but these two are the kind you expect to work smoothly. Does anyone have a reasonable explanation for this?
I have OCSP validation active on Firefox, i.e. when the OCSP validation fails the certificate is treated as invalid. Additionally, Firefox uses OCSP stapling. An example error below:

Secure Connection Failed
An error occurred during a connection to www.google.fr.
The OCSP server experienced an internal error. (Error code: sec_error_ocsp_server_error)

The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.
Please contact the website owners to inform them of this problem. Alternatively, use the command found in the help menu to report this broken site.

Some of the websites where I detected the problem (HTTPS):

Facebook;
Google France/Spain;
Wikipedia; and
Youtube.

[Edit] The first time it lasted between 30-60 minutes; and I am still getting this every once in awhile but only at home. At work it rarely happens (different ISP there btw).

Issue #1: sec_error_ocsp_server_error can occur for other reasons than OCSP server internal error.
From Bugzilla bug 495380:

SEC_ERROR_OCSP_SERVER_ERROR is used 5 times in ocsp.c for everything from an internal OCSP server error to failing create the request session and any number of different problems writing the request to the remote server.`

Issue #2: I believe that Firefox is caching this error but should not do so, so I created Bugzilla bug report 1014979.
Workarounds (from a post that I wrote at another forum):

Method #1: Restart Firefox.
Method #2: Go to Options->Advanced->Certificates-> Validation. Set checkbox "When an OCSP server connection fails, treat the certificate as invalid" to the opposite of what it is now, and then press OK button twice. That is sufficient to clear the OCSP cache. However, since you probably want the original setting that you just changed, go to Options->Advanced->Certificates-> Validation and set checkbox "When an OCSP server connection fails, treat the certificate as invalid" back to the value that was there before you read this post, then press OK button twice.


Would hashing a username add any value Pretend that I have a website running which does not show any usernames on any page. Therefore, it would not be a problem to hash usernames. When the user logs in, the unhashed username is stored in a session. Using this unhashed username, specific user data can be obtained from the database and the username can even be displayed on pages for logged in users.

Would this add anything regarding the security of the data? And am I possibly missing some functionality which does not work when the username is hashed?

Securely hashing the username in the database protects the confidentiality of that information in the event that your database falls into the hands of an attacker.

Be aware though that if you use the un-hashed username in other ways in your application that information may still be obtained by an attacker.

For example, you mention:

  When the user logs in, the unhashed username is stored in a session.

If we assume that your session information is sent to the client as part of the normal http response for a logged in user (e.g. as a cookie), the username may be obtained by an attacker if they get access to that session token. OWASP advises against storing user specific information in sessions sent to a client.

  Using this unhashed username, specific user data can be obtained from
  the database and the username can even be displayed on pages for
  logged in users.

In this case the fact that you can use an un-hashed username to lookup database information implies that there is some un-hashed user information in the database, which undermines the hashing of the username in the first place. Also, if the information can be displayed in pages, be aware that unless the connection between client and server is secured at the transport layer (TLS) then that username may be visible to an attacker.


Unauthenticated packages in debian Yesterday I updated my debian server using:

  apt-get update && apt-get upgrade

I received message that some of the packages cannot be authenticated being in a rush I hit yes to install anyway. Now thinking back was a bad decision, what if someone was doing MITM and installed a backdoor on my server?, after all debian does not use SSL for it's repository.

How can I view witch packages were installed unauthenticated ? I can't remember. Also what you recommend in this case

You can check it at /var/log/apt/history.log . There you'll find info about what packages were installed by users in the system. I think there is no info about the repository from they were installed. Anyway you can get that info with dates. I guess you know when exactly this happened.

Hope it helps.


Can Microsoft access all private data if a user installs Windows 10? According to this Forbes article by Gordon Kelly, a condition of using Microsoft's Windows 10 operating system is to agree to the following:

  [Microsoft] will access, disclose and preserve personal data, including your content (such as the content of your emails, other private communications or files in private folders), when we have a good faith belief that doing so is necessary.

If this is true, and I'm reading that correctly, that means that Microsoft currently has the ability, via Windows 10, to access any file on Windows 10 systems and transmit it to them.  Also, it sounds like they don't even need a court order to do this; they just need to have a "good faith belief that doing so is necessary".

Is this true?

This is the whole passage (source: https://privacy.microsoft.com/en-us/privacystatement):

  Finally, we will access, disclose and preserve personal data,
  including your content (such as the content of your emails in
  Outlook.com, or files in private folders on OneDrive), when we have a
  good faith belief that doing so is necessary to:

  comply with applicable law or respond to valid legal process, including from law enforcement or other government agencies;
  protect our customers, for example to prevent spam or attempts to defraud users of the services, or to help prevent the loss of life or
  serious injury of anyone;
  operate and maintain the security of our services, including to prevent or stop an attack on our computer systems or networks; or
  protect the rights or property of Microsoft, including enforcing the terms governing the use of the services - however, if we receive
  information indicating that someone is using our services to traffic
  in stolen intellectual or physical property of Microsoft, we will not
  inspect a customer's private content ourselves, but we may refer the
  matter to law enforcement.

Microsoft is not allowed to access the files that are only on your local machine. Technically they could implement a function that sends them all your files (something like onedrive synchronization, ;-) ) but someone would definitely notice the high traffic if Windows OS would do so. Your machine would have to open the connection, they can't just open it from outside because of basic networking principles.

I don't think that I have to add something to the legal aspect because the quoted passage explains it pretty well. Of course, there are more limiting words than "good faith belief"...

Edit: Here's a report from a German security company about Windows10 privacy stuff and how to configure it. It's written for company admins but it's an interesting and compact read: https://www.ernw.de/newsletter/newsletter-52-february-2016-some-recommendations-regarding-windows-10-privacy-settings/index.html (didn't want to link the pdf download directly).