Can you type your own keys? Instead of generating keys, is it possible to type your own? For example, could all the characters be A's for example sake. Or do they have to be generated because they are based off of prime numbers or because it would be to hard to create a matching public key as well?

For RSA there are special requirements on how to formulate a key. Primarily (pun not intended) you need the p and q values, which are large primes.

There are, however, schemes (see here and here) which can be used to deterministically generate asymmetric key material from a passphrase.

The easiest way to achieve such a goal is to take a known-secure PRNG design, then seed it only with data derived from the passphrase (e.g. bits from a PBKDF2 or scrypt hash), then use it in your RSA key generation when picking the p and q primes (this is quite well described in the RSA wikipedia article). This ensures that, given the same passphrase, the same random number sequence is always produced during key generation, leading to deterministic keys.

However, there are certain security drawbacks, primarily around key complexity and memorisation issues compared to the comparative entropy of more traditionally random key generation.


Preventing softwares from leaving traces in Windows | deleting the traces easily Say I open a .doc file from my UFD. I want to avoid leaving any traces in Windows (e.g. recent files, back-up files, swaps, etc) , or at least be able to delete all easily. So in this case, I want to isolate the MS Word and prevent it from having any contact with Windows, or gather all the traces in some virtual space so that I can delete all of it easily.

Is this possible? What is it called? Is there any Open Source software to achieve that?

You're going to have a hard time doing this - Windows is pretty well known for spraying information about what files you've accessed and the contents of those files all over the disk. For a start, even having it on your system might get it indexed, which means its contents are already copied over to the index database before you've even opened it.

One option for actually opening it is Sandboxie, but even that's not a solid solution if the OS is actively caching copies of it to the volume shadow copy and index databases.

My suggestion would be to set up a Windows VM inside a TrueCrypt container, save a snapshot of that VM, then load the sensitive documents in and read them. Once you're done, revert the snapshot back. If an attacker later compromises your system, they'll only see the encrypted TC volume. If they force you to decrypt it, there's a good chance that the snapshot revert has wiped all traces of the document and your access to it from the system.


Any CTF sites besides CTF365 I am looking for free ctf sites like ctf365, but I want a challenge and not vulnerable-by-design machines. Any references?

Here there are a lot of .iso containing ctf:
https://www.vulnhub.com/
there a lot, some are stupid , others are more interesting.

Then there is exploit-exercises.com that has some very good ctf box.
Another is www.root-me.org that has a lot of challange and some ctf too.
Anyway, a ctf that is "not vulnerable by design" doesn't exists. You can take some open source project and try too find some vuln, or maybe look
for https://bugcrowd.com/ , that lists all bug bounties


What is the added security of “PermitRootLogin no” alone? Referring to this Q&A:
The setting PermitRootLogin no alone does not prevent su - after logging in as a normal user.
As described in the referenced answer, there it is possible to prevent su with additional  measures.
The question arises, though, what does PermitRootLogin no alone achieve?
The only thing I can think of is some extra traceability:

ssh root@somehost -- we don't know who attempted / logged in as root
ssh joe@somehost su - -- we know it was joe who attempted to get root privileges

Are there any other benefits?

The setting PermitRootLogin no alone does not prevent su - after
logging in as a normal user.

Your statement assumes that any system is configured in such way that all users in this system are allowed to use sudo and that any user is allowed to executed any command via sudo. This may be the case in some systems if administrators don't care about security. But if administrators do care, sudo is configured very fine grained, only some users are allowed to use sudo, and in via sudo they are allowed to execute only some commands. The number of users that are allowed to execute su via sudo will be kept as low as possible, and this sudo permission will be given for a relatively short period of time. In case of on premises server one would login locally as a root and give sudo su permission to some user. In case of remote or virtual server an administrator would give sudo su permission via corresponding remote control tool. After the work that required su permission is done, this permission would be revoked again.
Thus, if an attacker was able to log in via ssh using some non-root account, and this user has very limited permissions in sudo, or even no sudo permissions at all, then the potential problems will be usually relatively limited compared to what an attacker with root permission could do.


OpenVPN client can still connect to the server after client's tls-auth key has changed I'm currently getting familiar with OpenVPN by building and testing some client–server infrastructure using VMware workstation.

This is what I've recently noticed: if you manually change some values in client's ta.key, you still will be able to connect to the server, no errors or warnings appear in the log during the connection process.

Example:
My current key, which is the same on client and server side looks like this:

  -----BEGIN OpenVPN Static key V1----- 135e25bb334841d0144bc9cada39d8f4 dc4185d5d78289e6b449d2616d808baa 149a110f3985d5b5698d0766f0e91826
  96fd9f886210f30cd4198713f7e5268d 02d5b88276e36c0152a1e117e02b02f5
  3918ddfaead2efa1760224024f9426dc 02e4f660da96c22fa9256374b72d5e95
  f0f154fb5acb65af4934e17a31d0bab3 1c96053d7c9ffac4e91da542bdff3bdc
  146b3dc28f484609d8d2b95e6b7b9ecb 0919f3a7bd1275810da8851b8699ab2c
  3d4f03e54ad77ec4a8b76cebfeac98d1 4c81af32861be3c396469710c0cfe4ea
  4b8285dd5dd925d2c4a9ba976ea137da cdaf8af33d0a69a341df41d1873f8e0f
  f30627ac336f6dd4dfe607efdf135740
  -----END OpenVPN Static key V1-----

Now, on client's side I make some changes to it, say, set first and last 4 values to 0, so it looks like this:

  -----BEGIN OpenVPN Static key V1----- 000025bb334841d0144bc9cada39d8f4 dc4185d5d78289e6b449d2616d808baa 149a110f3985d5b5698d0766f0e91826
  96fd9f886210f30cd4198713f7e5268d 02d5b88276e36c0152a1e117e02b02f5
  3918ddfaead2efa1760224024f9426dc 02e4f660da96c22fa9256374b72d5e95
  f0f154fb5acb65af4934e17a31d0bab3 1c96053d7c9ffac4e91da542bdff3bdc
  146b3dc28f484609d8d2b95e6b7b9ecb 0919f3a7bd1275810da8851b8699ab2c
  3d4f03e54ad77ec4a8b76cebfeac98d1 4c81af32861be3c396469710c0cfe4ea
  4b8285dd5dd925d2c4a9ba976ea137da cdaf8af33d0a69a341df41d1873f8e00
  f30627ac336f6dd4dfe607efdf130000
  -----END OpenVPN Static key V1-----

And surprisingly I'm still able to connect to the server. Only if I generate a completely new key with
openvpn --genkey --secret ta2.key command and use it instead of old one, only then I will get error when trying to connect to the server:

  Fri Sep  7 11:33:04 2018 us=232609 TLS Error: incoming packet
  authentication failed from [AF_INET]192.168.1.2:33596

  Fri Sep  7 11:33:12 2018 us=212985 Authenticate/Decrypt packet error:
  packet HMAC authentication failed

So, how is this even possible? I thought that changing a single bit in the key should lead to authentication error, but it does not. Any ideas?

--

OpenVPN version, if needed:

OpenVPN 2.4.0 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Jul 18 2017

https://community.openvpn.net/openvpn/wiki/327-changed-hex-bytes-in-the-static-key-the-key-still-connects-to-a-remote-peer-using-the-original-key

In short, the key is overly large. Not all portions of the file is actually used in current implementations.


Why add "***" in user-agent in this malicious code? I found the following in every index file of my sites on a server I have.  It looks like its redirecting all android users to some spooky Russian site.

$ua = $_SERVER['HTTP_USER_AGENT'];
if(stripos("***$ua",'android') !== false){
header("Location: http://andsecurity.ru");
die();
}

My question is: In the stripos function, they add three asterisks in front of the user agent variable, why would they want to do that?  What does that do?

It could be due to a (previous) bad code or to avoid warnings/errors in responses.

stripos returns the possition of second parameter in first one, starting indexes at 0, so in a bad code if (stripos($ua,'android')) the condition would be skipped as false in the case the string started with android.

Correct solution would be using === and !==, but prepending a string that wouldn't match prior to the test string, makes any match to be at least at value 1 (3 in this case), avoiding the need to use !== false.

It also covers the case where user-agent is missing to avoid any kind of warning/error at running time.


Encrypting a salted password hash with RSA before storing in a database Why is it a bad idea to encrypt a salted password hash with RSA (or maybe other public-key algorithm) before storing it?

As you mentioned in a previous question, the goal of encrypting a hashed password is to add pepper to it, to make it harder (even impossible when a good pepper is used) to brute-force passwords, in the event that the database is breached.
Adding a pepper in a password-hashing function and symmetrically encrypting the hash are functionally equivalent. To obtain the recommended level of cryptographic security, the pepper or the key should be at least 128 bit long and chosen from a cryptographic strong uniformly random source.
Adding the random key as a pepper in the hashing function provides benefits over using the symmetric encryption of the hash:

The key does not need to be derived to ensure it conforms to its requirements by the encryption algorithm. The hashing function will take care of that.
It is less computationally expensive, while providing exactly the same amount of security. Moreover, most encryption libraries are made to encrypt messages of varying length, while using the fixed length of the hash equal to the block size of the encryption algorithm could allow optimizations (no padding for example). So, using a encryption library could introduce an useless overhead, even though it's better to use a library rather than rolling your own cryptography.
It avoids to make mistakes in the use of encryption: no padding and no random nonce to handle. No weak choice of encryption algorithm possible.
It reduces the surface of attack and the maintenance cost: by not using yet another library, one avoids the potential bugs in it and the cost to keep it up-to-date.

