Does correcting misspelled usernames create a security risk?

As you said, you saw this on facebook - so I tried these steps:

Login with lukas@gmail.com and real password -> works
Login with lukas@gmail.cmo and real password -> works, too (!)
Login with luksa@gmail.com and real password -> also works
Login with luksa@mail.com and real password -> also works
Login with lukas@gmail.cmo and wrong password -> Wrong password, but email got automatically corrected to the right email
Login with lukas@gmail.cmo in a private tab (or a browser with cleared cache & cookies) -> "The email you’ve entered doesn’t match any account"

As the correction only seems to work when I have already successfully logged into FB at this PC,  I would say that this is not a vulnerability in facebook.

Edit: Added new test cases; thanks Zymus, simbabque and Micheal Johnson for the suggestions


How to ensure reliable source for installation?

When downloading an image, there is usually a checksum file provided as well (delivered over https). When downloading individual packages, many Linux distros have GPG verification built into the package manager. And for general network operations, increasingly the web is moving towards using TLS to secure everything.


Can ransomware affect hidden or "unmounted" drives?

There is no practical answer to this. It all depends on how good the malware was designed.

Some are just as basic as encrypting basic documents, some go as deep as disabling any methods of back-up and restore and accessing the disk in a more advanced manner.

Currently, there is no anti-truecrypt malware (i.e. something specifically designed to take TC into account).

What danger can exist is the following: a keylogger could find the password that you type to access the encrypted files or volumes and that would give it access to them, but again, this must be specifically designed to do so. An average malware will not dig for TC volumes or container files.


Questionable request to /user/soapCaller.bs

So the internet is a bad place. You have probably been scanned a thousand times before without noticing it,  everyone has.  There are bots that scan absolutely everyone for a handful of vulnerabilities in the chance of getting lucky.

Nothing special.


Regenerating the session-id is one of many points, that makes your application more secure. It makes sense when the user increases his privileges (login), to avoid session-fixation attacks.

There are other possibilities to achieve the same goal, so you cannot tell from the unchanged session-id alone, that the application is unsecure. An other way to make session-fixation more difficult, is to use a separate authentication-cookie, for example.


What legitimate uses do browser proxies have?

One of the early uses of HTTP proxies was caching proxies in order to make better use of the expensive bandwidth and to speed up surfing by caching heavily used content near the user. I remember a time when ISPs employed explicit mandatory proxies for the users. This was at a time when most content on the internet was static and not user-specific and thus caching was very effective. But even many years later transparent proxies (i.e. no explicit configuration needed) were still used in mobile networks.

Another major and early use case is proxies in companies. These are used to restrict access and also still used for caching content. While many perimeter firewalls employ transparent proxies where no configuration is needed, classic secure web gateways usually have at least the ability to require explicit (non-transparent) proxy access. Usually not all traffic is send through the proxy, i.e. internal traffic is usually excluded with some explicit configuration or using a PAC file which defines the proxy depending on the target URL. A commonly used proxy in this area is the free Squid proxy which provides extensive ACL's, distributed caching, authentication, content inspection, SSL interception etc.

Using an explicit proxy for filtering has the advantage that in-band authentication against the proxy can be required, i.e. identifying the user by username instead of source IP address. Another advantage  is that the connection from the client ends at the proxy, and the proxy then only forwards the request to the server given in the HTTP proxy request if the ACL check is fine and maybe after rewriting parts of the request (like making sure that the Host header actually matches the target host). Contrary to this in inline-IDS/IPS (which is the basic technology in many NGFW) the connection setup from the client is already forwarded to the final server and ACL checks are done based on the Host header, which might or might not match the IP address the client is connecting to. This is actually used by some malware C2 communication to bypass blocking or detection by claiming a whitelisted host in the Host header but having actually a different target as IP address.


What Does This Command Do? Should i be worried?

It's an attempt at command injection. IFS is basically a space in this situation, and && executes multiple commands. So you have:

/language/Swedish && echo 610cker > qt && tar /string.js

Which tries to execute three commands:

/language/Swedish   <-- where the injection takes place
echo 610cker > qt   <-- write 610cker to file qt
tar /string.js      <-- compress file string.js (but the command is invalid)

The commands do not really make sense and are not used to exploit your system, but likely used to test if it is vulnerable.

If you google 610cker you will find some reports about an exploit on a D-Link router (although the payload looks slightly different) and other systems (see eg here, using the same payload).

As with all log entries of this type, it is almost certainly a scanner. If your system is not vulnerable and there are no other signs of intrusion, I wouldn't worry about it.


TL;DR
Don't reply to spam emails

There are many databases where corporations had been exposed and your data in them. You can check your accounts on services like https://haveibeenpwned.com/.
When you reply to those emails you're also telling the spammer that your account it's still active and they can perform a direct attack on you, they also could try to hit you with different spam attempts than just reporting them.
And as a friendly reminder try to always use 2FA (Two Factor Authentication) and a password manager.


How secure are SSL client certificate authentications?

If you use a VPN you still need to authenticate the user to establish the VPN. A client certificate is a very good authentication factor but should be used in conjunction with a password as there are several examples of malware that steals certificates in addition to other ways they can be compromised. Client certificates tend to have a support overhead associated so not practical if you have a small support organisation and/or a lot of users.

There are also many other ways a Web server can be compromised such as through vulnerabilities,  SQL Injection etc. (Though VPN or certs reduce the liklihood somewhat due to reduced public attack surface). You could also consider something like Google Authenticator.


You might want to ask your company lawyer to help define what that means in your specific circumstances.

As for the usual definition of the term "data at rest": It means "stored data which isn't currently being accessed". So, for example, data at rest would be data sitting on a server's hard drives while the server is turned off, or data on backup tapes, or data sitting in a file that isn't opened by any of the running processes on a system, and so on.

So I'd say that what you need to do is encrypt all the data that falls under the requirement to be secured when it is at rest. Depending on what your data is, it might be enough to just encrypt the contents of a database before you store them in the database, or you might need to encrypt the file system the database sits on.

Edit: If you just encrypted the file system, but not the application data itself, you'd also need to make sure that backups of your application data, which also constitute data at rest, are encrypted, and so on.

For example, if you only encrypt text fields in a relational database, that might not be enough, because the relations between records would still be accessible. If you only encrypted your filesystem and then took a backup of the data while the filesystem was mounted and the plaintext data accessible, you'd then also need to encrypt the backup.

Like I said, do have legal counsel define it; your circumstances might vary, and security.stackexchange.com isn't law.stackexchange.com.


The idea is to control the length of your attack so you only overwrite the first byte of the canary. You can then brute force the 256 possible values for this byte, and using some kind of side-channel figure out which is correct. Once you've got this, you can brute force the second byte, and continue until you've got the whole canary.


Why doesn't the client's web browser need to be PCI compliant?

Well, first, what is written is the following: payment card companies are requiring merchants to be PCI-DSS compliant. PCI-DSS does not apply to anybody who doesn't process credit card transactions. The DSS requirements specify access control, logging, etc. None of this is applicable to a cardholder.

Clients do not have the same contracts as merchants. There is no benefit in trying to log activity on a client machine. Individual card numbers are likely to be stolen in many places, and the cost / benefit on forensic analysis of one person's computer for their one lost credit card is somewhere below sane. Finally, people just won't accept that. If using a credit card is too hard, card issuers will see decreased volume.


Is it safe to store SSN's in Azure Cloud?

Given the current state of public cloud, I would argue that in many cases it is in fact more secure than on-premise storage.  Granted I work for Microsoft, but my opinion both pre-dates my employment, and extends to competitors like Amazon and Google as well.  Companies whose business models are built on data center operational expertise and excellence, are simply always going to be better and running and protecting their assets than companies who view IT and data as simply a cost to be tightly controlled.

That said, there are definitely a couple of things that I would take a careful look at.

How are they encrypting the data?  Encryption is easy to get wrong, and with data as structured as SSNs, and with such a small domain, getting it wrong could result in a significant breach of confidentiality.
How are they managing access?  For this you need to look not only at who has access via the application and to the machines, but from an Azure-specific perspective, who has access to the resource groups and the subscription?
Key management.  Azure offers HSM-based key-storage.  For significantly sensitive data, you should ensure they're using an HSM-protected Key Vault.


Connection to ports 2000 and 5060 successful despite filtering

There is something between the scanner and the target that is responding on behalf of the target, spoofing its source address so as to appear to be the target itself. When you ran the Nmap scan as root with --reason -v, it showed the IP Time-to-Live (TTL) values of the response packets for each port:

PORT     STATE  SERVICE    REASON
21/tcp   open   ftp        syn-ack ttl 52
22/tcp   open   ssh        syn-ack ttl 54
113/tcp  closed ident      reset ttl 254
2000/tcp open   cisco-sccp syn-ack ttl 61
5060/tcp open   sip        syn-ack ttl 61

The TTL field starts at some number (usually 128 or 64) and is decremented by each intervening IP router or hop. If any received TTL fields are unexpectedly high, it can mean that the packet originated closer to the scanner than expected, i.e. from one of the hops.

You said that 21 and 22 were expected to be open. They have differing TTL values, which could mean that one of them (FTP) is port-forwarded to a system inside your network, or it could mean that there is some asymmetric routing going on resulting in a different path each time. But the real question is over 2000 and 5060, which are 7 hops closer than the nearest expected distance. These are almost certainly being intercepted.

You should be able to determine which hop is intercepting the traffic by conducting a traceroute. Nmap can be used to do this, if you limit its traffic to the one port in question:

nmap --traceroute -Pn -p 2000 example.com

This will show a series of hops culminating in the one "from" your target. It's actually most likely to be the hop beyond the last hop in this list. Compare it to the traceroute for a port that is acting as expected. For example, if your scan looks like this:

