Why does StartTLS block connection to apache When I run this command:

openssl s_client -connect my.server:443 -starttls smtp

Why does Apache 2.4 & OpenSSL 1.0.1h(running on server 2008R2) stop responding to request from other machines ?

What I see when I run the command from the clients end:

openssl s_client -connect my.server:443 -starttls smtp
Loading 'screen' into random state - done
CONNECTED(000001AC)

While OpenSSL is "CONNECTED" other connections from other workstations time out.

Any guidance would be appreciated

@Tom Leek, yeah I agree. So when I run the openssl command it sits at "CONNECTED", if ctrl+c I get the rest of the output from openssl

openssl s_client -connect my.server:443 -starttls smtp
Loading 'screen' into random state - done
CONNECTED(000001AC)
didn't found starttls in server response, try anyway...
bad select 10093
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 0 bytes and written 0 bytes
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
---

When I do openssl s_client -connect myservername:443 -starttls smtp, other clients are still supported just fine.

Of course, the connection from OpenSSL fails:

$ openssl s_client -connect myservername:443 -starttls smtp
CONNECTED(00000003)
didn't found starttls in server response, try anyway...
140029862278800:error:140790E5:SSL routines:SSL23_WRITE:ssl handshake failure:s23_lib.c:177:
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 0 bytes and written 330 bytes
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
---
zsh: exit 1

because the -starttls smtp instructs openssl to use the STARTTLS command as per the SMTP protocol, and my server is a Web server, that talks HTTP (and HTTPS), not SMTP, and it has no idea what "STARTTLS" may mean.

If connecting from a client and doing this (improper, unsupported) STARTTLS actually freezes your whole server, then you have a big problem (namely, a really easy denial-of-service) that deserves thorough investigation, especially since, to my knowledge and as per my own tests, Apache+OpenSSL does not in general suffer from that kind of bug. In fact, given that Apache forks several sub-process to handle clients, and each process handles several (many) clients in parallel, it would be surprising that a bug in handling incorrect data from one client would really block all clients.


Is it safe to store the database password in a PHP file? My connection.php file stores the credentials to connect to the database:

<?php
    $objConnect = mysql_connect("localhost","username","password");
    mysql_select_db("selectDB", $objConnect);
?>

When a page need to connect the database I just use <?php include("connection.php"); ?>.

Is this safe? Can  hackers steal my credentials from that file?

My recommendation: Don't store passwords in source code.

Instead, store them in a configuration file (outside of the web root), and make sure the configuration file is not publicly accessible.  The reason is that you normally don't want to keep your passwords checked into the source code repository or exposed to everyone who can view files in your web root.

There is an additional risk with storing passwords in a .php file within your webroot, which is a bit obscure but can be easily avoided by placing the file outside of your web root.  Consider: if you are editing connection.php using a text editor, and your connection drops while you are editing it, your editor will automatically save a copy of the connection.php file in some backup file: e.g., connection.php~ (in the same directory).  Now the backup file has a different extension, so if someone tries to fetch that file, the Apache server will happily serve up a copy of the file in plaintext, revealing your database password.  See 1% of CMS-Powered Sites Expose Their Database Passwords for details.

See also How do open source projects handle secure artifacts?, Open Source and how it works for secure projects?


Is it a security risk to expose some authorization roles to the user over an API I have an API (in this case GraphQL) and an accompanying app. My server is already censoring any data that the user is not authorized to see, so forget the risk of leaking any data.
There are certain actions I would like my client to take based on the user's role (logged-in, subscriber etc). A simple way to achieve this would be to return a list of roles to my client, so that the UI can respond accordingly. This logic is purely for optimising the UX, so if it went wrong the risk isn't in any way severe.
An alternative to this might be something like JWT, but we'd rather not implement this at this stage.
Is returning these roles inherently a security flaw? Or should I not worry about it?

There is nothing bad in the client or the UI knowing the allowed roles if it can help to provide a cleaner user experience. Said differently if a user is not allowed to go into the Admin page, it should not see a link leading there.
Simply server security should never rely on the client. That means that even if the client is never presented the link to the Admin page, the application should be prepared to get an unauthorized (because forged) request for it and reject it.
The underlying implementation does not really matter, provided the above rules are followed. That mean that a heavy client (anything more than a pure browser where javascript only smoothes interaction) should know the roles given to the user, and that the server should not rely on the requests coming from the expected client interfaces.


How to store a user's password in a database in 2019? This question, but focused on .NET's given PBKDF2 implementation, has been asked here now.

Situation

I am currently updating a password storage mechanism for a website.

My plan for storing a password was

Create a 16 byte salt*
Create a 64 byte hash with that salt, using SHA512*
Concatenate the 2
Convert the whole thing to Base64
Store the result in a 108 character DB field

The amount of iterations is still to be determined (aiming for an amount that will take a bit under one second per login).

*I am working in C#, using the language-provided RNGCryptoServiceProvider and Rfc2898DeriveBytes classes to create salt and hash respectively. This is a standard industry solution. Also it's a verified implementation, which apparently C# bcrypt is not

Do note Rfc2898DeriveBytes is Microsoft's implementation of PBKDF2. (Source Rfc2898DeriveBytes class)

Issue

Well, that was my plan until yesterday.

Then I read that it's a good idea to add the amount of iterations to the password, so that it can be updated to a higher iteration count later (when technology gets faster).

And then I found some suggestions for using a pepper, and some against it. Trying to figure that out ultimately led me to this highly upvoted answer on stackoverflow (last updated 2017)...

...which advocates using encryption instead of hashing, so that you can later re-encrypt all passwords with a higher iteration count/workload, instead of waiting for users to log in again (which might not happen at all anymore).

Common sense tells me that this is a good idea, but - let me put it this way -
Common sense does often not apply when it comes to security.

Question

How should I currently store a user's password in a database?

I would consider this one question, but there are several components to it:

Salt length
Pepper vs. no pepper
Pepper length
Encryption vs. hash
Encryption/hash algorithm choice
Encryption/hash length
How to combine all that into one string for the DB
(For example, I have seen a pattern [salt]$[hash]$[iterations])
Reasonably future-proof length for the DB field
(Considering e.g. that iterations will get bigger over time)

Why do you want to create your own scheme for this?
Please use one of the industry standard solutions for this:

Bcrypt
Balloon Hashing (you will need to convert the implementation from Python)
Lyra2
PBKDF2

I would suggest Bcrypt as that's the most accessible on a PC.
but all of them have considerations you will probably miss if you try to implement your own (as would anyone).

This list is time sensitive, so please check for the current best practices. It is based in part on the list of key derivation functions from Wikipedia.


Why using a SSL certificate if top websites doesn't use them? We've been told that:

  Certificate validity exists because one of the core features of SSL is server authentication. This allows the client (web browser) to know the identity of the server it is connecting to. Without server authentication, you would not know if you are connecting to the authentic website.

But I know a long list of top media websites that don't even bother to use HTTPS. Check that the links redirect to HTTP or give a certificate error.

https://www.nytimes.com
https://www.wsj.com
https://www.imdb.com
https://www.bbc.com
https://www.cnn.com

These big sites do need to start using HTTPS and are likely in the process of switching over however they were established long before it was recommended to secure whole sites with SSL/TLS.

The process of switching from HTTP to HTTPS can be much harder for long time established websites, especially when they have a large volume of old content to sort though and have links to this content all over the web. Any visitor coming from a non-secure link would need to be redirected to the secure version of the page.

On top of this, any media content on the pages would need the URL updating to point to a secure version. Web browsers will show a Mixed Content error and have a red broken paddle-lock if a page served over HTTPS tries to load content from a non-HTTPS location.

This Mixed Content issue can also effect any Adverting Networks the site may be using as these would need to be serving Ads via HTTPS.

Wired have quite a few articles about the difficulty they had switching over to HTTPS. You can read their retrospect here - https://www.wired.com/2016/09/wired-completely-encrypted/

Rather than focusing on what others are not doing, here are a few of the benefits for your site:

User trust. As more of the Internet is secured, users are going to start noticing when pages are not secured. This will be further enhanced as browsers get stricter and stricter on non-secured pages. [1]
Pages on your site can not be tampered with while passing over the Internet.
Speed improvement if your site is running on a web server that supports HTTP/2. Web browsers only support HTTP/2 when using HTTPS. [2]
Improved Google Rankings. HTTPS sites to may get a boost in search rankings. [3]

[1] https://security.googleblog.com/2016/09/moving-towards-more-secure-web.html

[2] https://http2.github.io/faq/#does-http2-require-encryption

[3] https://webmasters.googleblog.com/2014/08/https-as-ranking-signal.html


Security essentials for a embedded Linux device We are prototyping a security camera product using Raspberry Pi 3 as the hardware platform. The camera has capability to connect to the cloud over internet as well as offline processing when the internet is disrupted.

Currently for security we have SELinux enabled in enforcing mode and considering following:

dm-verity
eCryptFS for file based encryption

After a quick reading of some Linux security related articles we have come across certain keywords being spoken about:

Kernel hardening
Network hardening

What does hardening the kernel and network mean? Are there certain kernel configs that help achieve kernel hardening? Are there guidelines what should be blocked off on the network side?

Unlike Android we do not intend to install and run numerous application on our Linux system. We have few applications that run and do the job required. As a mater of fact any other application that somehow gains access should be blocked from running.