Using asymmetric encryption, such as RSA, adds the following drawbacks over just hashing with a pepper:

It still needs a symmetric cipher, so all the previous points about symmetric encryption applies here.
The recipient and sender are the same: it's the server. Both the public and private keys are in the same hands. Asymmetric encryption is a functionally useless layer over symmetric encryption here. See nobody's answer for more details on this point.
It adds yet another algorithm, one that is far more error prone than symmetric encryption, as history has proven. Even cryptographers often make mistakes when using asymmetric encryption.
Asymmetric encryption is rather inefficient (read "slow"). Especially RSA, which is very slow and needs a very long key.
No optimization possible: the use of random nonce and correct padding handling is unavoidable. This is hard and a lot of cryptographic library fail here. Do not assume your code is safe even when correctly using a library: most continue to use PKCS#1 v1.5 padding, even though it has been broken for more than 20 years. That's only the most common vulnerability, but others are often found.

On the other hand, in my knowledge, encrypting hashed passwords offers no real benefit over adding pepper; assuming the pepper is handled as a symmetric cryptographic key.
Claimed benefits cited by the OP in his other question are:

From stackoverflow and from security.SE: One can rotate the encryption keys. However, once the database is breached, that is useless: either the encryption is good, and changing the passwords or rotating the key is useless; or the encryption is weak and the passwords need to be changed.
From stackoverflow: Encryption is more secure than hashing. That's wrong.
From stackoverflow "since he knows the salt and the output, he can brute force the pepper" The same applies with encryption. This is not an issue with a pepper handled as a key.


vulnerability scan process management. I am looking for some open source tools to manage data from vulnerability scans. My company uses Tenable Nessus, Mcafee vulnerability mananger, acunetix, appscan for vulnerability scans. However it is extremely difficult to review output from multiple tools and generate VA report from it. Also it is very difficult to track closure of these VA findings.

Looking for some tools/methods to manager VA scan. recently I have come across tool called Openfisma but not sure whether I can use that in carporate but this tool can take xml output report from VA tools and generate report from it and helps in effectively tracking the same.

Can i go ahead and use Openfisma or is there any other tools available to consider for VA audit management?

Awaiting your reply..

The openfisma site is pretty bad and there is little action in the forums, plus the last release is from June 2013, plus you cannot login to their demo. Putting all that together, I'd be cautious. However, it still might be worth looking at.

I can't see any glaring reason why you couldn't use it, provided you check it out well.

I've been writing a similar tool for my work environment as I found a similar problem. I can't share it with you (at least not at this stage). It is pretty specific to our needs and may not suit anyway.


Can a client application volunteer to send a certificate? When testing our c# application with a service from a new supplier our request was denied because the client certificate was not send.
Network traffic with a service where our application is known to work with shows us this:
Client Hello
Server Hello, Certificate, Certificate Request, Server Hello Done
Certificate, Client Key Exchange, Certificate Verify...

The service asks the client for a certificate and our client sends it.
In the situation where the certificate is not send traffic looks like this:
Client Hello
Server Hello, Certificate, Server Hello Done
Client Key Exchange, ...

The service does not ask for a certificate and the client does not volunteer one.
Question is: Can a client send a certificate without being asked for one?
No, according to this: https://stackoverflow.com/questions/31200348/mutual-ssl-authentication-with-wcf-no-certificaterequest-and-certificateverify
By stating: A common confusion that I noticed while looking for a solution is that many people believe that the client can send the certificate if it has it, unchallenged. This is, of course, not the case - the server needs to ask for it first
Yes, according to this:https://stackoverflow.com/questions/49024391/when-do-i-need-negotiate-client-certificate-to-be-set-to-enabled#:~:text=The%20Negotiate%20Client%20Certificate%20setting,the%20web-server%20is%20negotiated.
By stating: *IIS has two ways to negotiate TLS: Where the client sends the client certificate in the initial request. This is useful when all resources on the server require TLS client authentication.
Where the client doesn't send the client in the initial request, but later after IIS performs a TLS re-negotiation. This is useful when only some resources require TLS client authentication.*
Now which is right?

The client will only send a client certificate when requested by the server. This CertificateRequest can be sent by the server in the initial TLS handshake. But it can also be sent in a later renegotiation (up to TLS 1.2) or post-handshake authentication (TLS 1.3). This is typically the case when only some resources on the server require client certificates and the requested resource is only known after the initial TLS handshake.


Finding the cipher suites supported by a web server So I need to find the cipher suites supported by a website. Now I can use this NMap script however this problem is research oriented so I need to write a code in order to collect the data automatically and parse it for research purposes.

Is there any library for C#, Java etc. that can do it.
Thanks.

Thomas Pornin has published a command line tool written in C# that does this, among other things. You can find the tool here. You should be able to easily modify this into a library.


Store github credentials I am new to the security section.

I want to write a cross-platform Java Desktop application which ask a user for their credentials
and connects to their github account.What I want to do is If the credentials they provided are correct to store them in the disk.

What I would like to know is:

Where to store their credentials
Do I have to encrypt their credentials
What kind of encryption do I have to do
How do I decrypt their encrypted credentials

Also if possible I would like not to store user credentials into a database.

I would like a detailed answer with proper explanation if possible so I can learn and improve my knowledge

So, firstly I would avoid storing credentials for a third party at all if you can. As S.L. Barth says in the comments, look at OAuth (https://developer.github.com/guides/basics-of-authentication/) and then you don't need to know the creds - it's more secure for your users, it's less hassle for you - there's reduced liability if you are breached.

If you must store them, then yes you must encrypt. This isn't optional, you just can't store passwords in plain text and you can't hash them as they need to be reversible so you can send them to your third party. Look at the Rijndael AES suite, it is available for Java. There's a post on Stack Overflow about encryption with Rijndael. https://stackoverflow.com/questions/587357/rijndael-support-in-java

Where you store them is dependent on your application architecture, your users may have unrestricted access to your storage location on a desktop application, this is why it's critical the passwords are properly encrypted.


How does the client pick the correct certificate from its certificate store? As I am able to configure my SQL Server and client to establish SSL connection,
I have installed the certificate on the server as well as on the client machine (Trusted Root Certification Authorities store).

If I have only one certificate on server and client, it is working fine.

Now my question.

If I have multiple certificates on both machines then I need to attach the certificate to the SQL server which I want to use, but I am not telling my client which certificate to use. Then how does the client pick the correct certificate from its store for handshaking with SQL Server?

Does it loop through all the certificates from its store and get the one matching with the SQL Server's certificate?

How does the client identify the correct certificate (generally it exchanges the public keys from the certificate) from its store?

Is there any way to configure the client to use XXXX certificate for the SQL Server 1 and YYYY certificate for the SQL Server 2?

The sever sends its certificate during the TLS handshake
 and the client verifies its trust path.

In the first step the client matches the common name (CN) field with the server's hostname (it does not compare the certificates).

Then the client verifies the trust path, i.e. whether the certificate presented by the server is signed by an entity whose certificate is in the trusted root certificates store (again: it does not match the certificate directly)

if you use a self-signed certificate and add it to the store, then the verification is successful when server's certificate is in the store itself;
if you use a (self-signed) CA, then the verification is successful, when signing CA's certificate is in the client's trusted store.

  Does it loop through all the certificates from its store and get the one matching with the SQL Server's certificate?

Remember the client is not trying to match the two certificates (sent by server and stored on the client), but to verify the certificate used to sign the sent certificate.

As for the process itself, you can think of it this way, but whether it checks the trust path by looping through all entries or uses an index to speed up the process, is an implementation detail that does not really matter to the user.

  Is there any way to configure the client to use XXXX certificate for the SQL Server 1 and YYYY certificate for the SQL Server 2?

The client will verify the trust of the certificate sent by the server during the handshake phase. So effectively they will be different for SQL Server 1 and SQL Server 2 and it will work the way you described without any additional configuration.

As a sidenote, you shouldn't be really managing by adding a self-signed certificate for each server separately, but create a CA and sign sever certificates using it. Then you distribute only one CA's certificate to all clients.


Why are certificate chains different in Firefox and Chrome? I have a server with HTTPS, and I noticed a very strange behavior which I cannot understand.

When I checked the chain in Firefox, there is this:

But in Chrome I see this:

So it's clear, that the paths are different (4 vs. 5 items in chain). In more detail it seems, that the certificate "Trusted Root CA SHA256 G2" has one different parent certificates.

When I checked the chain using portecle there are also 5 items in chain.

My question is: Is the chain built based on CN/DN? While this is, I'd say, just a name, it seems weak... Does someone know where the difference is coming from?

edit: Thanks to Marko's question I realized one important thing that I didn't highlight, sorry.

In those two chains, there is certificate "GlobalSign", which seems to be correct, but in Firefox chain, the serial number of the certificate is 04:00:00:00:00:01:21:58:53:08:A2 but in Chrome's chain the cert with same alias has serial number 04 00 00 00 00 01 25 07 1d f9 af, so what is concerning is, that "Trusted Root CA SHA256 G2" certificate has different parent certificate.

It is probably that Firefox and Chrome decided to trust certificates on different levels.
Chrome trusts "GlobalSign Root CA" and it chains certificate all the way up to root one to check its validity, but FireFox trusts "Trusted Root CA SHA256 G2" and there is no need for it to check all up to root one to tell you if that browser trust it.
So if both browsers returned that chain is valid, it should be ok.
Chains is build on Parent certificate SIGNING child one, and verification of signature can only tell if the path is valid.
Hope this helps!

edit:
Well ,certificate aliases are not unique, so one CA can use same name for many of their certs. For example one CA I worked with used multiple intermediate certs with same aliases for issuing client certs for different periods of time. So in this case, they would have same alias, same root, both be valid, but still have different serial numbers or expiration time or other. So, it does not matter what aliases or serial numbers certificates use, only that they all chain up to one root certificate you chose to trust. In this case, there can be as many chains with same names that all lead to GlobalSign Root, and if you trust that root, and that signature chain is valid, path to it does not matter.
Hope this helped your concerns.


SOP for SQL Injection Attack What should (or) how an Incident Handler do (or) follow when an SQL injection attack is reported?

Initial Response
Analysis
Action

Aiming to make a procedure guide to follow for myself and my team. Brief or detail, anything would help.

1) Initial Response can be taking the particular module/section of page offline or patch it on IPS or WAF. After that you should check the same yourself first with any web-proxy like Burpsuite or ZAP, if the reported vulnerability is false-positive or a real threat. You can also use a tool called SQLMAP to reduce the effort in verification.

