WD My Cloud Vulnerabilities - What is at risk? Recently there were around 70 vulnerabilities found within Western Digital's "My Cloud" devices. I am curious to know more about the scope of these vulnerabilities. All of the vulnerabilities have been listed by Eploitee.rs here.

There they talk about how to bypass the login and gain administrative rights for the drive. My question is, can this extend beyond the drive itself? If the drive was hooked up to computers on the network, would that allow the intruder to then access files on a computer that is hooked up to the drive, or is this limited to files that are on the drive?

I guess the way I could see someone using it to gain access to other computers in the network would be to upload some file with a trojan on it so that when someone would then access the drive on the network that trojan will now be visible on that computer.

What is the scope of these vulnerabilities? What are the network implications if the drive is compromised?

MyCloud is a service that runs on the NAS. The exploits documented on the site you link to allow three different things:

1) Bypass login and pose as a MyCloud administrator

2) Place files anywhere on the NAS

3) Execute commands on the NAS

These exploits are limited to the NAS device itself, but as you point out, once an attacker has gained access to the NAS, he can use that as a stepping stone into your home network / your connected devices.

For example, the ability to place any file he wants on the NAS allows him to place viruses, trojans and other malware on your NAS. Once you open the affected files on your other devices, they might become infected.

Having access to the NAS itself allows an attacker to spy on your unencrypted network traffic unless your network is very well protected against various spoofing techniques. For example, if you're using a local mail program to send and receive mail and you communicate with your mail server unencrypted, an attacker can potentially read (and change) all your incoming and outgoing e-mail.

The compromised NAS does NOT give an attacker immediate direct access to data sitting on devices that simply connect to the NAS via a file-exchange protocol such as SMB, NFS, FTP in order to use network storage. However, the NAS will (most likely) have an unfiltered view of the network services running on the devices in your home network. If, for example, you're using windows and you've enabled file sharing on all computers in your home network, this service will also be visible to an attacker sitting on the NAS.

Access to the NAS also gives an attacker access to the password database of the NAS. Depending on how well passwords are protected by the NAS software, this might allow an attacker to recover your passwords, and since it's not a stretch to assume that you reuse this password elsewhere, he could gain access to other services you use.

For these reasons, I would never ever run a cloud solution of one of the consumer grade NAS providers on my home network. If you really want to do that, you should at the very least put a firewall between the NAS and the rest of your home network. While this won't help against the NAS passively infecting your other devices with trojans, it will at least make actively attacking your other devices from the NAS, and spying on your network traffic from the NAS, much harder.

The firewall can also be used to deny any connections from the NAS into the internet (except the ones needed to do file sharing), which will help against your NAS being coopted as part of a botnet.


Trustworthiness of kernel.org post attack What are the security implications of the compromise of kernel.org  on the trustworthiness of the code base hosted on the site’s Git repository?   The announcement today explained the mitigations provided by 160 bit hashes, site mirroring, and the distributed nature of the development effort.   Are those reassurances solid considering the hashes for the main Git repository are collocated with the code they hash and typical usage/mirroring  in light of the fact that the site was compromised  for 17 days prior to detection?  Finally, what improvements, if any, could be suggested based on this event?

Well, in regards to the use of Git, it turns out that the software and distributed nature does a lot to protect code and detect malicious modification. For starters, no old commits can be altered unless they match the corresponding SHA-1 hash. Even if one commit did match a certain SHA-1, it would affect the child SHA-1 hashes, so that's out. Nothing older than the date of the breach could reasonably be altered or it would break the repository and syncing.

Commits could be added in that 17 day period. Because timestamps are part of the SHA-1 hash for a commit, we can narrow down the list of "suspect" commits by looking at anything older than the last commits before the breach or anything where the child date of the commit is younger than the parent date. If you've ever tried to alter a commit in git after it reaches a shared repository, you understand how severely obvious it is that something historical was altered.

Because full copies of the kernel hash that contain full history are so widely distributed and are always incrementally updated by following a chain of commits that can't be rolled backwards without the user being aware, the kernel source code is actually remarkably safe even when the hosting website is compromised.

Finally, because only a limited number of individuals are able to legitimately commit to the  kernel, we can expect that they would be able to note any updates to their sections that they don't expect. The human controls of sign-offs (kind of a technical control, but kind of not) plays a big part in knowing where the content came from.

All in all, compromising the kernel source in an undetected manner while it is in Git would be one of the more impressive hacks of the decade. One would have an easier time slipping in code via proper channels that looks innocuous but is malicious.


Does keystore has benefits over just encrypted properties? What is the benefit of using the "proper" JKS keystore over something like AES encryption over just plain property file? Why do keystores exist, which benefits do they provide over encrypted properties?

For more details, we use JKS keystore created with the help of BouncyCastle library. We generate the public/private key pair and keep the private key in the keystore. We also store public key and some other security critical metadata, setting them as properties of this private key.

What is the benefit of using the "proper" JKS keystore over something like AES encryption over just plain property file?

One point is that you would need to manage that encrypted file yourself.

And you cannot make use of other keys and certificate authorities that the user might already have defined.

  Why do keystores exist, which benefits do they provide over encrypted properties?

Keystores abstract different ways of managing keys and certificates. Certificates are not always stored in local files. Sometimes they are accessed over the network and in many cases the certificate store depends on some hardware device (like id card readers).

These hardware keystores often do not allow the extraction of private keys from them, in order to keep them more secure. Instead, they provide a programmatic way of signing and/or ciphering data.

Several devices exist. So the keystore manager in the computer needs to use different protocols and drivers to access these hardware keystores.

For example:

PKCS-11 defines an API to access cryptographic devices.
PKCS-12 provides a standard to store keys and certificates in a file.

The JKS abstracts and allows you to access this whole ecosystem of keystores.


How do hackers trick frontend validation? I've always read: Put validations in the backend. Frontend validations are for UX, not security. This is because bad actors can trick frontend validation. But I'm having a hard time wrapping my head around how a bad actor could trick it.
I never thought about it much, I just thought this meant someone could bypass the validations by making a request on something like Postman. But then I learned that with a same origin policy that's not possible.* So how are these bad actors making same origin requests?
The only other idea I can think of is bad actors can go into the code (ex: on DevTools) and edit the request there and make an edited request from the same site. Is that what they do?
What does tricking frontend validations look like in practice? How are they making a request that gets around CORs?
*Update: I was wrong here about what SOP is. It doesn't stop requests from other origins, ex Postman. Many answers below clarify what SOP is for.

I think you are very confused about what both CORS and SOP do... neither is relevant to these attacks at all.
There are lots of ways to bypass client-side validation. HTTP is just a stream of bytes, and in HTTP 1.x they're even human-readable text (at least for the headers). This makes it trivial to forge or manipulate requests. Here's a subset of ways to do it, grouped by rough categories:
Bypass validation in the browser

Browse to your site and input the invalid values. Use the browser dev tools to remove the validation events or manipulate their execution to pass validation anyhow. Submit the form.
Use the browser dev console to send requests from the site as though through the validated form, but with unvalidated inputs (just directly invoke the function that makes the request).
Use the browser dev tools to "edit and re-send" a request, and before re-sending, change the valid values in the body to invalid ones.
For GET requests: just type any URL with invalid parameters into the location bar.
For POST requests that use non-samesite cookies for authentication: create a web page that POSTs to your server with the expected values (including any CSRF-protection token) but with invalid values, load it in browser, and submit.

Bypass validation using non-browser tools

Set the browser to run through an intercepting proxy (like most in the security industry, I usually use Burp Suite, but you can use others like Fiddler too). Capture the outbound request, tamper with the fields to make them invalid, and send it on its way.
Use an intercepting proxy again, but this time replay a previous request with modified, invalid values (in Burp, this is exactly what the Repeater tool is for).
Right-click a request in the browser's dev tools' network history, select "Copy as cURL", paste the resulting curl command into a command line, edit the validated fields to make them invalid, hit Enter to send.

Crafting malicious requests from scratch

Using Burp Repeater, specify the protocol, domain, and port for your site. Add the necessary headers, including any cookies or other headers needed for authorization. Add the desired parameters, with invalid values. Click "Send".
Using curl, send a request to your site with the required headers and whatever body, including invalid values, you want.
Using ncat, open a connection to your site, using TLS, on port 443. Type out the HTTP top line, headers, and body (after all, it's just text, although it'll get encrypted before sending). Send the end-of-file input if needed (usually the server will just respond immediately though).
Write a little script/program in any language with a TCP or HTTP client library (from JS running on Node to a full-blown compiled golang binary) that creates a request with all the required headers and invalid fields, and sends it to your server. Run the script/program.