Your considerations
Using dm-verity is a very good idea, especially if you are able to fuse a key in hardware to reduce the TCB further. This can greatly help prevent a system from being persistently compromised, as well as ensure integrity, making tampering highly evident. A quick web search shows several TPM implementations for Raspberry Pi, which will allow you to implement SRTM (Static Root-of-Trust for Measurement) on the device, giving you the ability to perform measured boot and remote attestation, augmenting dm-verity to increase the integrity of the device.
Filesystem-level encryption can be useful, but if you are uploading data to the cloud, you must be aware of risks incurred from that behavior as well. Filesystem-level encryption will not protect data which has been uploaded to an insecure "cloud" host. Ideally, you would use client-side encryption instead. If you are only uploading things such as video files, you could encrypt them with an easy to use and popular library like NaCl/libsodium before uploading them, encrypted, to a remote server. Remember also that the password has to come from somewhere. Unless your user is selecting the password themselves, then you will not be providing any confidentiality (for the data on the device). Storing the password on the device would be a bad idea.
Even more important than this and everything that is about to follow is the development of a formal threat model. You need to know who your adversaries are, what your users' assets are and their value, and put it all in context. Write up an attack tree, and use it. Risk assessment and threat modeling are in general extremely important for the security of your product.
Kernel hardening
This refers to any action to increase the security of the kernel to reduce the risk of exploitation. This is a broad class of techniques that range from patching the kernel with security-oriented patches to simply adjusting sysctls to reduce attack surface.

Kernel patches such as grsecurity greatly increase the difficulty in exploiting the kernel. Currently, grsecurity has closed itself except to paying customers, so it may be out of your budget range. If you are able to use it, or a forward port of it, you will get a large number of kernel hardening features, quite a bit more than would be possible through configuration alone.
Custom kernel configurations allow you to remove unnecessary code and features from the kernel, as well as breaking stock exploits. For example, many kernel exploits require the use of obscure or complex drivers. Since you are developing for an embedded system, chances are you will already be using a custom kernel config. You should strip it down to only the drivers you need, and disable some particularly problematic features such as user namespaces, vsyscalls, and unprivileged eBPF. This is one of the most important ways to harden a kernel.
If you go through the whole sysctl list, you will see many which are security related but have default values that are not ideal. By tweaking sysctls, you can disable unprivileged user namespaces, eBPF, JIT, etc. You can also do things such as increase the randomness provided by ASLR, by increasing the vm.mmap_rnd_bits sysctls. Additionally, enabling sysctls to panic the kernel on various events such as oopses can also greatly improve security, as many kernel vulnerabilities trigger an oops or a kernel warning, but by default the kernel will continue as if nothing happened, potentially allowing the exploit to succeed. As this is an embedded device, panicking and rebooting immediately would be ideal.
Kernel module signing is used to prevent an unsigned module from being loaded (though ideally you would build a non-modular kernel with only drivers you need, as you control the hardware). The signing key can be created offline while compiling the kernel. This can be used, along with other security features such as those provided by grsecurity, to prevent even the root user from compromising the system. Protecting the kernel from root is hard, but not at all impossible.

Using grsecurity is by far the most effective form of kernel hardening, but depending on the budget for your product line, it may or may not be cost effective. A custom kernel config is the second most effective, but requires a decent understanding of kernel configuration. I would strongly recommend hiring a security expert to do all this, otherwise you may inadvertently disable important security features or enable unsafe options. The Kconfig help section is not always sufficient to understand the security implications of a given option. For example, many of the "debugging" features are actually extremely useful for security, such as the various sanity checks. Familiarize yourself with the Linux kernel and its various subsystems. This will allow you to greatly improve the security of your device.
Network hardening
Network hardening refers to increasing the difficulty of network exploitation vectors and lateral movement. Exactly what constitutes appropriate network hardening depends heavily on the specific setup and network topology. At its simplest, it involves basic firewall rules, but can be more extensive.

Whitelisting incoming connections is important to protect potentially insecure services. Whitelisting outgoing connections can also be useful for hampering malicious software or otherwise misbehaving software, making it harder to control a device over a C2.
Like with kernel hardening, you can tweak various sysctls to improve networking security. The exact tweaks depend very heavily on your use case. For example, disabling IPv6 can reduce attack surface area when it is not necessary. Disabling features only useful for routing can reduce the chance that your device is abused to redirect packets. Other tweaks can improve performance and increase resistance to DoS attacks.
Unnecessary protocols should be disabled. This is especially important for kernel hardening against remote attackers, as many protocols such as DCCP have a history of vulnerabilities, and yet are enabled by default. Ideally, your kernel should only support TCP, UDP, and ICMP, unless other protocols are absolutely necessary for correct operation of your devices.

Network hardening is usually more relevant for an entire infrastructure with multiple interconnected components. For a single device making only a connection to a server to remotely upload files, network hardening is much closer to kernel hardening, i.e. eliminate unnecessary attack surface area.


User IDs containing URIs When adding a User ID to your OpenPGP key, you are typically asked (for example by GnuPG) to provide a name, a comment, and an email address (where each part is optional).

This format (Name (Comment) <email address>) is described by RFC 4880, section 5.11 (User ID Packet):

  By convention, it includes an RFC 2822 [RFC2822] mail name-addr, but there are no restrictions on its content.

While it says it’s only a "convention" and there are "no restrictions on its content", the first sentence of this sections reads:

  A User ID packet consists of UTF-8 text that is intended to represent the name and email address of the key holder.

I assume (please correct me if I’m wrong) that "intended to represent the name and email address" is not normative. So that would mean:

I may specify any kind of content (it does not have to represent a name and/or an email address).
If I specify a name and an email address, I don’t have to follow the address format described in RFC 2822.

Is this correct?

If so, I could specify any kind of URI (using angle brackets to delimit it). As the URI scheme would be included (contrary to the "convention" format), it could, for example, prevent people mistaking an XMPP address for an email address.

Examples of possible User IDs:

<mailto:unor@example.com> (my email address)
<xmpp:unor@example.org> (my JID)
<tel:+1-201-555-0123> (my telephone number)
<acct:12139@security.stackexchange.com> (my Security SE account)
<https://example.org/> (my website)

Is this sensible, maybe even recommended? Will it break something?

I especially wonder if tools (like keyservers, mail clients or key chains) will still find/associate a key with an email address if the full URI is specified (<mailto:unor@example.com>), and if they won’t interpret an XMPP address (<xmpp:unor@example.org>) as email address.

Standardization

Don't expect any clients to be able to read those user IDs. User IDs following the schema provided are not part of the standard and will very likely not be implemented.

This is especially valid for providing mail addresses, which do have a formalized representation, including a mailto: prefix would break that.

Arbitrary Strings are Allowed

Anything beyond name, mail address and possibly a comment is not standardized, but the standard does not disallow anything, you can provide any string you want. Consider whether somebody else will be able to understand what you want information you want to provide, and whether giving the information is reasonable (thus, would anybody approve/certify the user ID?).

Maybe try to avoid matching the schema defined by RFC 2822, and do not put anything in angle brackets which does not fit an e-mail address you're able to receive mail on, as this is what implementations (and possible other users) would expect.

OpenPGP Notations

Another way to give (usage) restrictions would be using notations, but again, there is no defined way of using them, and I haven't heard of any implementation actually taking use of them.


Should links to images contained in emails be secure? We are generating emails which contain links to images: our client's branding, images showing other products offered by the client etc.

What are the security pitfalls if these links in the emails are src="http:// rather than src="https://?
Should links to images contained in emails be secure?

Note:
The emails would be generated from our secure webservers.
The images would be hosted by the client on one of their webservers.

I would say yes. While an eavesdropper (in either case) can still see what server they are connecting to and therefor infer that they have some interaction with your company, you deny them at least some minor insight into what that interaction is.

Really what it comes down to is that you'll be exercising a best practice, that is to say using SSL when linking to your website. Consider it secure communication hygiene.