2) For analysis part you can see, what sort of data you are able to get using that attack vector. Also you can see what roles are assigned to the web user and what privileges are granted. Depending upon the exposure and impact of vulnerability, you can decide the action.

3) For resolution, You can put server-side validation on the input vector. Also you can change the SQL statement in actual code to Parameterized SQL Query. A detailed procedure for mitigation can be found here. https://www.owasp.org/index.php/SQL_Injection_Prevention_Cheat_Sheet

PS: To prevent this from happening you should consider source code analysis at the time of development and after build is complete a dynamic application testing or Penetration Test. This will reduce the surprises in real-time.


What type of CA is "Management CA" in EJBCA? In the EJBCA documentation I found a CA named Management CA. I would like to know what type of CA this CA is. Is it a RootCA or subCA?

EJBCA requires client certificates to allow administrators to log in to its user interface. The Management CA issues these certificates as well as the default TLS certificate for the interface.


Warn about specific CA in Firefox Consider a setup where all HTTP/HTTPS traffic goes through a proxy. The certificate of this proxy must be trusted by all browsers (in this case, Firefox). This certificate replaces the original certificate for all HTTPS connections to hosts which are not in a whitelist maintained by the sysadmin. As such, all HTTPS traffic to non-whitelisted hosts can be inspected at the proxy.

To check whether a connection has been whitelisted, I can simply right-click and go to View Page Info → Security to see the "Verified by" field. This is a bit of a cludge, and I don't want to have to go through these steps manually for every HTTPS connection. So how can I display the certificate issuer for the current connection at all times in Firefox?

With Firefox 5.0 (at least - not sure about previous versions...) I'm getting exactly this type of information every time I put the pointer on the left side of the address bar, where the site logo is displayed.