SOP only applies when the request is sent using a browser AND the request originates from a web page hosted at a different origin (combination of domain, protocol, and port) than the request's destination. Even then, SOP primarily protects against the originating page seeing the response; it doesn't prevent attacks from occurring. If you're the attacker trying to get past client-side validation, then you can just send the request from the origin you're attacking, and SOP is entirely irrelevant. Or just send the request from something that isn't a browser (like a proxy, or curl, or a custom script); none of those even have SOP in the first place.
CORS is a way to poke holes in SOP (CORS doesn't add any security; it's a way to partially relax the security feature of SOP), so it doesn't even matter unless SOP is relevant. However, in many cases you can make a cross-origin request with invalid parameters (as in the case where I create my own attack page and point the browser at it, then use it to submit an invalid request to your site) because for most requests, SOP only restricts whether you can see the response - you can send the request cross-origin even if the server doesn't allow CORS at all - and often, seeing the response isn't needed.
Pulling the authorization tokens (cookies, header values, whatever) out of the browser after authentication is easy (just examine the network traffic in the dev tools, or use a proxy). Remember, for validation to even be in question, the attacker has to be able to use your site via a browser, which presumably means they can authenticate. Or just submit an authentication request using curl or whatever, scrape the returned token out of the response, and use it in the malicious invalid requests; no browser needed at all!
There's nothing the browser can do (in terms of sending requests to the server), that I can't do from a shell prompt with some common, open-source utilities.
EDIT: As @chrylis-cautiouslyoptimistic points out, this includes spoofing the Origin header in the request. Although the Origin header is not normally configurable within the browser - it is set automatically by the browser when certain types of requests are made - it's possible to edit it after sending the request (by intercepting or re-playing the request), or to simply forge it in the first place. Any protective measure based on the presence, absence, or value of this header will only be effective in the case that the attacker is indirectly submitting the request through an unwitting victim's browser (as in the case of CSRF), typically because the attacker can't authenticate to the site or wants to attack through another user's account. For any other case, the attacker can simply choose what value, if any, to give as the Origin.
EDIT 2: As @Tim mentioned, things like SOP and anti-CSRF measures are all intended to protect the user of a website from an attack by somebody else on the internet (either another user of the same site, or an outsider who wants to exploit your access to the site). They don't provide any protection at all when the authorized user is the attacker and the target is the site itself or all of its users, through something like a stored XSS, SQL injection, or malicious file upload (the types of things people sometimes try to prevent with client-side validation).


Could John Oliver be (inadvertently?) launching DOS attacks? Occasionally on his show, John Oliver points his viewers to the comments section of websites for companies/organizations that have done something putatively nefarious. For instance, when he pointed his viewers to the FCC's website to comment about net neutrality, the FCC was subject to a DOS attack.

Now, in that case, it seems the FCC was subject to an intentional, coordinated, and (at least partially) automated DOS attack. If, on the other hand, the roughly 1 million people who watch the show all followed John Oliver's lead and relatively quickly after his announcement commented on the site (just once, so that it is "legitimate" commenting, not spamming) would that be a sufficient amount of traffic to generate a DOS attack on a typical modern website (I apologize for the infuriatingly vague "typical modern website")?

Back in the day, this was called the Slashdot effect.  Accidentally DoSing a site through sudden popularity is nothing new.


is it possible to issue a sub-CA and trust it only? I'm currently a hobbyist trying to learn more about SSL. If I create my own CA for my virtual servers, and trust that CA on my devices, I can then issue certificates for my virtual servers, and my SSL will be sound as long as my CA isn't compromised right?

But now I'm running the risk of my CA getting compromised and a friend I'm learning with in my virtual lab, Eve, gets a hold of this and can now MITM all web traffic, not just the traffic to and from my servers which would happen if they only held the private certs for each virtual server.

Is there a way to trust a sub-CA that can only issue certificates for my virtual servers so that at worst, Eve can only intercept traffic to and from my personal services?

Yes, and in fact this is generally how risk gets minimized in large deployments.  What you're describing is a two-tier PKI hierarchy.  Typically, it starts with the ROOT CA at the top, which serves as the "trust anchor," or the one CA which everything in your domain is going to ultimately trust.  Typically, this machine NEVER touches a network in its lifetime. You'll have it generate a self-signed certificate (in the process, it will have generated its own private key with which to sign other certificates).

Then you build what will be a suboordinate (or "online") CA. This one can be network-attached.  Generate a key pair (Certificate Signing Request), and place the resulting CSR on some removable media.  Sneakernet that media onto the ROOT CA, and have it sign the CSR.  The resulting certificate is what gets installed back on the suboordinate CA.

Meanwhile, all your client machines should have the public certificates of each CA (the ROOT CA at minimum) in its "Certificate Trust Store."  This is the only way clients will know what to trust.