# nmap --traceroute -Pn -p 2000 example.com
TRACEROUTE (using port 2000/tcp)
1   2.04 ms  gateway (192.168.1.1)
2   14.37 ms 10.100.96.1
3   15.60 ms example.com (192.0.2.5)

# nmap --traceroute -Pn -p 22 example.com
TRACEROUTE (using port 22/tcp)
1   2.04 ms  gateway (192.168.1.1)
2   14.37 ms 10.100.96.1
3   15.60 ms 182.23.16.88
4   10.11 ms 182.23.16.82
5   44.73 ms example.com (192.0.2.5)

The last common hop is 10.100.96.1. The next hop in the sequence is 182.23.16.88, which is most likely the one that is spoofing the response.

As to why these ports may be being spoofed, I note that SCCP (port 2000) and SIP (port 5060) are both VoIP services. Maybe your ISP doesn't want you running a VoIP server, client, or relay, and is using this method to prevent it?


Safe to consider webapp user's email as implicitly confirmed after a password reset?

No added risks if you use the same communication protocol to/from user's email, your database, or any other part in these two cases, I.e at the point of registering and at the "forgot password" steps.


Password generation based on hash of master password + suffix?

Yes and no.

It depends on the strength of your master password. Since you are using a fast hashing function your master password needs to be even stronger.

The main threat of this scheme is that any website to which you give a password can try to brute-force or dictionary attack your master password. Once they have it they can impersonate you in every other site you use this scheme.

Here are 2 good answers on the subject :

https://crypto.stackexchange.com/questions/5689/a-single-password-manager-vs-password-generator-hash
Password Managers: encrypted database vs hashing strategy


Some thoughts, not meant to be critical per se, just providing feedback:

No reason to have the app make its own JWTs. Just pass the client-delivered JWT along.
This may not be what was meant but it is not a good idea to have some unavoidable delay in revocation. Should some compromise be detected around a specific JWT it needs to result in immediate declination, not just in the JWT being made nonrenewable.
There is no benefit to picking some arbitrary window within an expiration period to do some special renewal behavior, vs just having a shorter expiration period. It's confusing and the ergonomics are no more helpful for users. The relevant policy decisions are around whether activity automatically lengthens the session (which would be enforced on every request, not just with 5 minutes left), and what happens on receipt of an expired token.
Relatedly, machinery to "renew with less than 5 minutes remaining up to a limit of 12 hours" is no different from having a refresh token that has some lifespan and is checked on expiration of a authorization token. Then think about whether lifespans of 12 hours are really much different than lifespans of 24 or 48 or some other arbitrary number.
Think about multi device access- multiple refresh + JWTs, or the same? and concurrent access from a single device. Think about other potential mechanisms for locking down utilization of a token, like binding the token to a specific IP or user agent.
Think about whether multiple apps will ultimately be involved in this system.

Hope that's helpful.


How to secure a mobile app against its user?

You cannot.

As soon as the user has the mobile device and your application, nothing stops him from decompiling your application, understanding how it works & what data it sends, and replicating it. They can even cheat using some contraption that rotates the phone around and make your application believe it's a human that is using it.

They don't even need to decompile your application; they just have to put a proxy to intercept the requests and understand the protocol.

From the comments:

  If you control the hardware, you can secure the app:

Not quite. Apple controls from the processor to the UI of the iPhone, and jailbreaks are a thing. Even if they are controlling every aspect of it, one day someone jailbreaks and roots the iPhone, and loads your app on it.

  Certificate Transparency, Key Pinning

Not useful if the device is rooted. Checksum, digital signature and integrity verification only work if the OS is not compromised. If the user owns the OS and the device, he can disable OS checks, can edit the binary of the app and change the instructions verifying the signature or checksum.

  Virtual Machine, Code obfuscation

They make it much more difficult to analyze the code, but code must be executed by the processor. If a disassembler cannot help, a debugger will. The user can put breakpoints on key parts of the code, and in time will reach the function checking the certificate, or the checksum, or any validation checks in place, and can alter anything he wants.

So it's pointless to try?

No. You must weigh the costs and benefits. Only don't count on the defenses to be unbeatable, because every defense can be beaten. You can only make it so hard that the attacker gives up putting lots of resources against your app and receiving a little benefit.


ssl+symmetric with my own encryption algorithm?

It is possible to add a symmetric crypto algorithm to OpenSSL.  There is an example algorithm called GOST included in modern OpenSSL distributions; this page talks a tiny bit about integrating it from a separate package, which would be a good first step for you if you want to learn how to integrate your own algorithm.

That being said, while this would be a useful and interesting learning tool, never implement your own crypto algorithm for actual secure use.


Authentication helpers for tunneling through an HTTP proxy?

So, the auth method used  by corkscrew is only meant to auth you against your proxy. Not to auth you against the service you want to tunnel.

  Have other people developed similar software supporting other types of authentications?

I'll make a list of the other types of HTTP authentications:

digest auth

finished.

I've not met an digest-authing HTTP proxy myself, but I'm sure they exist somewhere, somehow. Anyway, it seems to me, you're the first person to actually need this – so, go and add that feature to the full 291 lines of C code that corkscrew 2.0 has. Shouldn't be that hard :)

Personally, I don't understand why anyone would mandate a HTTP proxy but then allow HTTP CONNECT that allows things that aren't HTTPS. That's really like putting a lock on a door, but at the second time, installing an equally-sized second door next to the first door, unlocked.


Secure source code review tool for jQuery

Very few vulnerabilities exist in client side code when compared to other components in a modern web application.  Even if you have a very obvious CWE-602 violation the vulnerability exists because of a lack of server-side controls.  No tool that I am aware of can detect CWE-602 violations.

That being said the client isn't totally exempt from vulnerabilities.   The two biggest problems being mixed content vulnerabilities and dom based xss.  Domsnitch is one of the few tools that is able to detect both of these, although it also produces a large number of false positives.

There are also commercial tools that perform static code analysis of JavaScript for the purpose of finding vulnerabilities.  HP Fortify and IBM's AppScan are examples of this type of software.


Allowing request to internal services only from specific IP addesses

Any app in the DMZ is at best only semi-trusted. Ideally apps in the DMZ should have NO reach into the internal network, data should be pushed not pulled so firewalls only need to open from the more secure to the less secure network not the other way around.

If that is not possible for some reason (and it would have to be a really good reason!), you need to make absolutely certain that the DMZ app has the minimum possible access to anything.

In addition, you don't really even want anything reaching out if you can avoid it. Every connection is a potential risk.

In most cases, you would even create a parallel network for management traffic so that you can further limit and reduce the available attack windows.

Blocking Insider Threats

Restricting internal networks to block insider threats is a sensible idea but don't loose sight of the value of your data and the relative risks involved. Most forms of security come with some cost maybe $$$ but maybe in admin overheads and user overheads so be sensible.

Having said that, it is very important to separate assets of differing values and security. So high security data such as your core PKI infrastructure or patient records, etc. should be kept separate from less important data such as management information perhaps (depends on your business). Segmenting data in this way can actually reduce costs in some cases because, even though the infrastructure and admin costs may be higher, the physical protection costs overall may be less than having to protect everything.

There isn't really a one-size-fits-all solution for this.

One other consideration. Internal controls are by no means just about stopping insider threats. Remember that most intrusions to large enterprise data lie undiscovered for 12m or more and often are only discovered by external parties. It is common practice for the bad guys to break into something innocuous and then slowly work their way up the food chain, keeping below the intrusion detection radar all the way.


Why would I use an ACK scan over a FIN scan and vice versa?

According to nmap.org, the ACK scan compared to FIN,PSH,URG,SYN:

  [ACK] scan is different than the others discussed so far in that it
  never determines open (or even open|filtered) ports. It is used to map
  out firewall rulesets, determining whether they are stateful or not
  and which ports are filtered.

Rather than using an ACK scan over a FIN scan, instead use a combination of scan types to glean extra information from a system.

For example a FIN scan may return the following:

22/tcp    open|filtered ssh

And an ACK scan of the same host may return:

22/tcp  unfiltered ssh

An ACK scan will return unfiltered for both open and closed ports on an unfiltered system.

If one scan type identifies a port as open or filtered and another identifies it as open or closed, logic dictates that it must be open.


what does key size (64 bit) in DES means

First, just to get this out of the way: the key size of DES is not 64 bits in any meaningful sense; only 56 bits are actually used in the encryption or decryption (see Wikipedia). The other 8 bits are for parity (error checking). In practice, they are usually ignored.

The openssl utility's enc operation (or, simply, the enc command itself) expects a passphrase, not a key (unless you use the -K option). The passphrase is turned into a key (of the appropriate length) using a key derivation function. This happens internally; you the user don't really control the process.

Breaking DES is actually pretty easy, due to its 56-bit key length being short enough to brute-force search (trying every key until one works). Modern personal computers will still take months (possibly only weeks for the fastest) in a typical-case scenario. However, dedicated hardware designed for the purpose, or a distributed network of computers, can break a DES key in under a day. Bear in mind that those machines are now a few years old, and Moore's Law is extremely applicable to this kind of brute-force operation; what took tens of thousands of dollars and a day of work eight years ago would today take under a thousand dollars to build, or only a few hours per key.


Is it unsafe to hash one password with more than one salt?

Assuming you mean an attacker has 100 copies of the same password hashed with 100 different salts, then no, that doesn't provide any advantage to them in findings the plaintext password.  The benefit of using different salts means that cracking attempts aimed at any one of the hashes must be done independently of the computational work used for the others.

In theory an attacker could build a rainbow table with bcrypt hashes using a specific salt.  By increasing the number of salted hashes you increase the likelihood of one of your salted hashes matching the salt they built their rainbow table with.  However, if your salt is chosen from a reasonable pool of possibilities then this has an infinitesimally small chance of paying off for the attacker.