(the pointer is missing in the screenshot but it's over the amazon logo)

Which Firefox version are you using?


How comprehensive is CPE? How authoritative and comprehensive is NIST's CPE, as a list of applications, hardware and operating systems? It's clearly a vast labour for which I am grateful, but I need to know how good it is.

Specifically, I am wondering about coverage of manufacturers (inclusion seems a bit optional, particularly for Open Source), products, depth of versions (e.g. RHEL 6.x sub-versions all listed but version 5 mentioned without sub-version lists), naming (e.g. Red Hat vs RedHat), and currency (how quickly do new products find their way into the list?)

It seems hard to measure or define just how comprehensive the list of manufacturers or products are - you would need to somehow measure it against an even more comprehensive list

For naming, they have produced a Naming Specification detailing how the process works:
https://csrc.nist.gov/publications/detail/nistir/7695/final

For currency, again you would need compare against some other source of data but you could spot check specific items.  It is updated very frequently - there is a consistent pattern of a large number of updates going back many years, which you can see here:
https://nvd.nist.gov/products/cpe/statistics


Security risk of adding a HTTP Header with server identifier We are about to deploy a web application to a web farm of quite a few web servers. During our testing we have found issues happening in one of the servers but not in others. Most of them because of misconfiguration in the web servers.

Identifying the server that is misbehaving turns out to be time consuming. I thought about adding an HTTP Header to the response with a server identifier. That way we can quickly see from the browser what server processed the request.

Say our web servers are named following the pattern:

prodweb1
prodweb2
prodweb3
and so on

The response HTTP header for prodweb1 would be:

X-ServerID: 1

and for prodweb2:

X-ServerID: 2

Is there a security vulnerability in specifying in the response the server that processed the request? Could someone take advantage of this in some way for an attack?

Does this disclose more information to a potential attacker?  Yes.  Does it make you vulnerable to an attack that you weren't vulnerable to otherwise?  No.  You may have helped them attack you a bit quicker.  However, they still have to find a flaw to exploit.  Really, you are just as secure as you would have been without using a load balancer (or more correctly you are as secure as using one server behind a load balancer as the load balancer could be attacked as well).  Is the point of the load balancer security, or to allow more load than a single server could handle?

Now, you probably already log access requests in log files or a database of some sort; typically storing things on each server like IP/time stamp/GET request/HTTP status, Response Size, and User Agent string.  Would it be possible in debugging to run a quick grep over the relevant logs to identify the server that's not performing?  E.g., change the User-Agent in your browser while testing to something like "DEBUG_14_Feb_2013", search for that User-Agent in all the logs and identify the server + requests that are malfunctioning based on response size or timestamp or IP?

Or maybe you could turn this HTTP header on, but only while debugging by having a flag set received from the load balancer (or alternatively set at each server), so its only displayed when you are actively debugging an issue?


How to verify my connection is not going through MITM proxy? I realized the issue a MITM proxy can pose to my privacy and I started to dig into it more to see how to detect it as a client. Things I know to check so far are:

Checking who issues the certificate and see if it is a self-signed one installed in my own root certificate store.
Checking if I am being served web content from a local IP instead of the outside server IP and if the local IP is always the same.
Checking if my system proxy settings are configured to localhost.

My questions are:
Besides certificate pinning, what else can I check if all of the above is negative but I still have reason to believe I am being MITM proxified? Case in point: Avast claims they use a MITM proxy to scan all web traffic except white-listed URLs of some banks but I am not seeing any of the usual singes of MITM being active. I read somewhere that they could be reading directly from memory but that sounds expensive to implement and maintain if they already bundled a MITM proxy in their product and tell openly that they use it? Is there a way for a MITM to run without triggering any of the listed checks? Some kind of transparent MITM proxy for Windows machines?

Of those three points you mentioned, none of them can be used to reliably detect a Man-in-the-Middle attack.

  Checking who issues the certificate and see if it is a self-signed one installed in my own root certificate store.

All of the root certificates are self-signed. That, and the fact that they are capable of being Certificate Authorities, is what makes them a root certificate.

What you can do, however, is compare your certificate store manually with a known good certificate store. Microsoft and Apple, for instance, publish which root certificates they trust by default. If your configuration varies inexplicably, it may be a sign of compromise.

Of course, in a company environment, your IT department is very likely to have their own CA, which they deployed on your machine. So check with them if you worry about a company computer being compromised.

  Checking if I am being served web content from a local IP instead of the outside server IP and if the local IP is always the same.

If you are in a home network, you don't get the content directly from the web server, but instead have it routed to you over many network nodes. Each one of those, theoretically, could change the source IP address.

Imagine your home router was compromised and would conduct a Man-in-the-Middle attack. They could, theoretically, just change the destination of your IP packets and have them end up at the attacker. Upon replying, the router could then mangle the packets back, making them look as if they came from the correct source.

Of course, this would be noticeable, since if you use HTTPS, the attacker will likely not have a valid certificate for the site, unless they also have installed a compromised root certificate on your machine.

  Checking if my system proxy settings are configured to localhost.

The system proxy settings are only relevant for applications that care about them. In fact, an application can simply decide not to use the system proxy settings. This is vital, because otherwise, proxies running on localhost would try to call themselves and end up in an endless loop.

Furthermore, a proxy configuration only instructs your computer to send all traffic to the proxy, expecting the proxy to take care of the responses. This is, in essence, the same job as a router. As such, if your traffic goes through a router, you can think of them as a "proxy" of sorts. Of course, that's not entirely true, but for the sake of brevity, it's close enough.

However, if you see a proxy configuration that you didn't put there, it can be a sign of compromise. It doesn't need to be to localhost, however.

  How can I detect a proxy if the above things look normal?

You probably can't. If you are completely certain that no strange root certificates have been installed, then you likely are not being attacked with a Man-in-the-Middle attack. Or at least, you would know about it, as long as you use HTTPS. For plaintext communication, you have no way of knowing at all.

  How can Avast use a Man-in-the-Middle Proxy to scan websites, even if I see no evidence of it?

A number of things may be possible:

Since you installed Avast, it may have installed a root certificate.
Since anti-virus software loves going really deep into the OS, it may have inserted a proxy system that every connection has to follow, even if not visible to the user.


Is it possible to login on an machine with keylogger installed without compromising your password? Suppose a scenario in which you have to login to a public/friends pc which has a keylogger installed. You need to login from that pc. Will it be possible to escape compromising your passwords if you know in advance that the machine is infected.

Taking into account that different keyloggers have different functionalities, still I think it must be possible to reduce the probability of password being compromised or at least making it more difficult to decode the password. Some naive thoughts that come to my mind for achieving this are:

Inputting wrong password and then using backspace key in combination  with mouse clicks to make it correct.
Inputting half of password using step1 and half password using virtual keyboard..
Keeping a pendrive, and using it to executing a script to enter password, thus implementing keepass like functionality..

I think that using these points might be helpful to some extent.

What do you think we can do to reduce the chances of being getting compromised?

Go on your phone and change your password to a random one
Login on the compromised PC using the random password
On your phone change the random password back to your normal one


How to discover if there is someone else connected to my wireless router? I have a wireless router (WPA/WPA2) that is connected to my modem, so I can use wi-fi internet on my laptop. So, I'd like to know if there is any tool that allows me to discover if there is someone connected to my wireless router and if this tool allows me "kick" this person out of my network.

I'd prefer a multi-platform software, so I can use it in Ubuntu and Windows 8.

Most WiFi routers have a browser-accessible admin interface (usually supplied with default passwords, that need changing...) showing connected clients. There is not, usually, a way to "kick them out", but there is a "MAC security" option. Not really so effective, since tools exist that allow modifying MACs of WiFis, but you can tell your router to only accept connections from your laptop's MAC address.

Since the interface is HTML/JS, it is naturally multiplatform. To "kick someone out", though, you need to reset the device (this also can be done remotely), thus kicking everyone out, and being then the only one to be able to get back in again (in such a scenario, also change the WiFi password!).

By default, most routers expose the interface on their own LAN IP, so you need only point the browser to, say, http://192.168.0.1/ , or whatever your gateway address is.


Archive encrypted traffic, for later decryption attempts? I am concerned about sending long-term sensitive information over SSL. Someone who does not have the private key could record SSL traffic (with WireShark, Fiddler or some such) and store it for several years. They would not be able to decrypt the traffic now. But later, when attacks against SSL have progressed, or when computers have become faster, they might decrypt the traffic that they have recorded.

As I understood of Google they are into temporary SSL because of such reason (the topic). Is this reality or just a way for companies to sell, by the name of security?

I may state something wrong or nearly wrong here, because i'm not super-familiar on the context. I'm glad of help if I misunderstood something or if there are details that worth extra explanation.

This of course also apply to traffic that are compromised with XSS or other  ways with similiar result (listen on someones traffic).

  As Google stated in their reasons, within 10 years the computers will be
  strong enough to decrypt this traffic. I'm sorry I do not have a link to
  an English news page on this topic. Does this mean
  that our traffic can be listened on today and be archived? Then when
  the time is right, the data is decrypted by brute force, even if the
  eavesdropper has not been able to obtain the private key?

Do we need to care? When and how? May it apply to other situations then just http traffic, where data are transferred encrypted with a very high trust (by human)?

Nice question.

I'd say we can only worry, but not do much. We can secure our data by today's standards, but tomorrow might change the whole ballgame. If quantum computers really can brute-force ciphertexts at a speed magnitudes higher than what we can do now, than a 128-bit block cipher could suddenly be peanuts. But what can you do about it?

Perhaps you should not digitally transmit information that will still be sensitive/harmful in 10 years time...


If I backup my files to "The Cloud", will they be kept there forever? I have a lot of information to backup, this includes accounts passwords, personal files, images and a lot more. So I was thining about backing up everything using a cloud service like Dropbox, Google Drive or OneDrive.
My question is: Is this secure? Are these services always going to keep my files "forver"?

"The cloud" is marketing-speak for "other people's servers", so I will use that term instead.

When you move your data to other people's servers, you need to be aware that they have direct access to your data. When they are not trustworthy, they are able to steal your data. Read the privacy policy of the people you give your data to. Many people do not give you any guarantee that they won't look at your files and might even share it with third parties for fun and profit. This is usually worse with people who offer you to store your files for free. Remember: When you are not paying for a service, you are not the customer. You are the product!

A sensible precaution is to encrypt your files before you upload them to other people's servers, so that they can't see the content. But then you are responsible for remembering the decryption key. Lose your password and you lose your files. You might also miss out on some convenience features other people's servers provide, like viewing your files online, sharing them with others or automatic versioning.

Also, read the terms of service in regard to availability. They might not guarantee that their service will be available forever. The people might reserve the right to delete your files from their servers with a very short notice or even no warning at all. This is, again, usually worse with people who don't want any money from you. But even if they give you a written guarantee, that guarantee is worthless when they go bankrupt and have to sell the servers you have your data on. Taking legal actions against a bankrupt company is usually pointless.

However, when you believe you can trust these people, having your data on their servers can even have a security benefit. People who provide such services as their primary business model usually(!) have lots of know-how about how to properly secure a datacenter against logical and physical attacks. When you lack the know-how and resources for proper IT security precautions, letting someone else handle your files might not be a bad decision. But you should do your research about the security track record of the people whose servers you are storing your files on.


Save Password length after hash to minimize calculation Reading this topic How critical is it to keep your password length secret? following scenario comes to my mind:

Assume I've a web application (PHP written using password_hash()) using salted password hashes to save user passwords. A user tries now to login. The server now has to do some tasks:

Calculate hash of provided password (of course with cost factors)
Compare hash with saved hash

Assuming that I can save the length of a password without any security issues, I could change the taskflow:

Compare length of provided password with saved length (does not match -> return)
If match calculate hash of provided password (of course with cost factors)
Compare hash with saved hash

What do you think? Would this be "economic" because I save computing time/resources (or does it slow down the process overall, because it would only save time if no valid password was provided)? Or would that be an security issue?

Yes there is a security issue. You stand the risk of inadvertently leaking the length of the passwords using this approach.

An attacker could abuse this to determine the length of a password using a form of timing attack.

Since calculating the hash is computationally more expensive than comparing the length of the provided password with the stored length we can assume that the length comparison will execute much faster than the hash calculation and comparison and therefore return a result to the user much faster (we are speaking about milliseconds here - but what is important, is that it is measurable).

Now, the attacker can simply start submitting passwords of different lengths and measure the time it takes to get a response (adjusting for network latency and other factors) and measure the response times. Since the server will take longer to respond when actually comparing the hash the attacker will know that the length of the password is correct when the response is relatively slower than in previous guesses. Having the length of the password then makes it much easier for the attacker to start guessing at the correct password.

If computation on the server is really an issue for you, you can mitigate this risk by ensuring that the response is only returned after a fixed amount of time. This way the time the response takes leaks no information to the attacker as it has no bearing on what computation is being made in the background.

Everything considered I'd say that the risks of doing something like this definitely outweighs the rewards.


Are 2FA soft-tokens flawed if the user can log into the website from the same mobile device? If I'm using something like Authy for soft tokens for my users, and they log into the web application on the mobile device itself, haven't they just lost the benefit of 2FA (ie loss of the mobile phone by itself may result in compromise of both factors)?

If so, is there any reliable way to prevent users authenticating on the same mobile device (or even on any mobile device)?

edit: I've discovered that Authy (at least on iOS) allows you to set an access PIN, which helps for trusted users. Now if there was a way to enforce that a PIN is set I'd be completely happy.

Yes, it loses some of the protection since it fails to protect them if the device is thoroughly compromised.  It still, however, protects against any number of limited attacks.

For example, if they are configured to connect through a proxy that can strip the encryption, the 2FA will remain safe.  If the password DB is compromised somewhere that they used the same PW, the 2FA will remain safe.  If they use the account on another computer sometime and that computer is compromised the 2FA will be safe.

A thorough compromise of the phone is a failure case, but it is only one of many possible failure cases.  It is worth advising the user that it is ill-advised to login on the same device as they use for the 2FA, but ultimately, it still does provide significantly more benefit than having no second factor would.


Are temporary files an issue when opening and editing an encrypted 7z file? I am new to security and encryption. I want to store important information like passwords and pin codes so I don't forget them. So far I have been using LastPass but I would prefer a solution I control my self. From reading a lot on the net it seems to me that 7-zip with AES 256 encryption is the way to go.

But what about the temporary files while opening/editing the content?

The temporary files are being deleted (as far as I can see at least) but I guess deleted files can be recovered?

Here is the process I would use (suggestions fro improving it are most welcome!):

create SECFILE.txt on desktop
open, write, save/close
right click SECFILE.txt, add to archive...
type password, click Ok (SECFILE.7z is created same place, 7-Zip closes)
shift-delete SECFILE.txt

open SECFILE.7z, enter password
hit F4 to open SECFILE.txt in Notepad, read, close or...
edit (as you start typing a temp copy will be created)
save/close Notepad
back in 7-Zip hit Ok in pop-up to update archive

On Android (I want to be able to read my information on my smartphone too) the app ZArchiver works fine to open and read files.

My computer runs Windows 8.1 and the file system is encypted with BitLocker. My smartphone (currently a Samsung Galaxy S4) can also be encrypted and I password protect it with a pincode. But lets say somebody got access to my computer or smartphone. Would the temporary files be an issue?

TEMP files:
Z-Zip (PC): C:\Documents and Settings\\Local Settings\Temp\7z#####.tmp
ZArchiver (Android): /storage/emulated/0/Android/data/ru.zdevs.zarchiver/temp

Yes, the (unencrypted) contents of the temp file can be recovered after they are deleted (I don't think 7-Zip overwrites them before removing), so they can be a problem (assuming an attacker can the BitLocker disk, such as having administrative account privileges (not necessarily voluntarily given, it could be through a compromise) to your booted computer).

7-Zip is Open Source, though, and it should be simple to force it to overwrite temporary files before deletion.


How to detect malicious actor altering DNS responses? I am trying to detect what is causing my DNS to return fake IP addresses for domains like apple, orange, etc. which obviously don't exist.

If I do following on my Windows machine:

ipconfig /flushdns - flush DNS cache
ping apple - invoke DNS query
ipconfig /display - see DNS cache

the ping command doesn't fail and I can see DNS entry in the output.

I tried visiting http://apple on both Windows machine and Android machine (which I checked are both using the same DNS config), my Android machine can't find the domain.

My question: What could possibly be acting maliciously between Windows' DNS client and the DNS server, or how could I go about finding where the malware is installed?

Note: my Windows machine is connected to router via Ethernet, while Android device uses Wi-Fi.

It is hard for me to fully understand your question and the problem you explained.
If you mean you can access in your windows machine:

  http://apple.com

and you are presented a webpage, then something is wrong.

Because you say the same behavior does not happen in your Android and that it has the same DNS configurations of your windows machine,  the router is perhaps not the source of the problem, meaning it is not compromised

I also noticed that you flush your DNS cache in your Windows machine,  hence a DNS poisoning directly into your machine may also be excluded, unless it is persistent. There could be a malicious process running in the background and that has the rights to redirect your DNS traffic and give you some fake responses,  either from hard coded webpages pages within the malware code or from some files hidden in your file system.

After pinging apple.com you should see what the IP address is. If it is your own,  or one in your homenetwork,  then clearly it is a man in the middle attack. If it is a public IP address,  run a WHOIS request on some site that offers that service.

Finally what you can also do is install wireshark and run it while you make the ping request,  this will allow you to see where the packets go exactly.

This is not a real answer,  but without more details it is hard to provide you with one.


Benefit of Parameter Map size validation in web application controller I have a web application (Spring MVC) and have input data validation for every parameter in the controller. What is NOT present is checking for accepted Parameter Map Size. i.e When the controller expected 10 parameters and the request has 11 or 9.

I have been told that parameter size is important to check to ward off any attack or Injection i.e security pov, especially Parameter Injection. This is highlighted during scanning by ZAP where ZAP adds a new parameter query to an URL that has no request parameters.

In my opinion,checking for size can be skipped unless there is a business reason. The application will simply ignore the extra parameters and if there is any less than acceptable, the input data validation will take care of it.The size check is not adding reasonable benefit to security.

My reasoning is that the developer may only write to have 10 parameters, but the underlying framework can add more parameter. For-ex Spring MVC will add one parameter(csrf token). And any upgrade in the framework can introduce more or less of these.

So now , Question-Is it important to check for the size of the parameter map when each parameter validation is already in place? What is the real security benefit of this?

This is answered by @kingthorin in StackOverflow
https://stackoverflow.com/questions/52092548/what-is-the-benefit-of-parameter-map-size-validation-in-web-application-controll

There are a few benefits to using a size map. Such as prevention of HPP attacks, etc. You've got to weigh the maintenance headache vs. the risk of such attacks with regard to your app. ZAP adds the query param on URLs with no params in order to test a few things like DOM XSS etc which might be missed or overlooked otherwise.


Are there any known attacks (technical or social) against enterprises where password resets are scheduled on fixed (known) intervals? A company I know of has a password policy that requires employees to change passwords (on AD server) every 90 days. The vast majority of its new hires start on the 1st of the month. Thus, several hundred password resets happen on a predictable schedule. My intuition tells me that this is tactically valuable information to an attacker (I am an infosec noob).
An attacker could enhance the standard "reply to this with your password" phish with a "reply to this with your password because it is time to change your password" phish. The latter seems less suspicious because the person who wrote the message knows about the password reset policy.
Are there any other attacks enhanced or made possible by a predictable password reset schedule?
I realize that (by the pigeonhole principle) every sufficiently large enterprise with a forced password change policy will have a lot of same-day password changes.

The reason why recommendations for years is to stop passwords from expiring is to prevent people from doing what they normally do: mypasswordJune.
If you know that a large section of the user population is changing their password on June 1, then you can start creating password databases based on common patterns and adding:

summer
june
etc.

So the big threat here is credential stuffing.
Please inform the company about the recommendations to cease this practice.
The other issue will be load on the Help Desk systems. There is normally an increased number of calls when people need to reset. If there is a large block all changing their passwords at the same time, it then becomes easier for attackers to social engineer the Help Desk to gain access to an account:

Yeah, it's that time again. Look, I forgot to change it in time. Yeah,
I know. Can you reset it for me and tell me the password over the
phone? I'm not at a computer right now and I need that super-critical
email, etc. etc.

Because the call is "expected" the Help Desk's ability to suspect a problem is lower.


Scanning WordPress for security vulnerabilities I am trying to use WordPress from Azure marketplace to deploy a web app. I ran a Fortify scan on entire code base (wwwroot) which includes wp-admin, wp-includes, wp-content and other boilerplate php files.
There are various issues found like below:

What else can I do for static code analysis to detect code vulnerabilities in WordPress boilerplate code?

You should notice that WordPress is a content management system (CMS). Systems like that are designed for modifying web pages. That includes adding and modifying HTML, JavaScript, HTTP redirects etc. – and even working with databases.
Therefore, your whole security scanning approach is flawed: the findings described as security problems are within the normal operation of WordPress. It would be catastrophic if such functions were publicly available, but they are restricted with a password-based login. That's the area of security you should focus on: whether it's adequate for you or not:

Do you use strong passwords? Are there password requirements for all users?
Would you need multi-factor authentication?
Should the administrative areas be restricted to certain IP addresses?
Could the content be served as static pages e.g. from a proxy or CDN? That would ultimately limit the access to all dynamic content including the administrative tools.

Furthermore, are you responsible for security auditing open source code made by others, or just the source code of your web application project? Because this is about the WordPress core, according to Wordpress Security:

The WordPress Security Team is made up of approximately 50 experts
including lead developers and security researchers — about half are
employees of Automattic (makers of WordPress.com, the earliest and
largest WordPress hosting platform on the web), and a number work in
the web security field. The team consults with well-known and trusted
security researchers and hosting companies.

If you have better resources than that, you could find and fix security problems in the WordPress core. Please contribute the findings to the WordPress project and you'd help in securing 63.6% of the web sites in the world. If Micro Focus Fortify Audit Workbench was the ultimate solution for that, it would have already been used.


LastPass Bootstrap on New Android Phone I've been using LastPass to manage all my passwords, including the password for Google account. The thing is, on a new Android Phone, in order to sign in (for Gmail, Play store, etc), I need the LastPass app to copy password from. To get the app, however, I need to sign in Play store first. So my question is, how do I "bootstrap"?

I tried using LastPass website, and copy password from there. Yet I can not paste to the Google account login textbox--paste is not supported there.

Is there any way other than manually enter the long, random password by hand?

You can try pasting it into notepad, print it out, then enter it manually into android.

If its like 100 characters long, this is one good reason for why you may want to make it shorter.

I asked a question about how long is too long, and after 22 characters a password stop making sense.

I have the same issue. My windows account and iTunes passwords I intentionally leave somewhat weak because of this exact situation.

For a time I had facebook and gmail accounts with 100 character passwords, and it bit me in the bum in a situation similar to yours.

I've never had a problem where I wasn't able to paste into a password field, only copying out of a password field.


How does Software Defined Perimeter (SDP) protect against certains attack that happen in the browser? I have been doing a bit of research on SDP (Software Defined Perimeter) but it's still a bit unclear to me how it protects against certain types of attacks.

On Wikipedia it says that it can protect against these attacks:

cross-site scripting (XSS)
cross-site request forgery (CSRF)

And many others. But I am just wandering for these two.

If I understand SDP correctly it's a way to controller specific access to specific services/servers/etc for a user.

So how does it help against XSS and CSRF attacks?

SDP is a closed VPN solution replacing traditional VPN services like (MPLS, VPN concentrator, etc). The typical enterprise use case eliminates below pain points:

Leave their applications open to the Internet
Create an in-office VPN concentrator
Implement basic firewalling
Build their own VPN gateways
Pursue a traditional corporate VPN service

You may refer a commercial SDP solution at: https://www.perimeter81.com/software-defined-perimeter-enterprise

In my opinion, claim of getting rid of DDoS, XSS and CSRF are coming form the nature of not opening Enterprise applications to internet (users can connect through SDP with proper controls).

But this may not be applicable for services offered through internet (like eCommerce).


How to create a secure password for a Java keystore? What would be the recommended approach (industry standard) for generating a password for a Java keystore that contains TLS certificates? In the event that the keystore is obtained, an attacker would have unlimited time to brute force the password.
Would a UUID be the best approach? What is the best way to easily generate a pseudorandom one from the command line if so?

A password with 256 bits of entropy is more than enough to withstand even the most well-resourced brute-force attacks.  See https://crypto.stackexchange.com/questions/1145/how-much-would-it-cost-in-u-s-dollars-to-brute-force-a-256-bit-key-in-a-year for some interesting reading on this subject.
The command below will produce a random password with 256 bits of entropy:
head /dev/urandom | sha256sum


is it safe to AES encrypt the RSA private key and storing it in the database i'm building an app that really needs encryption of this type , my question is it safe to store the aes encrypted RSA key in the database ?

here is how i encrypt the key :

i generate a random 256 bit number and turn it to hex (this is the salt)

then i get the user password and derive a key from it using pbkdf2

i store the encrypted rsa key in the database

and i store the password using Argon2 in the database

is this safe or risky ?

It really depends on your threat model. However, properly-implemented AES encryption will ensure confidentiality for any arbitrary data, including an RSA private key. There is nothing special about RSA which would make it unsafe to encrypt using a symmetric algorithm.


Protect database data from everyone, including sys admins, etc One of the things that has always bothered me about simple database data encryption: If the server is compromised, the database is effectively compromised. The attacker can use the same code as the app to query out the data as desired. A simple review of the app code will show where/how the key is stored and what the database connection parameters are.

Of course, encrypting the data can be helpful when storing off-server backups, etc., but for this purpose the backup files could be encrypted entirely, instead of fields, saving some headaches with queries, etc.

Generally, making sure the server is secure is the best practice. But, what if the data must be protected from everyone, sys-admins included (much like the way we treat user passwords, through hashing)?

Ultimately, I'm wondering, how can an encryption key be protected, so that it is not accessible by anyone without the secret, even the application code. The only approach I can think of is the key must be provided by the user at run-time (it isn't persisted on the host machine, period).

I imagine the first issue is that if a user has access to the server, there is probably a way that the secret could be sniffed at the point of entry, or if the key is stored in memory by the app (e.g. in a session variable) this could probably be exploited as well.

What are the other (likely glaring) problems with this approach? Is this just reinventing the wheel? If so, what is the best practice when data security is critical, even from super-user roles?

This question may be somewhat similar to: How to login and encrypt data with the same password/key, except that I'm asking if the concept is even a good one, not how to implement.

In order to make a live database that encrypts its data, the database itself would have to have access to the keys. By that token, any admin could su into the account and find them. Your concerns are valid.

Your idea of having the user present a secure key (RSA for example) if you have them do it over an SSH or SSL protected connection is not a bad idea. @Eric G mentioned Mylar in the comments below which does this type of thing, and more. It would be well worth examination.

If instead of encrypting the database, you encrypt the data before it gets entered into the database, then you would have a different possibility -- this is meant as a possible alternative only:

The data be encrypted before posting, and decrypted by a client program afterwards. The database would not be encrypted, only the data within it.

...or for the truly security paranoid-- do both: database encryption and data encryption, each with different methods.

More is described and discussed below in comments.


Is really TLS backward compatible independent of the version? I was reading two answers here on the site about the TLS versions compatibility:

The first one says:

  Basically, for the handshake to succeed, there must be a protocol
  version that both client and server support. If the client supports
  only TLS 1.1, and the server supports only TLS 1.2 and SSL 3.0, then there is no common protocol version, and communications won't
  happen.

The second one says:

  TLS is backward compatible, in the following sense: when the client
  connects, it sends a ClientHello message that specifies the highest
  version that it supports; the server then responds with a
  ServerHello that defines the protocol version which will be used.
  That way, a TLS server can perfectly support TLS 1.2 and yet
  interoperate properly with clients who know only SSL 3.0, TLS 1.0 or
  TLS 1.1.

For me, there are differences between these 2 answers. The first says that if server and client don't have the same protocol version, no communication happens (regardless if one version is higher than the other), while the second says if the server has the highest protocol version, can interoperate with the client if the client has a lower version.

So, I'm on a situation where I need to implement that scenario: A server with TLSv1.2 and client with TLSv1.1. I need to know which one of those answers is the truth.

Those two posts are saying different things. If the server is configured to not support lower versions, it won't.

The second quote assumes that the server has not been configured to limit supported versions.


SSL cert not turning green anymore I'm running a Drupal site and have asked about this issue pertaining specifically to the Drupal aspect of it on Drupal Answers Stack Exchange. I know that the "Green" HTTPS URL doesn't show up because the cert itself isn't verified exactly as the CA has the cert registered. However, nothing has changed on the site (other than updates on core and modules) as far as site information or domains. Why doesn't the SSL verify like it did prior to the update?

When checking the cert I get the following:

Website: www.[url].com <- this was correct.
Owner: This website does not supply ownership information.
Verified by: Not specified

Prior to updating my core Drupal and associated modules, the cert would turn the URL bar green and the certificate had the proper owner and the CA as the verifier of the cert. My page URL does turn from HTTP to HTTPS on secure pages, but is only partially encrypted according to my warnings on Firefox.

ISSUED TO: is all correct.

ISSUED BY:

The (CN) is: Starfield Secure Certification Authority
Organization (O): Starfield Technologies, Inc
Organizational Unit (OU): http://certificates.starfieldtech.com/repository
Validity: Issued on 3/26/2012 - Expires on 3/26/2013

Unsecured content on a page served by HTTPS is a possible explanation for this problem (at least with Google Chrome it is).

You can check your SSL configuration using https://www.ssllabs.com/ssltest/index.html

If you need futher help, please consider revealing the site's URL.


How to Create file name with Slash in it for Path traversal attack? Yes I've read forums that says Forward Slash (/) is invalid character in a file name since it being File Separator in Windows and *nix based machines. But Without creating such an exploit file, I think attacks like ZipSlip won't be possible, Isn't it?

Most Zip Slip attacks involve creating an File with a slash character and when languages like Java use File IO with ZipEntry name, writes to some directory other than intended. So how is this possible?

Ref : https://snyk.io/research/zip-slip-vulnerability

The key is in the first line of the third paragraph of the page you reference:

  The vulnerability is exploited using a specially crafted archive...

You don't create a file with a slash in it (and then put that file into an archive), but you create an archive that says it has a file with a slash in it (so when it is extracted it "confuses" the extractor/operating system and creates a file where it shouldn't).