From this point, you could create as many suboordinate CAs in the same manner described above, and assign them to support whatever you wish... a department, a line of business, a type of device or user account object, a data classification, external partner trust relationships (you can create a sub-Ca specifically for the purpose of signing another organization's sub-CA to create a limited realm of trust between the two networks).


Install the same certificate on public facing servers and dev / qa servers I work with an application and the main site has a CA issued wildcard certificate for *.example.com.

We have several public facing subdomains eg app.example.com / cdn.example.com and several dev / qa environments eg. qa.example.com which are not available without being behind the corporate firewall.

Investigating a mixed content issue I was starting to talk to the network guys about trusted root certs and group policy for the dev boxes when I noticed that the main cert was a wildcard cert. Which leads me on to the question:

Are there any negative security implications by asking to have the public certificate imported onto the dev boxes?

You are not just importing the public certificate. You are also importing the private key that belongs to it.

I think the main implication is that you will be giving an untold number of dev and qa people access to the production server's private key. That means with a quick file copy, they can go home and do man-in-the-middle or phishing attacks against your user base.

Apart from insider threat, since I assume your dev and qa environments have less security hardening than your prod environment, you are also lowering the bar for hackers to steal the prod server's private key . For example, a compromised dev machine (say from an email attachment) probably has an easier time accessing the qa system than the prod system.

Better to have your prod system and dev / qa systems using different private keys.


Why is Webauthn not used as primary authentication method? In theory, authenticating with a public key should be much simpler than with a password. There is nothing to remember for the end-user, and registration can be done just by clicking a button. For all intents and purposes, this should be much more user-friendly than a traditional password-based authentication.
So, why is Webauthn not used everywhere? Why has it not replaced passwords already?

It is not as flexible.
I am at my friend's place and I get an alert on my phone that someone wired some money out of my bank account! I need to login to my bank's site to check whats up. But, my public key/cert is in my computer and I have not registered to the bank using my friend's machine. Or I forgot to carry my Yubikeys with me. Now what do I do to quickly login?
It does not have the necessary client support yet.
We use webauthn for some of our internal workflows in our organization. It works flawlessly for web browsers but it doesn't have the necessary support for other clients yet. For example, there are several applications that run as Desktop clients on Windows/Linux/Mac etc.
If you look at the support matrix on FIDO alliance's website, their support for some scenarios is still work in progress:

Source
Electron is a popular application framework based on Chromium browser. It doesn't have a clear answer for U2F support yet. Some users claim it works while some can't get it to work.
If your application is going to be supported outside of just a browser, then currently you don't have much choice.
One of the major device makers, Apple, joined FIDO alliance to move users away from passwords as late as Feb 2020. So, there wasn't enough urgency to even support many of the user scenarios.
It is not an easy job to replace passwords entirely
Getting rid of passwords means changing user behavior. That takes a while. Here, usability of your security mechanism plays a huge role.
Before Face ID, Biometric auth in phones and Windows Hello, there was no cheap way for general public to use anything other than passwords to login. And these are fairly recent technologies.
Mobile phones have done a great job so far of integrating separate authenticators like Swipe patterns, biometric etc to replace passwords. But till we get such easy and free technologies available to mass market for Desktop, it is going to be hard to replace the passwords.


What should I watch out for when using pam_ssh_agent_auth? I got tired remembering passphrases for my SSH logins and heard about pam_ssh_agent_auth. Unfortunately I hadn't found any security audit of it and I don't know enough low-level details about SSH to evaluate how safe those 6K lines of C code is.

Is pam_ssh_agent_auth reasonably safe to use on production machines? If so, what should I watch out for when setting it up? One thing that comes to my head is disabling SSH agent forwarding.

We ship it and use it in Fedora and RHEL. It is here for a long time and it is using the code from openssh for almost all the public key operations (and openssh is using openssl). The code is quite fair.

The pam_ssh_agent_auth itself basically does only verification that the public key matches and that the signature provided by ssh-agent is valid. All the private key operations are still left on your ssh-agent.

It is not clear what is going to be your exact use case from this question, but from my POV, the most powerful thing on this is having single agent on local machine to log in to all the servers and allowing sudo operations there (or use separate key for this module). It exposes a bit "single point of failure" (if you lose the unencrypted key, it would be a problem, but this module does not expose it).

You should probably disable ssh-agent forwarding for untrusted hosts (or by default and whitelist your trusted), maybe also add the key with -c switch to confirm PK actions or some timeout (-t to let it expire).


How to Determine if Keylogger is Running on My Windows System How would a program (such as AV) pick up key loggers running on a Windows based system ? Are there internal system processes that are normally invoked to pickup keystrokes ?

I ask because I know there are commercial spyware that are able to hide from anti malware - otherwise how could they prove useful if they are being neutralised by anti malware tool.

Take a look at this thread. Slightly different topic of discussion, but the answer also answers your question. As was stated in that thread, no anti-virus program can detect every key logger, especially given that there are numerous different ways and languages that could be used to create a software based key logger, assuming that's what you're asking about. Some AV software will detect a key logger simply by identifying it as a known key logger by hashing. Some will also detect key loggers by identifying that a process is behaving like a key logger.


Bypassing htmlentities() for XSS attack I'm only a beginner so if any more info is needed just request and i'll update the question.
For one of my modules we are covering cross-site scripting and I have been given a series of PHP files that I need to get a script through to print document.cookie to an an alert box. I've spent a while on this one and i'm having some trouble, if someone could help me out.

 <html><head>...</head>

 <?php require_once 'header.php'; ?>
 <?php
      if (isset($_POST["name"])) {
          echo "HELLO ".htmlentities($_POST["name"]);
      }
 ?>

 <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST">
 Your name:<input type="text" name="name" />
 <input type="submit" name="submit"/>

 </html

I have tried to POST URL encoded payloads and I have read through the PHP manual for htmlentities but they only show examples of injecting JavaScript where the PHP is inserting the POST data into an element already. This code is just writing it to the document and removing the characters < > " ". All other characters are written to the document.
I have also tried manually entering this data into the request headers directly and the same sensitization is done.
All that is in header.php is the cookie being set and the disabling of the browsers X-XSS-Protection.
Any help is much appreciated.

Try injecting the xss payload directly into the request header.


Reasonable source of old proof-of-concept attacks I am relatively new to the area of cyber security but have a reasonable knowledge of several programming languages, assembly (x86 in particular) and scripting. In light of the recent Shellshock and GHOST vulnerabilities I thought it might be interesting to study older CVEs and security reports and find some old POC code that showed how the vulnerabilities (and attacks) worked, particularly on systems I use less frequently.

I fully understand why more recent vulnerabilities do not necessarily have publicly accessible exploit examples - but are there any archives (Internet or otherwise) of POC (or similar) attacks on old security vulnerabilities?

Take a look at http://exploit-db.com it has lots of exploit codez


Security of DNSSEC without NSEC DNSSEC uses NSEC (or NSEC3) records to indicate that requested domain name does not exist. NSEC has been criticized because it allows zone enumeration.

What breaks, if dnssec is implemented without nsec records, that is, what if there is no authentication of nonexistant domains?
(if domain exists, response is authenticated, if domain does not exist, response is unauthenticated)

As I understand, DANE uses NSEC to protect against MITM, but do not understand exactly how. Wouldn't attacker just drop or corrupt authenticated NSEC responses?

Could it be that there is no way of knowing whether DNS response were supposed to be DNSSEC authenticated or was (proposed unimplemented) NSEC, subsequently modified by attacker to unauthenticated DNS response pointing to attacker controlled host.

Am I getting it right? Are there other problems?

If you do not authentify NXDOMAIN responses, then any attacks where the vilain can send the victim a NXDOMAIN reply before/in place of the correct answer, would be accepted by the victim's resolver and hence the attacker is able to make any domain disappear (in the view of the victim) without the victim being able to detect this attack. Hence NSEC, NSEC3 or NSEC5.

Dropping NSEC replies would be seen by the resolver, it would retry the query and then bail out saying "network error", so if this an attack it gets detected. Same for corrupting valid NSEC/NSEC3 records, since they are signed with the accompanying RRSIG record, a change in them would be detected by the victim.

And the victim knows that there is a DNSSEC enabled zone by seeing the DS record in the parent zone, needed to follow the chain of trust.


Why can we trust a website with our data? On what grounds can we trust a website's privacy policy and how they handle user data?

Taking Google for example which has petabytes of user data, who or what makes sure that they don't misuse user data and endanger personal privacy and is anybody keeping a check?

You can't trust that any data anywhere won't end up as tomorrow's news.

If you have data that absolutely can't be made public, don't store it on a computer.

For anything else, there's always a risk.

FWIW, I trust Google to "not get hacked"; however I assume that they're selling every byte of data that they can make a profit on. This is the price for free access to a level of technology that most of society couldn't afford if they had to pay for it.


Why would I protect my computer? I see a lot of posts about how to protect your precious computer, but what is it that we are trying to protect?

Note: Before you flame me, I'm not trying to ask a stupid question. I just see many not knowing what it is that the full consequences can be of not protecting your computer

On with the question...

What threats out there is it that we have to protect ourselves from? Spyware that would steal our credit-card information, our social security number or something else? These things are at risk even if we built ourselves a fortress at home. Especially in the light of the recent Equifax breach (these breaches seems to happen all the time), it hard to see how we could avoid losing sensitive data just by securing our home computers.

Dont get me wrong, I fully understand why we would want to protect our servers, business computers and other business-sensitive hardware & software. I'm all for enhanced security and best practices here. But the home computers I think is quite a different story.

For many people, most of our data is saved online, in the hands of cloud-services. Services that have rollbacks and the possibility to restore the individual files to a previous version. Even if my entire computer and my cloud-data was encrypted from some kind of ransomware, I would be able to just roll back to a previous version of either the computer or in the cloud select a previous version of my files.

Are we instead primarily speaking of securing that my computer does not end up in some kind of a bot-net? Making sure that my device is not used to hurt others? In that case, I think our personal computers are the least problem? We are seeing more and more IoT attacks with our intelligent toasters trying to DDOS someone.

Bottomline, what is it that we want to defend ourselves from? What is the case for the person who remembers to take a backup up his data?

Four threats to data:

distortion
destruction
disruption
disclosure

Sure, you can do a threat impact analysis and determine that the data on your computer is not worth the effort to protect it. That's called a Risk Analysis and more people should go through that process.

And sure, you can determine that some data already has many layers of protection against some threats and that data is protected to a level that you are comfortable with.

But, most people are not aware of just how precious the data on their computer actually is, and most people do not think of all the data that they should when doing these analyses (like login credentials).

Consider also the monetary and time costs to recover from some of the attacks above, even if they are protected. You are protected with identity theft protection? Great! How long and how many other costs will be incurred if your driver's license and SSN are stolen? Are you ok with those costs, too?

All these things need to be considered when you consider protecting your computer (and mobile devices, and home network, and router, etc.). You might conclude that you do not need as much protection as another, and that's fine. The important part is not that you have the same level of protection as everyone else, but rather that you understand and accept the risks. Because most people will not go through that process, experts simplify it all down to baseline protections that everyone should have. If you want to have less protection than the baseline, then make sure you understand what you are doing.


How to encode user authentication in a barcode I was suggested to post here from this question in Super User SE. So here is the copy of it:

I'm asked to add the possibility to scan a barcode (on a badge) to authenticate users when they log in to my app. In this context, my customer has no standard (he does not use badges for now) but would like to use these same barcodes/badges for other apps. Of course, it cannot be encoded in 'user/separator/password' way, because that will show the password when scanned in any simple text editor.

Are there any standards about that? Are there any barcode scanners that provide a built-in function for this?

Preferably, the barcodes I'd want to use may be 1D barcodes. The authentication needs to be one step in this context. The code is being written in C#.

If none of the above, how could it be done?

Thanks

There is no such standard. What the barcode (or QR code) provide is a way to encode some text information.

Encode, not encrypt - so it is readable by the relevant software which can decode the scanned data.

Using this as an authentication system is similar to printing out a password on the badge.


Image file as password alternative I seek guidance on interesting issue. Recently I've been searching for password alternatives, not because of the security, but to be more user-friendly.

In one of my projects user receives 128 bits base64 encoded salt as security token, which could be safely transmitted over social networks, messengers, sms, etc. When user decides to perform certain actions, he enters this public salt alongside with secret passphrase.
Now, this 22 random character salt looks unpleasant and raw for the end user, it's difficult to distinguish one security token from another (user can have many), but easy to send, as it is just a string.

My general idea is to:

Using 128x128 image, each pixel of this image is somehow binded with
corresponding value from base64 with reference to next pixel of a
sequence (details currently irrelevant), to produce something that
looks like QR code from salt;
Adding, say, gravatar as second layer on top of it, to make it visually recognizable.

My questions:

Is this approach reasonable from usability point of view? It's
harder to send image than string, I suppose.
Is there any other way to make salt look more user-friendly?

Searched all around for answer. Would greatly appreciate any help.

UPDATE #1

I've found an example on Defuse Security, that generally reflects the scheme that is implemented in my project:

As a result of the encryption process, end-user gets link, and path is actually represents salt - OwkXSVW8R5NTv3jGyAvnjy. This is the ugly stuff I want to transform into image, so it will be secured but still easily distinguishable for users, so my questions remain relevant.

Hope this will help to find out how.

UPDATE #2

I believe that question is misunderstood.

In my project, user have usual password, and some salt, persisted in DB, but that salt is just used as identifier. So, salt is not something that should be kept secret, and generally, salt is not secret. From Andrew Hoffman answer, unless you've got photographic memory, salt is something he has, and password is something he knows.

But the problem is, salt is not user-friendly, it looks heavy, and it's hard to distinguish multiple such salts at a glance. With that I think what salt can be transformed to that will look and feel good. For example, like Google ReCaptcha of version 1 and version 2 - it accomplishes same task, but simple click is more user-friendly than entering some symbols from picture.

I don't want to be annoying with that question, but please, just accept the fact that I'm not inventing my own salt derivation mechanism or security system.

I believe you're confusing the purpose of a salt. You can derive a salt from an infinite amount of ways, but that doesn't change the purpose of the salt. And for the salt's purpose, it need not be secret.

So when reviewing critiques on your salt derivation, just understand that you're getting this feedback based on the purpose of the salt.

Other than that, user authentication can be very broadly generalized by something you know, or something you have. An image falls under the category of something you have.

Keeping that in mind, its fun to experiment and be creative with custom authentication schemes, but these schemes have not been hardened or analyzed for weaknesses, and for that reason, they should not be used in a production application.

The security industry is sort of like the FDA. It's not that you can't make a new, effective, safe drug, it's just that yours hasn't passed inspections.  Inspections are costly, and if the problem is already a solved problem, we can't be arsed to inspect yours.

And that is why we generally respond, unfortunately in a brash way, of don't roll your own security. It's a solved problem.


3-factor Auth with RSA token? My company issues us RSA tokens:

We use these when logging in remotely, and are presented with a prompt similar to:

Username:

Password:

Security code:

This all seems fairly standard; you give your company username and password, followed by the code on your token. The first time you log in, you are prompted to create a PIN, which you then append to the beginning of the RSA token code from that point forward when logging in.

Why is this done this way? Isn't the RSA token itself the second factor in the 2FA? What's the marginal gain from doing this, if an attacker rubber-hoses a company password out of me, why not the PIN as well? What other attacker surface is being protected?

I will note I've done this before with a yubikey; but the 2FA there is pretty obvious.

The scenario you have provided is still 2FA and not 3 (as your question states). This still only uses something you know and something you have to authenticate. Now, moving on to why a pin and password would be needed. You are right, in that asking both doesn't increase the 'number of factors'. I have seen some companies not use the password, and just ask for the username and PIN + RSA code. But, if the PIN and the password were to be stored in two different data stores (2 different DBs, regions etc), compromise of one still wouldn't be enough to crack one of the two factors needed to authenticate.


C library functions in statically linked ELF32 binary no longer use int 0x80 I've been practicing shell coding on Linux for a while. I used a VM to develop and test my shell code. The VM ran inside VMware workstation  12 pro, on Windows 10. Everything was fine and I could use the usual int 0x80 to switch to kernel mode until now. Just recently, I upgraded my windows 10 from 1607 to 1703 and used the same VMware and same Linux virtual machine. However, there is no int 0x80 anywhere in the syscall invocation now. I compiled the same source codes that I used to try earlier, which earlier showed int 0x80 now don't show them anymore. For instance, the gdb assembler dump for exit function has the instructions as

<Address> jmp DWORD PTR ds: <address>
<Address> push 0x8
<Address> jmp  <Address>

I wonder what could the reason be.

EDITS
1. I haven't updated my Linux
2. Haven't updated my VMware
3. Use a 32 but Linux VM on a 64 bit machine.

int $0x80 is indeed executed by some of the C library functions in the statically linked binary, but not by nearly as many library functions as one would expect given how many library functions are included in the binary:

$ objdump -dj .text binary | grep "cd 80"
 8049401:   cd 80                   int    $0x80
 806c465:   cd 80                   int    $0x80
 806ea5e:   cd 80                   int    $0x80
 806f040:   cd 80                   int    $0x80
 807b5c5:   cd 80                   int    $0x80
 807b5ce:   cd 80                   int    $0x80
 8092651:   cd 80                   int    $0x80
 8094092:   cd 80                   int    $0x80

Let us examine a few of the library functions to see what is going on:

_exit

$ objdump -dj .text binary | grep -A10 "<_exit>:"
0806c451 <_exit>:
 806c451:   8b 5c 24 04             mov    0x4(%esp),%ebx
 806c455:   b8 fc 00 00 00          mov    $0xfc,%eax
 806c45a:   ff 15 f0 a9 0e 08       call   *0x80ea9f0
 806c460:   b8 01 00 00 00          mov    $0x1,%eax
 806c465:   cd 80                   int    $0x80            <---
 806c467:   f4                      hlt
 806c468:   66 90                   xchg   %ax,%ax
 806c46a:   66 90                   xchg   %ax,%ax
 806c46c:   66 90                   xchg   %ax,%ax
 806c46e:   66 90                   xchg   %ax,%ax

No issues here. Note that exit is different than _exit.

__execve:

$ objdump -dj .text binary | grep -A10 "<__execve>:"
0806c470 <__execve>:
 806c470:   53                      push   %ebx
 806c471:   8b 54 24 10             mov    0x10(%esp),%edx
 806c475:   8b 4c 24 0c             mov    0xc(%esp),%ecx
 806c479:   8b 5c 24 08             mov    0x8(%esp),%ebx
 806c47d:   b8 0b 00 00 00          mov    $0xb,%eax     <-- 11 in eax == sys_execve
 806c482:   ff 15 f0 a9 0e 08       call   *0x80ea9f0
 806c488:   3d 00 f0 ff ff          cmp    $0xfffff000,%eax
 806c48d:   77 02                   ja     806c491 <__execve+0x21>
 806c48f:   5b                      pop    %ebx
 806c490:   c3                      ret

__libc_open and __open_nocancel:

0806cdb0 <__libc_open>:
 806cdb0:   65 83 3d 0c 00 00 00    cmpl   $0x0,%gs:0xc
 806cdb7:   00
 806cdb8:   75 25                   jne    806cddf <__open_nocancel+0x25>

0806cdba <__open_nocancel>:
 806cdba:   53                      push   %ebx
 806cdbb:   8b 54 24 10             mov    0x10(%esp),%edx
 806cdbf:   8b 4c 24 0c             mov    0xc(%esp),%ecx
 806cdc3:   8b 5c 24 08             mov    0x8(%esp),%ebx
 806cdc7:   b8 05 00 00 00          mov    $0x5,%eax      <-- 5 in eax == sys_open
 806cdcc:   ff 15 f0 a9 0e 08       call   *0x80ea9f0
 806cdd2:   5b                      pop    %ebx
 806cdd3:   3d 01 f0 ff ff          cmp    $0xfffff001,%eax
 806cdd8:   0f 83 82 32 00 00       jae    8070060 <__syscall_error>
 806cdde:   c3                      ret
 806cddf:   e8 cc 1b 00 00          call   806e9b0 <__libc_enable_asynccancel>
 806cde4:   50                      push   %eax
 806cde5:   53                      push   %ebx
 806cde6:   8b 54 24 14             mov    0x14(%esp),%edx
 806cdea:   8b 4c 24 10             mov    0x10(%esp),%ecx
 806cdee:   8b 5c 24 0c             mov    0xc(%esp),%ebx
 806cdf2:   b8 05 00 00 00          mov    $0x5,%eax      <-- 5 in eax == sys_open
 806cdf7:   ff 15 f0 a9 0e 08       call   *0x80ea9f0

It looks like many of these library functions are making system calls through an intermediary beginning at the address in location 0x80ea9f0 which is in the .data section.

$ readelf -SW binary

[23] .got.plt          PROGBITS        080ea000 0a1000 000044 04  WA  0   0  4
[24] .data             PROGBITS        080ea060 0a1060 000f20 00  WA  0   0 32
[25] .bss              NOBITS          080eaf80 0a1f80 00136c 00  WA  0   0 32
[26] __libc_freeres_ptrs NOBITS        080ec2ec 0a1f80 000018 00  WA  0   0  4
[27] .comment          PROGBITS        00000000 0a1f80 00002b 01  MS  0   0  1
[28] .shstrtab         STRTAB          00000000 0a1fab 00014c 00      0   0  1

Let's take a look inside the .data section:

readelf -x .data binary | less:

0x080ea9d0 00000000 00000000 00000000 00000000 ................
0x080ea9e0 00000000 01000000 00000000 00000000 ................
0x080ea9f0 40f00608 b0ad0908 07000000 7f030000 @...............
0x080eaa00 03000000 02000000 00100000 107a0908 .............z..

Remembering that x86 is little-endian, we read 40f00608 as 0806f040.

Good news: 0x0806f040 is in the .text section of the binary:

[ 3] .rel.plt          REL             08048138 000138 000070 08   A  0   5  4
[ 4] .init             PROGBITS        080481a8 0001a8 000023 00  AX  0   0  4
[ 5] .plt              PROGBITS        080481d0 0001d0 0000e0 00  AX  0   0 16
[ 6] .text             PROGBITS        080482b0 0002b0 075b64 00  AX  0   0 16
[ 7] __libc_freeres_fn PROGBITS        080bde20 075e20 000b36 00  AX  0   0 16

Let's take a peek at the code at that address:

$ objdump -dj .text binary | grep -A5 0806f040
0806f040 <_dl_sysinfo_int80>:
 806f040:   cd 80                   int    $0x80      <--- !!!!!!!!!
 806f042:   c3                      ret
 806f043:   8d b6 00 00 00 00       lea    0x0(%esi),%esi
 806f049:   8d bc 27 00 00 00 00    lea    0x0(%edi,%eiz,1),%edi

The memory address 0x0806f040 contains the first instruction of function   _dl_sysinfo_int80, which is the int instruction followed by the interrupt vector 128.

In conclusion, every library function that calls *0x80ea9f0 is making a system call via function _dl_sysinfo_int80. No dynamic analysis necesary.


Is it wise to completely rely OAuth2 for new users and not have our own login(with username and password) system My question is: Is it fine to build applications where the user login is completely handled by OAuth2 and services like that. That way we do not have to have our own password database for the users. How good this approach would be keeping in mind the user experience?
Also would this approach be easy to implement the multi-factor authentication?

Is it fine to build applications where the user login is completely handled by OAuth2 and services like that.

If both the user and the service provider can trust the OAuth2 provider and if OAuth2 is implemented correctly it is fine. Note that this trust also includes privacy: the service provider can see which services the user is using. And there is no general rule if a service provider is trustable or not - it depends on the specific service provider and the specific use case. For example: NSA would likely not use Baidu (China) as OAuth2 provider.

  That way we do not have to have our own password database for the users.

The use case of OAuth2 is not only third party provided authentication. It can also be used in-house to provide single sign on to various internal services. In this case you still have your own internal password database.

  How good this approach would be keeping in mind the user experience?

In general single sign on and less passwords to remember provide a good user experience. But if you force the user to use an OAuth2 provider he does not like the experience will be bad. This can for example the case when you force privacy sensitive users to login with some social network provider even if these users specifically refused to use social networks so far for privacy reasons.

  Also would this approach be easy to implement the multi-factor authentication?

Most large OAuth2 providers offer MFA already.


Can this be turned into dom xss? I am testing a bug bounty website and i reached a support ticket creation functionality. I registered with email address {{15*15}}@testemail.com.
I created a ticket but when i try to open the ticket i noticed a call to https://www.website.com/undefined and i am not able to open the ticket, it keep saying "loading ticket" but it never loads. I believe that this error is caused by {{15*15}} that is injected in some javascript file and generate that error. I tried to register with emails like "></script><xss>@email.com or alert(1)@gmail.com but the email in registration page is controlled and doesn't let me register with invalid emails. Can i execute some javascript code or exploit this issue as dom based xss? If possible what payload could i insert inside email field?

Could you please share errors written at console ?

This type of contents does not send to browser over js files, I believe you can find it in a response of document request or initial response. Most of the time you can find it at html response or API response (json/xml etc.).

If you want to check XSS, follow items listed below.

Find the input at response (alert(1)@gmail.com
Check, is app do html encoding/decoding (write <> and check response is <> or <>)
If it does not handle correctly, find the right payload

You are working with stored XSS so you can follow this link https://www.owasp.org/index.php/Testing_for_Stored_Cross_site_scripting_(OTG-INPVAL-002)

You can find out example payloads at link written below
https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet

PS. This situations can be a simple frontend error so check the reason first (reason of "loading tickets").


Which practices should i use while generating SMS codes for auth on my project? Let's imagine that we have an SMS verification auth, and using random 4-digit codes,
i.e. 1234, 5925, 1342 and etc.
I'm using this random inclusive algorithm on my node.js server:
function getRandomIntInclusive(min, max) {
    min = Math.ceil(min);
    max = Math.floor(max);
    return Math.floor(Math.random() * (max - min + 1) + min); //The maximum is inclusive and the minimum is inclusive
}

const another_one_code = getRandomIntInclusive(1000, 9999);

taken from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/random
Seems i have range from 1000 to 9999 and have some questions about security:

I'm using good algo? Maybe i need to use something better?
Will it increase security if i will check previous sent code for {$n} last minutes from db and regenerate another one if it will be same (brute same code twice case), so user always gets random 5941-2862-1873-3855-2987 without 1023-1023-2525-2525-3733-3733 case? I understand that chance is low, but anyway...

Thank you for answers!

I'm using good algo? Maybe i need to use something better?

Which generator is being used by Math.random()?
Have a look at the footnote on that Mozilla page:

Math.random() does not provide cryptographically secure random numbers. Do not use them for anything related to security

Will it increase security if i will check previous sent code for {$n} last minutes from db and regenerate another one if it will be same (brute same code twice case), so user always gets random 5941-2862-1873-3855-2987 without 1023-1023-2525-2525-3733-3733 case? I understand that chance is low, but anyway...

No. You shouldn't try to make numbers "more random" by avoiding repetitions. It's the property of random numbers that there is a chance that the next one will be the same as the previous, and it's ok. You would actually weak it by discarding those $n last codes.
I would actually try to implement HOTP / TOTP on the sms codes. You don't really need to, a random number would do, but that way you could easily change the users from sms authentication to local-app authentication, with no changes on the verifier code.


Is it safe to pass an OpenID Connect ID token to my back-end API for verification? I am currently adding single sign-on functionality between my application and an electronic health record (EHR) system. The SSO is done using the OpenID Connect authorization code flow, but unlike a typical OIDC sign-in (i.e. signing in with Google/Facebook/etc), the EHR system initiates the SSO process (IdP-initiated). Basically, the user will press a button in the EHR, and the expectation is that they are then automatically logged in to my application (which is displayed in a browser frame within the EHR client).
Presently, I am using a JS library (https://github.com/smart-on-fhir/client-js), running in the browser, which manages the OIDC authorization code flow. I have everything working great through the browser and am able to ultimately retrieve an OIDC ID token.
Once I have the ID token, I need to be able to use it as a means of matching to a specific user in my system. To do this, I'll need to pass the token to my application's back-end API, so that the token can be validated and then used to extract the info necessary to find/create a user and log them in.
Are there any security concerns or considerations in regards to passing the OIDC ID token from the browser to my application's API?
FYI, I do have functionality in place to validate ID tokens per OIDC specs, using the rotating, asymmetric, keys that are provided by the EHR's authorization server.

The purpose of id_token is for your application acting as OIDC Client to do stuff with. Locating a user in your app based on token claims falls under the definition of "stuff". From OIDC spec:

OpenID Connect returns the result of the Authentication performed by
the Server to the Client in a secure manner so that the Client can
rely on it

"Safe" and "security concerns/considerations" imply a value judgement. Weighing the repercussions of a particular action requires a threat model. Good news: a lot of threat modeling work has already been done on OpenID Connect. Bad news: it's complicated.


What ciphersuites does Java 6 support out of the box that are not broken? I have a legacy application which sits on Java 6(!), and talks to Apache 2.2.15 on RHEL 6.4.

(An upgrade for Java 6 is on the cards, but not before go-live date.)

We have pentest fails for a weak TLS configuration, so I want to find the best ciphersuite that both Java 6 and Apache will support, without any modifications e.g. no adding of crypto providers to Java.

I've looked at the Client Hello coming from the Java app, and having removed the suites I know I will get failed for (export grade, RC4, etc), this is what I'm left with:

TLS_RSA_WITH_AES_128_CBC_SHA
TLS_RSA_WITH_AES_256_CBC_SHA
TLS_DHE_RSA_WITH_AES_128_CBC_SHA
TLS_DHE_RSA_WITH_AES_256_CBC_SHA
TLS_DHE_DSS_WITH_AES_128_CBC_SHA
TLS_DHE_DSS_WITH_AES_256_CBC_SHA
TLS_RSA_WITH_3DES_EDE_CBC_SHA
TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA

Bear in mind I only have one client to support for this, so one ciphersuite that both sides support will suffice.

I realise there may not be a clear cut answer to this, so any advice is appreciated.

I tend to go off the list that Mozilla provides, which gets updated every so often, although no where near as frequently as browsers do!

This currently suggests the following cipher order for a "modern" browser:

  ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!3DES:!MD5:!PSK

This would suggest that the best option you have is DHE-RSA-AES128-SHA (which I am fairly sure is Apache speak for TLS_DHE_RSA_WITH_AES_128_CBC_SHA).

Not sure why the AES128 one would be preferred over AES256, but it is the same in the Mozilla list.

Edit

Original version stated "DHE-RSA-AES128-SHA256", which was wrong - fingers used to typing SHA256...


TLS and self-signed certs. Is hostname verification necessary if client-supplied CA is the same as server leaf cert? TLS client implementations will tend to try and do hostname verification by default for remote TLS endpoints (servers). The client connects to the server, and as part of the negotiation the certificate chain is checked (valid, signed by a trusted CA etc.) and the hostname is also verified (is the hostname that I'm connecting to listed in the server leaf cert SAN list).
As I understand it, the purpose of the hostname verification is to make sure that the certificate being presented by the server was issued for that specific server, so as to prevent a valid and trusted certificate issued for evil.site.com being used for connections to an endpoint reachable as, say, gmail.com. If an attacker controls where a target's packets go (including DNS), hostname verification is something that can prevent traffic being MITM.
However, in the case of a self-signed cert, the dynamic is slightly different. Mainly, the cert won't be trusted by the client by default - it is almost certainly not in the client's root CA list. As a result, a client wishing to make a valid TLS connection to an endpoint protected by a self-signed cert would need to explicitly configure themselves to add the cert into the CA list (or even configure it as the only CA for this connection). By doing this though, the client is effectively ultimately trusting this certificate. Any remote endpoint that presents the same certificate must surely also be trusted, no matter what name was used to access it.
If the server presents a leaf certificate that is the same as the one configured by the client to be a trusted CA for the connection, is there any value in doing hostname verification? If so, what threat is being defended against?

A check of the subject is done if the CA has issued many certificates for different servers and thus just checking the CA (i.e. trust chain) is not sufficient to specify the expected leaf certificate.
But if the expected certificate can be specified with sufficient precision by other means the validation of the subject is not needed. This is for example the case when checking the certificate or its public key against known good values (as done in certificate pinning or public key pinning). This would also be the case if the CA is known to have definitely only issued certificates for this specific site. This is also essentially what browsers do when the user explicitly adds an certificate exception for a site: they remember this certificate as trusted for the specific site (but not for others), no matter if the subject matters or not.
Trusting a specific self-signed certificate by importing it in the trust store is basically pinning to this specific certificate. No further checks of the subject would be needed in this case. Note though that the browser does not know that this self-signed certificate can not be used to sign other certificates if it is imported as a trusted CA - it must assume that it is a generic CA which can issue other certificates and thus subject need to be checked.


Is the IBM AppScan XSS vulnerability on Google Analytics about the "cross-domain tracking query string parameter" a false positive? The IBM AppScan reports an XSS vulnerability on Google Analytics regarding the cross-domain tracking query string parameter. I'm trying to address this issue, but:

I haven't been able to reproduce it, even in non-CSP supporting browsers (specifically IE 9), and,
I wouldn't know how to fix it if I could reproduce it, given that it's not in any code that I control.

Has anyone else seen this issue reported? Can I safely assume that it's a false positive?

There is an XSS vulnerability reported on google-analytics, more information can be found on the following pages:

http://www.cvedetails.com/cve/CVE-2014-9174/
http://www.acunetix.com/blog/articles/xss-vulnerability-injected-google-analytics-executed-ioss-gmail-application/

Make sure to update your version, when your version of google-analytics is the same to this one reported.


Is this system of authentication secure for a mobile app? What can I do to improve it? Users authenticate with their phone number, get a pin text, and if it is correct, they get an access token. Store the access token in a DB in a Token model. The client always sends the access token in an Authorization header. For requests that require authentication, parse the header, check if it is in the database, and pull up the user id (also stored in the Token model) based on the row. Assuming the user_id exists and the token is marked as still valid, complete the request.

Everything is over HTTPS. Tokens have no expiration. If it is invalid, I delete the token on the client and then the user would be prompted for another. Tokens are just random, long alphanumeric strings

Is this reasonable? Is it secure? Should I use some preexisting paradigm?

Users authenticate with their phone number, get a pin text, and if it is correct, they get an access token.

Phone numbers are PII, so you should be keeping them safe (encrypted?). Text messages are sent in the clear and are readable by smartphone applications, consider that. Also, are the pin numbers random or can they be deducted easily? Are they valid indefinitely?

  The client always sends the access token in an Authorization header.

So if the token is stolen, can the session be spoofed from another phone number?

  Everything is over HTTPS.

Consider testing your TLS settings. Default settings are not secure in most cases. There are online services that help you with this.

  Tokens are just random, long alphanumeric strings

How random, how long? Can the token be brute-forced? Do you hinder login attempts after a few failed ones?

  Is this reasonable? Is it secure?

As a commenter asked, what is your threat model?

  Should I use some preexisting paradigm?

Yes. Don't roll your own.


Gmail Email id, dot(.) recognition I keep on receiving email which is intend to be received by a gmail id similar to be mine, with no dots(.) in gmail id of other party.
For example : my email id is john.grisham@gmail.com
the inbox of above email ids, get emails intended to be received by  johngrisham@gmail.com

Question 1: The other party will also be receiving my emails ?
Question 2: How can i get rid of this problem?

Dots don't matter in GMail addresses.

Here's the link for your further reading.

You can add as many dots as you like in your GMail address, and you'll still receive that e-mail.

It also says that nobody else can create a new, dotted version of your e-mail address, so there can't be "other party" you mention in your e-mail.

Since there's no "other party", I assume the e-mail you received was meant for you.


Decrypting TLS in Wireshark when using DHE_RSA ciphersuites How can I decrypt TLS messages when an ephemeral Diffie-Hellman ciphersuite is used? I am able to expose the premaster secret and master secret from the SSL Client. Using that, how to decrypt the messages in Wireshark?

Some background: Wireshark supports decryption of SSL sessions when the master secret can be calculated (which can be derived from a pre-master secret). For cipher suites using the RSA key exchange, the private RSA key can be used to decrypt the encrypted pre-master secret.

For ephemeral Diffie-Hellman (DHE) cipher suites, the RSA private key is only used for signing the DH parameters (and not for encryption). These parameters are used in a DH key exchange, resulting in a shared secret (effectively the pre-master secret which is of course not visible on the wire).

Wireshark supports various methods to decrypt SSL:

By decrypting the pre-master secret using a private RSA key. Works for RSA key exchanges and subject to the above limitation.
Using a SSL keylog file which maps identifiers to master secrets. The available identifiers are:

The first 8 bytes (16 hex-encoded chars) of an encrypted pre-master secret (as transmitted over the wire in the ClientKeyExchange handshake message). (RSA XXX YYY, since Wireshark 1.6.0)
The 32 bytes (64 bytes hex-encoded chars) within the Random field of a Client Hello handshake message. (CLIENT_RANDOM XXX YYY, since Wireshark 1.8.0)

A variant that maps the Client Random to a pre-master secret (rather than master-secret) also exists. (PMS_CLIENT_RANDOM XXX ZZZ, since Wireshark 2.0)
Another variant exists to support TLS 1.3 and maps the Client Random to respective secrets. Instead of CLIENT_RANDOM, the key is one of CLIENT_EARLY_TRAFFIC_SECRET, CLIENT_HANDSHAKE_TRAFFIC_SECRET, SERVER_HANDSHAKE_TRAFFIC_SECRET, CLIENT_TRAFFIC_SECRET_0 or SERVER_TRAFFIC_SECRET_0. Since Wireshark 2.4.

The Session ID field of a Server Hello handshake message. (RSA Session-ID:XXX Master-Key:YYY, since Wireshark 1.6.0)
The Session Ticket in a Client Hello TLS extension or Session Ticket handshake message. (RSA Session-ID:XXX Master-Key:YYY, since Wireshark 1.11.3)

To generate such a SSL key log file for a session, set the SSLKEYLOGFILE environment variable to a file before starting the NSS application. Example shell commands for Linux:

export SSLKEYLOGFILE=$PWD/premaster.txt
firefox

On Windows you need to set a global environment variable, either via cmd (invoke setx SSLKEYlOGFILE "%HOMEPATH%\Desktop\premaster.txt" for example) or via the System configuration panel. After doing so, you can launch Firefox via the icon. Note: (Linux) users of Firefox with NSS 3.24+ are possibly unable to use this method because Firefox developers disabled this by default.

The SSL key log file can be configured for Wireshark at Edit -> Preferences, Protocols -> SSL, field (Pre)-Master-Secret log filename (or pass the -o ssl.keylog_file:path/to/keys.log to wireshark or tshark).

After doing this, you can decrypt SSL sessions for previous and live captures. Should you encounter a situation where you still cannot decrypt traffic, check:

whether the key log file path is correct (use absolute paths in case the program changes the working directory).
whether the key log file actually contains key material for your program.
whether Wireshark was compiled with GnuTLS (I have tested Wireshark 1.10.1 with GnuTLS 3.2.4 and libgcrypt 1.5.3)
whether other sessions can be decrypted. For instance, I tried https://lekensteyn.nl/ which works, but a site using a Camellia cipher suite failed.

If you still cannot decrypt all traffic, it is possible that Wireshark contains a bug (in my case it was missing support for Camellia). To start debugging, save your capture and start wireshark with SSL logging enabled:

wireshark -o ssl.debug_file:debug.txt savedcapture.pcapng

After the capture has been loaded, you can close the program again. (You do not actually need to save the capture, but it makes it easier to reproduce the issue and avoid further noise in the log dump.) You might see something similar to the line below:

ssl_generate_keyring_material not enough data to generate key (0x33 required 0x37 or 0x57)

These numbers are a combination of the constants defined in epan/dissectors/packet-ssl-utils.h:

215-#define SSL_CLIENT_RANDOM       (1<<0)
216-#define SSL_SERVER_RANDOM       (1<<1)
217:#define SSL_CIPHER              (1<<2)
218-#define SSL_HAVE_SESSION_KEY    (1<<3)
219-#define SSL_VERSION             (1<<4)
220-#define SSL_MASTER_SECRET       (1<<5)
221-#define SSL_PRE_MASTER_SECRET   (1<<6)

As you can see, I am missing the SSL_MASTER_SECRET (0x20) here. Looking further in the log file, I can also find:

dissect_ssl3_hnd_srv_hello can't find cipher suite 0x88

This cipher suite is indeed missing from the cipher_suites structure defined in epan/dissectors/packet-ssl-utils.c. After studying RFC 5932 - Camellia Cipher Suites for TLS, I found the required parameters for a CipherSuite.
The resulting patch should then be submitted to Wireshark as I did here: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9144. The stable 1.12 series have vastly improved cipher suite and TLS support, so you should not have to manually patch it now.


Having problems with performing a JWT "none" algorithm attack I'm taking a course where I must breach a site which uses 2015 version of JWT for authentication. They gave me the test//test login information and I must login with admin.

After I log in, I receive this token, and it's stored in my cookies:

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6InRlc3QifQ.vLVv9jMkXF8YTdkkbmWfWAB9teChPPJI6t4f8ejR-8I

I decoded it with jwt.io and got this header and payload:

{
  "alg": "HS256",
  "typ": "JWT"
}

{
  "username": "test"
}

So I changed the alg to none and the username to admin and used an empty string as a signature:

header = '{"alg":"none"","typ":"JWT"}'
payload = '{"username":"admin"}'
signature = ""
token = encodeBase64URL(header) + '.' + encodeBase64URL(payload) + '.' + encodeBase64URL(signature)

I got this token as a result:

eyJhbGciOiJub25lIiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImFkbWluIn0.

I replaced my cookie with this one, and refreshed the page. But it's invalid or something because I got logged out instead of being identified as the admin user.

Why?

You have a typo in your header:

header = '{"alg":"none"","typ":"JWT"}'

none has two quotes at the end.


Why would the government collect Wi-Fi SSIDs via manual door-to-door questioning of citizens? I live in a country with little freedom on the Internet (not as strict as in China, but some sites, particularly anti-government sites are inaccessible without a VPN). Recently the government just went collecting the Wi-Fi names of every house. I had to fill in my name, my address and my Wi-Fi name. I didn't have to to provide the password. Every house needed to fill in the survey. They refused to tell the reason.

My questions are:

Why would they do that?
If I can change my Wi-Fi name, or even the modem, whenever I want, then why would they do that? Should I do that right now?
To my knowledge*, once the password is passed, changing new password on the same modem won't help. However, I'm not sure that after they have gained the access on my modem, what can they do? Can they open the backdoor or something?

*I used to install Kali to break Wi-Fi passwords for fun, but unfortunately I didn't pass the first test of the tutorial. :( After I found out that all tutorials only give me a part of solution, I was lazy to try again.

I see two possible uses of such information from a government perspective. None of them involves the password or actually using your WiFi access.

Forensic analysis: connected devices store an history of access points they were connected to, sometimes associated with "last seen" dates. Using this history, it is therefore possible to know where someone was and when, which can be very helpful for investigators.

Concrete example: someone is arrested, his cellphone and laptops are seized for investigation, and their WiFi history is analysed (actually, in some cases, with some devices being a bit too talkative, it is not even needed to actually seize the device, but let's stay on topic). This will reveal where the suspect has been and when (for the last time at least), and because we are talking about associated access points it strongly leads toward some sort of relationship between the suspect and the AP owner (you do not distribute your WiFi password to any strangers, do you?), helping to construct a map of the suspect relationships (here having the ability to associate an SSID (the WiFi name) to an owner name takes all his importance).
Geolocation: If by any means investigators can remotely access the list of the access points covering the area where a device is currently located, then it is possible to determine where the device (and most likely its bearer too) is located.

Concrete example: An implant (to borrow NSA's terminology) is installed on a device with Internet but no GPS capability (laptop, tablet, etc.) or where the user has disabled GPS geolocation for privacy purposes. The implant phones home on a regular basis, sending a list of currently visible WiFi networks with the associated signal strength (the device doesn't need to be associated to any of them). Associated to a map of SSID geographical locations, this effectively allows to track in real time the suspect's movements.

In this case however, collecting the owner's name in such visible actions is less needed, war drivers and other Google cars know this very well. However depending on the details of this procedure it may also limit the possibilities for people to freely change their WiFi SSID name (let's say the form forbid this, it would be trivial for the authorities to detect undeclared changes and associate it to a name), thus possibly providing more accurate information on the long-term.

Regarding your mention about the WiFi password, as long as the WiFi access has been hacked by finding the password and not due to another unrelated weakness and unless the attacker also hacked the access point itself (and replaced its firmware for instance), then changing the password by a stronger one is sufficient to block any further exploitation of this access.

Regarding what can be done using a compromised access point, this is worth a separate question but you may already find a lot of information in already existing posts on this site (basically an attacker would gain a Man-in-the-middle (MiTM) position to intercept/modify all of your communication, this also opens opportunities to attack other devices of your internal network, and depending on the device's reset abilities the attacker could also prevent the access point firmware from being cleaned, effectively requiring the device to be replaced).

And yes technically you could change your WiFi "name" any time you want, however it is possible that your government may request you to fill a form to officially declare this change (or they just assume that only a minority of users will do this so it does not worth to track such changes).


How do I get my Encryption Certificate back? I was using Windows 7 Professional. I encrypted a few personal pics and videos on my hard drive. Unfortunately someone deleted the encryption certificate.

Now I have installed Windows 8 and have formatted the previous Windows partition. My encrypted data is now available on the D drive but is not opening and I have no certificates. What should I do?

If you haven't backed up the certificates and if you reinstalled your operating system, chances are high the files got overwritten. This means the certificates will not be recoverable from your hard drive. You can always try some file-recovery tools (like Undelete 360 ) to try and recover the certificates.


Attacking encrypted storage vs attacking memory I want to create a generative password manager. Generative password managers generate passwords based on seeds such as the master password and the website's URL. In contrast, most password managers store the password in an encrypted file (encrypted with the master password). In this regard, since generative password managers do not store any information, would it be more secure than a normal password manager which delivers an encrypted password file to the user to be decrypted on the client-side? An attacker can theoretically look into the generative password manager's memory and retrieve the generated password. Would this be more difficult than trying to breach a server, steal the password file, and then trying to brute-force it?

Stealing data from the memory is definitely easier than stealing it from an encrypted file.
You can take a dump of your memory and then scan it to search the password.

On a side note, I believe the bigger risk here is that there is a very simple mapping between the seed and the password. Also, the seeds seem to be predictable. Once that is compromised, do you have a safety/fallback mechanism to protect other passwords?


NetRange and Router Sharing for Pentesting When pentesting a network, call it ExampleNet, the network range sometimes exceeds 256 hosts, such as the range x.y.56.0-x.y.63.255. Does this mean that a compromised host on x.y.56.z could be used to leverage a MITM attack against a range such as x.y.62.z, considering they both share the same ethernet?

It generally depends on network setup. Some commercial switches can separate the network out into different subnets, with special routing tables between them. That way you'll have a single physical switch connecting all the machines, but you'll still have several subnets.

They may also be using technologies like ipsec to encrypt and authenticate network communications, which can make a MITM attack difficult, if not impossible.

But, if it's all on the same switch, the switch isn't doing anything "clever", and they're not using a protection technology such as ipsec, then you should be able to perform a MITM attack using a single comprimised host.


What can a compromised firmware (UEFI) do after the hard-disk has been wiped? I might be mistaken, but it seems the firmware (UEFI) needs to load some stuff from the disk to be able to do anything really interesting, like loading some advanced tools or loading the OS. Yet firmware infections are often associated with the concept of "persistent infections", where wiping the disk won't help. But what can an infected firmware do on its own, after you have wiped the whole disk? Obviously malicious firmware can load all sorts of malicious stuff, but first it must find that stuff somewhere. Maybe the firmware memory is large enough to contain malicious code to inject somewhere later in the boot process, but I'm not sure there is enough memory available to do anything interesting that actually works.

So what can a malicious firmware after the disk has been totally wiped (every partition has been overwritten) and another clean OS has been installed?

The simpliest malicious firmware can do is to add or replace existing executable files, to make OS load it on boot. This is how LoJack/CompuTrace anti-theft software works.


Website customer e-mail collection form getting spammed, why and what to do I am the webmaster for my girlfriend's page where she advertises her services as an online tutor. The webpage has a simple PHP post form, using which the visitors can leave their e-mail addresses to be contacted about possible lessons. Once an e-mail address is received, it is validated and then e-mailed to me. Usually there's a message once every 3-4 days.

Since yesterday I have received about 50 e-mail messages with different e-mail addresses, about once every half hour or so. I checked the IP addresses of the senders, and they are from proxy servers all over the world, so I can't just filter them out based on IP. The e-mail addresses themselves are linked to spammers (according to Google). I am assuming it is a bot and not a real person typing these e-mail addresses into the form.

Can anyone suggest how I could stop this deluge of spam? I guess I could try to figure out how to use a captcha, but, before I do it, maybe there is an easier way? Also, could anyone perhaps explain their motivation? How could they possibly expect to benefit from this?

Thank you.

You need to use an automated system to defend the form entry.

Currently, something like RECaptcha, also mentioned by @korockinout13 (+1) is probably the most common solution to do this.

You might also want to leverage something like Fail2Ban to block repeat offenders.

For certain businesses, larger scale whitelisting/blacklisting of IP's may be useful. For example, if you notice that the IP addresses causing harm are always from Tor relay IP address ranges blocking these might be helpful for you but do take into account privacy reasons that a legitimate user may want to connect to you via tor. If this is unlikely to ever happen then blocking these IP's may in some cases be helpful. Similarly, if you don't ever do business with some other country but 99% of the form attacks come from IP addresses in that country you might consider blocking that countries IP addresses for a while but do not do this blindly because some of your customers do travel and other countries may have valid business for you or legitimate reasons to visit your site.

Some website frameworks, like Django, have additional add-on anti-automation defences and honeypots that may also help.

Finally, it is wise to use more than one of these solutions as there are already tools like Bishop Fox's Anti-Anti-Automation Framework which can help attackers and penetration testers get around some of these systems. Ultimately, your goal is just to make it more expensive and time-consuming for attackers to the point they stop impacting your forms.

In any case, you want an automated solution that doesn't create a lot of work for you.


Router level filtering on home network I want to block some part of a website or some videos from dailymotion or other site video sites.

Type of network

I have 7-8 devices(PCs, Mobiles, iPhones & tablets) all connected to a router (Tenda W150d) with wire or with wifi. I dont have a seperate server like offices to control traffic.

Problems

I can block websites on a single pc by some software but can't do that on mobile devices.
I can not use a separate server turned on 24 hour

Note:

I can buy a new router with reasonable price ($40-$50), suggest me if any of these can do what i want.
This link seems good and i can afford it but not sure if it blocks urls.

Blocking some part of a website is easy with software like privoxy, or you can ban entire domains with dnsmasq. Both are available for most, if not all, open source router firmwares, like TomatoUSB or DD-WRT. For a good router, I recommend something like the Asus RT-N66U.


How do you know a computer is not compromised when you first get it? How do you know a computer is not compromised when you first get it? How do you know that manufacturers have not intentionally built vulnerabilities into the system?

You don't. Some vendors do indeed ship backdoors with their products, and many computers come with "crapware" pre-installed as a source of revenue for the manufacturers. Even apps that don't contain a backdoor can cause other damage (e.g. Browser toolbars that track browsing).

Same concerns apply with hardware, especially in networking equipment.

What you can do:

Re-install a "clean OS" onto any new computer. This probably means buying a new, vanilla copy of an OS that you have already paid for (the factory image that ships with the computer will also contain the original "crapware", unless you pay extra to not have the crapware).
Re-install a more trusted OS onto a new computer (unless you write your own OS, you have to trust someone at some point). Ubuntu, Security-Enhanced Linux, whatever you trust.
Use only hardware that you trust. This usually means avoiding hardware that is made in countries hostile to yours. Huawei (a Chinese networking equipment manufacturer) is finding it difficult to prove that it is trustworthy enough to supply some governments.


How does my antivirus determine which CTL is used? I have imported a trusted root certificate into the Windows local machine list. This works fine with my signed certificates, unless my AV (Bitdefender Antivirus Plus 2012) is set to "scan SSL", in which case my certs are flagged as untrusted.

I can manually turn off SSL scanning, or add my certificate to the CTL that they use for mitm, or sign my certificates with their fake root cert and key. None of these options are any good if I want to deploy my application to remote users who may use other AV's

The AV has its own CTL to which I have not added my root cert, so I am wondering how the AV gets the browser/OS to use this alternate CTL and can this be overridden?

My understanding of this from using Fiddler 2 is that the AV would have to work as a proxy.  Thus, it would act as the client to the website you request and all SSL pages would be signed by the anti-virus software's cert on the fly to make it appear to be valid.  Most likely, in the case that the A/V software doesn't trust the source, it does not apply a valid SSL cert via it's own trust to allow the information to be relayed to the browser.  Because your valid SSL trust has been stripped by the proxy (because the proxy is not in fact your server), the connection appears to be invalid.

It would be up to each client's AV software to respect the certificate trust and there isn't any way I know of to handle that in the general sense other than get a root or domain signing cert from a trusted CA that would most likely be seen as valid by most AV software.


Why is there "t=[your device]" in duckduckgo query URL? I was just searching something on my raspberrypi via duckduckgo and realized that there is q=[my query]&t=raspberrypi&[rest of the URL] in the URL bar.
When i did the same query on my PC, there was ...t=h_....

Their motto is "We don't track you" so why they need to now what device am I using? The results are the same.

From DuckDuckGo's &t= page:

  Through partnerships with developers and companies, DuckDuckGo has been integrated into many applications. In these partnerships, a portion of DuckDuckGo's advertising revenue is sometimes shared back. To assign advertising revenue and collect anonymous aggregate usage information, developers add a unique "&t=" parameter to searches made through their applications.

They say the results are an "anonymous aggregate" and not for customizing results or tracking users.

Their API docs also suggest apps using the API should include a descriptive t parameter.

  Use a descriptive t parameter, i.e. append &t=nameofapp to your requests.

Sounds like whatever software you are using on your Raspberry Pi is simply using this feature as instructed.


Is it possible to speed up WPA/WPA2-PSK cracking using a rogue AP? We know that WPA/WPA2-PSK uses a PTK (Pairwise Transient Key) for each client to encrypt the communication. This PTK is generated through the process known as 4-way handshake. As told in the related page on Wikipedia:

  The PTK is generated by concatenating the following attributes: PMK, AP nonce (ANonce), STA nonce (SNonce), AP MAC address, and STA MAC address. The product is then put through a cryptographic hash function.

So, if an attacker has the ability to setup a rogue AP (Access point) and make some clients automatically deauth & connect (especially mobile clients) to that rogue AP of his, can he gain some advantage to speed up calculations for cracking the PSK by introducing some specially generated inputs for example ANonce, AP MAC -the variables which he can control-?

We can assume that he has the chance to do this for some reasonable times such as 10. So he will obtain that number of 4-way handshakes which he used some specially selected inputs (similar to a chosen-plaintext attack). I wonder if there is some component in the design which will prevent that he gains some speed advantage by using a rogue AP rather than simply capturing the 4-way handshakes?

The key derivation of the PTK is defined in section 8.5.1.2 of IEEE 802.11-2007, Figure 8-20 (page 198, which is page 247 in the PDF file):

PRF-X(PMK, "Pairwise key expansion",
      Min(AA,SPA) || Max(AA,SPA) ||
      Min(ANonce,SNonce) || Max(ANonce,SNonce))

AA and SPA are the addresses of both communicating partners, ANonce and SNonce are the nonces sent by them.

X is the number of bits needed, and depending on the use, X is here either 384 or 512.

In the previous section 8.5.1.1, the PRF (pseudo-random function) is defined, and it is effectively

PRF-X(K, A, B) = HMAC-SHA-1(K, A || 0 || B || 1) ||
                 HMAC-SHA-1(K, A || 0 || B || 2) ||
                 ...

(with as many repetitions as needed to fill the needed number of bits, discarding the remaining ones.)

So the question effectively is: Can one attack HMAC-SHA-1 in a way that, knowing some of the input and choosing other parts of the input, but not knowing the key, one can (a) derive parts of the output, or (b) derive the key?

As far as is known, neither the HMAC construction nor the SHA-1 hash function has a weakness in this respect.

So the only currently known way to break this would be to brute-force the PSK (or the password from which it is derived), which would need not much more than one listened handshake, but lots of computation to find the key.

There is no realistic chance to break the 256-bit key, but one might find a password from which it is derived quite easier. So use a good password.


What causes "High Risk Website Blocked" on Chrome? I have a website with no ads and no external content. Everything on the page comes from the webserver in question. Some users on Google Chrome have reported that they see the following warning when they try to enter the site.

Content that has not been developed by us include only jQuery, flags and the template (styles including icons and the very basic HTML layout - no content).

My questions

What has it detected on the site?
How do I get rid of the block?
Why does it only happen to certain Chrome users (and not myself for example)?

Here is a virus scan of the site, which shows that Sophos detects the site as malware.

  High Risk Website Blocked

  Location: www.twisted-gamers.net/portal/dashboard/members
  Access has been blocked as the threat Mal/HTMLGen-A has been found on this website.

  Return to the page you were previously viewing.

EDIT

After checking the site with Google Webmaster Tools, I discovered that Google has not found any malware on the site.

Typically a site gets blocked because it either contains malicious code or, more often, links to another site that contains malicious code.

Google has several sources for this information; stopbadware.org is their primary partner in this, and of course they get most of their direct knowledge through their GoogleBot indexing.

Chrome has a built-in feature that checks Google's "is this site malicious" database for all new domains you visit and will display an alert if you access a site that is. You'll get a similar result from any browser if you click on a Google search link.

To find out more about what they found, go register your site with Google Webmaster Tools so that they know you're the owner, and they'll tell you there what they know about your site, including anything malicious they found.

To get removed from the list, the first thing you have to do is find and remove the malware. Of course that's not enough: you also have to find and fix the hole that the hacker used to get in, or he'll just come back. And that's not enough either, because in nearly 100% of cases, the hacker will install multiple backdoors to ensure he has access even if you patch the hole. So you have to identify, find and remove those as well. (Not a trivial task.)

In the end, it's a whole lot safer to just nuke the whole thing and restore from a known-good backup. And then install any necessary patches after that but before you go live.

And once your site is clean, THEN you notify Google through the webmaster tools panel, and they'll re-scan your site.


Using Bluestacks with VLC and Live Net TV When I tried to open the app on PC I got a security login from google on my Samsung phone that a new OnePlus 5 device had logged in to my account.I do not have such a device so I changed my password on google.Any ideas to what it was?

Bluestacks is an Android emulator. When you run it, it pretends to be a particular Android based device. For the newest version of Bluestacks, I believe OnePlus 5 is the default device emulated.
So yes, you do have a OnePlus 5 device, it's just emulated.


Browser session cookies stolen/copied to another PC, why websites not smart enough prevent it? Just out of curiosity and security test, i copied my own browser's cookies to another pc on same browser and surprisingly i managed to open facebook and google accounts with existing sessions even after public ip changed!!

Imo, it would be more secure if websites was clever enough to detect you r accessing an existing session from same platform/agent but from a combination of different ip/mac/machine model/unique id etc. in this case even if sessions stolen, only combination of same platform/agent/ip/user/any unique id that is related to actual user would be able to continue existing session. wouldnt it be good protection againts session hijackings? cheers

There is always a balance between usability and security. There are some changes which might be perfectly normal, like visiting the same site from a totally different IP address (mobile users), with a slightly different User-Agent (might be caused by browser update), from a slightly different operating system fingerprint (might be caused by OS update or changes on hardware or restoring system from backup) etc. Getting cookies invalidated in these cases would be more secure but would also be annoying for the user.

But binding sessions to specific environments is also done in practice in cases where the sessions are short-lived so that the environment could be treated as kind of constant or where the data are very sensitive and it is acceptable to login again on any changes to the environment.

On the other hand: what you did is to explicitly copy the cookie from the browser into another browser. This is not what an attacker could do if the site is properly protected (HTTPS, http-only cookies) and the attacker has no physical access to your system. Insofar  binding a cookie to an environment should be more seen as an additional protection layer in case the other layers somehow fail (which they hopefully don't) and not as the single layer which protects against session theft.


What security risks do you face when connecting to a server via RDP? What security risks do you face when connecting to an (possibly foreign) RDP server? Opening an unsigned RDP file triggers the following warning:

RDP is a one way street, right?

If the server's identity cannot be trusted, it is possible that you are subject to a man-in-the-middle attack. If that happens, an attacker can potentially read and/or alter your RDP traffic in either or both directions.

Having a MitM on RDP is just as bad as dealing with one on a web session, if not worse. Anything you send to the remote system - keystrokes, mouse activity, file/clipboard transfers, etc. - can be monitored and recorded by the attacker. Additionally, the same can also be altered by the attacker. Traffic coming to you is just as vulnerable. The attacker can see and hear all of the output from the remote system, as well as possibly alter it in transit. They could use this to inject malicious payloads into file/clipboard downloads or take over the session. Any local resources you share (e.g.: printers, local/networked drives, etc.) are put at risk as well.

That being said, most of these warnings are probably benign. The most common reason for seeing this is because the system is using a self-signed SSL certificate instead of one from a trusted Certificate Authority. This is the default configuration for all Windows systems, and usually is not changed except in very security-conscious business environments.

If you want to be sure whether you can trust a self-signed certificate, you need to check the certificate on the system locally first. Note the certificate's fingerprint while logged in locally, then compare it to the fingerprint of the certificate presented over RDP when you try to connect.


Access Control Techniques Dear all members of Information Security, this is my first post here and I hope I came to the right place. I am currently studying about access control techniques and I am struggling to visualize and conceptualize the ideas.

Following is a set of techniques I have been reading about:

Access Control Matrix
Access Control Lists
Access Control Capability
Role-Based Access Control
Rule-Based Access Control

I feel comfortable with [1][2] and [3]; partially comfortable with [4] and completely lost with [5]. What I mean by comfortable is that I understand basic concept behind the technique but don't have a practical example of an implementation.

I would be happy with a clear definition which could assist me in visualizing these ideas. Ideally, I would be interested in visual type of information which could assist me to establish conceptual understanding. Bonus, if someone could describe concise practical example.

Definition
Rule based access means that your privileges are computed based on rules. The rules are logical formulas based on 1) user attributes like: job position, clearance level, job title, job description, geographical location and so on and/or 2) physical things like ip address you log on from, weekday, whether you're on vacation or not, ...
Example
You're a power user of software product ABC. The product uses rule based access. You have some strong privileges that allow you to do XYZ on objects which are assigned to the same geographical region that you work in. These privileges are only effective if:

your client IP is in some IP range (which excludes doing stuff from at home through VPN)
It is monday - friday between 8am and 6pm.

So the rule to be granted a certain privilege would be in this example

ip == 10.10.1.0/24 and workday <= friday and workday >= monday and timeofday <= 6pm and timeofday >= 8pm

and such a rule could also check things like job position, which is relatively straightforward if it is an alphanumeric code from the HR system which immediately identifies you as poweruser for that particular product.