What user was this spammer trying to authenticate as?

It seems they tried to login as test. This is the dissection of the field Command:

NTLMSSP identifier: NTLMSSP
NTLM Message Type: NTLMSSP_AUTH (0x00000003)
Lan Manager Response: 000000000000000000000000000000000000000000000000
NTLM Client Challenge: 0000000000000000
NTLM Response: 7645875143c81e4d9320ad67ab6463f10101000000000000...
NTLM Client Challenge: 65a13a6e5e5bb0ca
Domain name: NULL
User name: test
Host name: OWNEROR-KTATDUI
Session Key: Empty
Flags: 0xa2888205
Version 6.1 (Build 7601); NTLM Current Revision 15
MIC: d5f5e89c25be594d3b2ff29420b2135


PCI scope for a Direct-Post e-commerce site (SAQ A-EP)

To quote the document you've provided, emphasis mine:

[When performing Direct Post] the payment form is provided by the
merchant; therefore, the merchant’s systems are in scope for
additional PCI DSS controls, which are necessary to protect the
merchant website against malicious individuals changing the form and
capturing cardholder data.

And SAQ A-EP is applicable to Direct Post merchants:

Your e-commerce website does not receive cardholder data but controls
how consumers, or their cardholder data, are redirected to a PCI DSS
validated third-party payment processor;

So, yes, your server that provides the checkout page is in-scope for PCI, even though the Direct Post sends card data directly to the payment processor.  You should fill out SAQ A-EP accordingly.


Of course its possible. Its literally a console that you can run and execute arbitrary JavaScript in.

As an example, here's me popping up an alert box on this very page:

This is only dangerous if your end-user is stupid enough to run code in dev-tools that they don't understand.

Alternatively if there's an exploit available in the plugin your calling that may also be leveraged to exploit XSS attacks


It's not hacked. It's just bloated by Samsung software.
What you see is a log of com.samsung.android.smartface leaking (if I can say that) into your application log.
This because logcat monitors logs globally and doesn't natively filter for your application only.
It is a Samsung application named "SmartFace".
What it does is to continuously activate front camera to scan for the user's face and detect eyes open in order to keep the screen always-on.
(source)

keep the screen on if you look at the phone: smart face

It is also a known bloatware
Conclusion
Another good reason to debloat devices


In Windows, what should I do to run a program with admin rights without concerns?

Since you are already running it with Sandboxie, no need to be concerned about "admin rights", that shouldn't be an issue. The program won't write any changes to your hard drive or the windows registry directly, so it is "sandboxed" regardless of having administrator access.

If you'd like to be in greater control of what's going on when you run programs, I recommend trying a HIPS (host intrusion prevention system) plus a good firewall which will ask for your permission before any outgoing internet access and critical behavior (direct access to the disk or keyboard, changes to the registry etc).


Benefits of injecting antivirus inside browser

That the file gets scanned in the browser while downloading. This way you can block malware before it's correctly installed on the system.

Most AVs are only able to check for viruses after they've been installed to the system and had the time altering it.

This isn't always the case though.
Sometimes your browser also leads the downloaded file automatically through your installed AV.


its a security product that installs agents on endpoint to watch for any suspicious execution activity and alert you on it.

it can be used to push Indicators of compromise that are not covered yet by an anti-virus or an IPS.


Preventing fraudulent access to restriced resource on the web?

Are you sure that there aren't any cookies available by a mobile app, often this is the case. Also this is known as horizontal privilege escalation. If you can only see details of other users I would also add user enumeration.

If you want to check how these requests are performed you can put a proxy between your phone and the internet (like ZAP or Burp)to see what it actually passes on to the server.

The best practice is to NEVER EVER put session IDs in GET requests. There is a reason why we have cookies and mobile apps support cookies just like any other application. Most mobile banking applications I have seen use a REST API with JSON which doesn't necessarily use cookies (but can although than it's not completely stateless). Often the queries are signed with a type of private key or token.


Using fail2ban for detecting suspicious activity whitin a webserver

Sounds like you are trying to build a web application firewall (WAF) over Fail2Ban by creating a bunch of custom filters. The problems with this approach include:

Fail2Ban works after something has already been achieved. Now the attacker only needs to wait for the ban time or simply use another IP address to collect the prize.
Fail2Ban can only monitor the parts of the requests that are logged somewhere; e.g. POST data and cookies sent by the client aren't usually logged anywhere.
Youd would need to create and maintain a huge variety of filters. That's awfully lot of work.
Fail2Ban consumes lots of CPU time processing all the logs against all the filters.

Instead, you should be using an existing WAF that has a wide and maintained rule set, like ModSecurity with OWASP ModSecurity Core Rule Set (CRS). After the suspicious requests have been blocked with ModSecurity, you can use the logs produced by ModSecurity to block the IP addresses using Fail2Ban. E.g. with Apache you could use the updated filter from Kazimer Corp.


Direct VPN access to DBs - government guidelines (DBAs at home COVID)

Directly exposing core services' admin ports and access is not best practice. The better approach is to create a "jump box" which is a remotely accessible workstation (often virtual) where your admins log into to perform admin tasks as if they where on your local network.
The jump box can be locked down, monitored, and have additional security.
If you expose admin ports, you are limited in how you can secure that access.


Normal usage vs. denial-of-service? How many requests are needed to talk about a denial of service?

Enough to cause the service to be denied to someone. Might be 1 unexpected malicious request, which causes excessive load on the server. Might be several million expected requests, from a TV advert with a really good response.
There isn't a specific value, since all servers will fail at different levels - serving static content is a lot easier on the server than generating highly customised content for each user, so generally authenticated services will have a lower "problem" threshold than unauthenticated ones. Servers sending the same file to multiple users may be able to handle more traffic than servers sending distinct files to multiple users, since they can hold the file in memory. A server with a fast connection to the internet will usually be able to handle more traffic than one with a slow connection, but the distinction might be less dependent on that if the generated traffic is CPU bound.
I've seen systems that fail at 3 requests per second. I've also seen systems which handle everything up to 30,000 requests per second without breaking a sweat. What would be a DoS to the first, would be a low traffic period to the second...
Updated to respond to update
How do firewall providers determine when traffic is causing a denial of service?
Usually, they watch for response times from the server, and throttle traffic if they go above a pre-set limit (this can be decided on a technical basis, or on a marketing basis - waiting x seconds causes people to leave), or if the server responses change from successful (200) to server failure (50x).
What is a legal definition of "denial of service"?
Same as the original one I gave - it's not denial of service if service has not been denied. It might be abusive, but that wouldn't be quite the same thing.


Best practice for data security on a web application

You're right that there isn't a great solution.

Yes, entering via CLI and storing in RAM is sometimes used, but dumping ram isn't too hard.  There are hardware security modules that specialize in this scenario (research this term if this problem is important enough).

Generally speaking, it's best to store it in a folder which has its permissions very restricted, then focus on hardening the server so the attacker has to do two difficult things (exploit a service, then escalate privileges).  Don't store it in the database or in a directory accessible to the web user.

Encrypting it using AES would be good.  If the attacker can control the plaintext or observe the ciphertext in any scenarios you'll want to take much greater precautions to ensure it's implemented correctly.


Scanning for files than have been encrypted by CryptoLocker

We created a free scan tool that finds CryptoLocker encrypted files dumps the list into a CSV file. This is handy when trying to figure out what files need restored from backup.

http://omnispear.com/tools/cryptolocker-scan-tool


Replacing Windows 7 security updates with anti-virus?

Nope.

After Microsoft discontinue security updates for a version of Windows there is not a safe way to run that version of Windows.

Some people will promote Virtual Patching where you have a external firewall scan all your traffic looking for patterns of traffic that look malicious. I would not trust that, and it requires a seperate non-vulnerable computer.