Depending on the nature of an archive, and its internal format, creating an archive could conceivably be as easy as binary-editing an existing archive (e.g. changing SafeNamedFile.sh to ../../../evil.sh), but is more likely to need altering the source code of the archive-creation utility to embed what would normally be an illegal filename.


Can Malware Fight Against Malware? Is there is a way to create a better anti-malware tool by utilizing malware to fight against malware itself?
I've looked up how anti-malware works and searched a lot in famous sites like Avast Blogs (Academy) and articles on McAfee, but nothing addressed this question.

Is it (ever) possible to make malware fight for us? Even in a theoretical way that requires technology that we don't yet have?

Disclaimer: I do not advocate any of the approaches described in my answer, as I do not consider them ethical and they are not even legal in many countries. This is just an academic answer to an interesting question!

To answer this question, we must distinguish between malware itself and the mechanisms malware is using. To qualify as malware, a piece of software needs to be intentionally designed to cause damage. This is not what we want. So why isn't the answer to your question a clear and resounding "NO"?

One common malware property is the ability to spread from system to system, infecting more and more targets. A worm for example exploits known vulnerabilities to spread from one computer to the next, gaining a foothold on each hop. This can already be problematic by itself, because it uses resources and might (even if just accidentally) cause problems on the affected systems. What the malware does in addition to that (e.g. encrypt files, mine crypto-currency, display dancing monkeys on the screen) is up to the payload of the malware.