How to implement non-password authentication in a web site In an answer to this question about pw reset, D.W. says:

  Lastly, consider non-password authentication. Passwords have many problems as an authentication mechanism, and you might consider other methods of authenticating users, such as storing a secure persistent cookie on their machine with an unguessable secret to authenticate them. This way, there is no password to forget and no way for the user to be phished, though you do need to provide a way for a user to authorize access from a new machine or a new browser (possibly via email to the user's pre-registered email address).

How does one do that?  How safe and user friendly is this solution?  What are the key drawbacks?

In almost any case where you click on "remember me", this is already happening on your computer. A random string of characters is stored in a cookie and linked to your account. The reason why more than this is required has to do with mobility. If you change computers, how do you log back in without the standard username / password? Users simply don't take their cookies with them.

In the case of the email suggestion, you could send a random code that can be entered into a form field, or even clicked as a link. For some marginal level of increased security, I would expire those click links after a time and store a different random code as the cookie.


What is the added value of dynamic payload in Ping/Heartbeat commands? Many protocols, including TLS and WebSocket, have a ping/heartbeat packet format that we encapsulate a variable payload that the remote end must reply back.

In other terms, If I (client) send a ping to the server with payload "a", the server must reply with a pong with payload "a".

From a security point of view, what's the added value of the dynamic payload?
That is, what is the difference when a payload is included rather than sending just a static "ping" and "pong" command?

From a security point of view there is no reason for this.

The motivation is purely technical.

An arbitrary payload allows you to check not just if the system is able to respond in general, but also if the communication is free of any errors. An arbitrary size also allows to find out how the connection behaves when using larger messages. Standard ICMP pings with different length, for example, can be used to discover the fragmentation size of a network route and which router enforces it.


Why doesn't XSS execute when bypassing HTML encoding? I am trying to execute an XSS payload on a search field that takes my input like this:

<input name="q" id="gsasearch" type="text" value="My Input"></input>

Observations:

<, > and " are filtered. However, HTML encoding these characters work.
The input is URL encoded and URL decoded and displayed to me.
There are no parameters.

Payloads used is HTML encoded version of is qq"><script>alert('xss')</script>.

However, all i see in the result page is qq"><script>alert('xss')</script>.

XSS doesn't execute in both Chrome and IE. If I inspect the element, I see this:

<input name="q" id="gsasearch" type="text" value="qq"><script>alert('xss')</script>"></input>

After using F2 in dev tools, I could see that " is getting converted to &quot;, as shown below:

<input name="q" id="gsasearch" type="text" value="qq**&quot;**><script>alert('xss')</script>"></input>

So,

I/p--> URL encoded --> URL decoded --> HTML encoded if its a "

Is there any way to bypass this?

The developer console and the "inspect element" functionality of the browser is not a good way to check for XSS. This will show unencoded HTML elements, even though they are really properly encoded:

When pressing F2 or selecting "Edit as HTML", it properly shows the encoded characters:


Kerberos ticket lifetime I was just reading up on Kerberos and realized that the lifetime of a master ticket called the TGT(ticket granting ticket) is 25 hours. Is there any particular reason behind this choice of lifetime?

The Kerberos (v5) RFC does not specify a lifetime but recommends nothing more than 25 hours life for each ticket (section 8.2) and a renewal time of max. one week. There is probably no good answer here as to why Stanford chose to break that recommendation.


How did Google Map know it was me on my mother's hardwired desktop? Here is the situation.  I signed into my mother's desktop using her password. So I should not be detected as different user.  But as you will see later on, the map knew it was ME????

I opened her email to check something I had sent to her Verizon mail (had sent it previously, not right then, using my Gmail from my cell).  Then I signed onto a forum using Explorer and a password.  My forum profile has my email address in it, which is Gmail (not sure if this means anything).

I wanted to open a map to see where someone on the forum lived, so I googled the words "google map" (she didn't have shortcut).  Google results came up, I clicked on the first link, the map opened.

And here's where it gets freaky....to me at least.

IT HAD "BONNIE" IN THE UPPER RIGHT HAND SIDE!!!  How did the map know IT WAS ME using her PC????  I cannot figure out how it knew I was using the PC???

It also had a couple address searches listed that I had done on my tablet at my house (also linked to Gmail), not at her house (so not in the same exact GPS location).  And I did not have my tablet with me when this happened. I may be telling you unrelated info, but wanted you to have ALL the facts. I'm not tech savvy so don't know what's important.

I am in no way connected to her PC.  I used her sign-in password, I have no log in info on it, I did not log into Google, she has no wi-fi.  She has Verizon DSL.  (I'd seen in this thread on here with a similar question How does Google Maps know where I am, when I'm using a VPN? that that might matter).

I cannot recall ever using google map on her PC before and even if I did, I do not think I would have signed into it.  I would have just used it as a guest, so to speak.

I did have my cell phone nearby, which was also mentioned in that same thread.  But I still do not know how the map knew it was me on the PC.

Can someone explain this to me?

Also, I never use +Google but it had all these pics of some people I know who also have Gmail, but then tons of others who are total strangers, saying they were all people I knew.  It also had a whole lot but not all of my contacts (prolly only people I have Gmailed).  I realize that both my mail and the map are "google" but did not know the map would pull up all that info. I did not like that at all.

Odd thing is, I could not duplicate this occurrence once I shut down everything and restarted (because I was so freaked out).  I tried the map without having anything else open.  I tried it after opening up her mail.  I tried after logging back onto that forum. I tried sending her another email from my cell to see if that somehow "opened a doorway".

Each time, the map opened as if it did not recognize me. It just knew the PC was in VA. And when I went to "my places", it asked me to log in versus giving me prior search results like before.

Also the first time, it was a full screen map.  The other times, when it did not recognize me, it was a 3/4 screen map with words and stuff off to the left.

I am not a security specialist but I could not find anywhere in the HELP section that said I could not ask a question on here.  I hope I stated my question clearly and that someone can solve this mystery for me.  It really shook me up because I feel like I have somehow made my mom's PC vulnerable, like I have opened some kind of doorway into it.  And I don't like that AT ALL

Another possibility is the forum you're using used an OpenID account to sign you into the forum. Similar to what Armani was saying, at the point you login with that OpenID you'll set the cookie that lets Google know you're a user on that machine. The login on the page itself was for your mother, but the map picked up the cookie and read your profile. When you closed the browser it closed the sessions, so you weren't logged in when you tried to replicate the results.

If you go back into the forum and log in and then try to access the map check to see if you have the same results.

You can go into your Google account and restrict the types of information they keep on you. Also you can open a private browsing session in most browsers when you need to use your mother's computer to do something like check your e-mail. That way all of the cookies are cleared when you close that window.


Serial key in pdf document I'm writting a ebook and I'm gonna to sell it soon.

I'd sell it at Google Play Store, but here in Brazil they don't accept PayPal as payment (and many brazilian don't have a credit card), so I think that the best option is to sell it by myself.

I could sell it also at Amazon, but the Kindle format just sucks when you work with (a lot of) equations.

But, of course, there's a problem about sending the pdf file to the buyer. My friend suggested me to lock it with a serial key - like a software. Then a person could open it just in one or three computers. I know there's a package that lock the pdf file with a password (that I create), but I'd like to have a way that block this password when it's used a lot of times - really like a software.

Is it possible?

Do you have any other ideas to protect a pdf file?

I'm gonna take the copyright of my ebook here in Brazil and I know that I can't protect it totally, but I'm trying to do everything I can do to protect it.

There's also a brazilian site (www.hotmart.com.br) where you can publish anything you want and they say that, about pdf files, they print in each page the document number of that one who bought my ebook.

Thanks! :)

For the kind of protection, that you want, you need a Digital Rights Management (DRM) scheme. Unfortunately, those are kind of inconvenient, expensive, or both. Also, most commercially available schemes are either broken or can be worked around.

For example if you want to count how many computers are used to open a specific copy of your e-book, those computers need to contact a server of yours. That's inconvenient for your customers, who have to be online to read your book. The will probably be limited to a certain software reader. And they have to be okay with the fact that you can track their reading behaviour. Also, when some time in the future you decide that you do not longer want to maintain the server, they might not be able to read the book any longer.

You can ask a publisher to sort the details out for you -- Amazon is not the only one offering that kind of service. That will free you of the burden to run a DRM-Server, and probably will give your customers a larger degree of compatibility as well.

If you expect to have a limited audience, a Traitor Capturing Scheme like the one mentioned in your last paragraph might be a better idea: You can for example compile a personal edition of your e-book, with the name of your customer (if it's a present, the presentee's Name) and a short text explaining that it's pretty uncool to copy this book. Watermarking, encrypting or digitally signing might be a good idea to make sure, the name stays there.


DOS safe alternative to delay response to an attacker with sleep()? tl;dr
sleep() costs my servers resources. Using it to delay response to the attacker might cost him/her time, but allows for DOS. Is it possible to keep him/her waiting without costs of mine?
Long
Assuming I can tell (or at least very well estimate) that data send to my via POST method is an attack.
First in a fit of anger I though I would be smart, just never answering the request and leave the attacker "waiting forever", therefore I thought I would use sleep(30).
Then I found out that this opens the door for the attacker (especially when using DDos that is more than 1 IP) to drive my server load through the roof because each "dangling" (i.e. sleeping) script costs me resources on my system.
Is there a way know way to delay a response at very little costs?
(i.e. breaking of the TCP/IP connection without notice and keep attack in the dark/waiting)
Alternatively:
In essence is there maybe even a strategy to reverse the resource costs?

sleep() won't slow down current generation brute force attacks all that much to begin with.

In general, bruteforce breakin attempts nowadays are executed via the same type of botnet used for DDoS attacks - so rather than a single source attempting one set of credentials after another, you'll be seeing hundreds or thousands of different sources attempting a single set without waiting for a response to one another. Whichever one scores a hit reports back, all the other zombies just shrug and move on.

If you have sufficient control over your server that you can tell your services to log bad login attempts to a file somewhere, you can set up something like fail2ban to handle blocking and unblocking attackers for you, but sleep() is going to be essentially useless against most modern breakin attempts while degrading performance for legitimate users who'll have to wait an extra second to get each new page.


What purpose is served by repeated connection resets? My server logs are being filled with Connection Reset by xxx.xxx.xxx.xxx [preauth]:

$ cat /var/log/auth.log | grep 'Connection Reset'
Mar 13 19:52:30 server sshd[29366]: Connection reset by xxx.xxx.xxx.xxx [preauth]
Mar 13 19:52:33 server sshd[29366]: Connection reset by xxx.xxx.xxx.xxx [preauth]
Mar 13 19:52:41 server sshd[29366]: Connection reset by xxx.xxx.xxx.xxx [preauth]
Mar 13 19:52:50 server sshd[29366]: Connection reset by xxx.xxx.xxx.xxx [preauth]
Mar 13 19:52:53 server sshd[29366]: Connection reset by xxx.xxx.xxx.xxx [preauth]
...

This goes on for hours and hours. The IP address in question has not attempted any legitimate login attempts.

As I understand it, a connection reset is roughly analogous to dialing someone's phone, and then immediately hanging up. So what goal is this person trying to achieve?

(As a secondary question, is there an is fail2ban regex which will detect this behavior and stop it?)

You should use grep 'Connection Reset' /var/log/auth.log -A 2 (do not use cat since it's not useful, and use -A to get the context above the matched lines).

My guess is that your server is being bruteforced, you should be able to see the attempts with the above command. The attacker is closing the connections as soon as it knows it won't be successful, and retries again and again.

This is something very common, see this question to know how to block them.


Difference between "weakness" and "vulnerability"? What is the difference between the terms "vulnerability" and "weakness" when it comes to security?

I was looking at the CWE page and it mentions that a weakness leads to a security vulnerability. I understand this only partially.

From my understanding, this is the sequence flow starting from when a weakness is identified till it's exploited: (correct me if i'm wrong!)

weakness -> vulnerability -> exploit -> security breach

Is there something I'm missing/am I completely off?
Can someone explain the difference between a weakness and a vulnerability with an example?

This is purely for better understanding the basic terminologies and different perceptions of the same. Many thank for everyone's help!

Your understanding is correct within the framework of the CWE1.

Typically when you encounter problems with terminology, it is best to focus on the scope where the term is used. The word weakness in itself has several meanings according to the Merriam-Webster dictionary, for instance:

  1 : the quality or state of being weak; also : an instance or period of being weak
  2 : fault, defect
  3 a : a special desire or fondness
  3 b : an object of special desire or fondness
  pizza is my weakness

How the word weakness is used by the CWE is explained in their FAQ which you have linked. They even have a question in there which is more or less exactly phrased like yours "What is the difference between a software vulnerability and software weakness?"

There they state the following:

  Software weaknesses are errors that can lead to software vulnerabilities. A software vulnerability, such as those enumerated on the Common Vulnerabilities and Exposures (CVE®) List, is a mistake in software that can be directly used by a hacker to gain access to a system or network.

So what kind of error can lead to a vulnerability and could therefore be called a weakness? Let's have a look at a randomly selected weakness from the CWE database.

  CWE-400: Uncontrolled Resource Consumption ('Resource Exhaustion')

  Description
  The software does not properly restrict the size or amount of resources that are requested or influenced by an actor, which can be used to consume more resources than intended.

There are also examples given, let's look a short one:

  Example 2

  This code allocates a socket and forks each time it receives a new connection.

sock=socket(AF_INET, SOCK_STREAM, 0);
while (1) {
 newsock=accept(sock, ...);
 printf("A connection has been accepted\n");
 pid = fork();
}

  The program does not track how many connections have been made, and it does not limit the number of connections. Because forking is a relatively expensive operation, an attacker would be able to cause the system to run out of CPU, processes, or memory by making a large number of connections. Alternatively, an attacker could consume all available connections, preventing others from accessing the system remotely.

Now it gets interesting:
In itself this represents a working interface, but the consumption of resources is not controlled by the system. This is a weakness that leads to a vulnerability because it can be controlled by an attacker. If new connections can not be established by an attacker, this would still be a weakness, but it would not lead to a vulnerability.

To put it in other words:
All vulnerabilities rely on weaknesses, but not all weaknesses entail vulnerabilities.

1:
For instance in the ISO 27000 framework the term weakness is not defined as a separate term. They only define vulnerability:

  vulnerability
  weakness of an asset or control that can be exploited by one or more threats


Remote return into libc attack It is often shown that non-executable data segemnts are possible to bypass through return-to-libc attacks. It's evident on /bin/sh but is it also possible to invoke a remote shell?

The universal parts of an exploit are often called "shell code" because they usually do exactly that: Start a shell process and connect stdin/stdout to a network socket.

This paper may be interesting:

  To demonstrate, we perform an over the network brute force return-to-libc attack  against a pre-forking concurrent server to gain remote access to a shell.


Can malware "upload" itself to the actual mobile base station and regain back to another phone? My question is can a malware from my affected phone "upload" itself to the ACTUAL REAL mobile base station from the service provider, and regain back to my another phone with the same number (same identity code), but different SIM card (just same number, same identity)?

My situation: I am using a smartphone with SIM card with mobile internet plan (2GB per month). I know same number from SIM card has same identity code. Is it something like a malware able to spread through over the modem when two computers connected to it? Is it possible? HELP

Such an attack is theoretically possible, but is it likely? As always, to estimate the risk of an attack you must look at your threat model. Yours doesn't quite make sense.

You are assuming a targeted attack from a sophisticated and well resourced adversary, but that such an adversary wouldn't use a fake base station and directly target your second phone.

(To be fair, you're probably not consciously assuming an "ATP" style attack, but the attack you are imagining is too complicated and too specific for anyone else to bother with it.)


Malware analysis - Traffic Inspection I am working on small project. There is an organization in which it has 100 around systems across the country. All of their machine's traffic goes through a single proxy monitored and maintained by the organization. Proxy is configured to use only white listed websites such as www.google.com and many others.(I am not aware about the proxy configuration that, are they using content based filtering or website URL based filtering? ).

If a machine sends traffic out of white listed domain, proxy alerts and then I need to manually analyze the machine.

Question:

How can I know due to which application/port/running process that traffic is occurring?

Is there any other way to stop this? Malware scanning tools identified nothing on the system.

If I recommend sysadmin to install disconnect, ghostery, blur, donottrackme and adblockplus like ad-dons will the number of reports generated by their proxy get reduced or not?

Any other permanent solution or global setting solution?

You will not be able to tell the application/port/process based on the network traffic alone.  For that, you will need to analyze the logs on the endpoint.

The add-ons you mention to block ads will help in reducing the noise you are seeing, since I imagine you're seeing a ton of random ad-traffic tied to legitimate white-listed sites users are browsing to.  The modern Internet is very loud with that stuff.

I recommend gathering logs from two places:

Border firewalls that block all HTTP/S except from your proxy server as the source -- that way if a machine is trying to connect to a C&C server through a process that is not proxy-aware (aka malware dropper / Trojan downloader) it will be denied and you will have visibility of it.
SysMon on each endpoint with process tracking and network tracking enabled.  That way you can connect to the remote Event Log during an incident response to track which processes were communicating on which ports, etc., or even better use Syslog or a SIEM to aggregate these to a central location for review.

You will need to apply some analytical discretion when getting alerted on this stuff; known ad sites and redirectors will likely accompany typical browsing, SysMon will tell you which browser was being used but browser history logs may be cleared (or Incognito was used), and remember that some malware is proxy-aware.


SHA1 vulnerabilities We are currently integrating with a third party component in our web application.  Part of this integration requires sending data over http.  This is done via POST parameters.  An additional parameter is included in the request which is a SHA1 hash of the other parameters, plus secret key, combined as follows:

param1.param2.param3.param4.param5.param6.secretkey

A malicious user or man in the middle attack has access to the parameters and the output hash, but not the secret key which is not sent over http.  I've been reading that SHA1 is considered weak and, with sufficient resources, broken.  I'd like to understand more about the robustness of this setup and how SHA1 is weak.

My questions are as follows:

An attacker could iterate over all possible combinations of secret key, creating a new hash until a matching hash was found.  Once the secret key is found, modifying the data (and then generating a new hash) sent between us would be trivial and, crucially, undetectable.  Are there other ways (other than brute forcing) of finding out the secret key? Brute forcing could be used against any algorithm, leading me to believe there is a better/faster/cheaper way to do this. In other words, how do attackers exploit the weaknesses of SHA1?
If we are unable to get them to increase the security of their message by using SHA2 or SHA3, will a suitably long secret key with SHA1 protect us against any attacks?

You should read the this article. HMAC is the preferred option in any case. The way you use the keyed hash exposes you to all weaknesses of the hash algorithm. HMAC, however is still safe because its security relies on less strong assumptions on the hash algorithm.

Please note that the opposite way of computing the hash HASH(KEY || MESSAGE) (as opposed to HASH (MESSAGE || KEY) as you intend to do it) is considered completely insecure as you can read here and here.


How to share information between devices, while keeping it anonymous I'm developing an app for alert people if they encounter covid-19 positive person.
I'm very much concern about user's privacy. So I need to make a user completely anonymous.

What is want is as follows.

Suppose there are devices A, B, C,

A, B, and C should broadcast the their own UUID via bluetooth
When A, B, and C is near to each other A will have B, C UUID's and B will get A, C's UUID and vise versa.

Lets suppose A's find out that A is positive for Covid-19.
A will upload its UUID to a central server B and C also checks for UUID's with the server.
When B, C gets UUID list of infected person's apps B, C will check if they match any of UUID downloaded from the server against locally saved UUID.

But in my case I don't want the server to find out UUID of A. But somehow I need to send A's UUID to other devices as well. Whats will be the best approach.

My Solution.

All the devices will generate public, private key pairs of their own.
Each app will encrypt their UUID with the public key they have generated and broadcast to the other devices encrypted UUID + public key.

Once particular user find him positive for covid-19 he will upload his private key to the server.
All the apps will download all the private keys from all the covid positive devices. and check if app's themselves can decrypt their messages with the private key's they have.

Will this be possible ? or what will be the best approach.

Its stupid to disclose the private key. And also it will be chaos to find appropriate public key which matches with the private key also.. But yet this was the only thing that I could think of.

Once particular user find him positive for covid-19 he will upload his
  private key to the server.

A private key is supposed to be kept private and uploading it to a server will defeat this requirement.

  I'm very much concern about user's privacy. So I need to make a user
  completely anonymous. in my case I don't want the server to find out
  UUID of A. But somehow I need to send A's UUID to other devices as
  well. Whats will be the best approach.

Based on the above parts of the question, what you should look at is Data Anonymization. You can use a hash function to anonymize data (as long as you don't link the hashed value to other personally identifiable information).

In your case you can simply hash the UUID and send the hashed value to the server. When you receive the broadcast of a device on another, just hash it and compare it with the hash from the server. I suppose an MD5 hash function should be sufficient in this case.


Multiple security layers for SOA REST intranet services For intranet applications that already leverage Active Directory, is there any point or benefit to adding a second layer of security such as OAuth when accessing SOA REST services? We're new to SOA and REST and are fairly unguided as to how to secure our services.

Assuming all your accounts are stored in Active Directory, and only AD, and you will not accept any account registered at an external provider, it's hard to see additional benefit of simply using OAuth solely as the protocol to authenticate* users registered on your AD.

OAuth has a different use-case, it is designed to fit for federation scenarios:

  It allows users to share their private resources (e.g. photos, videos, contact lists) stored on one site with another site without having to hand out their credentials.
  - Wikipedia

In your case, there is no need to share credentials in the first place, since the client machine, the server application, and the user accounts are all registerd in AD to begin with. SSPI (aka Windows Integrated Authentication) would probably fit your needs just as well.

There are a few downsides, though, to just using WIA/AD out of the box - for one, having transparent user authentication (via WIA) can lead to some other weaknesses, such as CSRF (doesn't cause it directly, but it definitely makes it much easier to exploit).
Depending on how you were thinking of implementing OAuth, this may or may not have mitigated this issue. Regardless, there are other better solutions than OAuth (which has it's own complexities).
There are also possible AD issues to consider, however your proposed solution (OAuth+AD) would not have affected this anyway.

So, bottom line - I don't see any benefit in sticking OAuth in there.
If there is a specific risk you're worried about with WIA, there are probably better / easier solutions.


Block MAC address in PHP Refer to this post here how-can-i-get-the-mac-and-the-ip-address-of-a-connected-client-in-php, MAC address is unique as per device right?

So if I found a possible attack from that device, I could just blacklist and block the device from log in my website is that correct?

There are a couple of issues here.

First, MAC addresses, while intended to be unique, are in practice not. They are user-controllable.

The second issue is that your PHP-based application, if on the internet, will not be able to access the MAC address. The reason is that MAC addresses are layer 2 and layer 2 data is not typically sent across WAN links. If you want something to block, you have layer 7 data. This includes:

User agent
IP address
URL requested

However, if your application is on the internet, it is going to get attacked. The energy should be spent on ensuring the application follows good development practices. This includes keeping it updated with any frameworks and libraries it uses, output encoding user-supplied data, parameterized queries, and so on.


Determine what is making outgoing connections I have a Centos 7 server running httpd for a webmail service. I'm blocking outgoing connections, including ports 80 and 443. I'm doing this with iptables on the machine.

Now looking at the logs I see the server is trying to make outgoing connections to ports 80 and 443.

Using --log-uid in iptables I was able to see that the user making those connections is apache which is the user running httpd.

The connections occur at random times throughout the day and to about 50 different IP addresses on port 80 and more than double that on port 443.

How can I determine what process is making those connections?

And is there any way to determine what's going on without actually allowing those connections and capturing the traffic?

In addition to tracking the process down with netstat or lsof, on the affected system, instead of blocking the traffic, you could use iptables to redirect the traffic to services running on ports 80 and 443 that you control. This way, you could potentially gain some insight into HTTP headers and what kind of content is being accessed.


Cookieless Authentication I am working on an authentication server that can act as a central place to manage authentication for multiple projects, sort of like keycloak or ory kratos.
While working on implementing refresh_tokens (RT) I got an idea for an alternative solution that would not rely on cookies. But first, what challenges do I see with using refresh_tokens:
Secure Cookies
I am currently storing the RT inside an HttpOnly cookie with the SameSite configuration set to strict to avoid the browser leaking the RT. This also requires me to either 1) have the authorization server run on the same site (e.g. auth.example.com) or 2) proxy the request though my API server to the authentication server.
Refresh Token Rotation
When a client asks for a new access token (AT) the old RT get invalidated and the client receives a new pair of AT and RT, this works well for the happy case where things don't break but IMO creates a bad UX in case something goes wrong e.g. the user is on a bad internet connection and request a new AT, while the server is processing the request the client loses the connection and never receives the new RT, now the user is in an invalid state and needs to sign in again.
A cookieless solution

Generate a Private/Public Key Pair
Alongside the username and password send the generated public key to the authentication server
On success the authentication server returns a session ID that can be used to associate the current session with the public key that was send to the server
The client stores the session ID  and the private key in indexddb (set extractable to false)
In order to request a new access token for a given session the client calls the authentication server with a short lived Access Token signed with the private key.

Private Key Storage
In order to prevent private keys from leaking outside the browser context we need to configure the CryptoKey object to not be extractable, this allows us to use the private key to sign the AT without directly accessing the key and preventing XSS.
MDN: https://developer.mozilla.org/en-US/docs/Web/API/CryptoKey
Conclusion
I think this approach would have the same security characteristics compared to using refresh tokens but can provide a better UX in case of failure, additional I don't have to run the authentication server on the same site as my client projects.
Am I missing something?

Well, first of all, the simple approach to fixing the problem you face is to not invalidate the RT immediately upon use. Either just don't re-issue it at all (keep using it until the session ends due to user action, or the token expires), or wait to invalidate the old one until you've confirmed that the user received the new one (e.g. by checking the next request the user sends to the site and seeing if the new token is present. The second approach adds an additional DB access on each refresh (on the subsequent request), but you can safely store the "new token verified" flag on the client (possibly as part of the cookie, which gets updated during the verification) since the whole "make sure the user gets their new token" thing is just a convenience factor for the user anyhow and doesn't impact security.
As for your proposed implementation, it looks like it should work. However, the whole thing is complicated in a way that adds little actual security. You're using asymmetric signatures so that you can hide the private key from JS, which is only relevant in the case of XSS that happens at some point post-login (as most of them do). However, this - like the HttpOnly flag on cookies - is barely relevant security-wise. As long as the victim has any document (including in a window or iframe) open to the vulnerable page, the attacker can remote-control the victim's session and see all data. Assuming the access token is visible to script - which it must be, for a script to sign it for the refresh process - the attacker can use that token themselves in the background, making their own requests and viewing the responses. The attacker won't be able to refresh the AT once the victim closes all vulnerable pages, but realistically that doesn't matter. Either the attacker will have already achieved their goals, or they'll just use the XSS attack again when they need it.


How do end-to-end encrypted chat services ensure that the server admin doesn't add new members to a chat? This question is about any chat service that supports end-to-end encrypted group chats, for instance Signal, XMPP + OMEMO (closed group chats in particular), WhatsApp, and the like.

How do these services ensure that a hostile server admin does not add their own keys to any group chat that they wish to snoop on? What are the best practices?

It's possible to ensure that all current group members are at least notified of the intrusion in their client, but the intruder may still access all messages sent before they are noticed and kicked out.

It is possible for a server admin to silently add an infiltrator to group chats. But without letting the group to be notified, It's not possible well atleast in Signal protocol.
Signal is open-source so you can verify from the source that a message that someone has joined the group is shown on GUI. While what's app if pressurised by the government can choose to program it in a way that no message is shown on GUI if they add an infiltrator.
But that won't prevent the infiltrator from getting detected. It is because the group key exchange would still be visible. To add a member into a group, the group administrator sends a group management message to each group member which instructs them to send their own group key to the person group admin wants to add. Now if you observe the key exchange is already started to happen. This group management message also notifies the members visually so that they know that said person is now part of the group. This is where you see that message on GUI. Once that person is added, he generates his own group key and sends to every member of the group as a personal one-to-one pairwise encrypted message. Yet another time, key exchange can be seen.
The group key is not same for all. Each member has its own group key and everybody keeps list of group keys of each other. That's why it is very important to flush old group keys when someone leaves because former member has learnt group keys of every member.
In Signal app, server doesn't involve with group administration. Everything happens exactly that way except the fact that there is no admin in Signal and every member can send group management message to the group members.
But In WhatsApp, a group admin doesn't send group management message directly to the group members. It should have but they went out of specifications. Instead the group admin sends this message to the server, the server verifies if he is actually an admin and then it instructs group members for key exchange. Actually, now WhatsApp sends group management message to only subset of members but it is enough, other members can send their group keys later. Even if the infiltrator is silently added by WhatsApp server, each member has to be instructed to prepare for the key exchange else the infiltrator won't be able to decipher the messages.
A team of crytopgraphers from Germany’s Ruhr University Bochum say they have uncovered flaws in WhatsApp’s security that could Let an Infiltrator Add Members to Group Chats

The described weaknesses enable attacker, who controls the WhatsApp server or can break the transport layer security, to take full control over a group. Entering the group however leaves traces since this operation is listed in the graphical user interface. The WhatsApp server can therefore use the fact that it can stealthily reorder and drop messages in the group.
In a response to the story, Moxie Marlinspike, co-founder of Open Whisper Systems, which developed the end-to-end encryption used in Signal and WhatsApp, refutes the researchers’ claim that an attacker could conceal alerts from other chat members that someone was added to a group. “The attacker will not see any past messages to the group; those were e2e encrypted with keys the attacker doesn’t have,” Marlinspike writes, adding, “All group members will see that the attacker has joined. There is no way to suppress this message.”

The attacker has joined message cannot be dropped because it is just not a message on GUI, it's an instruction for key exchange.
But let's suppose that the message was dropped and the infiltrator has joined the group without triggering any alert. Now if the group starts talking in his presence, all the infiltrator can see encrypted messages that are encrypted by the group key he never had which is same as sitting on the server and watching the passing messages. Without participating in the key exchange, group keys cannot be shared.
It doesn't matter how apps handles group management. If they are using E2E, a key exchange is always visible before communication can take place.
Theoretically it is still possible to verify if someone has been added without being notified by verifying whether a new group key is added. The group keys are only added or removed when someone leaves or enters the group.
if there is a backdoor added by the developer, then the app is compromised anyway so it is just not limited to silently adding an infiltrator. An adversary can then steal unencrypted received messages, private keys and group kety. The above detection method only lasts as long as the app itself is not compromised.
There are some concerns about group management in E2E protocol. You can read in this article, WhatsApp, Signal group chats not as secure as users might believe. Parent article has some more information about this problem
Technical talk from the Real World Crypto conference has also highlighted the problem with handling of group management in WhatsApp and Signal: On the end to end security of group chats | Paul Rösler (U. Bochum) | RWC 2018
You can also read their paper
WhatsAppp whitepaper has in-depth technical explanation of how key exchange for group chats is performed, pdf warning](https://www.whatsapp.com/security/WhatsApp-Security-Whitepaper.pdf).
I'm not sure about how other e2e protocols handles group management. Signal is the most popular one and widely tested.


Should Virtual Machines be patched for Meltdown and Spectre? In Meltdown and Virtual Machines it was clarified that at least Spectre works crossing VMs. This of course means that the Hypervisor must be patched, but

Should the VM OS be patched as well?

Not being real CPUs it is not clear if they are directly vulnerable to attacks based on prefetch, or if patching the Hypervisor is enough.

My understanding, first off, is that the OS / hypervisor patch only mitigates Meltdown, not Spectre.

Second, you patch the hypervisor to prevent a VM from reading memory belonging to the kernel of the hypervisor. You patch the guest OS to prevent a process from reading memory belonging to the kernel of the guest OS. My understanding is that they are independent of each other; patching one has no effect on the other.

Emulation vs Virtualization

I'm not a great expert on virtualization technologies, but your question dips into emulation vs virtualization: in emulation the CPU, including all registers, caches, etc. is fully simulated in software and it may use a different instruction set from the underlying hardware. In virtualization, the instructions are passed directly to the hardware, but with extra process scheduling imposed by the hypervisor. In particular, my understanding of x86 virtualization, specifically Intel's VT-x technology, is that it is a "real CPU" in the sense that the guest OS is using real x86 instructions that are more-or-less passed straight through to the underlying hardware.

So yes, the guest OS will be vulnerable to Meltdown and require patching independently of whether the hypervisor has been patched.


What happens if I use a proxy through software such as Proxifier and also use a software which supports working through proxy servers? Let me give you an example:

I use proxifier to use a proxy that uses IP from Germany. So when I check https://www.whatismyip.com/ it shows as if I'm from Germany.

So imagine if I have a software on my PC which supports working through proxy servers and I enter a French proxy different from the one from Germany. Will the admins of that software see that my IP is from France or Germany?

Let's use Firefox as the software you use.

First, you proxify Firefox, and set the proxy to No proxy. Every request will be routed to Germany (e.g germany-proxy.de) and your IP will show as coming from Germany. Nothing unexpected here, right?

Next, you configure Firefox and use a proxy on France (e.g france-proxy.fr). Firefox will try to connect to france-proxy.fr, and the request is intercepted by the proxifier. The connection gets redirected to germany-proxy.de, which will establish the connection to france-proxy.fr. On this moment, france-proxy.fr thinks you are from Germany, and germany-proxy.de knows where you are. The destination have not received anything from you yet.

If Firefox connects to, let's say, Google, is france-proxy.fr the one connecting, so Google will think you are connecting from France. France will think you are connecting from Germany, and Germany knows where you live.

That's a oversimplified version of Tor. On Tor, you connect to a proxy, that connects to another one, that connects to another one . . . that connects to the destination, and every hop is encrypted.


Session Management: Set new value of session ID after privilege change and other sensitive operations This OWASP Article on session management recommends to set a new value of session ID when:

  Common scenarios must also be considered, such as password changes,
  permission changes or switching from a regular user role to an
  administrator role within the web application. For all these web
  application critical pages, previous session IDs have to be ignored, a
  new session ID must be assigned to every new request received for the
  critical resource, and the old or previous session ID must be
  destroyed.

Please elaborate on the need of this.

It is important to quote the previous sentences too:

  The session ID must be renewed or regenerated by the web application after any privilege level change within the associated user session. The most common scenario where the session ID regeneration is mandatory is during the authentication process, as the privilege level of the user changes from the unauthenticated (or anonymous) state to the authenticated state. Other common scenarios ...

In other words, OWASP is summarizing the case where a user changes what he is authorized to do or what he is authorized with.  I'll give an example of each case:

User changes what he is authorized to do:  A user logging in to a different account (e.g. google "log-in as a different user") must have his current session invalidated before he can login in to the other account.  This important because you are keeping a session open for a limited time (to make it harder to hijack a session).

Now, if one of the accounts the user has credentials to is compromised and the other isn't, the attacker could use the overlapping sessions to execute something as the account that he did not manage to compromise.  Therefore it is important that the previous session is killed (no matter if the previous or new session it the one that is for a compromised account).

As an extra, if an attacker can force a user logged in two accounts switch between them repeatedly, you may fail to count the session time and be vulnerable to fixation.  It is easier (and less error prone) to simply invalidate the session on spot, than trying clever algorithms to keep both sessions alive.  This is less probable, but still a way of increasing attack surface for an attacker.
User changes how he is authorized (actually authenticated, but then authorized):  A user changing the password must have his old session destroyed on the spot because that is what the user expects to happen.  If your session lives for 10 minutes, and a user changes his password he expects than an attacker who he believes has his password cannot access his account anymore.  He does not believe that the attacker can use his account for 10 minutes more.

Note that this is not the same requirement as asking an user to input the old password and the new password on a password change screen.  You should definitely do that, since it prevents an attacker in possession of a session ID from changing the user's password.  But what that quote from OWASP argues is about the destruction of the previous session the moment that the POST request with the password change is received.  So that an attacker in possession of a session ID cannot use the account of that user at the moment when the password is reset.


Cloudflare Full Strict HTTPS flow I would like to understand Cloudflare full(strict) SSL flow.
Because if user type https://example.com it redirects to Cloudflare web servers. So how Cloudflare decrypt HTTPS data before sending to origin host without browser warning ?
How Cloudflare match certificate data between Browser and Cloudflare servers. Because main certificates situated on origin web server and only Original web server can decrypt after get HTTPS data.

The operator of the domain either uses Cloudflare as registrar or user another registrar and points the domain to Cloudflare's authoritative DNS servers.

This gives Cloudflare control over the domain, and they are able to issue valid TLS certificates for the domain, as they host it.

Cloudflare also host the authoritative DNS servers that reply with Cloudflare IP addresses to recursive DNS resolvers looking up the domain (maybe you use Cloudflare also for DNS resolving, but that is another thing entirely).

Cloudflare will even host DNS for you if you don't use Cloudflare as a reverse proxy / man-in-the-middle, but then of course they can't provide all the additonal services and they explain that.

Cloudflare uses anycast, and connections to Cloudflare IP addresses go to one of the ~200 Points of Presence (server farms) around the world, ideally the one closest in network topology terms (latency) to the client.

When a site uses Cloudflare, clients (browsers) only connect to Cloudflare's servers, never directly to the origin server. Requests go from the browser to Cloudflare's server and from Cloudflare's server to the origin server. Responses go back from the origin server to Cloudflare's server and from Cloudflare's server to the browser. The services Cloudflare provides are in filtering the requests and transforming and caching (storing for later) the responses, to make Cloudflare's server handle as much of the work as possible, to leave as little work as possible for the origin server. Depending on the site or application, a small origin server behind Cloudflare can handle a lot of user traffic and stand up to a big DDoS effort from attackers.

So, when a client (e.g. a web browser) connects to a site hosted by Cloudflare, the client connects to Cloudflare's servers. Cloudflare's servers perform DDoS protection, WAF, page rules, caching, CSS and JS minification, image optimization, data compression, run arbitrary javascript or WASM code provided by the site operator, and if needed, Cloudflare's server connect to the origin server, using TLS if possible, using mutual TLS authentication if desired, and performs an HTTP request that is processed and cached. The processed response is forwarded to the waiting client and potentially used to respond to other requests by other clients that reach the same Point of Presence (server farm).

Cloudflare is willing to connect to the origin server over cleartext HTTP, exposing user information to the internet, and then serve the response over HTTPS to the client, who sees a green lock icon. Some people don't like that. But Cloudflare also help site operators to set up TLS certificates (either trusted ones like Let's Encrypt or issued by Cloudflare's internal not-trusted CA) for the origin server. Cloudflare has a mode for their customers to maintain physical possession of their TLS keys, for example if required by regulation. And as I wrote, Cloudflare can use a client TLS certificate when performing "origin pull", if you setup your origin server appropriately.

Cloudflare is a CDN, yes, but it's more of a man-in-the-middle-as-a-service.


Random characters and letters form obsfuscation I know that this question has been asked many times, but would JavaScript encryption work if I just added 100 random numbers and letters to the password? That would be hard to reverse engineer, because it's totally random. I am making a WordPress and Joomla kind of service, and all the user's that download it do not have SSL.

No, you seem to have a misunderstanding of how encryption and obfuscation work. Encryption provides confidentiality: a message is hidden with a mechanism using a shared secret from all parties not possessing that secret.

Obfuscation refers to a number of techniques employed to make, in general, a scripting programming language application difficult to understand to a human reader. They take as input the application in its original (human readable) form, (a key) and output a functionally equivalent application, larger in code size and far more difficult to understand.

Now to answer your question, no it will not work as you mention there may be no authentication nor encryption, meaning that any passive attacker(using a packet sniffer and located in the same network as one of your potential visitors(i.e. victims) simply retrieves the password/javascript code in plaintext.


set uid for reboot binary & pm-suspend : security hole? I think all the question is in the title :
For the use of my laptop to be more convenient I made a chmod 4755 to /sbin/reboot and /usr/lib/pm-utils/pm-action so I don't have to make a 'sudo' before doing them.

Is that a really bad practice or it's ok for a personnal data with no sensitive data on it ?

Security, in my opinion, is only relevant and lack of it is a threat, when you have something to lose. If this is, say, your test machine and you put effort into doing nothing with that machine, loss of which can cause material or emotional distress, then I see no point in hardening the system. Security and convenience are complimentary trade-offs. More of one usually means equally less of the other. If you have nothing to lose on this machine, I am all for the convenience. Hence, laxing the security measures.

Having said that, in my 20+ years of UNIX sysadmin life, I have seen more than once, that the convenience measures being transported from insignificant machines, to those which are critically important to the enterprise operations and for what ? Just in the name of making something easier for the user, without any regard to the security implications.

So, my advice would be, go for it but don't be a slave to convenience. These things have a tendency of coming back to bite one in the ass :-)


Why are the CVSS scores differ so much between Redhat and NVD page? take CVE-2016-7872 for example.

in National Vulnerability Database webpage, we can see that the cvss2 and cvss3 score are 9.8 and 10.0 respectively.

but in the redhat security advisory page, they are 6.8 and 8.8.

To my understanding, cvss score are being computed via a fixed set of rules (https:/\www.first.org/cvss/specification-document), why are they differ so much?

Working out the inputs to the calculations is very subjective:

Take the CVSSv2:

RH:  AV:N/AC:M/Au:N/C:P/I:P/A:P

NVD: AV:N/AC:L/Au:N/C:C/I:C/A:C

Both agree the Attack Vector is Network, and the Authentication is None. But disagree with everything else.

NVD think the attack difficulty is easy and the impact is complete.
RH think the attack difficulty is medium and the impact is partial.

Since the attack doesn't get root, I'm not sure impact can really be complete. But you can see why the values are different.

PS: Although not relevant to this case some of the temporal score for CVSSv2 are particularly weird:
Take https://nvd.nist.gov/vuln-metrics/cvss/v2-calculator?name=CVE-2016-7872&vector=(AV:N/AC:L/Au:N/C:C/I:C/A:C) and apply a "Official fix available" and the result drops from 10 to 8.7. It you had a rule that you had to fix everything above a 9 immediately, you'd have to fix it if there wasn't a patch, but not if there was a patch available.


Does FTP provide any type of integrity? To verify, that the files I have downloaded using it are not corrupted.

No, FTP does not include integrity protection as a feature of the protocol. You can use SFTP which runs over SSH and does have built-in integrity checks (scp is another option that uses SSH).

You can roll your own integrity protection by manually comparing a checksum calculated locally with one calculated either on the remote host itself or by the origin client who uploaded it. MD5 is a typical choice, and you can calculate the MD5 checksum by running openssl md5 <file> on most Unix-like systems.

If you can't use SSH, hopefully that means you have no remote shell access at all. If that is true, then you would need to compute the checksum prior to uploading the file, then store it somewhere (e.g. md5.txt) for future reference. That assumes that you are the one uploading the files which may not be the case.


Forgot Password? - sends email with plaintext password A "reputable" education company that my university utilizes for it's Physics
course online materials sent my plaintext password in an email after using the Forgot Password? tool.

I know that this is bad practice and is a little disconcerting coming from  a prominent "reputable" corporation.

What I want to know is if it would be prudent or worthwhile to contact the company and ask/inform them about this issue to see if they're willing to address it?

Should I take any additional precautions on their website other than using a completely unique password?

I definitely think it is worth telling the company how you feel regarding how they handle your privacy. I am sure management often times doesn't know the technical details or implications of password storage policy.

I have run into this twice with mixed results:

T-Mobile: They text you a plaintext password to your account portal when you submit your telephone # to the lost password link. They were not interested in hearing about the problem.
Jimmy Johns: The forgot password form was sending plain text passwords via email. I questioned the practice, and they apologized and immediately implemented a password reset code instead. I don't know whether they started hashing passwords.

It is horrible practice, and I encourage anyone to put pressure on companies doing this.


Fido: trusting user-agent As I went through Fido specifications:

  the server (providing web app/services) need to trust user agent for local fido authentication and if needed can enforce certain policies"

I am not sure what that translates into.

How is the trust established? Aren't there any side effects that now authentication is performed locally at user rather at server side traditionally?

FIDO servers connect with authenticator meta data service which has a "score" for each authenticator. Policy can be the type of the authenticator and the features the authenticator allow to perform. To make thing simple server can decide that up to 100$ transaction will be permitted with 4 digit PIN authenticator and for bigger transaction fingerprint sensor is required.
Server still verify the client but instead of verifying it password it verify cryptographic signature which the client generate after device verifies user identity.


Brute force alphanumeric password using JohnTheRipper I recently recovered a zip archive with some files I need access to, but I can't remember the password. All I can remember is that the password was short (around 3-4 characters), and contained only lowercase characters and possibly numbers). However there is no Incremental mode for this particular situation in John the Ripper. The closest there is is lanman, which also increases the set of possible passwords dramatically by including uppercase chars, which I'm positive the password includes none of.

Although I can edit the john.conf file so that a specific mode goes only to 4 characters, for instance, I don't know how to customize the set of characters to try. How could I do this?

lowercase + numbers

Incremental actually has a predefined mode for lowercase + numbers:

[Incremental:LowerNum]
File = $JOHN/lowernum.chr
MinLen = 1
MaxLen = 13
CharCount = 36

From the documentation:

  "LowerNum" (lowercase letters plus digits, for 36 total)

Just adjust MinLen and MaxLen.

Create new incremental mode with certain characters

If you want to create your own chr file with a customized set of characters, you would do it like this:

john --pot=YOUR.pot --make-charset=YOUR_NEW_FILE.chr --external=filter_lowernum

filter_lowernum is the filter which determines what characters will be in your chr file. It is defined in your john.conf (under [List.External:Filter_LowerNum]), and you can create your own filters there as well. The code for LowerNum looks like this:

[List.External:Filter_LowerNum]
void filter()
{
    int i, c;

    i = 0;
    while (c = word[i++])
    if (((c < 'a' || c > 'z') && (c < '0' || c > '9')) || i > 13) {
        word = 0; return;
    }
}

Then just add the incremental filter to your config.


Does OpenID Connect Hybrid Flow return ID Token on /token endpoint? In OpenID Connect, there is a flow called "hybrid flow". The hybrid flow returns, depending on the response_type (e.g. id_token code, id_token code token), the ID token immediately. My question wether the /token endpoint should return an ID token even if an ID token was already issued by the /authorize endpoint (e.g. when response_type is id_token code).

I would also like to know if an ID token is returned by the /token endpoint when response type is code token and the scope contains openid.

The specs don't really give much information on this matter (or I'm looking at the wrong sections): http://openid.net/specs/openid-connect-core-1_0.html#HybridTokenEndpoint

Chapter 3.3.3.6 of openid-connect-core-1_0 specification you are linking:

When using the Hybrid Flow, the contents of an ID Token returned from the Token Endpoint are the same as for an ID Token returned from the Authorization Endpoint, as defined in Section 3.3.2.11, with the exception of the differences specified in this section.
If an ID Token is returned from both the Authorization Endpoint and from the Token Endpoint, which is the case for the response_type values code id_token and code id_token token, the iss and sub Claim Values MUST be identical in both ID Tokens. All Claims about the Authentication event present in either SHOULD be present in both. If either ID Token contains Claims about the End-User, any that are present in both SHOULD have the same values in both. Note that the OP MAY choose to return fewer Claims about the End-User from the Authorization Endpoint, for instance, for privacy reasons. The at_hash and c_hash Claims MAY be omitted from the ID Token returned from the Token Endpoint even when these Claims are present in the ID Token returned from the Authorization Endpoint, because the ID Token and Access Token values returned from the Token Endpoint are already cryptographically bound together by the TLS encryption performed by the Token Endpoint.

My interpretation would be that, yes, /token endpoint does return ID Token if "id_token" response type has been originally requested.


Is Google Analytics tracking actually safe to use on pages with sensitive information? When enabling Google Analytics, they ask you to embed a JS snippet on every page you want to track. That's fair enough.

But when you add this code are you giving Google the ability to scrape the content on every single page that the code is loaded on? Presumably by giving Google access to run a JS file that they control, that JS file could edited to steal everything in the DOM?

I'm not suggesting that Google actually do this, but is it theoretically a risk?

Every third-party script has the ability to load every page on the same domain so the risk exists.

If you really need to track analytics on sensitive pages, consider doing it server side, and be sure to check that an analytics snippet loaded on another page couldn't load the sensitive page and read its contents (via AJAX, for example).


Is it possible to slow down the Blue Midnight Wish cryptographic hash function? In the Blue Midnight Wish (BMW) cryptographic hash function, is there a variable I can use to increase memory/CPU resource consumption to slow down the password hashing process? Call me crazy, but I really like BMW and I'd like to use it to hash passwords. It's obscure, so a bit better, but I am also paranoid, so I need to increase hashing time.

You don't increase hash time (I surmise it is for hashing passwords) by tuning the hash function from within -- especially one which has been optimized to be very fast. You get slow hash time by integrating the hash function in a larger structure which runs many iterations. In any case you would not want a slowdown by a factor of 2 or 3, rather 200000.

See this answer for a primer on hashing passwords. See this site for an ongoing open competition to design better password hashing functions.


How to authorize access to a resource when requested with CORS and validate the origin? I'll try to make the explanation simple and to the point (keyword try). And if that's not sufficient, then maybe I can expand on the question.

Imagine two sites: resources.example.com and www.example.com. I only have direct control over resources.example.com. www.example.com ultimately wants access to resource.example.com/dashboard. The idea here is the resource should be protected; secured.

I also cannot validate www.example.com user credentials for authentication (i.e. username, password). I don't have access to their user store. Ultimately, above all else, my priority is ensuring that www.example.com is the identity of the resource requester.

My first thought was having www.example.com issue a CORS request to resources.example.com for authorization and send back a token. Token expiry is small (<5 seconds). I check that the request is POST, validate the origin header and the referrer, if it exists. If no origin header is passed, authorization fails. User then passes back token with standard POST request to resources.example.com/dashboard.

The problem is this is a very bad authorization scheme. Origin header is resistant to spoofing but it absolutely can be spoofed. Referrer is even easier to bypass.

www.example.com wants to keep effort minimal, which probably means it's up to me to code their piece because I don't know if there's a simple solution here. They are open to CORS request.

My question is how can I secure the resource on my site in a CORS request and ensure the identity of the client is www.example.com, knowing the origin header can be spoofed?

Is there some way I can possibly leverage, i.e. aJSON Web Token (JWT) using asymmetric cryptography in order to prove the identity of the requester is www.example.com, even if the origin header is compromised? If so, who would generate the JWT, me or www.example.com?

You are focused for user will access your server directly. Same data can be represented by www (proxy) and authorization validation can be done. Following list will describe a solution for you, could you please review.

www.example.com will map resource.example.com as www.example.com/resource/. For example "profile.jpeg" will be at place "resource.example.com/profile.jpeg" but will be able to access with "www.example.com/resource/profile.jpeg"
Write proxy configuration to your HTTPd (if there is a load balancer it will be better of course). You will need configuration described below. When resource directory tried to access, this request will be proxied to resource.example.com.
If authorization will be given by www.example.com so it have to validate it. There is couple of authorization validation technique, I suggest something like subrequest feature of Nginx. If users are not be authorized for access this data, forget this step.
Deploy ip filter & be sure only www is able to communicate (tcp/ip) with resource.

You can see flow representation.

User requests www.example.com/x/y/z    =>  Nginx (Proxy)  => www.example.com
----------------------------------------------------------------------------------
User requests www.example.com/resource =>  Nginx (Proxy)  => resource.example.com
                                                ||
                                         Auth SubRequest
                                                ||
                                                \/
                                     www.example.com/auth-check

This should solve your problem.


How to Check if my mail is classified as Spam I think several of mails are classified as spam.But Gmail and other Public Email providers has no issues.
It might be a false positive cases with the associated tools

Is there a tool or a way by which i can verify this.

The only surefire way to see if an email is classified as spam is to... send it, and see how it shows up on the other side. Any email server can classify any incoming email as "spam" or "not spam" or "slightly spammish" or whatever based on any arbitrary criteria, which may include email source, contents, or the phase of the Moon or the degree of incompetence of the intern who last played with the server configuration. In any case, such rules are local, often change without notice, and are almost never advertised in any way. Antispam rules are a heuristic hide-and-seek game with spammers, and secrecy is crucial (this is security through obscurity, because there is nothing better available).

When I send an email to a recipient on Hotmail, the Hotmail server classifies my email as "spam"... because my name contains a "forbidden word". No sysadmin at Hotmail admitted as such, but I made extensive tests (implying sending many emails from my own server, with various characteristics, and using an Hotmail account to see them) and I am fairly sure that I pinpointed the reason (if I send two completely identical emails, except for the sender name, being "Thomas Pornin" in the first and "Thomas Portin" in the second, then only the former is marked as "spam").


Who is the Gate Keeper? If using Basic security under an SSL connection (https), is is not true that the server matches the user/password combination, but what happens after that? What prevents the browser from accessing the server? Does the browser enter an "authenticated" state, allowing it to access the server? Or, does the server somehow offer a different channel to the browser, once authenticated?

I ask this because if any of the responsibility of authentication is entrusted to the browser, then what if we have a renegade/profligate browser that doesn't follow the rules. Conceivably, a modified browser could get you into anything by bypassing the final authentication. I wonder what it is on the server side that determines if a user is "authenticated", and what changes that allows http transactions to take place.

Note that this assumes that user/password has been securely transmitted using ssl, but questions the trustability of the browser if it is the authentication agent.

In other words, who is the gatekeeper (i.e., the one that can deny access) - the server or the browser? If it is the server, are credentials or some sort of authentication key passed on each independent transaction? Or, if it is the browser, is the server vulnerable to a "profligate" browser - e.g., one that has been modified - that can allow access without authentication?

Can anyone shed some light on this?

With Basic Authentication the username and password is send with each HTTP request to the server. But, the browser will not ask you again and again for each request because it simply uses the same credentials you've already entered as long the authentication succeeds.

This is similar if you give somebody the key to your house. You give the key once and the person (browser) will use it always to open the door (i.e. authorize against the server). Only if you change the lock (i.e. change password or similar) the original key will not work any longer and the person needs a new one. The person does not enter an authorized state in any way, it is just that the person has the key matching the lock.

EDIT: since the comment showed that it was not fully clear. The server never trusts the browser unless it can provide the authentication credentials. Thus it will not help to modify the browser. This is the same with the lock in the door: it will never open just for a person no matter how this person looks like. Instead the lock will only open for the person having and using the correct key.


How to identify a machine by its IP address in wireshark? I'm new to the world of security and I'm trying to figure out how to analyze the network traffic on my home wifi network. I've been watching a lot of tutorials and reading about how to use wireshark. I've identified that there is some traffic going to IP address 192.168.1.19(me) as well as my phone .20 but there is unexpected traffic coming from a device with IP address 192.168.1.15, and .4. Is there a way I can see the type of device or the device name just from knowing the IP so I can know what device to look for?

There are two approaches to solve you question:

Passive: meaning that you don't want to interact with the device you want to discover. You can monitor the network using Wireshark and find information such as the MAC address, from MAC, you can know the device manufacture. Or by analyzing other requests.
Active: in this case you can interact with the device and discover more about it but you may raise an attention by its owner. There are many tools you can use, I prefer nmap which available on Windows and Linux.


How does a malicious user connect to a private network? I have followed these instructions for setting up a couple of servers to have private networking.  It ends by saying "It is important to secure your private networking interface the same way you would secure a public interface.".  Is this securing the private network if a node within it becomes compromised?  I was under the impression a third party could not access a private network from outside the network.

I believe they mean that at the endpoints of the communication, you need to practice good security.  The private network only protects data in transit, not at the end-points.

All the computers that connect to the private network need to be secured using standard operating systems security tools.


Is it possible to share BitLocker decryption keys between multiple TPMs? The TPM specification mentions that some keys are migratable, i.e. transferable to another TPM. Does this mean that it would be possible to share (transfer) a BitLocker decryption key between several TPMs, and thus being able to decrypt the same encrypted hard drive on multiple machines? Or does the BitLocker keys fall under the non-migratable category which is locked to one TPM?

I think I have found the "answer" to this. It should be possible, but Microsoft has not currently implemented it. As far as I know it is technically possible to have the decryption keys protected by several different TPMs stored on the same encrypted hard drive since they are (I think) a binary blob encrypted by the TPM, so each different TPM could have its own different blob that can be decrypted by that TPM.


using commonName for DNS vs subjAltName According to https://stackoverflow.com/a/26195101/569976#comment41093099_26195101 "[Using the DNS name as the common name is] deprecated by both the IETF and CA/B Forums, and it should not be done. Instead, the DNS names should be placed in the Subject Alternate Names (SANs)"

My question is...  where is it deprecated? Can I get a link to the RFC where that behaviour is deprecated and the line that deprecates that behaviour?

From what I've seen what's most common is...  if you're doing one domain that domain is set to the commonName and no subjAltNames is present. When multiple domains are done, however, subjAltName is used.

RFC6125, 6.4.4 (from 2011):

.... the client MAY as a last resort check
for a string whose form matches that of a fully qualified DNS domain
name in a Common Name field of the subject field (i.e., a CN-ID)

RC2818, 3.1 (from 2000):

...Although
the use of the Common Name is existing practice, it is deprecated and
Certification Authorities are encouraged to use the dNSName instead.

Apart from that, not everything is regulated through RFCs. If CAs and browsers agree to a behavior they don't need to write an RFC an each case.