A number of vulnerabilities patched by Microsoft are not the sort that anti-virus are good at catching. In the most recent example Google announced a Chrome Bug plus Windows 7 bug that caused visiting a site to remotely execute arbitrary code, this was being used in the wild. After end-of-life Microsoft will not patch this type of bug. (https://www.zdnet.com/article/google-chrome-zero-day-was-used-together-with-a-windows-7-zero-day/)


Caller ID Spoof and Text Spams – How do they work?

I got one of these messages the other day and so did a few of my friends, so I know exactly what your talking about. I did not txt back and as I'm sure you know you shouldn't txt back unless you know its a legitimate service. Unfortunately one of my friends did txt back saying STOP and now he's getting loads of spam messages as they know his phone is active.

I previously worked for a phone company, so I have an idea of how a lot of this stuff is pulled off.

The answers to your questions all really depend on what scam they are trying to pull. Are they just interested in getting a list of active numbers for a sucker list of future scams or are they trying to actually scam them using this message.

What sort of equipment, infrastructure, software, etc will they require?

You can spoof a CallerID to perhaps persuade the user that you are someone that you are not by using a voip account and a server running Asterik. See this article Caller ID Spoofing w/ Asterisk

How are they able to obtain such large batches of numbers – do the network operators sell them in this way?

Depending on the numbers if they are actually mobile numbers and they need a reply as part of the scam, its more than likely that they have just got a hold of a load of SIM cards you can buy them in bulk from eBay and other places. Just have a google you can get sim cards for less than 50p a go.

Given that they have these ‘batches’ of numbers, how are they able to setup and monitor them (is everything redirected to a single source).

Asterik again can be used to handle large volumes of numbers. They may also use a third party to redirect their calls.

How permanent/transient is this setup? I.e. are numbers only ‘Live’ for a short period of time.

Dependant on how they get the numbers its most likely they will only be live for a short period as the network providers are usually quite hot on cutting off scammers.


Is there a vulnerability other than XSS which can result in client side script execution?

Note that this answer applies to the initial version of the question which was less strict and clear about what the OP would actually like to know.

To execute malicious script on the client side in the context of the web application the script

might be injected cross site by the attacker for example inside the URL (reflected XSS)
might be served by the original webserver because the server was compromised or had a stored XSS vulnerability
might be done by loading or moving the client side of the application into some unexpected context (DOM XSS)
might be injected on the client side using a browser extension, which can be controlled by the attacker either because the extension is malicious or has bugs
might be injected by misusing script includes for third-party, for example when including ads or tracking (malvertising)
might be provided by the attacker using a MITM attack (thanks to Anders for this idea)

And of course there might be bugs in the browser which makes this possible (universal XSS).


Yes, it's not got a distinct meaning in information security - from dictionary.com:

  the determination of priorities for action

So, deal with the most critical problems first, working down the list of known issues, trying to minimise the overall problems you can face.

Usually goes something along the lines of:

Make sure no-one else can get into the system
Take an image of the system
Rebuild the system from known good
Find out exactly what went wrong in great detail


Tracking down the source of email attacks

The email headers should suffice (see "email header ip address for an example of how to read them."). Perhaps post them here as well.

I want to emphasize that while only the most recent header line is absolutely reliable, header information is really the only information about email origin that you can obtain.

You could email a copy of the headers to the "sender", and they should then have enough information to confirm or deny - but it is up to them to have the desire, expertise and diligence to do something about it. As the old saying goes, "You can lead a horse to water, but you can't make him participate in synchronized swimming."

If you suspect the headers are not reliable, then the only recourse is to slowly work backwards through each intermediate MTA, each time confirming that the header line matches their logs. This would allow you to prove who the sending MTA was with absolute certainty, but:

It's a HUGE amount of work. Several hours at least.
You'd have to be quick, as many large mail systems can't store log data for long due to the volume of storage required
You'd have to be lucky, and hope that every intermediate MTA co-operates with you

Even if you succeed, the sender can still choose to ignore you (it's their mail server after all), in which case your only remaining recourse is to report the spam to blacklist providers.


Although Skype uses robust mechanism and cryptography to authenticate a user, a password can be compromised in many ways from many different points. For example:

From your endpoint, e.g. malware stealing your password, using a keylogger, etc.
From external parties, e.g. password reused on another system/application which has been hacked, password manager being compromised
Guessed by an attacker, e.g. brute-forcing, "lost my password" feature revealing the password in clear-text

In fact, there are so many different ways to compromise your password that one can not answer your question precisely.

Most of the time, attackers are able to obtain credentials on robust applications that they cannot compromise directly (e.g. Skype, Facebook, Google) thanks to password being reused on different applications and systems with weaker security settings.

For instance, when a big username & passwords list is leaked on internet, hackers immediately check for those credentials on other applications.

You can also check online tools that verify if your username / email has been compromised somewhere, for example: Have I been pwned


How secure is commercial cloud storage compared to my private cloud storage?

The question initially asks about security benefits, but then opens out to ask for "the better option" generally, and why.

In this answer I'm looking a the broader question, "which is best and why", for 2 reasons: first, being realistic, you won't decide on security alone (cost? knowhow? time? strength of personal feelings for/against privacy? enjoyment of challenge? other non-security pros/cons/motivations), and second, because security can be considered within the broader picture anyway.

Framing the question

Giving a definitive answer to the question as posed isn't always easy, because the decision almost always involves personal preferences (you might not be at much risk of intrusive data mining but still have very strong feelings about avoiding it if practical), and incomplete information (the actual risks which an infosec specialist could assess better than you, including your own ability to manage data if you keep it locally and the data safety of the proposed commercial host).

Fortunately I suspect that's largely a non-issue for your needs and this question, because the question suggests that you aren't already a data security specialist. So any answer has to fit an "informed enthusiast looking for their best options" or similar.  That means any answers where you magically make it all secure from scratch probably aren't suitable, which means we can look at the question from another angle that makes it much simpler.

Answer

From your question, the first definite point to discuss is the possible use of prebuilt systems (such as open source distributions that include cloud storage as part of an "all-in-one"/"out-of-the-box" general storage server). In these systems you don't just install a cloud storage package onto your OS. You install a complete customised and dedicated file server, which also provides cloud storage as a  feature.  You install from CD/USB, use the GUI/web to configure, and it's done.

This can be a very helpful source of assurance, because if its a well known project and has a reasonable security focus, then you can count on their own work (and their community of contributors) to cover a huge amount of the security unknown.

What I mean is, I wouldn't trust myself to set up FreeBSD, install NextCloud/OwnCloud/whatever, and trust it for security, but I probably would be comfortable downloading the FreeBSD-based installer for FreeNAS,  configuring it in the GUI for those tasks, enabling the NextCloud/OwnCloud plugin, and doing it that way, because the scope for my own ignorance and knowhow to wreak havoc is quite constrained, purely because the options I configure are preset in the GUI, they are functional, the important settings are already done, and it's mostly very clear to understand (or ask about if unsure). I'd still need to know some things, but much less and much more obvious. In fact that's exactly what I have done, minus cloud storage which I don't use.

So I'm going to assume that this is how you'd approach it if you did it yourself.

That means the real comparison isn't Google Cloud/Dropbox vs. do-it-yourself NextCloud/OwnCloud. It's Google Cloud/Dropbox vs. FreeNAS/NAS4free/Openfiler/Nextenta/OpenMediaVault etc that also supports NextCloud/OwnCloud - which has been properly configured and secured within a jail - and that's a very different proposition. It's much easier to be sure of the situation and security you'll end up with (the 'downside risk').

If the underlying system is good, the team building it is security aware, and you are comfortable with the basic config likely to be needed, then you will probably get a good level of security by any usual standard and can choose the final decision based on personal antipathy to commercial cloud storage and cost, which sounds like what you're after.

As an example, if you look at a similar decision for routers and firewalls, I switched many years ago from a commercial router to pfSense. Factors relevant to the decision included:

Cost (couldn't afford a router with the connections handling capacity I would need),
Physical access security (short of Secret Service/NSA breaking into my home, nobody is in a position to access or interfere with my computers through physical access except me. If you have hacky kids, housemates or visitors, consider the security of your data disks, backup disks (including where you keep them), physical keyloggers, FireWire/other accessible DMA devices and ports, or whatever)
Non-physical security (based on FreeBSD which is probably a lot more secure than most Linux or Windows setups, compared to most domestic routers which stop getting updates after a while or are just insecure by design or (very often) have huge security holes due to bad OS config, very popular/large community/serious use, speedy responses to security issues, team  appears to have a firm eye on security, has published security audits of the software by third party assessors which showed few issues, suggesting the team knows its job, enterprise security features if I ever want to get heavier on security),
Future-proofing (likely to have ongoing updates and active development for many years, or be forked if not, large user base, extensible and adaptable for almost anything I might need/want from it in future, even on my old Pentium 4 boards from 2003 which I have no other use for, I can get performance of hundreds of thousands of connections, caching, filtering, etc.),
Certainty of code/privacy (well-known open source, backdoors unlikely and guaranteed killed if ever found (including backdoors claimed to be "for support, honestly, bad guys won't find them!" as some products secretly have) runs on own hardware),
Easy to manage (very straightforward GUI after a bit of learning curve, any issues likely to be able to be addressed without buying another router),
and for the file server I later added, guaranteed data storing (some cloud providers suddenly failed or lost data when hacked, while not common you can't know what is happening "behind the scenes" and how dependable their setup and disaster recovery will be in reality, as a security specialist would assess it, because you just don't get access to that sort of knowledge).

I've used this platform for my router for many years now, and rarely need to do anything to maintain it apart from click when there's an update, and runs for months without issues. I've been using FreeNAS for data storage for a few months so far and it's been rock solid, any issues have been down to properly configuring the shares, so I expect much the same benefits from it.  It just keeps going, and once I get to a config I like, then I suspect I will barely need to know its there after that point.

The main downside in that equation is cost. Say you have 4TB of data (or whatever)... you might be committing yourself to a surprising hardware cost if you went that route:

Up to 4-6 x the amount of storage capacity compared to the actual data you expect to store, meaning for 4TB data you'd want up to 16-24TB of disks (file systems and especially the very reliable ones like ZFS used in many storage setups, might not want to be over about 60-80% full, disks fail so you need redundancy, and you do plan to keep a backup as well don't you?),
A good quality motherboard probably with ECC/RDIMM memory (platform stability, probably means using a server not consumer board for the ECC),
Lots of RAM (ZFS is hungry that way!),
At least one, maybe more decent SSDs (mainly for write cache but if affordable and needed then also for read cache),
Good quality power supply and probably a good brand secondhand UPS (so that power glitches don't trash the data),
Probably at minimum a second smaller, less well specified box for nightly backups/clones (replication, in case the entire primary box goes bang, so you don't lose it all).
Periodic replacement costs as equipment fails (each disk might need replacing every few years, so 4-6 disks might average 2+ a year if they're cheapest commodity type or about 1 a year for 5 year enterprise types)
Power (in some countries and locations, electricity is expensive and running a server with multiple drives will definitely add to the bill)

So cost is definitely an issue to consider when it comes to storage locally or in the cloud, because with a commercial provider you don't have to worry so much (usually!) whether their hardware and backup approaches are data-safe. Less so when it comes to say, a router where you can just restore config onto new hardware and carry on as normal if it all goes bang.

There may be workarounds if decent hardware cost is an issue. For example you might decide to run it on commodity or consumer hardware, with no backup or redundancy other than using two disks configured as a mirror. That would slash the cost a lot. You'd then set a task to copy your modified or important data into an encrypted disk system locally (truecrypt/veracrypt etc) and upload that to Google/Dropbox instead, or keep a copy on a third disk which you put safely on a shelf and update weekly. That might be a possible solution to the cost issue, but as with all compromises you'll have to consider if it works and the pros and cons for you.

As a guide and if it helps, I'm doing it all locally and its a lot of hardware - the primary server and UPS probably contains 8 x £250 ($300+?) of enterprise data HDDs, another £500 SSDs, and about 96GB of ECC ram for another £500 - and that's before the CPU, motherboard, PSU, UPS, and backup server. I've saved a bit with two 'tricks':  using a decent commodity brand for the backup (less worried about it once there's multiple copies of the data), and by having it do "double duty" (it acts as a router and service host when I'm awake during daytime, and when  asleep and the network is quiet at night it grabs a copy of the current file server contents acting as a backup server)  But that's my situation, yours may differ.


Short answer: no. Long answer: If there's no reason to investigate, you're probably good. They could in theory, but it is highly unlikely. If they have installed monitoring software on the device, even then they will usually not directly see what sites you visit at home. That is only easy and legal on their network. What sites you visit on your private network is your private information. Maybe your history logs can be read out, but if you've used private browsing for this it its not a problem.


Can a certification authority sign another CA's certs?

Yes, it is possible, but the better question is would they?  The CA's reputation is their life blood.  Why would they give a trusted signing authority to another CA that might not hold up to their standards (and could be a direct competitor in the future.)  To the best of my knowledge, no CA offers this kind of service, nor do I see any reason why they would consider doing so in the future.  Apparently some CAs do allow this, but they have extensive requirements for the security of the sub certificate and charge a very large amount for the privilege.


Use a single CSRF token per session (rather than per request or per user).  For example, the CSRF token can be the plain text session ID, or an encrypted or securely hashed (e.g. HMAC) version of the session key.  Or you could store the CSRF token as a session variable that is associated with the session key.  These are all common options.

If you're wondering if this makes your site any less secure, read this article for reassurance.

If you happen to be using the ASP.NET framework, the way to do this is simply set the Page.ViewStateUserKey to the session ID.


Is there a PRNG in Java with a period of at least 256 bits?

Java's cryptographic layer is pluggable: you can configure extra providers and even set them as "default".

For java.util.SecureRandom, the default implementation (called "SHA1PRNG") that is shipped with Sun/Oracle JVM uses SHA-1 and a 160-bit internal seed obtained from the operating system (see this analysis). For all intents and purpose, its security level is "about 160 bits", which is more than enough.

If you really made enemies among some major deities that have access to sufficient divine computing power to break 128-bit keys (and who also, for some reason, prefer not to strike you with lightning, as is customary), then you will need another PRNG provider. I don't know of any ready-to-use JCE provider that includes a PRNG algorithm that would fit your 256-bit criterion, but such things may exist nonetheless, or could be implemented with relatively little effort.


Why would a school need to install certificates on student laptops?

There are two different kinds of certificates you could install on a machine:

The first type of certificate is root certificate authority. A root certificate contains just a public key of the certificate authority. A root certificate is a trust anchor that is installed in your machine so that your machine can identify "trusted" sites to connect to, a certificate authority can issue a claim in the form of a server certificate that "X is owner of domain Y" and because your machine trusts the root certificate authority, it'll trust that claim. If the school/company installs a root certificate to your machine, your machine will trust whatever connections made to the school/company's server thinking that it is legitimate. If you install a root certificate, the school/company would be able to intercept any SSL/TLS connections made by your machine that runs through their network without triggering browser certificate errors/warning.
The second type of certificate is client certificate. A client certificate contains a private key that is unique to you and a certificate signed by the school/company's certificate authority. A client certificate is used for your machine to authenticate to the school's infrastructure, proving that it is you that is connecting. A client certificate is used as essentially a better solution to authentication credential than having to remember passwords. A client certificate cannot be used by the school/company to eavesdrop on connections made by your machine to servers that aren't owned by the school/company.

A client certificate is  fine to install and shouldn't cause any security concerns. In contrast, be very wary of installing a root certificate, as it is a cause for concern as the root certificate can easily be abused.


Pass SSL certificates after verification to other components

Can the software component verify the certificate it has received from another software component is same as the one from the web server?

It might trust the other software component that this is the correct certificate but it cannot verify this.


In terms of "best practices", Full Disk Encryption is designed to mitigate threats to data at rest. For example, FDE can mitigate the risk of a disk being removed from a server and then an attacker attempting to read data from it.

Against an attacker who has access to a powered on server (from which they can extract the key in RAM) most FDE systems are not an effective control (nor are they intended to be).

If you're looking to mitigate the threat of attackers getting access to your running servers then there are other controls you should be looking at.

For the threat of physical access then you need to look at the physical security of the server (e.g. locks on cabinets, access control to server rooms)

For the threat of logical access to the running server, then things like logical access control, patching, firewalls etc are the appropriate mitigations.


The PMK is used the same after generation, however they are generated very differently. With WPA-PSK the PMK is generated from the PSK, fundamentally if one knows the PSK one can access the network. With WPA-Enterprise this is a little different as 802.11x does EAP authentication to a RADIUS server and then the RADIUS server gives the PSK in the parameters it sends back after successful authentication and can give a different one for each authentication, therefore every client is using a different PSK, and each session can give a new PSK.


Nevermind, found the answer, it's:

  db insert domains

same thing with others as well, for companies it's "db insert companies"


Is a single infoleak enough to break ASLR if you don't have access to the binary?

Possibly. It would depend on the leak and the type of address leaked. For example, an address for the heap, stack, or executable segment of the binary are of little use for conventional exploitation without their context and knowing the offset from the base.
However, it may be possible to determine the type of address just by looking at it, and some useful information can still be obtained; especially return addresses on the stack. If it appears to be an address from the binary's executable page, that may give you an idea of the addresses used for code in the binary. If it's also possible to exploit a buffer overflow, an attack with something like BROP may be possible.
If a pointer to libc is leaked, it may be possible to determine the version of libc and what the pointer points to (IIRC, the lowest n bits of the address aren't affected by ASLR and can uniquely identify the libc function), possibly with some educated guessing and by searching the libc database. Once offsets are calculated, this combined with a buffer overflow could allow you to perform a ret2libc attack to call any function in libc and gain code execution.


They are not equivalent.
The W3C Draft for CSP only defines the headers Content-Security-Policy and Content-Security-Policy-Report-Only. No other headers are defined by the document.
That means browsers can choose to include this specific typo, but it is unlikely that browser vendors will attempt to predict all possible ways to misspell Content-Security-Policy in order to improve compatibility.
How to proceed now?
Mark it as a finding, stating that their CSP header is malformed and will likely be ignored by browsers. Fixing it should not be difficult anyways. If the developers state that some arbitrary browser they tested this on still works with it, you can still mention that it's not covered in any draft and is implementation-specific behavior - and thus a risk.


Why can't we encrypt the message with sender's private key and receiver's public key in case of sending messages through a server?

First of all, in TLS 1.2 the RSA is not used for encryption or decryption of the messages. It can be used for authentication and key exchange but not actual encryption. TLS utilizes symmetric cryptography for the encryption of the payload. Generally, it is considered a good practice to use RSA only for the authentication part, as the keys exchanged using RSA are not ephemeral. It means that if anyone was ever able to decrypt captured communication he would be able to find the symmetric keys used to encrypt the payload and obtain the data exchange between nodes. One of the reasons why we are using encryption is a fact that it is very easy to record the communication of the network.
We are currently pushing towards "perfect forward secrecy" which can be only achieved with ephemeral keys. For that to take place we need to exchange keys without sending them in the communication. It is possible to exchange symmetric keys without sending them over the network, we are using Diffie Helman (or EC variant of it) key exchange for that.
Your problem boils down to the fact that the TLS session is between the server and the sender, not the sender and recipient. Depending on your level of trust in the server you may consider it man in the middle. This is the reason why E2EE is used. You don't want to exchange the secrets using symmetric crypto cause if it ever gets decrypted your communication is out in the open. It doesn't really matter if the asymmetric crypto is end to end in this case or sender -> server, server -> receipient.


Why don't browsers restrict cookies per-tab to combat CSRF attacks?

Yeah, the cookie is a "browser thing"... not a "tab thing". Is to favor multiple login on the same site on different tabs what in the most of the cases is an advantage.

Yeah, you are right, in the hypothetical case of to have "tab cookies" the CSRF attacks make no sense because as I guess you know very well, the Cross Site Request Forgery attacks are based on:

A user have an already existing session on website A.
Then, clicking on an evil link maybe on website B or in an email or however, another request is done (this is usually done in other tab) launching a forged request trying to do something on website A "abusing" of the already set existing session or cookie on the victim's browser to perform any "evil action".

If you want a separate session on a browser there are ways to achieve that like using private browsing. That separates the session/cookies from the other sessions. That's because is like "other instance of browser", but between tabs of private browsing you'll share session/cookies in the same way.

Hope it helps.


Discovered a security flaw in a company, what to do?

You just found the issue, you didn't take advantage of the flaw and never intended to do harm (I assume you wouldn't do any harm to your friends).

However, every company should be happy if you report the issue to them. Big companies like Twitter or Facebook even pay nice bounties for this.

You might check out HackerOne if the company you are talking about is listed. In case it is, just go ahead and submit an issue. You don't have to worry about the "I tried to hack them, they will send the police and arrest me" scenario. In case it is not listed, try to browse their web if they offer some sort of bounty program themselves. If they don't you can still submit the issue to their support, etc.


Potential employer wants me to email my SSN with an application form, is this a major security risk?

I feel like this is a major personal security risk for myself. Is it?

It may be. You may not be targeted specifically, but "email is a private as a postcard". (Not enough reputation for a link, but it's googleable.)

  If so, how can I make that clear to them while still maintaining my eligibility for employment?

I would've called my contact person and explained that I'm a security conscious person and that I don't feel comfortable with sending all that information over the Internet. I would then ask if there is another way for them to recieve it, or if they could wait until an in-person interview.

It may also be illegal for them to require you to send it over unecrypted email, depending on which state you are in. I'm neither a US citizen or a lawyer, but this came to mind:

See http://consumersunion.org/news/state-laws-restricting-private-use-of-social-security-numbers/ and for example California civil code

  1798.85.  (a) Except as provided in this section, a person or entity
  may not do any of the following:
  [...]
     (3) Require an individual to transmit his or her social security
  number over the Internet, unless the connection is secure or the
  social security number is encrypted.


Domain offline - are unmaintained email clients a security risk?

If you have a domain that has handled important email for you, you need to keep it registered forever or at least until any email you might receive is completely useless.

An attacker can easily buy your old domain, setup a mail server to accept all mail regardless of whether or not the user exists, and accept any mail sent to you.

This means that s/he could send your bank a password reset request for example, accept the email, click on the link and steal your money.

There's no particular risk for your client software. The only risk I can see is that whoever owns the domain can accept and read your incoming mail.


A fake Snapchat account has been created in my name

This kind of thing happens all too often, and there isn't much you can do about it. You aren't going to get ahold of the person's IP address, or be able to find out anything beyond what is on the public snapchat account profile. Snapchat could determine a lot more, for instance IP address and the email address used when creating the account. They are not going to give you this information though, and even if they did give you the IP it's not good enough to tell for certain who the perpetrator is, especially if they are using TOR or a shared IP address.

Your best bet is to contact snapchat and tell them you are the victim of identity theft, and ask for the account to be closed. They will have a process for that.


Printing and deleting as a security measure

To answer your more specific question in comments:

  I'm mostly curious to know if there would be any benefit to converting digital documents to physical ones so as to avoid hackers gaining access to any information in the case of an attack.

This, like most security, depends on what you are protecting against.  If you have completely erased all posts older than 21 days from your database, then you have effectively prevented anyone who gains access to your database from reading those posts.  However, since all the posts are now presumably in plaintext on a bunch of pieces of paper in a cabinet, a thief could steal the physical papers.  You may or may not consider that a valid concern, but again it depends on your threat model.

I don't know how you define a bad idea, but I can say with certainty that this is not the path I would take.  The biggest issue is that printing and storing a bunch of papers once a day is a pretty big expenditure of your time and energy.  What happens if you go on vacation, for example?  Additionally, if you want to protect the posts on your side, you'll want to use strong encryption on all messages currently in the database anyway.  In that case, a malicious person who manages to get a copy of your database won't be able to read the messages.

Going back to your original idea, if you are willing to put in the effort to deal with physical objects each day you might be better off using an air-gapped server to store old messages.  That way, you can keep them encrypted and still retrieve them later if necessary, but not even their ciphertext will be exposed if your main site is compromised.


Why is hashing a password with multiple hash functions useless?

The assumption always is, that any attackers will know the software used, including configuration like which hash is used. There is always a risk of that knowledge leaking, so robust systems must be safe even if their source is known. (Maybe the attacker bought the same piece of software) Also, if the attacker somehow obtains just one password, and the corresponding hash, it's relatively easy to find out which one of a set of plausible hash functions produces that hash.

As for using multiple hashes for one password at the same time, the problem is that it usually makes it possible to brute-force the hashes by just concentrating on the weakest or easiest to calculate (chosen by the attacker.)

There was no link, so I don't know exactly what situation it is you refer to, of course.


Analyzing malicious PDF can sometimes be very tricky, attackers are becoming more and more creative in a way of infecting people.

But let's make this simple, here are some examples which will indicate that PDF is malicious.

JavaScript based exploits

The PDF specification supports JavaScript programming and makes a number of JavaScript functions available to programmers in the form of APIs.

Due to its flexibility and ease of use, JavaScript is widely used in malicious PDFs, and it is used to exploit a vulnerable JavaScript API and to setup the PDF reader program’s memory with malicious code (aka heap spray).

Non-JavaScript based exploits

Although the majority of malicious PDFs observed in the wild use JavaScript, either for the exploit or to set up the memory for further exploitation, we have observed other techniques used as well. One alternative to using JavaScript is to embed Flash objects in the PDF instead.

From PDF document: The Rise of PDF Malware

Here is also nice cheat-sheet for analyzing malicious documents.

Also take a look of 'How can I tell if a PDF file I was sent contains malware?'


pwdump gives me blank passwords as hash although there are passwords?

Since the latest Windows Anniversary Update, Windows 10 seems to be using AES encryption on the SAM file, as well as storing information differently.

See this tweet.

Currently, pwdump doesn't appear to support extracting hashes offline in this new update, there's an issue posted on the GitHub page here.

You may have to sit tight and wait for an update, or look for an alternative tool.


Need help detecting a flaw or vulnerability in a network

Simple answer:
Start sniffing your network and discover what is happening. After this work with what you'd seen.

Sources, destinations, packets entering, packets leaving and possibly their content. It's all there if you can catch.

Sniffing your network and understanding how this connection is being stablished without suppositions is the key to solve your problem, so you can start working on what's really happening.

Discover how it's leaving your network and drop it.


Additional important steps:

Firewall everything. Only expose SSH port, HTTP and HTTPS (+ any other application specific ports)
Make sure MySQL is binding to localhost only, run the secure set up (be careful with PW length it only supports 32 chars)
Install and configure Fail2Ban to dynamically block any suspicious requests
Remove/disable any unused Apache modules
Make sure your least privilege access controls are set up properly, e.g individual keys, easy way to revoke access, full logging of all commands and terminal history
If possible implement IP whitelisting for SSH access

Desired steps:

Use a CI solution for the actual code deploys, this adds a layer of governance and control to the source code appearing on the server
Lock down the public facing side with IP whitelisting/basic auth, no sense it getting crawled and bombarded when it is in development
Make sure your Apache and MySQL logs are set up properly with the correct log level and permissions (Apache logs are owned by root so be careful if making any changes here)
Move ssh off port 22. No doubt someone will moan about this, yes it is security through obscurity but coupled with Fail2Ban the advantage here is less bot traffic on port 22.

You have not mentioned any of the services or languages used, if you are using PHP etc their is a whole host of other measures to take as well.


Simple SQL injection to bypass login in MariaDB

In MariaDB the comments must be followed by a space:

  From a '-- ' to the end of a line. The space after the two dashes is required (as in MySQL).

Please try ' OR 1=1 --[space].


I read a post earlier concerning port scans and one of the answer stated something along the lines of:"There is no definitive protocol that can determine if a host is alive", is this actually true? Surely there must be a way?

No, and this is a good thing. If I host a server, surely it's my choice who I send data to? I could filter out entire continents if I only want to be able to access my server from, say, The Netherlands if that's the only place I access it from. Unless you happen to scan from the Netherlands, you wouldn't know whether my server is up.

Now that's a server, but what about your laptop? Why should anyone be able to learn whether your laptop is turned on just by knowing its IPv4 or IPv6 address? Most NAT routers and stateful firewalls don't return anything (not even an ICMP Host Unreachable or TCP RST packet) when you try to reach a computer in its network -- and I think that's good design.

If you're in the same LAN, I think there are typically ways to figure it out using arping (ARP ping), but technically you could prevent that from working too if you want to. I just doubt anyone bothers.

  2.This got me thinking; how does port-scanning on a computer outside of your network actually work? Is it even possible just by knowing their public IP?

Oh, I think I half answered this already... I'll dive into this a little deeper.

Port scanning scans ports, but you seem to be asking about checking whether a host is up in the first place.

Usually people access the internet via their router (or modem or something). Strictly speaking a router just routes, but what consumers call a router is a device that does all sorts of stuff (DHCP, DNS, NAT, etc.). Most people only have one IPv4 address due to the shortage and everyone in the local network gets a local address (typically 192.168.x.x). The router performs a function called NAT, which translates between the local address and the public address.

When you connect to some IP address on the Internet, your system sends a SYN packet there and a connection is setup. Your router gets that, and any responses will be forwarded to your computer (based on the port the packet is addressed to). Any SYN packets or UDP packets or something will bounce off because the router wouldn't know which internal host to deliver it to. If you setup port forwarding, this tells the router to always forward certain ports to certain hosts.

If you have IPv6 or a public IPv4 address, the router's firewall will (or should) perform a similar function. It doesn't do address translation because it's not needed (everyone has their own address) but it does filter incoming connections that you didn't initiate. This is a security feature.

So scanning to see whether a certain computer is up won't work because the router just drops anything it doesn't recognize. It might also return ICMP packets saying the address is administratively prohibited (when the firewall is simply active), which doesn't tell you anything either.


Confused about the most relevant way to secure my APIs

The difference is : OAuth 2.0 is a standardized protocol, and there is many implementations in differents langages (JAVA, Python, PHP, JavaScript...etc) for both client and server sides. So you don't need to follow this article to implement something which "seems" similar to the OAuth 2.0 protocol and probably not secured.

For the cookie-based token solution : an attacker maybe can still a cookie from a logged (an authorized) user.

So, I think the best solution is to use the OAuth 2.0 protocol which already used by many corporations(facebook,twitter) for thier APIs


What are the security precautions taken to ensure a virtualized domain can't compromise its host

The implementation of the virtual machine is a kernel for the kernel.

In a typical operating system, there is application code (aka "userland") and kernel code. They use the same set of instructions; however, the CPU knows, at any time, whether it is executing application or kernel code. When application code tries to execute some opcodes which access the hardware (the in and out opcodes for x86), the CPU traps: it temporarily jumps to kernel code (the address of that code is registered in a specific table). The kernel code decides what to do with the access (grant it, modify it, kill the application process...). If the kernel code decides to grant the access, or the kernel blocks it but pretends to have performed it, then application code can believe that it could access the hardware directly.

Similarly, when application code reads or writes data in memory, it uses an abstraction of memory: a virtual address space which is mapped to physical memory (or not...) through the MMU. The MMU uses tables that the kernel fills (and, of course, the kernel takes care not to make these tables part of the address space visible from the application code). This way, the application is in a magical world where it is alone in a big address space, whereas in reality there are several concurrently executed applications, which cannot see each other.

A virtual machine uses the same structure, one level up. When the kernel accesses the hardware or the MMU, it actually is under scrutiny of the virtual machine implementation (the hypervisor) which traps unwanted accesses.

Particulars vary quite a lot. The main distinction is whether the kernel is aware that it runs in a virtual machine or not. With Xen, the kernel is aware; it knows that it is under control of a superior deity (the hypervisor) and does not try to tap into the hardware directly; instead, it asks nicely through a dedicated interface. With VirtualBox, the kernel is not aware; the guest operating system believes that it runs on true hardware, and the VM works hard to maintain the illusion.

Other differences can be made on the means by which virtualization is enforced (i.e. how the hypervisor can trap kernel code). Recent x86 processors offer some specific support with dedicated opcodes. Older x86 processors, in 32-bit mode, can use the various remnants of older protection mechanisms (segment registers and the four "rings", mostly)(these have been removed from 64-bit mode, which is why 64-bit VM must use AMD-V/VT-x). Other techniques include emulating each virtualized opcode (for the whole of the emulated machine, or parts of it), possibly with more-or-less dynamic translation (aka JIT compilation), aas QEMU does in cross-CPU situations.

There is a whole paraphernalia of terms on the subject (virtualization, paravirtualization, emulation, simulation, hypervisor...) which is not completely consensual, and often quite byzantine. Some readers who cling to some specific doctrines of terminology have probably been somewhat irritated by the loose way I use the terms.


Is there any way to safely examine the contents of a USB memory stick?

I'd use a Raspberry Pi, the Model A/A+ without a network connection, as:

It (or rather Linux) can read most types of filesystem on a USB stick.
The only non-volatile storage it has is an SD card, which can be reformatted (or discarded if you're paranoid) afterwards.
If the USB stick turns out to be electrically malicious, you've only lost $20 of hardware.
It runs a somewhat non-mainstream OS on a non-x86 platform, which makes it less likely to be vulnerable to typical Windows malware.

This still leaves the question of what you'd do with any files you find on it - copying them to any other machine would obviously put that machine at risk.

Nothing is 100% safe, mind you. I can put it no better than James Mickens: "If your adversary is the Mossad, YOU’RE GONNA DIE AND THERE’S NOTHING THAT YOU CAN DO ABOUT IT".


How do I determine if an existing SSH private key is secure?

As RubberStamp points out, this is covered in detail in stronger encryption for SSH keys but to summarize:

Look at the words in the first line, and the next one or two.

 -----BEGIN RSA PRIVATE KEY-----
 Proc-Type: 4,ENCRYPTED
 DEK-Info: DES-EDE3-CBC,(hex)

 (several lines of base64)
 -----END RSA PRIVATE KEY-----

(or similarly with DSA PRIVATE KEY or EC PRIVATE KEY) is the old, bad-PBKDF format.

 -----BEGIN RSA PRIVATE KEY----- # or DSA,EC
 (base64 immediately)
 -----END RSA PRIVATE KEY----- # ditto

is the old unencrypted format, which is even worse.

 -----BEGIN OPENSSH PRIVATE KEY-----
 (several lines of base64)
 -----END OPENSSH PRIVATE KEY-----

is the OpenSSH-specific 'new' format, which is why it says OPENSSH right there. However, this format doesn't directly show whether it's encrypted or not. The easiest way is to try reading it (either for an ssh connection, or with ssh-keygen to convert or modify it) and see if it needs a password. Alternatively, you can strip the labels and decode the base64 (conveniently, openssl base64 -d does both of these!) and look at it:

$ openssl base64 -d <se200935.clr |od -c
0000000   o   p   e   n   s   s   h   -   k   e   y   -   v   1  \0  \0
0000020  \0  \0 004   n   o   n   e  \0  \0  \0 004   n   o   n   e  [snip rest]

$ openssl base64 -d <se200935.enc |od -c
0000000   o   p   e   n   s   s   h   -   k   e   y   -   v   1  \0  \0
0000020  \0  \0  \n   a   e   s   2   5   6   -   c   b   c  \0  \0  \0
0000040 006   b   c   r   y   p   t [snip rest]


Where can I find articles about identity disclosure attack?

Identity theft deterrent / strategy

For some quick wins I suggest you read into NIST initiative on National strategy for trusted identities in cyberspace

To give you the quick summary of the program focus and objective it is to...

  The new Identity Ecosystem is meant for sensitive transactions — banking, shopping, accessing health records, etc. It is designed to protect your privacy by helping online providers verify your identity before accepting or providing sensitive information to you

This is where the real attacks happens and attacks that costs which is sometimes unquantifiable e.g reputation and trust.

REPORTING

I hope I have understood you correctly if you want some responsive authority to take action in case you experience some indications of fraud then depending upon the country you live and the laws that applies you can best contact local law agency. Like in case of USA FBI help you identify the fraudster through this online reporting system.

http://www.fbi.gov/about-us/investigate/cyber/identity_theft

If you are from USA then following agencies get involved when its comes to prosecution

Excerpt taken from What Are Identity Theft and Identity Fraud?

Federal prosecutors work with federal investigative agencies such as the Federal Bureau of Investigation, the United States Secret Service, and the United States Postal Inspection Service to prosecute identity theft and fraud cases.

Responsible authority
Also, taken from the excerpt

  Under the Identity Theft and Assumption Deterrence Act , the Federal Trade Commission is responsible for receiving and processing complaints from people who believe they may be victims of identity theft, providing informational materials to those people, and referring those complaints to appropriate entities, including the major credit reporting agencies and law enforcement agencies

ONLINE REPORT FTC


Detecting a Pixie Dust attack? How much of a trace does it leave behind?

I reached out to SoxRox (an assistant developer of PixieWPS) and this is what he told me:

  "It’s different for every case, but for the average case, most routers
  don’t have enough storage to keep massive logs, and they’re generally
  disabled by default.

  The only way they could know is if they see WPS is locked in the GUI
  or if they were passively listening as you did it

  They could get your MAC address, likely an RSSI, but that’s about it

  And it’s not likely that people passively monitor 24/7

  If they’re next to their router, they may also see the wps light
  flashing "

Thanks so much to everyone and especially https://www.reddit.com/u/realHoffman for letting me know who to reach out to :D

P.S we talked for some more after that, PIN association and any WPS attack follows the same logic as he stated above as it is all the WPS framework.


I personally really like the idea of an encrypted container residing on a storage device. Truecrypt can do that stuff and while setup properly it is secure.

Reference

http://www.truecrypt.org/docs/?s=truecrypt-volume
http://www.truecrypt.org/docs/?s=hidden-volume-precautions


Are the CPU protection rings meant to protect against malicious programs or against unintentional programming mistakes?

Are the cpu protection rings meant to protect against malicious programs, or against unintentional programming mistakes?

CPU protection rings are meant to enable operating system software the control and protection checks necessary to implement an overall security strategy with good performance.  This includes the notion of kernel mode vs. user mode.  (Multiple rings are useful so that one operating system can efficiently guest host/run (an)other operating system(s), instead of only user programs.)

  I don't think that the CPU protection rings are meant to protect against malicious programs, because a malicious program can be written to run in kernel mode instead of user mode

You would still have to find an exploit that would trick the overall hardware/software system into running the program in kernel mode.  An operating system would be remiss in allowing an unknown program (from the internet or otherwise) to run in the most privileged ring, regardless of where that code might have wanted to run.

  (it can be written as a device driver for example) and then it will be able to cause whatever damage it wants.

Yes, if you could trick the system into loading your device driver, you'd have a lot of control.  Bootkits do similar, they bypass security by placing files early in the boot process, so that those run before the operating system has a chance to come up and protect things (then further, they hide themselves from prying eyes).

This an aspect of why permissions are so important.  A user mode program with unlimited permission can write to the file system in areas that will cause the operating system to load device drivers or the boot mechanism to load a bootkit.

  I rather think that the CPU protection rings are meant to protect against unintentional programming mistakes, for example a programmer may unintentionally write code to access the memory of another process or the memory of the kernel, but since the program will run in user mode, the program will not be able to access the memory of another process or the memory of the kernel.

Kernel mode, for example, can reprogram the hardware's virtual memory protection and mapping mechanism, and this allows an operating system to establish separate address spaces for user mode processes.  User mode, however, cannot make changes to the address space.  Yet, the hardware CPU cannot remember everything needed to maintain an address space, so when it runs into something it doesn't know about, it faults back into kernel mode asking the operating system software to take over — the OS then decides if this is an illegal access (e.g. at kernel memory, or some other process or shared library) or if this is a legal access that the CPU didn't fully know about this go around (this is how page faults work in virtual memory).

Ultimately, security is accomplished by a complex choreography between hardware and (operating system or privileged) software.  The hardware does simple (and a few complex) things that it can be programmed to do and that it can do rather quickly (perhaps in parallel with other computing), and anything that either doesn't fit inside the CPU or is overly complex is left for software.  Software then makes use of the hardware features constantly changing and reprogramming the hardware as needed to run different programs or even different parts of the same program, while preventing the program from coloring outside of the lines.


Has any virus attempted to compromise the anti-virus database?

Anti-virus software are only useful as a preventive measure.

When your computer is clean, they are able to detect and prevent any attempts by malware to execute on your system. They rely on their malware database to do this. New and undiscovered malware will not be detected in such a way.

If a malware manages to execute on your system, you simply cannot trust the system anymore. There is no way to ensure that the malware is successfully removed. There is just too many ways a piece of malware can hide itself. Your best bet would be to wipe the system and start over in such a situation.

To answer your question - yes it can be done, it has been done.

Prevention is always better than cure. Take the usual steps to protect yourself - don't execute untrusted files and so on.


Is an anonymous FTP user always a risk (even if this user doesn't have access to anything)?

That connection does not mean you have no rights, it means there was a network problem setting up the FTP data connection. Here's a thread on FileZilla's forum about similar errors. Causes range from unresolvable hostnames to misbehaving proxies. But I strongly doubt that the reason for this error is anonymous user restrictions; that would be indicated by some sort of 4XX or 5XX error from the server telling you you don't have the rights to do something.


TEE is secure mainly because of the key store is placed directly on the CPU and access to it is limited to security functions of the CPU (SoC). Also, the memory is spitted in between secure and non-secure world. Additionally, the trusted boot is ensured which makes impossible to run another than trusted code on the CPU (SoC). And as you correctly stated, there are various isolation zones making sure the running code can't be hacked somehow.

As far as I know the linux kernel does not support trust zone fully. Also, you would need some trust friendly kernel loader. It would be hard to get it work I would say.


How to install Metasploit on Mavericks + MacPorts?

Version used

MacOS X        10.9.4
Xcode          5.1.1
MacPorts       2.3.1
Ruby           1.9.3
Postgresql     9.3.5
Metasploit     4.9.3

Method

To avoid any confusion between system, MacPorts and Metasploit binaries
it is fundamental to start to install everything in clearly separate
part of the filesystem.

Here are the choices I took:

/local/MacPorts     initial install of MacPorts
/local/Metasploit   install of Metasploit
/opt/local          install of everything managed with MacPorts

Steps

The overall steps to install completly Metasploit are:

Xcode + command line tools
MacPorts
Ruby
Postgresql
Metasploit

1. Xcode + command line tools

Download Xcode 5.1.1 from the App Store (2 Go)
launch it to check and accept the licence
install the command line tools with:

xcode-select --install

2. MacPorts

Create the initial directory structure (let's say my account is BOB).

$ /usr/bin/sudo mkdir -p /local/MacPorts
$ /usr/bin/sudo chown BOB /local/MacPorts

Download the latest tarball:

From MacPorts:
MacPorts 2.3.1
to save it under:

/local/MacPorts/MacPorts-2.3.1.tar.bz2

Extract

$ cd /local/MacPorts
$ tar xvf MacPorts-2.3.1.tar.bz2

Configure, install

$ /usr/bin/sudo mkdir -p /opt/local
$ cd MacPorts-2.3.1
$ ./configure --prefix=/opt/local
$ /usr/bin/sudo make install

port isn't in my PATH, and this is normal.
1st PATH switch

(I'm using zsh) insert within ${HOME}/.profile, within the section
which is always run and after any other PATH or MANPATH definition:

PATH=/opt/local/bin:/opt/local/sbin:${PATH}
export PATH
MANPATH=/opt/local/share/man:/usr/share/man
export MANPATH

PATH switch:

$ . ${HOME}/.profile

Update MacPorts DB

$ /usr/bin/sudo port -d selfupdate

port in in my PATH, and this is normal.

3. Ruby

Download, configure and install ruby19

$ /usr/bin/sudo port install ruby19
$ /usr/bin/sudo port select ruby ruby19

check that everything is ok thus far:
    $ type ruby
    /opt/local/bin/ruby
    $ ruby --version
    ruby 1.9.3p547 ...
Download, configure and install bundler

$ gem install bundler

4. Postgresql

Download, configure and install postgresql93

$ /usr/bin/sudo port install postgresql93-server

the correct install will display:

To create a database instance, after install do
 sudo mkdir -p /opt/local/var/db/postgresql93/defaultdb
 sudo chown postgres:postgres /opt/local/var/db/postgresql93/defaultdb
 sudo su postgres -c '/opt/local/lib/postgresql93/bin/initdb -D /opt/local/var/db/postgresql93/defaultdb'

Simply run these 3 commands, and on correct DB initialization, postgresql will warn you:

WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.

Success. You can now start the database server using:

    /opt/local/lib/postgresql93/bin/postgres -D /opt/local/var/db/postgresql93/defaultdb
or
    /opt/local/lib/postgresql93/bin/pg_ctl -D /opt/local/var/db/postgresql93/defaultdb -l logfile start

Use the launchd plist installed by MacPorts in the right place:

$ /usr/bin/sudo launchctl load -w /Library/LaunchDaemons/org.macports.postgresql93-server.plist

check that everything is ok thus far:

$ telnet localhost 5432
Trying ::1...
Connected to localhost.

ctl+C
Secure postgresql (a vulnerabilities DB should be of very restricted access)

$ cd /opt/local/var/db/postgresql93/defaultdb

edit pg_hba.conf to remove the lines:

local   all     all                     trust
host    all     all     127.0.0.1/32    trust
host    all     all     ::1/128         trust

and replace them with:

local   postgres        postgres                trust
local   msf_db          msf_user                trust

Restart postgresql in this mode limited in access through UNIX domain socket.

$ /usr/bin/sudo launchctl stop org.macports.postgresql93-server

Select the correct postgresql version

$ /usr/bin/sudo port select postgresql postgresql93

Configure the Metasploit DB to use

Let's say the user to use will be msf_user,
with password pass_pass and the DB will be msf_db.
Switch to user postgres:

$ /usr/bin/sudo /usr/bin/su postgres
$ createuser msf_user -p
Enter password for new role: pass_pass
Enter it again: pass_pass
$ createdb -O msf_user msf_db

These 2 commands won't display anything, this means everything is OK.

5. Metasploit

Install Metasploit

$ /usr/bin/sudo mkdir -p /local/Metasploit
$ /usr/bin/sudo chown BOB /local/Metasploit
$ cd /local/Metasploit
$ git clone --depth=1 git://github.com/rapid7/metasploit-framework .

2nd PATH switch

Insert within ${HOME}/.profile, within the section
which is always run and after any other PATH or MANPATH definition:

PATH=/local/Metasploit:${PATH}
export PATH

PATH switch:

$ . ${HOME}/.profile

Update Metasploit:

 $ msfupdate

Configure the DB access:

$ cd /local/Metasploit/config
$ cp database.yml.example database.yml
$ vi database.yml

to include there this uniq block:

production:
  adapter:      postgresql
  database:     msf_db
  username:     msf_user
  password:     pass_pass
  port:         5432
  pool:         75
  timeout:      5

To get an automatic connection at each start, include the following line within the metasploit initialization script:

$ cat >${HOME}/.msf4/msfconsole.rc <<eof
db_connect -y /local/Metasploit/config/database.yml
eof

Check that everything is working:

$ msfconsole
msf > db_status
[*] postgresql connected to msf_db
msf >

Help yourself a cup of champaign :).


As long as you delete the existing partitions and start from scratch, the risks are very low indeed.

There would only be two realistic risks.

Firstly that some kind of rogue hardware had been attached that could insert code to a rebuilt machine - wildly unlikely!

Secondly that the BIOS had been compromised. This is slightly more realistic a risk but still tiny.


Can attackers change the public key of certificate during the SSL handshake

... change the public key in the certificate and send it to client. Digital signature is same, all the properties except public key are same. So how can browser understand the difference?

The browser checks that the signature of the certificates fits the certificate. Since the public key is included in the signature and the public key is changed, the signature no longer fits the certificate. Therefore the validation will fail.


Do I need two firewalls or is one enough?

This answer borrows ideas from Steffen's comment. The answer is it depends, with a sprinkling of random internet people don't know enough about your organization to give a proper answer. But we can give you some points to think about.

As Steffen said: "Firewalls are used to separate things", usually to protect a higher-security group of users and / or devices from a lower-security group.

In a diagram like that, you have servers, desktops, laptops, and mobile devices. The usual assumption is that the servers and desktops are:

where the sensitive data lives,
running all the corporate-issue endpoint protection, anti-virus, and monitoring tools,
only ever connected a clean packet-inspected network with other similarly trusted devices.

When you draw laptops and other mobiles on a diagram like this, the assumption is that these devices may or may not:

be running proper endpoint protection, anti-virus, and monitoring tools (almost always the case for phones),
get connected to random coffee-shop or hotel Wifi networks (or even employees' home networks) during which time they A) come in contact with infected machines and B) can browse to infected websites without the corporate packet inspection and monitoring tools there to protect you,
get infected USB sticks plugged in,
be easily monitorable / remotely wipable to prevent data being exfiltrated from the building,
etc.

TL;DR: You need to have a think about what your organization's security and threat models are. If you decide that the phones and laptops really truly have exactly the same security needs and risk level as the servers and desktops, then you don't need a firewall there. However, in 99% of organizations, devices that are allowed to leave the building are considered to be at higher risk of infection, so it makes sense to have that firewall and only allow through the hosts and ports that the laptop users actually need to access.

The idea is to assume the laptops and phones are infected and reduce the amount of network probing that they can do on your internal network.


Most people don't have backups.  Most people who do have backups, haven't tested them to make sure they work.

The real difference between disk failure and ransomware is that paying the ransom is cheaper than paying a data-recovery company, and is more likely to get your data back.


Does publishing the md5sum of a private key compromise the private key in any meaningful way?

You can use the MD5 cryptography hash without any serious concern but why not consider using the public key to confirm the private key in question.

You could have the partner sign a sample binary and use the public key to confirm the signature and thereby confirm the private key.

If you want to work outside the signing infrastructure you could use a PKI utility like openssl to confirm the key set using the partner's private key and the public key.