This is the point where your idea comes in. Instead of doing intentional harm, the payload could be designed to fight other malware, either by cleaning an affected system directly or by patching the vulnerability other malware uses to spread.

Example:
Lets assume there is a worm-able vulnerability in the Apache web server that's exploited in the wild. An anti-malware worm could use exactly this vulnerability to spread to affected systems, gain a foothold there and patch the vulnerability afterwards. If the anti-malware worm arrives there first, no other malicious worm can use this now patched vulnerability to attack the system. And if the system is already infected, the anti-malware worm could even try to remove it like a normal anti-malware product would. After securing the system, the anti-malware worm could look for other vulnerable systems in range, spread there as well and finally remove itself from the current system, which it has protected.

There we have it. We leveraged malware-like behavior to fight of real malware. So why do I discouraging and warn against such actions?

While it may sound good in theory and it may be an interesting though experiment, you still invade other systems without consent and might accidentally cause severe harm to those systems. That's why this is a theoretical concept and not done in practice by law-abiding security actors.


openVAS: uninitialized constant OpenVASOMP::OMPConnectionError I was searching in many forums regarding this issue like here and here, but they were mentioning using port 9390. I launched OpenVAS on port 9390, but I still get the same error.

I am using openVAS in msfconsole on Kali Linux. I load openVAS successfully, but when I try to connect, it shows me this error.

  openvas_connect root toor 127.0.0.1 9390
    [*] Connecting to OpenVAS instance at 127.0.0.1:9390 with username root...
    [-] Error while running command openvas_connect: uninitialized constant OpenVASOMP::OMPConnectionError

    Call stack:
    /usr/share/metasploit-framework/plugins/openvas.rb:195:in `rescue in cmd_openvas_connect'
    /usr/share/metasploit-framework/plugins/openvas.rb:189:in `cmd_openvas_connect'
    /usr/share/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:501:in `run_command'
    /usr/share/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:453:in `block in run_single'
    /usr/share/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:447:in `each'
    /usr/share/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:447:in `run_single'
    /usr/share/metasploit-framework/lib/rex/ui/text/shell.rb:151:in `run'
    /usr/share/metasploit-framework/lib/metasploit/framework/command/console.rb:48:in `start'
    /usr/share/metasploit-framework/lib/metasploit/framework/command/base.rb:82:in `start'
    /usr/bin/msfconsole:49:in `<main>'

So the answer for this is to reinstall the whole configuration and start over again due to missing dependencies:

root@kali:~# apt-get --purge autoremove openvas
root@kali:~# apt-get update
root@kali:~# apt-get dist-upgrade

root@kali:~# apt-get install openvas
root@kali:~# openvas-setup

Once openvas-setup completes its installation process, make sure that OpenVAS manager, scanner, and redis-server services should be running.

root@kali:~# /etc/init.d/openvas-manager status
root@kali:~# /etc/init.d/openvas-scanner status
root@kali:~# /etc/init.d/redis-server status

Then you can simply start all the necessary services by running openvas-start. Then run your browser to https://127.0.0.1:9392, and accept the self signed SSL certificate and plugin the credentials for the admin user


Traffic not passing trough OpenVPN Connect on Android I am trying to use OpenVPN Connect (the official OpenVPN app) on Android.

I import the profile and everything seems to be correct until I notice that traffic is not passing trough the VPN. The status is displayed as connected, and there is some data passing trough, but obviously not everything (i tried 720p video for a couple of minutes but the app's traffic counter still shows something like 20 kilobytes).

The VPN appears in android's VPN settings,

but apparently I can't use it as Always-on VPN.

My goal is to be able to route all traffic trough the VPN.

My server config (OpenWRT uci config format):

config openvpn 'myvpn'
        option user nobody
        option group nogroup
        option keepalive '10 120'
        option persist_key 1
        option persist_tun 1
        option enabled '1'
        option verb '3'
        option port '1195'
        option proto 'udp'
        option server '10.8.0.0 255.255.255.0'
        option push "redirect-gateway def1"
        option push "dhcp-option DNS <router dns ip>"
        option ca '/etc/openvpn/ca.crt'
        option cert '/etc/openvpn/my-server.crt'
        option key '/etc/openvpn/my-server.key'
        option dh '/etc/openvpn/dh1024.pem'
        option dev 'tun0'
        option log_append '/var/log/openvpn.log'
        option status '/var/log/openvpn-status.log'

My client .ovpn profile:

dev tun
proto udp

log openvpn.log
verb 3

ca ca.crt.pem
cert my-client.crt.pem
key my-client.key.pem

client
remote-cert-tls server
remote <router wan ip> 1195

PS: I'm obviously new here, thanks in advance for directing me somewhere more appropriate if this is not the right community.

I think the issue lies in your OVPN profile. I see your server IP address is an internal 192.x.x.x address rather than a DDNS or external IP address.

I notice you're also connected to WiFi, which I'm assuming is at home / wherever you set up your VPN server. I imagine if you disconnect it'll give you an error?

It may be a simple matter of just changing the IP address in your OVPN file under remote x.x.x.x 1194 assuming 1194 is the port you've chosen and x.x.x.x is your public IP.

You should ensure that you have port forwarding set up on your router also, and the server will correctly forward your traffic.

This guide is comprehensive, and although its based on Ubuntu 14.04, it translates pretty well to other flavours
OpenVPN Ubuntu 14.04 set up guide


User ID Soft Delete or Hard Delete? Is there any particular reason (security) for us to implement Soft Delete Mechanism on Deleting User ID or Hard Delete.

I am trying to make my user id better for my web application

thank you.

Generally, my vote would be to soft delete; but eliminate any sensitive data (such as password hashes).  As in line with with Matthew's comment;

Accountability : if find out in X amount of time that you were breached by a user whose contact details you don't have, will make it very difficult to find out what exactly happened. And even provide potential evidence, etc.
Data scrubbing : users re-use passwords, no matter what we tell them.  If your service does get compromised, you wouldn't want your customers' password hash to be exposed.

Probably a lot more engineering work, but potentially worth looking at.  De-activate accounts but keep a reference to them somewhere, so ensure you're not re-using the user ID.

Bottomline, there's very little gain by hard deleting user accounts.  Storage is virtually free, and unless it's a business / regulatory decision, it's better to keep the (scrubbed) account.


Deploy verifiable webapp source code Recently there have been quite some discussions about the security approach of ProtonMail. Since it do crypto stuff at client-side, loading the javascript code in the user's browser, as far as i know, even if that code is published somewhere in the internet, there is no guarantee that it has not been manipulated by an evil entity with admin access to the server before user actually use it.

So, generally speaking the question is: how can i develop open source software and let the end user to verify if the code behind that software is the same published?

In case of compiled software i can use signed reproducible builds, but in case of interpreted code (for example JavaScript as in ProtonMail) what can i do?

From my very basic knowledge of programming and cryptography, i would try to solve this situation adding to the published code the fingerprint of, let's say, each source file. That fingerprint should also be signed by the developer.
At this point when the user download the code while accessing to the web service, he can calculate the fingerprint and compare it against the public one. Does it is viable approach? Am i missing something?

Thanks in advance!

P.S. I have already read some other questions like this one and i think they still not fully answer to this question.

From MDN web docs:

  Subresource Integrity (SRI) is a security feature that enables
  browsers to verify that resources they fetch (for example, from a CDN)
  are delivered without unexpected manipulation. It works by allowing
  you to provide a cryptographic hash that a fetched resource must
  match.

The idea is to generate a hash from your web app files (ex. javascript files) by using commands such as openssl or shasum, and specify the hash function such as (sha256, sha384, and sha512) which are the current allowed prefixes, and then embed the generated hash digest into the user running script through the integrity value attribute. The browser must first compare the script to the expected hash, and verify that there's a match.

If the script doesn’t match its associated integrity value, the browser will refuse to execute the script indicating it is not the same source code, probably because of network error or unexpected file manipulation.

Generating hash digest to "FILENAME.JS" example using openssl command:

cat FILENAME.js | openssl dgst -sha384 -binary | openssl base64 -A

And before executing the FILENAME.js script to the user side, you need to embed the generated hash through the integrity value in your script tag, for the browser to validate the script hash to the expected hash.

For more info:

https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity


HSTS on sites available over HTTP and HTTPS I'm wondering if it makes sense to enable HSTS on a site that is served over HTTPS as well as over HTTP.

What I mean is to add HSTS-Header if the site is accessed over HTTPS. But there is no redirection from HTTP to HTTPS. The Server will also serve the website over HTTP (without HSTS headers of course).

My goals:

Allow users with a broken HTTPS (blocked Port 443 or using proxies without HTTPS support etc.), to view my website using simple HTTP.
Allow users with security in mind to access my website over HTTPS with best possible security (including HSTS).

The idea is that a user with broken HTTPS will never see the HSTS header while users accessing my website over HTTPS one time will be forced to use HTTPS in future.

HSTS headers sent over HTTP are ignored by specification compliant browsers - this is to prevent a man-in-the-middle from causing visitors to be unable to access a non-HTTPS website by setting a HSTS rule in the browser. (see RFC 6797)

Therefore, you can safely, although technically incorrectly, serve HSTS headers to all your users, and provide the same pages over HTTP and HTTPS, and deliberately not redirect from insecure to secure pages.

This will have the effect that visitors who visit your HTTPS version will be forced back to it upon future visits (for the duration of the header, at least), and visitors who deliberately visit your HTTP version will stay on that. If they follow a link to the HTTPS version at any point, they will be forced to HTTPS in the future.

As to whether it makes sense, it depends on your objectives, and on your visitors - do you have many visitors from broken proxies? Do you provide information which could be incriminating on some pages?

Personally, I'd just serve the secure version, and have an enforced redirect from the insecure one, especially since search engines seem to be moving towards preferring secure sites.


Phishing email from a contact I received an email from what looked like a friend, it had a suspicious link I inspected the email address and saw that the username was spot on but the domain name was totally different.  I also put the link through a suspicious link checker and it came through as such.  The username is quite a unique one I'm very suspicious as it feels like a personal attack.  That said I don't how these phishing people operate so am asking for your thoughts

I would like to bring your attention to a malware called Trickbot. This TrendMicro article on Trickbot should bring you up to speed.
I have worked with the malware a couple of times in recent months and you might be interested in one of its capabilities.
It is able to steal email credentials & address-books. The compromised sender email address will then be used to spoof the subsequent mass emails to the potential victims in the address-book.
Essentially by doing this, the chances of this malware infecting another user by clicking it is way higher. The intention is to let the victim's guard down by putting a familiar name to the malicious email. Victims would assume that the sender is legitimate, like a friend or a colleague, and would then click the link and compromised itself and the cycle continues. So let's say an address book of 150 recipients, all it takes is one out of the 150 to keep the chain going.
You might've witnessed this malware first hand, notify your friend through proper channels, and see what is going on.

as it feels like a personal attack.

I can see why you would feel this way, I am not ruling out the personal attack reasoning. But I am just letting you know that there is a way that there are automated/customized personal attacks being crafted where you are just a potential victim of another victim.


Is there a standard checksum for verifying multipart key fragments? We will have a symmetric key arriving in three component parts.  Once all parts arrive, the key custodians will get together for a ceremony where each enters their part of the key into a secured system.  This system will XOR the parts together to combine them into a final key that will be injected into the receiving system.  The secret-combining system verifies that each custodian has correctly entered his or her part of the key by having each custodian enter a checksum for their key part; these checksums were generated at the time when the key was split.  To avoid entering a corrupt key, if there are any errors in the data entry the process must be terminated and restarted.

My question is if there are standard checksum algorithms used for validating key entry into a multipart key exchange system?  Or is this something each crypto vendor typically comes up with on their own?

There is no standard algorithm for key verification*, but there are standard checksums.
Assuming verification is done to detect simple mistakes when retrieving or submitting the key, any reliable checksum algorithm such as CRC32 will work. In fact, it can be made transparent to the key-holder by including the checksum in the key itself. This can be done easily for any key K by creating K' = K || H(K), where H is a hash or checksum. Any error in the key itself or the checksum would result in the key being discarded. The keys being input could optionally have their checksum stripped after verification. This mirrors historical techniques where encryption keys for algorithms such as DES included parity bits in the standard to ensure every 8-bit chunk is odd-parity.
You have a few options for the checksum itself. Parity bits are the easiest to implement, but are designed to detect transmission errors where only a single bit is expected to change. A human-created mistake that changes "a" to "b" will result in two changed bits and a parity bit would not detect the change. Checksums are similar, but more complicated. They calculate a sum of the weighted multiplication of each component part of the input. CRCs on the other hand are designed for efficient error detection under nearly all circumstances. They can be guaranteed free of collisions for up to a certain number of errors. They have a configurable overhead.
Which one you use is up to you. CRCs are the most effective, since performance is not an issue (you won't be verifying millions of keys per second). A commonly used standard is CRC32c. It has a 32-bit output and has a well-chosen polynomial. If you only expect single-bit errors, parity checks will be a simpler option with less overhead (only one extra bit for each chunk of data).
* As pointed out in a comment, there are standards for verifying keys called Key Check Values, or KCVs, for example ANSI X9.24-1:2009 KCV. However, these are designed to detect electronic transmission errors, not human errors.

To answer your questions directly...

My question is if there are standard checksum algorithms used for validating key entry into a multipart key exchange system?

There is no standard for validating key entry, but there are checksums that have been standardized for error detection which you can safely use in your scheme. However, there is a standard for secret sharing (multipart key input) which is not your simple K' = K0 ⊕ K1 ⊕ K2. The algorithm is called Shamir's Secret Sharing and provides configurable parameters for the number of correct keys required to calculate the secret, the amount of redundancy against incorrect keys, etc.
In order to reduce the impact of incorrect input, you can use an error correcting code. These expand the size of the key material slightly, but ensure that the original value can always be derived even if it has up to a certain number of errors. The larger the error correcting code (and associated overhead), the more errors it can correct. This allows you not just to detect a mistake, but to correct it at the same time.

Or is this something each crypto vendor typically comes up with on their own?

Most vendors come up with things on their own due to a severe case of NIH syndrome, not because there are no standard primitives to work with or best practices to adhere to. The answer also depends on the specific organization. Various US intelligence agencies tend to use (or used) fill devices which often used parity bits for key integrity. The answer here is that they do typically come up with their own, sometimes flawed, scheme. This does not mean it is necessary to do so.


Video Conference Systems - Security Testing Any one have any experience in testing ISDN based VC systems?

What approach did you take, tools used? How did you approach fuzzing the protocol?

What resources did you read up on prior to testing?

I have had limited exposure to this - but the main attack routes I have found successful in Video and VOIP have always been misconfigured H.323 gateways - it can be very difficult to set up H.323 and the associated protocols correctly, as each vendor seems to implement things differently. Symantec had a useful list of 20 rules in  this paper - well worth having a look.


How do you keep someone from changing hidden values in an HTML form? If I have an HTML form, and it has hidden inputs for ID numbers and the like (so I know the id key of of table x to update), how can I secure it so the person can't just change it and screw up database entries?

I have a modal bootstrap "popup," for example, that I append hidden inputs to the form so when I submit the form in the modal the correct database keys are submitted and processed.

Someone can easily change that (not to mention editing the Header and Resend).  What can I do?  The site is secured with username and password, but other than that I am not sure what to do.  I'm not as worried about SQL Injection as much as bad data.

The only other thing I could think is to store values in Session Variables.

I am using ASP.NET Core 2.x and jQuery if it matters.

This was similar, Protecting hidden form fields

You don't. User can change whatever they want to. A hidden field is not different from a common field from the browser or server perspective.

If you want to store secret data the user will need, store them server-side on a session. It's the fastest way.


In what situations does parameterizing a query NOT prevent SQL Injection? While this isn't terribly common, I know that SQL Injection is still possible with a parameterized query, if you are calling a stored procedure that uses a parameter to construct and execute dynamic SQL.

I'm curious if there are any other edge case scenarios where SQL Injection is still possible even if you are using parameterized queries?  Is dynamic SQL the only catch?

The only one that immediately comes to mind is second order injection where a value such as 123' or 1=1 -- is stored in a table which is later retrieved and then used unfiltered in a query. It does usually require the code to not parameterize data retrieved from the database which is not that uncommon as developers often consider this a "trusted" source.


Validating security log configuration (rsyslog and syslog-ng) for PCI DSS 10.5 I work for a Level 1 merchant with annual onsite QSA audits, so this is a huge deal.

PCI DSS 10.5 requires the entity under test to "Secure audit trails so they cannot be altered". In our Unix and Linux environment this requires that the syslog configuration be checked to see whether a) the permissions on all files used locally to store audit logs (defined as the auth, authpriv, and security facilities in syslog) are restricted to root, and b) these facilities are also exported to a log collector for safekeeping.

In the past, with classic syslog, we have managed this with a test of the syslog.conf file to determine which files to check permissions and which collector servers are in use. The issue is with the newer versions of syslog, namely rsyslog and syslog-ng.

The configuration files for these logging components are far more flexible and human-readable than their predecessors. However, we have been going quietly mad trying to validate configurations of the new tools for the following reasons:

In rsyslog (and syslog-ng) you can route messages on just about anything you can think of… including regular expressions.  Not only can you route by those criteria, you could also completely discard certain messages based on them.  For example, it would be easy enough to configure a system to look like it is logging all of the security stuff if one was simply looking through the logs, but all the while it is silently discarding any log message that contained a specific user ID.  Easy to configure, difficult to detect.

With syslog-ng we have tried validating "known good" configurations with a checksum (this could be made more secure with a proper HMAC such as SHA-256, but that doesn't solve the underlying problem). The issue is that valid configurations tend to proliferate and it becomes impossible to keep up.

Both tools are capable of using include files, and rsyslog in particular uses this feature extensively "out of the box", which further complicates matters because now you have to checksum/hash not only the original file but every file it includes.

One stopgap is to flag every system running rsyslog or syslog-ng and require the SA to attest that the logs are being sent to the proper places, but with tens of thousands of systems, that approach does not scale, nor does it provide good evidence for auditors.

In short, we have found no technical solution to the problem of knowing for certain where every authentication log is being stored or transmitted, and yet PCI DSS 10.5 requires it. Therefore I am asking the security community what they are doing to facilitate this.

It seems to me like you're overanalyzing the issue - PCI DSS doesn't require you to ensure that the system is impossible to abuse, it requires you to perform due diligence along some basic abuse vectors.

Cites here are from DSS 3.1 "Testing Procedures":

  10.5.1 Only individuals who have a job-related need can view audit trail files.

Ensure that auth* type logs are readable only by root.  That can be pretty simple:

$ grep authpriv /etc/rsyslog.conf
# The authpriv file has restricted access.
authpriv.*                                              /var/log/secure
$ ls -l /var/log/secure
-rw------- 1 root root 1085793 Nov 10 13:43 /var/log/secure
$

And you're done.  Is it possible that a malicious administrator could go out of their way to log authpriv somewhere else and have it be obscure to see where, and to also have that be world readable?  It's possible, but that's not what the QSA is looking for, they're looking to ensure you didn't misconfigure your logs by mistake so everyone can read authpriv.

(edit) The situation you describe in the comment:

  The issue with checksumming was that applications had valid needs to
  alter the configuration (in places that do not affect security logs)
  and that broke the checksum.

should actually be easier to address with rsyslog:

system logs are specified in /etc/rsyslog.conf, standardized and auto-maintained across systems by cfengine.
rsyslog.conf includes /etc/rsyslog.d/*.conf
application log configurations go into /etc/rsyslog.d/application.conf

In this manner, you can easily prove that your system configuration for logging (say) authpriv is correct, and that the configuration is common across systems.  The per-application customizations are isolated to the /etc/rsyslog.d/*.conf files, which you don't need to checksum or prove to your QSA - he may look at one or two, but in general, he will trust you as an administrator not to hide a redundant bad system-level configuration in the application-level config files.

Again - PCI DSS wants you to document you're doing basic things right.  They're not trying to force you to prove, beyond a shadow of a doubt, that there's no way for you to do anything wrong.

  10.5.2 Current audit trail files are protected from unauthorized modifications via access control mechanisms, physical segregation,
  and/or network segregation.

Show that your log files aren't writable to any inappropriate groups or 'other':

# find /var/log -type f -a \( -perm -g+w -or -perm -o+w \) -ls
131282 2220 -rw-rw-r--   1 root     utmp      2265216 Oct 30 09:51 /var/log/wtmp-20151101
133888  192 -rw-rw-r--   1 root     utmp       192000 Nov  9 16:12 /var/log/wtmp
#

wtmp is group-writable to utmp to allow it to be updated by non-root terminals, so that's normal.  No other findings.  Along with basic checks to show that your logs go to /var/log, you're all set.

  10.5.3 Current audit trail files are promptly backed up to a centralized log server or media that is difficult to alter.

  10.5.4 Logs for external-facing technologies (for example, wireless, firewalls, DNS, mail) are written onto a secure, centralized, internal
  log server or media.

First, show the configuration indicating that logs are sent to your central SIEM.  Then show a query proving that logs from your machine can be found on your SIEM.  Repeat for whatever sample size your QSA requests.

You don't need to do a full reconciliation that every line found locally is found on the remote server.  You just need to prove that you've configured it to log to a remote server, and that it apparently functions properly.

  10.5.5 Examine system settings, monitored files, and results from monitoring activities to verify the use of file-integrity monitoring
  or change-detection software on logs.

Confirm that /etc/rsyslog* and /var/log/* are monitored by your FIM (e.g., Tripwire).  That's it.

Are these steps enough to secure your environment?  No!  The PCI DSS is a floor, not a ceiling.  It's a basic, due-diligence checklist to get you started and to try and ensure everyone is at least buckling their seat belts.  So you can keep looking for ways to improve your security, but you'll likely pass your PCI audit on your way there.

Now, that being said, I'm detecting another issue in your question, which is that you lack centralized configuration control.  That's going to make your audits harder - when you say "here's the config file, and here's the Puppet config showing it's used by 95% of our servers" you make it easier for the QSA to sign off on a sample of your environment.  If you've got "valid configurations [that] tend to proliferate" you've got a problem that's not just impacting your PCI compliance, it's going to impact your overall security.  You should look into centralized management (here's a comparison of four of such tools).