High security application in Angular - a bad idea? Well this is not a question of a specific problem I have it's more a general question.
Yesterday I had a little argument with a friend of mine wehter or not a "high security application" (e-Banking for example) could be implemented in Angular (not specifically angular, client-side SPA's in general).

While I was sure that it would be a very bad idea to implement an e-banking application in Angular, I wasn't able to give a concrete reason, it was more like a feeling I had.

Since then I'm questioning if I might be wrong about that. I'm not very experienced in the field of application security so I'd be thankful if someone more experienced could dispel my doubts wehter I was right or not. (Preferably with explanation)

The browser should be trusted with the user's data in any case. Whether you use a single-page app or a plain HTML page, you are toast if the browser is compromised. Single-page apps do not change anything in this context.

Single-page apps can however extend the potential of a server-side vulnerability - since you're now offloading some of the processing to the client you may sometimes forget to properly validate the incoming data server-side, or send data the client isn't supposed to see, relying on the client-side app to hide it (a malicious attacker would modify the client to not hide such data).

In terms of any properly developed app, it should be well-tested and audited in any case so that any mistakes would be caught before going live.


Is a global DNS record a security risk for phpMyAdmin? Services like phpMyadmin needs a domain name to access. Instead of adding a global DNS record, one could make a local DNS record (e.g. in /etc/hosts) to access the site.

Would it increase security if no global DNS record was made, if one assumes that other typical security measures (HTTPS, Password Authentication, etc.) are in place?

This would qualify as 'Security through Obscurity' and offers little to no protection whatsoever.

The /etc/hosts file is NOT DNS; it's the precursor of DNS and anyone can change their own records in it.

A domain name is mainly for human use... the computer will just convert this to an IP address and use that (and send the hostname with it in HTTP 1.1+). While the domain name has a function in virtual host configurations it is not part of a security defence.

To increase security consider adding one of the following:

IP whitelisting your own IP & blacklist all others
External login provider through oAuth / SAML. (such as Google's login system)
Use client-side certificates to authorize access

All of these would improve security from least to most, but also from easiest to most difficult.


Does password-protecting a server's BIOS help in securing sensitive data? I'm running a server of which I protected the BIOS with a password. One doesn't have to enter this password before booting, but before entering the BIOS setup. I just did this from routine. However, there aren't really interesting settings in the BIOS, are there? I only got settings for date/time, enabling/disabling the drives and ports, etc.

Of course, I don't want that anyone can just enter the setup and set a master boot password on the computer, but that's about protecting against vandalism.

Does password-protecting the system's setup help protect sensitive data in files stored on the system in any way?

  This question was featured as an Information Security Question of the Week.
  Read the Feb 28, 2014 blog entry for more details or submit your own Question of the Week.

The most common thing protected by the BIOS administrator-level password is the boot process. Someone with admin-level access to the BIOS (either by it being unprotected, or via password compromise) can set the computer to boot from whatever media he likes. This will allow an attacker to bypass access restrictions you have in place on any non-encrypted data on your drives. With this, they can:

Read any data stored unencrypted on the drive.
Run cracking tools against local user credentials, or download the authenticator data for offline cracking.
Edit the Registry or password files to gain access within the native OS.
Upload malicious files and configure the system to run them on next boot-up.

Of course, access to the BIOS generally means that the attacker has physical access to the computer already. At this point, all bets are off anyway - many BIOS's (and their passwords) can be cleared by a simple jumper on the motherboard, or the attacker could just pull the hard drive and do what they like with it on their own system. That said, a lot of the recommendations in my post here (and other answers in that, and linked, threads) are still worth considering.

Encrypt the hard drive
Make sure the computer is physically secure (e.g.: locked room/cabinet/chassis)
Use strong passwords for encryption & BIOS

Password-protecting the BIOS is not entirely an effort in futility. However, it must not be a measure that is solely relied upon. For the password on your BIOS to be effective in its purpose, there must be other measures in place to prevent it from being bypassed.


Can p2p use be traced by targeting a known individual rather than an offending IP Address? My understanding of most filesharing lawsuits initiated by copyright holders is as follows:

The monitoring agency will connect to a torrent swarm and collect
the ip addresses of people downloading files to which they hold the
copyright
They identify the ISP's to which theses ip addresses belong and
subpoena them for the identities of the end users in order to
initiate legal proceedings against them directly.

What I'm wondering is if a 3rd party could legally start with your name and work backwards to find out if used Bittorrent or p2p. Let's say you're a public figure and they're looking for dirt. Wouldn't you need probable cause first?

Does it get more complicated if the person uses a secure vpn? Are there shortcuts that the 3rd party organization could take to gather p2p usage data without having to subpoena the ISP or vpn provider?

There is no name in P2P networks. Your IP address is visible, but not your name. Of course, the name can be tracked back by asking the ISP, but this requires asking the ISP.

So the problem is: given an individual identified by name, can you find his current IP address without going through the subpoena+ISP path ? Well, it is sometimes possible. For instance, if the individual posts a message to Usenet through a client which uses the NNTP protocol, then chances are that the Usenet server will add an NNTP-Posting-Hostheader field containing his IP address -- thus his current IP address will be revealed (and published worldwide). Other common IP address leakages occur in sent email headers.

With a VPN and some care (e.g. not posting to Usenet directly, only through the VPN), an individual could keep his IP address "private", to be revealed only when legal action occurs.


Reducing the success ratio of email harvesting Would / does the following work to hamper email harvesting by spammers ?

Since spammers - among other things - do automated email harvesting by looking for email addresses in web pages, it follows that placing a sufficiently big amount of well-formed but nonexistent email addresses all over the internet for the spammers to grab would significantly reduce their ratio of good hits. Even better if those dummy addresses actually do exist - so they don't respond with errors when emails are sent to them - but were created with the sole purpose of having spammers grab them.

So I'm wondering if that would help fighting spammers, or at least place a noticeable burden on their operations. If yes, I guess it is already being done, so does anyone know who is doing it and how could people contribute to that in an organized way, f.ex. by creating dummy pages on different domains containing the same dummy addresses to make them look more real, or something like that ?

I don't think that your idea is effective to pollute the spammers lists with so much fake entries that the costs of sending spam increases noticeable. But as far as I know such fake accounts are still used to fight spam, although in different ways:

Since spammer don't handcraft a new spam mail for each recipient but base mails on templates such dummy accounts are actually used to get early access to new spam templates. This knowledge can be used to increase the precision of existing spam filters and thus better protect legitimate addresses.
Similar thus "honey accounts" are used to rapidly get new sources of spam and quickly update IP blacklists. Again this is used to protect legitimate accounts.
And since such addresses are not only used for spam but also for malware delivery these honey accounts help here too to detect new malware campaigns and to protect legitimate accounts.


How secure is asking for specific characters of passwords instead of the entire thing? In some password-authenticated sites, you are asked to enter a random selection of specific characters from your password rather than the whole word/phrase. For example, it might say 'Enter the 1st, 4th and 8th letter' and provide three separate input boxes.

From what little I know of security mechanisms, I would have expected this to be less secure than entering the whole password, salting + hashing it and comparing it to the stored hash, as there is no plain text anywhere in sight.

This system is used by (hopefully) very secure websites, though, including certain bank sites in the UK.

So my two-part question is, is this as secure as traditional salt/hash comparison and why is it so?

This method of password entry is popular in bank sites in Poland. It's called masked passwords. It's meant to protect from keyloggers - and keyloggers only. The password transmission itself is protected from sniffing with SSL, so the reasoning is that if keylogger is installed on client's device, it will never get access to the full password.

However, this logic has a few flaws:

Attacker needs to enter fewer characters (e.g. only 4 characters, often numbers only) for a single try. Therefore it's easier to brute force this authentication step. That is why masked passwords need to be paired with account lockout policy.
With just a few known characters at certain positions (e.g. gathered by a keylogger/screengrabber) attacker can simply try logging in when the server chose positions he knows and refresh when others were chosen. So often masked passwords implementation stores the positions choice for an account server-side for certain amount of time (e.g. a day) until successful authentication.
Getting to know the whole password only needs capturing a few successful authentications (e.g. when password length is 12 and there are always 4 positions chosen, it usually takes 8 tries), so a keylogger/screengrabber will get it - it will just take a little bit longer.
The biggest threat for Internet banking authentication is malware (man-in-the-browser attacks) like ZeUS or SpyEye and this kind of software usually conducts social engineering attacks that totally overcome masked passwords scheme. For example, this software can:

ask for a whole password
display a fake password change form after fake authentication
simulate password entry errors and redisplay the form with other positions to fill to get full password in 2-3 tries

Masked passwords are being difficult to handle for users and tricky to implement correctly. At the very least developers need to add account lockout policy, positions choice storage and partial hashes.

Contrary to popular belief, masked password, especially in e-banking sites, though they offer protection from basic keylogging, completely fail to other, more prevalent threats like malware utilizing social engineering.


Patch management for avoiding issues like EternalBlue Following the 2017 WannaCry attack against big institutions like the NHS or Telefónica did not apply the Microsoft security patches associated with EternalBlue and were forced to deal with a significant impact to their operations.

What's a reasonable patch management strategy to avoid having this kind of exposure and what are some of the more worrisome side-effects applying patches on a frequent basis would have for the infrastructure of a big institution like the NHS?

As with the patches for the vulnerabilities used by the ransomware, there was no negative impact described by Microsoft.

In a utopia, system administrators would be patching systems on a near daily basis. However, in the real world, it is the complete opposite.

Some updates may have to be reviewed, such that they do not negatively impact the productivity of an enterprise. While rare, some institutions consider down time, and the potential loss of work to be very significant.

Systems may not be connected to the network, or may not be connected to a corporate server that instructs for the deployment of certain updates. Laptops are notoriously known for being behind on patches because of their portable and unconnected nature.

Furthermore, some institutions may have patch cycles, such that a patch might be public, but not deployed for a month or more.

There was no valid excuse for the impact of the ransomware, as the patch and notice was public March 17th, but the vulnerabilities were taken advantage of almost 2 months later (May 12th).

You can read the security bulletin by Microsoft here: https://technet.microsoft.com/en-us/library/security/ms17-010.aspx


PCI requirement 8.3 - 2FA for all network access originating outside the network Requirement 8.3: Incorporate two-factor authentication for remote
  network access originating from outside the network by personnel
  (including users and administrators) and all third parties, (including
  vendor access for support or maintenance).

Current Situation:

We need to be PCI compliant in 2 regions (eg Japan and Thailand) but we have other 5 countries in Asia which is interconnected with private MPLS link.

In Japan and Thailand we are PCI compliant level 4. We have implemented 2FA for vendors/service providers etc.

My Question is: Do the other offices (Singapore, Malaysia, India) access restricted to the Japan and Thailand as we are able to connect through private MPLS link? Or is it OK as we are connecting only through a private link.

Disclaimer: IANAQSA, and if you're level 4, you probably don't have one.  Be cautious.

  My Question is: Do the other offices (Singapore, Malaysia, India)
  access restricted to the Japan and Thailand as we are able to connect
  through private MPLS link? Or is it OK as we are connecting only
  through a private link.

This is really a question of Scope - see pages 10-11 of PCI DSS 3.1.  Section 8.3 is designed to cover the case of remote (which usually means intermittent, not always-on) access.

The guidance for 8.3 says:

  If remote access is to an entity’s network that has appropriate
  segmentation, such that remote users cannot access or impact the
  cardholder data environment, two-factor authentication for remote
  access to that network would not be required.

and the Network Segmentation section on page 11 states:

  Without adequate network segmentation (sometimes called a "flat
  network") the entire network is in scope of the PCI DSS assessment.
  Network segmentation can be achieved through a number of physical or
  logical means, such as properly configured internal network firewalls,
  routers with strong access control lists, or other technologies that
  restrict access to a particular segment of a network. To be considered
  out of scope for PCI DSS, a system component must be properly isolated
  (segmented) from the CDE, such that even if the out-of-scope system
  component was compromised it could not impact the security of the CDE.

So the answer to your question is:

If the remote (Singapore/Malaysia/India) sites have unrestricted access to your in-scope networks in Japan/Thailand via the MPLS, then they are also in-scope, and require the same level of PCI controls as Japan/Thailand.  (That includes 2FA for any remote-remote users, e.g., users who VPN into India and can then connect over the MPLS to Japan)
If the remote sites are properly restricted via Network Segmentation as described in the DSS, then 2FA is not required for the site or for access from the site in general.  Access for a user at a remote site to in-scope resources at an in-scope site may require 2FA - again, to quote 8.3:

  However, two-factor authentication is required for any remote access
  to networks with access to the cardholder data environment

(In fact, depending on the QSA, if you have both in-scope and out-of-scope networks at your Japan/Thailand sites, you may need multiple factors to identify site-local users who access the in-scope CDE from the out-of-scope network.  I've seen varying levels of rigor on this topic from different QSAs)


Can attackers get anything with DoS attacks except crashing the service? A DoS (short for "denial of service") attack is a form of attack used on web services which aims to "crash" the service.

Is there any motive of this form of attack besides crashing the service / website?

For example, I could think of blackmailing/ doing harm to a competitor / political reasons as a direct motive for DoS attack. But are there other, more indirect motives? Would it be possible to get data from the service with a DoS attack? If so, how?

In general a (Distributed) Denial of Service attack will not provide you with much information directly. However, there are a few scenarios where information could be gleaned as a result of a DoS. The following are a few examples, but this is not at all exhaustive:

A load balancer may divulge internal subnet information or leak internal machine names in situations where backing systems are offline.
A DoS that shuts down the database first may cause an application reveal the database engine type, connection username, or internal IP address via an error message.
A poorly implemented API could result in a "fail-open" scenario--DoS'ing a Single Sign On server may give an attacker the ability to log in unauthenticated, or with local credentials.
In Advanced Persistent Threat scenarios, DoS'ing detection infrastructure may allow an attacker to remain undetected during other information-gathering stages.
Similarly, DoS'ing the admin interface of a firewall could hinder network administration's incident response efforts.
In an extreme case, DoS against a key-revocation service could allow an attacker to continue to use revoked, or known-compromised credentials.

Other motives for a Denial of Service attack become apparent if you consider the users of a system as targets in addition to the system itself: A Denial of Service attack against a website that sells concert tickets may allow an attacker to buy tickets to a event that would have otherwise sold out in minutes. A DoS against a version control system could prevent a development company from delivering software on time. A DoS against a social media site could make coordinating political protests more difficult, or event impossible.


Sharing a number while maintaining privacy I am currently working on a tedious project and I am stuck on a point that seems simple but very tricky. I want to preserve the privacy of search.
Scenario: Bob is having an array of 10 unique numbers placed at several different indices For example [2 5 7 8 9 1 4 6 3]. Alice wants to tell Bob about the number she is interested in but doesn't want to send the number to do the comparison. Suppose if she is interested in the number 9, then bob should send the index number of 9 i.e. 5 to Alice but by sending the number 9 to bob she looses the privacy of data.
I have searched for zero knowledge proofs but havent been successful.

You can use Oblivious Transfer.

Oblivious Transfer (OT) is a cryptographic primitive in which the sender transfers one of potentially many inputs to a receiver but remains oblivious to the input sent. The receiver also remains oblivious of the inputs he or she did not choose.

Chou and Orlandi define OT as it follows:

  ”In its simplest flavour, 1-out-of-2 OT, a sender has two input
  messages M0 and M1 and a receiver has a choice bit c. At the end of
  the protocol the receiver is supposed to learn the message M c and
  nothing else, while the sender is supposed to learn nothing.”

Below is an 1-out-of-2 OT protocol that is secure against semi-honest
adversaries, as it was described by P. Snyder:

In your case, you have many numbers (ten to be precise) and you want to pick one each time. So you need a 1-out-of-K OT protocol. Such a protocol exists but it is much more complicated because it is based on Oblivious Transfer Extensions.

Oblivious Transfer Extensions:

There lies a problem found in every OT implementation. Due to the fact that
every OT protocol is implemented via Public Key cryptography, it is increasingly difficult to simulate a very large number of OT transactions. To answer the previously stated problem, a solution would have to be found.
Indeed, in 1996, Donald Beaver proved that OTs can be extended using symmetric
cryptography. This notion was later proven efficient by Y. Ishai et al. As it explained by Asharov et al:

  ”An OT extension protocol works by running a small number of ”base
  OTs” de- pending on the security parameter (e.g. a few hundred) that
  are used as a base for obtaining many OTs via the use of cheap
  symmetric cryptographic operations only. This is conceptually similar
  to public-key encryption where instead of encrypting a large message
  using RSA, which would be too expensive, a hybrid encryption scheme is
  used such that the RSA computation is only carried out to encrypt a
  symmetric key, which is then used to encrypt the large message.”

You can check an implementation of the most known OT Extension protocol here.

Regarding the 1-out-of-K OT protocol, in 2013, Vladimir Kolesnikov and Ranjit Kumaresan proposed an optimization and generalization of the IKPN03 protocol which you can read here.

To conclude, OT is a known cryptographic primitive which does exactly what you want. You can use it in its simplest form (the 1-out-of-2 OT) and run it many times since you have 10 numbers instead of 2. Or, you can implement something more sophisticated such an OT Extension scheme.

See also:

https://en.wikipedia.org/wiki/Oblivious_transfer
https://crypto.stanford.edu/pbc/notes/crypto/ot.html
http://scapi.readthedocs.io/en/latest/interactive_layer/ot.html
https://github.com/search?utf8=%E2%9C%93&q=oblivious+transfer


Is making a clean install enough to remove potential malware? Is formatting the disk and reinstalling the system from scratch (to Ubuntu) enough to remove any potential hidden software spyware, keyloggers etc.?

Or can something still persist installed in the bios or something like that? What to do then?

To be clear, not concerned about common malware. The question is more specific about a machine to which people other than the user had physical access for many hours. So when the user returns cannot be sure that nothing changed, so the user makes a fresh install after some weeks. Is that enough to "clean" it?

Hardware keyloggers are not part of this question as they should continue after software reinstallation.

It is possible for malware to persist across a re-format and re-install, if it is sufficiently ingenious and sophisticated: e.g., it can persist in the bios, in the firmware for peripherals (some hardware devices have firmware that can be updated, and thus could be updated with malicious firmware), or with a virus infecting data files on removable storage or on your backups.

However, most malware doesn't do anything quite this nasty.  Therefore, while there are no guarantees, re-formatting and re-installing should get rid of almost all malware you're likely to encounter in the wild.

Personally, I would be happy with re-formatting and re-installing.  It's probably good enough in practice.


Is there a way around HTTPS being redirected to HTTP? I have come across something of a curious situation that a website (Palestinian News Network) has a valid TLS certificate (see here) but that the website always forces loading of the site via http://.

(This includes the main domains as well as the referenced sub domains.)

So:

1) Is there any way that I as a client can establish if there is a MITM/attacker which is denying/redirecting HTTPS connection? (this cause is suggested by the "HTTPS Everywhere" plugin)

2) Assuming there is no MITM attacker, is there any way that I as a client can force the server to maintain the valid secured connection?

3) What are some methods as to how the server can enforce redirecting valid HTTPS connection? I've found this issue very hard to research as - expectedly - search results are nearly all about doing it the other way around ("how to http --> https" etc. etc.) .

Try the website address here, note I am going straight to the secured protocol:

https://english.pnn.ps

Thank you.

Theoretically speaking, the answer is, of course, "It depends."  Practically speaking however, for the client side the answer is "probably not" and the answer for the server side is "yes, with caveats."

Client-side:

This is the situation you're describing.  You visit a site with your browser, explicitly specifying the HTTPS protocol, and are immediately redirected to HTTP.  First, this is not uncommon for news or other content delivery sites.  They often do this to take advantage of CDNs and caching options that are not available over HTTPS in order to reduce the load on the origin servers.

What can you do about it?  Not much.  Generally this is going to be achived by issuing a 30x location header with the location changed only to modify the protocol to HTTP.  By spec, your user agent is supposed to then navigate to that location.  If they are also serving the content in the response body (unlikely) and if you can also induce your user-agent to ignore the location header and not redirect, (not going to happen with a stock browser) then you could theoretically maintain the HTTPS connection.  In reality, they're not going to serve the content and best case is you get an empty response secured by HTTPS.

From the server-side, you have better options.  You can do the same thing in reverse, (redirect HTTP connections to HTTPS via a location header) disable HTTP entirely and only allow HTTPS connections to the server, and you can better enforce HTTPS-always by using  HSTS headers.   Big, high value sites (Gmail, for instance) do this with an concept called HSTS preload which is an option compiled into some browsers requiring that any request to the site be converted to HTTPS before the request is sent. This prevents any information from being accidentally leaked to a MitM even if a user specifically tries to send an HTTP request.  Any site owner, however, can add an HSTS header that tells clients that for some period of time (specified in the header) that client should do the same thing, and only make requests to that domain over HTTPS, even if the user manually attempts to use HTTP.   This cannot protect the first request, but once the HSTS header has been sent future requests, even requests from future sessions will be protected as the HSTS info will be cached locally by the browser until it expires.


Could a consumer-friendly PGP-like file encryption application theoretically be secure? In a situation where there are desktop and mobile clients, and a central public key repository to and from which the desktop and mobile clients automatically upload and download public keys as needed, could a consumer-friendly PGP-like file encryption application theoretically be secure?

The problem with PGP is it's cumbersome and perplexing to Joe Businessman. What would be the most likely possible major security weaknesses and vulnerabilities of a simplified (at least on the front end) version of PGP for secure file encryption and sharing with the automation I described? I'm talking about something built on OpenSSL with public and private keys, AES256, etc.

All the encryption stuff with emails is "secure" as long as you can establish the link between identities and public keys. The actual cryptography and format is already implemented by most platforms, following the S/MIME standard, which is fine as these standards go (even the mail application in iOS 5 knows S/MIME). S/MIME normally relies on X.509 certificates.

At some point, there must be a procedure for ensuring the link. The concept of identity of a user is not part of the "computer world". Usual procedures entail a physical meeting between the key owner (the user) and a sworn official who performs the actual validation. This is expensive, this is hard, and this is not necessarily what we want: do we want to bind the public key with a legally defined individual or with whoever controls a given email address (for some appropriate notion of "controls") ? As usual, the difficult part is deciding what we really want with enough precision.

When the link is established, the information can be conveyed through certificates. Certificates have the nice benefit of being transport neutral: since they are signed, they can be obtain by whatever means without any security issue. This avoids having to trust your "central repository". Standards and protocols are ready for that: X.509 is approaching some level of maturity, and the central repository is known as "the Directory". The Directory can be thought of "One LDAP Server to rule them all" (in practice, the LDAP protocol has emerged as a subset of the access protocol for the Directory). There is a minor setback, which is that the Directory does not exist: it is a central, worldwide structure, and such things do not appear unless a clear need for it is found (for instance, the DNS exists because without it, the Internet would be a harsh place; but encrypted emails do not yet have sufficient political push to trigger the apparition of the Directory).

X.509 is meant for hierarchical trust management, which is appropriate for business, and would also be good if we want to use "legal identities" (your name and existence as a citizen are defined by the State which recognizes you as one of its own, and you cannot get more hierarchical than that). For loosely bound communities with a spirit of good-humoured anarchy, a Web of trust might be more adequate (but, though decentralized, the WoT implies more network traffic because trust comes from redundancy of the certification topology). One characteristic of the WoT is that it entitles every user to act as a registration authority: a RA is whoever does the "physical world" steps of verifying the identity of a user (as Tradition goes, in a bar over a pint of Guinness). The OpenPGP format contains the bells and whistles which support WoT management (it could be done with X.509 -- everything can be done with X.509, with extensions -- but the details of WoT with X.509 have not been completely worked out yet).

The "everybody is a RA" is a way to sidestep the issue of defining the notion of identity you want to achieve: every user decides what notion it uses, when emitting the certificate for someone else (signing his public key, in OpenPGP terminology). The bad side of it is that when using a public key obtained from the WoT, you do not really know what you get. The public key has been verified to be linked with... what ? It is not said.

An interesting system is Identity-Based Encryption. It is very lightweight in that it does not need a central repository of public keys at all: the public key of a user is his identity (his name, his email address...). But this still dances around the issue: IBE allows you to use as "identity" whatever can be encoded as a human readable string, but most notions of identity are still bound to the physical world ("I want to send an email to that guy") and there must be non-computer parts in the system.

Summary: for security of encrypted emails, the problem is not support software (it is already there), protocols (we have them) or central repository (the pieces are ready, it just needs to be installed on actual servers -- or, we can do without a repository by using IBE). The problem is deciding what notion of identity you want to use, and setting up the parts of the identifying procedures which are not in the computer world at all.

(Many people around the World seem intent on transferring their lives into their mobile phones. This may ultimately "solve" the problem: we no longer need to send emails to human beings, only to smartphones, and these are computers. I am not sure I want to live in such a world, though.)


Best practice for sending IP Addresses IP Addresses are pretty common around the internet so they're often easily found in plain text. However, let's say there's a number of IP addresses configured on a server to allow access through a firewall to specific locations. So, 1) these addresses are allowed access to a protected server and 2) someone else owns these IP addresses.

Is it "safe" to send a list of IP addresses to the owner or another trusted entity in plain text? Possibly via email? If not, what is the bare minimum solution that would be "good enough" considering limited resources that I may or may not have?

This is safe in general, though you should be concerned about any services on those machines that are exposed via stateless protocols such as UDP, as the source address can be spoofed. As such, if an attacker knows the IP, they could still send UDP traffic through the firewall by faking the source IP. If you've got no UDP-based protocols exposed then the firewall should be blocking this anyway.

If you're only sending this list once, sending it in the clear isn't the end of the world. It's only a list of IPs, and doesn't contain any credentials, so you should be fine. That said, GPG is a great option for securing email, and really isn't as hard as people think it is. Just install an email client extension and it should do the hard work for you.


What is best way to pentest an AngularJS web app with a REST backend? Traditionall webapps are often pentested by vulnerability scanners like Burp Suite, OWASP ZAP or with the other gazillion tools included in Kali.
But what is the best way to pentest automatically a JavaScript web-app (AngularJS) with a REST backend? And what are the recommended tools for that task?

For Angular.JS, there is a very handy tool Batarang Chrome Extension in the Chrome Extension Store:

https://chrome.google.com/webstore/detail/angularjs-batarang/ighdmehidhipcmcojjgiloacoafjmpfk

For testing REST you can still use Burp, Fiddler or ZAP.

Here is a link to REST OWASP cheat sheet:
https://www.owasp.org/index.php/REST_Security_Cheat_Sheet


what can hackers do with a hacked router? In Malaysia, our service providers are giving us a router with remote-admin available. It has come to my attention that with a simple line I'm able to find out the routers username and password.

I'm wondering what could a hacker do if he had access to my router? my router does not show my external IP. It only shows my MAC address and local-ip. It can also setup to connect to other DNS.

I'm wondering what could a hacker do if he had access to my router?

An attacker (the hacker) could do anything if Telnet or SSH access is available (probable). If the router's shell environment allows writes, then the attacker could run echo "binary contents of executable">executable;./executable which could be used to execute any executable. The attacker could do anything that the modem does using software (intercept, modify content received or sent).

Even without Telnet or SSH access, the attacker could use the web admin utilities to change DNS entries and redirect any website to a malicious one.

In any case, communications over HTTPS (including passwords) will not be compromised as the data is encrypted before reaching the router.

  My router does not show my external IP.

All routers must have an IP as they send IP packets which have an IP address and destination.

PS: It's same situation here in India across multiple service providers.


Metasploit Pivoting on loopback? I'm pen-testing a Windows 7 machine, and have access to a limited remote shell.

I can see there's a vulnerable SMB service running on the machine's loopback, but it's not available externally.

Is there any way I can run a metasploit exploit over the session I already have, to access this service?

Thanks!

Yes you can. type in metasploit use post/windows/manage/autoroute then set SESSION 1 (1 is the session that you have meterpreter on) SET subnet 192.xxx.xxx.0 (your pen-test subnet) type run check if it works with route print.This makes the traffic goes internally
.If all it's ok, you can use your session of "Victim 1" to send commands internally to "Victim 2" the packets would be like this:
You > Victim 1 > Victim 2

Remember to set LHOST in next exploit to be your Victim 1 Address.


Best practice for sharing a (.zip) file password with recipient When sharing confidential documents, it's common to zip up and encrypt the files with a good password.

However, all too often the file is emailed as an attachment with the password in the body of the email. Therefore an attacker with access to the email has everything they need to access the files.

Some slightly more savvy users will send a separate email containing the password, but this is only marginally less insecure as it's not unreasonable to assume that the attacker will have access to all emails if they have access to one.

Some even savvier users will email the file, then phone the recipient to read the password out. However, this invariably results in a conversation along the lines of:

  "OK, the password is 'H65TU'... no, all caps... yes 'HT65U' then an ampersand... the and symbol... no, the squiggly and... yeah... then 3N... no, not 3 of them, just number '3' then 'N'... yep... '\4J'. Backslash. No the other one. On the left of the keyboard. That's it. What do you mean it didn't work? Right try it again... 'HT5NU'...

...and so on, all within earshot of other colleagues in the vicinity.

So what's a secure yet painless and practical way of sharing a one-off password with an end user?

This is a good opportunity to utilize a random passphrase system (like Diceware or XKCD 936). A series of words can be much easier to convey over the telephone and yet the passphrases still provide good protection against guessing or cracking.

The main obstacle for passphrase use tends to be if the software you're using expects shorter passwords and doesn't accept these longer strings.  I know PGP self-decrypting archives work fine with passphrases, and I believe modern ZIP software does too.


What are the best ciphers in terms of performance for SSH tunnel? From a security standpoint, there are few good cipher options to use with SSH, such as ChaCha20, AES 128/256 GCM/CTR. As I understand (please correct me if I wrong), all of these offer pretty strong encryption.

However, what are the performance differences between aforementioned ciphers? In certain SSH tunneling applications (like tunneling NFS, for example) the performance is absolutely critical. How does one chose the cipher for the best performance, while maintaining reasonable security?

Of course I could just try and measure the difference, but this data will only be applicable to my specific hardware and particular measurement technique (in my simple benchmark AES 128 GCM seems to show the best results both in terms of throughput and low CPU load).

Speaking more general (and assuming CPU has AES-NI support):

Does ChaCha20 take advantage of AES-NI?
Is GCM mode faster than CTR?
How does key size (128 vs 256) affects performance?
Apart from the raw throughput, what ciphers tend to load CPU more?

The realms of cryptography are plagued with challenges including how to get the best security with the least amount of wait time for the user.

Fundamentally, encryption speed comes down town a couple of factors.

How many rounds of encryption are required.
How much data is required per round.
Block Cipher vs. Stream Cipher.

When discussing symmetric key algorithms, there are two categorical types, block and stream. In fact, you mentioned two in your question: ChaCha20 which is a stream cipher and AES which is a block cipher. The difference comes down to the  way the encryption is applied to data (bit by bit or block by block). In the case of ChaCha, it streams data in specific block sizes. Due to the fundamental differences in operation (and light research) ChaCha20 is not based upon AES and wont likely have improved performance from Intel's NI technology.

For more information on ChaCha20 vs AES see here:

https://crypto.stackexchange.com/questions/34455/whats-the-appeal-of-using-chacha20-instead-of-aes

Also related to GCM vs CTR:

https://crypto.stackexchange.com/questions/14747/gcm-vs-ctrhmac-tradeoffs

Moving onto keysize, the bigger the key the more computational strength required to properly perform encryption or decryption. The more data required to perform the encryption will increase your decryption/encryption times. However, by doubling key length, you are exponentially increasing the level of difficulty to crack a key, not merely doubling it. This is why certain researchers may discourage smaller key sizes (such as AES128) and encourage adoption of larger keys (AES 256). It's the same fundamental protocol, but breaking the encryption is much more costly for the attacker.

Going on to the fourth sub question, I would recommend reading the post above on the appeal of ChaCha20 vs AES. Though it is a singular example, it discusses how the mathematics of encryption do not always align with computational process. This is why ChaCha20 can be performed quicker than AES even though it may iterate 20 rounds of encryption instead of ten or more with AES. Summarized, identically sized keys will operate differently based on the ability of the processor to churn through the data based on the mathematical computation required.

Lastly, you asked about the security of the tunnel over all. In reality, a high security payload is better off being encrypted and decrypted before being packaged for transmission to begin with. This will further challenge an attacker because your data security is not compromised if your network channel is; even if a man in the middle attack is successful.

As a security architect, my job is to determine what the "right" level of security is for a business process. This turns out a high number of variables including what the potential risk factor is, cost to the company in the event of breach, perceived valued of the data, cost to mitigate, and more. If you're trying to protect a public share, then a lighter security scheme is required than if you're protecting a security data lake. Being able to account for the business and technical requirements will help dictate your needs.

In your example of a file share, if speed of access and least impact to network are of highest importance, then a smaller encryption key size and lightweight cipher will benefit your business use case. If you're trying to prevent loss of sensitive data, then increasing key size and even choosing a slower algorithm may be justified. The point is that the "right" encryption may be different depending on your use case, even within the same company.


Lost my custom data files for OWASP ZAP (Forced Browse) - where do I find the data in ZAP? The tool used to be called dirbuster. I imported my own lists then lost the source files. I can't export the wordlists from ZAP. How can I find the data in ZAP so that I can recreate the source files?

ZAP stores the custome forced browse files you upload in a directory called 'dirbuster' under the default directory. The default directory depends on the OS - eg its ~/.ZAP on linux - for full details see this FAQ: https://github.com/zaproxy/zaproxy/wiki/FAQconfig


Tracing email sent from service? I know an email was sent using the online service emkei.cz. Is there a way to find out who used that service to send the specific email I received?

This is a seriously broad question and probably off-topic.

Still, emkei.cz is a free online mailer. It does not require an account or any form of registration. This means that any information contained in the email itself will be useless when it comes to identifying the ultimate sender.

The legal way for authorities to identify would be to subpoena the service provider itself.
If you notice the small print at the bottom, they say:

  This service does not violate the EU law. We are not obliged to keep
  any logs. FinalTek.com and Forpsi.com are neither owners of this
  service nor responsible for its content.

At a guess, I would say they might not be logging source IPs of email senders, so even a subpoena would be fruitless.

Of course, those are the normal and legal ways to find out who used the service. Help with any alternate methods is definitely off-topic here.


How can faulty version of an iOS app (such as WhatsApp) expose the whole device to crashes or take-over There was a lot of recent, prominent news about a security vulnerability in WhatsApp that affects also iOS versions of the app. The volnerability has been described as carrying the risk of an attacker crashing the device (e.g. mentioned in the original report from Google Project Zero) or taking over control of a smart phone (e.g. mentioned by heise.de here in German; translation courtesy of Google Translate here). The suggested remedy is upgrading to at least version 2.18.93 of the iOS app; apparently no updates to iOS itself are required.

Since this is described as a bug in an app (not iOS itself) it makes me wonder: how can an app (legitimate or otherwise) crash or take over an iOS device in the first place? FWIK there are no SDK calls that would grant an app such powers and indeed the report mentions heap corruption. But how can heap corruption inside a single app cause such havoc to the entire system? I could imagine for this to be the case if the app's heap overlapped with memory owned by the operating system in a peculiar way such that (a faulty version of) the app could inject malicious code there. But in this case I would expect for this to be treated as a bug in iOS (not only the app), which is not the case here.

So what's going on here? How can a faulty version of an app (such as WhatsApp) crash an iOS device or allow for it to be taken over in its entirety?

UPDATE This article mentions the names of two Google engineers involved. Their twitter handles are @natashenka and @taviso. Perhaps somebody with a Twitter account could reach out to them and draw attention to this question.

I guess what could conceivably be going on here is that there is (was) a bug in a library that might be used both by the WhatsApp app, iOS, Android, etc. This would explain why the problem surfaces in iOS and Android apparently at root level. Perhaps what could have happened in such a case is that Google informs the OS vendor(s), who informs the maintainer of the upstream library and then what?

To make this more concrete by way of an example, here is an excerpt from iOS 12's Settings | General | About | Legal:

And here is a bit of text from the cisco/libsrtp's GitHub project (srtp_protect is also mentioned in the original report):

  The srtp_protect() function assumes that the buffer holding the rtp packet has enough storage allocated that the authentication tag can be
  written to the end of that packet. If this assumption is not valid,
  memory corruption will ensue.

The project is at least somewhat active (last commit 7 days ago), but its issue #322 is apparently open since July 2017. I'm not an experienced white hat (nor black hat), but my current estimate is that it's fair to post such a (theoretical) example in this context exactly because all ingredients are already out in the open. Perhaps one could even qualify as a Google Zero engineer by just googling (no pun intended) such stuff :)

UPDATE For what it's worth, Sonatype OSS Index (a free service used by developers to identify open source dependencies and determine if there are any known, publicly disclosed, vulnerabilities) currently does not list any vulnerabilities for libsrtp.


BitLocker on Windows 10 Home If I encrypt a flash drive using BitLocker on a Windows 10 Pro (With BitLocker supported and installed) device and put it in compatible mode, can I enter the key and read/write to and to/from it from a Windows 10 Home device (without BitLocker supported or installed)?

Yes, you can unlock and use the device even on Windows 10 Home edition. However, you won't be able to manage the BitLocker.

Also, BitLocker is a part of Windows and is installed on every Windows copy by default.

Whether is it in compatible mode or not is not important in this case (Home/Pro). That would be important if you use older versions of Windows 10 or even older versions of Windows (8.1, 7, ...)


Ignoring collision and (second) pre-image resistance, what makes a cryptographic hash function strong? With regards to resistance against dictionary and brute-force attacks to "crack" hashes containing passwords, what determines the resistance of a cryptographic hash function? Since collision resistance is not important for password storing, and, as far as I know, all the popular hash functions are resistant enough to pre-image and second pre-image attacks to make it an infeasible approach, I guess those factors don't really matter.

The first thing that crosses my mind is the amount of computation needed to calculate the hash (is there a word for this?) - the higher amount the longer it's going to take. Is there anything else? Bit-length? Is bit-length and "computation amount" somehow correlated?

Since the context of this appears to be password cracking, and cryptographic hashes are unsuitable for storing passwords, the simple answer is just "your question is irrelevant".

A good cryptographic hash function has a number of basic design goals:

It should be computationally feasible to compute a hash H(x) for some input value x.
Changing one bit of the input should change all output bits with a probability of 50%.
Given only the hash output, it should not be computationally feasible to recover any information about the input (aside from generic attacks like rainbow tables).
Given an input x1, it should not be computationally feasible to find another input x2 which satisfies the condition H(x1) == H(x2), i.e. it should be hard to find collisions.

While these basic goals are certainly useful, they don't really cover the full requirements of a good password storage function. To answer your question more specifically: large or controllable computational cost is most certainly not a feature of most "ordinary" cryptographic hash functions.

A good password storage function, alongside all of the above, should have these additional design goals:

It should not be deterministic, i.e. two equal passwords for different users (or other entities) should not result in the same output hash.
It should implement some form of defense against precomputation attacks (e.g. rainbow tables)
It should be computationally expensive to brute-force the original input for all but trivial and common dictionary inputs. This is usually controlled by implementing a cost value, which allows for scaling of performance.
There should not be a way to produce more than negligible performance gains using time/space tradeoffs.
The performance of the function should be roughly linear across all architectures, to avoid acceleration by GPUs, FPGAs, etc. perhaps excluding specifically-designed silicon.

Some of these goals are similar to those implemented by key-derivation functions (KDFs) such as PBKDF2, but again these functions are not designed for password storage, and have instead been appropriated for such uses.

While there are currently only a few designs that implement all of the above, it is a relatively new field, so future works is expected. As a matter of interest, the current state-of-the-art for password storage, as per PHC, is Argon.


What are advantages of SSL VPN over IPSec VPN, if any? What are the things which can be done with SSL VPN which cannot be achieved with IPSec VPN?
What are the reasons to opt for SSL VPN instead of IPSec VPN?

Security wise there's no really big difference, as both IPsec VPN and SSL VPN can use similar encryption algorithms. Some sources like Paul Bischoff's VPN encryption explained: IPSec vs SSL may state that IPsec VPN requires a PSK that could be a security concern, but many implementations actually allows certificate based authentication for IPsec tunnels.
Advantages depends on use case
The key difference is that, as a higher layer protocol, TLS used in SSL VPN can easily go through NAT, whereas IPsec VPN requires NAT traversal techniques, and they aren't always working on all networks. Also, as TLS used for VPN isn't easy to distinguish from other TLS protocols like HTTPS, it's harder to block on firewalls. This makes SSL VPN ideal for client-to-site VPNs.
On the other hand, IPsec VPN (especially IKEv2) can negotiate connections faster, so there might be performance advantages. This performance and reliability perspective makes IPsec VPN ideal for site-to-site VPNs, as they typically don't have to deal with NAT traversal.


Where can a virus or other malware "hide" on common PC and Mac hardware? I'm looking for a detailed list of locations that viruses can "hide" in modern hardware even after a reboot.

Some things that come to mind include

Boot BIOS/Firmware
CPU Microcode
Connected PCI components that have a reprogrammable BIOS
Some keyboards
Hard coded directly into hardware
??Some graphics cards?? <-- speculation
BIOS of locally attached printer?? <-- speculation

How about Firewire DMA? Firewire (a.k.a. "IEEE 1394") allows direct memory access by at least some kinds of devices.  People have writte lots of attack tools for lots of devices over the years, so it should be possible to hide in a Firewire device.

To confirm your PCI device hypothesis, it looks like John Heasman implemented a PCI rootkit, which pretty much has all the properties you'd need to write a virus.

Another place: the ACPI BIOS. John Heasman also seems to have implemented an ACPI rootkit.  The presentation gives example code fragments for other evil things.


SSH most common symmetric encryption algorithm in 2018 What is the most common symmetric encryption algorithm for encrypting data between two machines with SSH in 2018?

I have attempted to find this out but I generally come across outdated blogs.

I understand that it is most probably currently either AES (in its many forms aes-128, aes-256 etc...) or 3DES.

On one of my Ubuntu servers, I have also checked the ordering via:

  man ssh_config

The ordering is AES with 3DES at the end.

Is it safe to assume it is AES or is there a better approach to finding this out?

It's an unknowable question as asked. There are too many servers in too many data centers to know the most common. You could guess and even take an inventory of every ip on the internet based on defaults and even query the servers themselves. But that excludes internal systems - of which there are many many thousands.


In fact you are using the wrong public key to decode the signature.

Being part of a PKI, the paypal certificate is signed by an issuer called "Symantec Class 3 EV SSL CA - G2". If you display the certificate with your browser, you should see it.

You can find their public key in the certificate as well :

daecc56a361186db2021a3ec4c21fd0fc55c3abeeca26e980e82996b7a7aeb6ef225c92d60205dd62be6dd99d9f1545c769b0bf92742247cead4e63c2ace239ffb78c91544f4562c55ce56b730f04989fe0dd86e017c61d34499665e9648188709c8c349e935ecbb4c7a159155ed6080950bd718f3a74be6e8740c2e6b45f417f9cbbf5456ee36d44ee6cfad1f4d7d8fb35535dd62d26e54859e45537aee6096227fb81aaf6fa00ea68e13b685a1cc5c8c9ead1d71b80894e6cebc38d0d1e93f7143fb9723a86cf431dc023bde2955f2a0be1e216caf1a5cdf6a3764029ad05171a57fba69c52c8967703b130572ed2123102b232a1aae3a0964237a276212d1

With this modulus, you will compute : hex(s, e, n) as :

0x1ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff003021300906052b0e03021a05000414e80a2b06b2b3c004b770831bdb9429f0e631376f


Why does OpenVAS warn about PHP 5 when I am running PHP 7? OpenVAS found a vulnerability where it points to PHP versions 5.4.3 and 5.3.13.
But both the two hosts I checked with OpenVAS are running PHP 7.2.x.
Would this vulnerability be a false positive?

High (CVSS: 7.5) NVT: PHP-CGI-based setups vulnerability when
parsing query string parameters from ph... (OID:
1.3.6.1.4.1.25623.1.0.103482) Summary PHP is prone to an information-disclosure vulnerability.
Vulnerability Detection Result  Vulnerable URL:
http://domain:port/
Solution type: VendorFix
PHP has released version 5.4.3 and 5.3.13 to address this
vulnerability. PHP is recommending that users upgrade to the latest
version of PHP.
Vulnerability Insight When PHP is used in a CGI-based setup (such
as Apache's mod_cgid), the php-cgi receives a processed query string
parameter as command line arguments which allows command-line
switches, such as -s, -d or -c to be passed to the php-cgi binary,
which can be exploited to disclose source code and obtain arbitrary
code execution.
An example of the -s command, allowing an attacker to view the source
code of index.php is below:
http://example.com/index.php?-s
Vulnerability Detection Method Details: PHP-CGI-based setups
vulnerability when parsing query string parameters from ph... (OID:
1.3.6.1.4.1.25623.1.0.103482)
Version used: 2019-11-08T10:10:55+0000
References CVE:   CVE-2012-1823, CVE-2012-2311, CVE-2012-2336,
CVE-2012-2335 BID:    53388

This VT is doing an "active" HTTP POST request to the mentioned URL http://domain:port/ with the following data:

HTTP Method: POST
POST body: <?php phpinfo();?>

to the following two URLs (one after another):

URL1: http://domain:port/?-dallow_url_include%3don+-dauto_prepend_file%3dphp://input
URL2: http://domain:port/?%2D%64+%61%6C%6C%6F%77%5F%75%72%6C%5F%69%6E%63%6C%75%64%65%3D%6F%6E+%2D%64%73%61%66%65%5F%6D%6F%64%65%3D%6F%66%66+%2D%64+%73%75%68%6F%73%69%6E%2E%73%69%6D%75%6C%61%74%69%6F%6E%3D%6F%6E+%2D%64+%64%69%73%61%62%6C%65%5F%66%75%6E%63%74%69%6F%6E%73%3D%22%22+%2D%64+%6F%70%65%6E%5F%62%61%73%65%64%69%72%3D%6E%6F%6E%65+%2D%64+%61%75%74%6F%5F%70%72%65%70%65%6E%64%5F%66%69%6C%65%3D%70%68%70%3A%2F%2F%69%6E%70%75%74+%2D%64+%63%67%69%2E%66%6F%72%63%65%5F%72%65%64%69%72%65%63%74%3D%30+%2D%64+%63%67%69%2E%72%65%64%69%72%65%63%74%5F%73%74%61%74%75%73%5F%65%6E%76%3D%30+%2D%6E

and is checking if the remote host is answering with a <title>phpinfo() to this request. To avoid that any false positives are happening it checks if any of the URL tested are previously detected to respond with such a <title>phpinfo() string.

If you're getting a vulnerability report this could mean a few things:

The web server / application itself is vulnerable against such kind of attacks even if not running PHP via CGI.
Newer versions of PHP are again vulnerable against such kind of attacks.
The URL http://domain:port/ is always returning <title>phpinfo() and the previous detection of this to avoid false positives failed.

The VT will be improved in the next few days to give out a little bit more info about the check done but the info above should be enough to verify the vulnerability on that specific host.

Disclaimer: VT Dev @ Greenbone (Maintainer of GVM, former OpenVAS)


How to donate a computer without jeopardizing personal information? I have an old computer that is no longer working and I want to donate it or perhaps throw it in the trash. However, I don't want people to potentially get my banking account data, usernames/passwords I have entered on the computer, software installed, legal or medical documents, internet browser data, etc. I am going to keep the hard drive, should I do something more to the computer before getting rid of it?

Donate your Laptop without a hard driver or replace it by a new one, there a many forensics tools able to restore the deleted data (password, files, visited URLS...)
Deleted files

A common technique used in computer forensics is the recovery of deleted files. Modern forensic software have their own tools for recovering or carving out deleted data.[11] Most operating systems and file systems do not always erase physical file data, allowing investigators to reconstruct it from the physical disk sectors. File carving involves searching for known file headers within the disk image and reconstructing deleted materials.

Data recovery


Can JS templates for admin-only pages be public In my page admins-only section is very responsive, so I have to use both server and client side templating.

Obviously server side templates are stored outside of web-root and routing takes care of loading them. However now I need to GET a bunch of templates for javscript part.

One approach is to put client side templates in web-root, therefore they can be easally grabbed without even touching my frameworks routes. There is not any sensitive information really hidden in thouse templates alone.

But it feels bad to leave them public. The only way to avoid this I could think up is to make a separate route for each template. Make sure admin is logged in and then do "echo file_get_contents('template.twig');"

However hitting DB for each request to log in is slow, and maintaining a bunch of file_get_contents is a nightmare. I'm looking for a good solution. Or simply leave them public? (I am using PHP, Twig and Twig.js)

Usually static resources are served from within the web root and are findable by unauthenticated users.

If there's no sensitive information stored in these files (and from a security point of view I'd say that there shouldn't be) then this shouldn't really be a problem. An attacker could view the contents of the file if they can guess the URL for a valid resource, but if the files have no security significance it shouldn't really matter...


How banking mobile applications keep data secure without Secure Element (SE)? Most of the banking mobile applications get installed on nearly all smart phones such as Android based mobile devices.

But to be secure and to make cryptographic operations, I assume they need to keep some secret data in a secure storage such as Secure Element (SE).

But not every mobile phone has SE in it.

So, how does these banking mobile applications keep their secret data safe?

You must differenciate between Simple banking app where you can do some sort of account management and payment application.

Banking App rely on webservices so all security items relies only on how secure the communication is between the app and the server side and what authentication mechanism you are using(eg:two factor authentication)

Payment App Making Contactless Payment with your phone.

Android offers two possibilities:

Hardware Based Solution:
hardware based rely on Secure elements currently there is three types of secure elements:

SIM Based
Embeded Secure Element
SD Card

As this implementation is hardware it can be considered as secure.

Software based solution:

Since Android 4.4, Android has introduced Host Card Emulation(HCE), to give the possiblity to emulate a plastic card and all contactless data exchange. android offers basic security, so another layer of security is mandated like whitebox cryptographie, Other features like device and user authentication.

Both solution rely on another mechanism which is called Tokenization, so the reel card holder data will never get used between the app and the terminals.


Can't log in dvwa with a simple python program, even though login credentials are good import requests

target_url = "http://127.0.0.1/dvwa/login.php"
data_dict = {"csrfmiddlewaretoken": "bbbfeed6e1aea50f14a51a331054022c", "username": "admin", "password": "password", "Login": "Submit"}
response = requests.post(target_url, data=data_dict)
print(response.content.decode(errors="ignore"))

I am using the code above to log in into here: http://127.0.0.1/dvwa/login.php
After doing some reading, I saw it was because it failed at the CSRF check, so I implemented it to my data_dict.

Here's the problem: now, even with the CSRF check added it's giving me the same

  invalid CRSF token

problem as before.

Whats happening?
Thanks in advanced.

In order to login you need to also submit a hidden field called user_token which looks like this:

<input type='hidden' name='user_token' value='random_value_here' />

The value changes every time you refresh the page, so you need a little web-scraping to do what you are looking for. The following code uses bs4 to scrape the page and get the correct user_token value and then logs in successfully to the application:

import requests
from bs4 import BeautifulSoup

url = "http://127.0.0.1/dvwa/login.php"

def get_token(source):
    soup = BeautifulSoup(source, "html.parser")
    return soup.find('input', { "type" : "hidden" })['value']

with requests.Session() as s:
    src = s.get(url).text
    creds = {
        "username"   : "admin",
        "password"   : "password",
        "Login"      : "Submit",
        "user_token" : get_token(src)
    }
    r = s.post(url, data = creds)
    print r.text


SHA1 signature in a SAML request I'm currently looking at the security of a KeyCloak implementation, which again uses SAML 2.0 identity provider.

I'm not too familiar with SAML, but during the authentication, the sent SAMLRequest states SigAlg=http%3A%2F%2Fwww.w3.org%2F2000%2F09%2Fxmldsig%23rsa-sha1.

Reading through the SAML documentation, I understood that this is used for the SimpleSign signature.

Therefore I'd consider this a security threat, with SHA1 being considered as broken.

Is my assumption correct, when I say SHA1 for the SimpleSign algorithm poses a security threat and should be replaces by SHA256?

I work as a security consultant for SAML 2.0 implementations on a daily basis, mainly for business scenarios. Said that, most security teams are OK using SHA-1 for the same reasons described in this post (that was already mentioned in a comment).

On the other hand using SHA-256 is a security best practice for SAML 2.0 scenarios, and multiple Identity Provider vendors are enforcing the usage of SHA-256 as the default algorithm.

Since for most scenarios (specially for cloud systems) the impact of changing the algorithm is minimal, I can't see why not use SHA-256 algorithm for a new implementation from the start.


Can my job see what I do on my home computer if I use my work computer on my home network? I'm currently using a work computer on my home network. On the work computer, I'm connected to the company's VPN. Can my work see what I'm doing on my home computer because it's connected to my home wifi, just like my work laptop?

This is a new permutation of this question.

No, any monitoring software on your work computer cannot see what is going on with your personal computers.

No, the company network monitoring technology cannot see what is going on in your personal computers if your personal computers are not using the company VPN.

Concerns like this should be asked of your IT department because inadvertent monitoring of non-work devices would be a big problem in most countries.


How to lock down iSCSI mounted NAS against ransomware If you lock down an iSCSI mounted NAS volume (on Windows Server) so that Administrators have read-only access and your backups account has write access to the file system, the Administrator account can always take ownership of files, right? There's always the risk that ransomware will infect the system and perform some privilege escalation, then take ownership of locked down files and directories before encrypting, right?

How do you combat this?

There is nothing special about this use case: if you fear that the read-only access can be bypassed using privilege escalation then make sure that privilege escalation is not possible on your system. If you fear that ransomware can infect and harm your system make sure that it does not get to your system. Thus the iSCSI problem is reduced to two other well known problems.

Since both of these problems which are known to have no perfect solution you should make sure that the single perfect solution against ransomware still works: make regular offline backups.


Should a CDN service like Cloudflare protect against Brute Force Attacks, or only from DDoS? I know that CDN services usually protect a user by hiding it's original machine's IP and by screening (and banning) any attackers that send too many requests in the form of DDoS.

But should a CDN service like Cloudflare protect against Brute Force Attacks, or only from DDoS?

But should a CDN service like Cloudflare protect against Brute Force Attacks...

TL;DR: Not should but could - but in case of Cloudflare there is actually such functionality.

A CDN is a content delivery network and not a content protection network. Some protection against DDoS is an added value Cloudflare and other CDN offer. But this is not core CDN functionality. Similar a CDN might provide protection against some brute force attacks but this is no core CDN functionality either.

Note that even if such feature is offered it will probably only cover common attacks and might not cover a specific attack flow possible against your application. And it might be a feature you have to explicitly enable and possible adjust to your specific application so that it will not accidentally block traffic you consider normal (i.e. false positives). In fact, Cloudflare already offers a Protect your Login feature for this purpose. And you could also add a more fine tuned rate limiting, see How do I use Rate Limiting to protect against brute-force attacks.


Very beginner question about JtR I Have lost my zip file password and I tried to recover it with Windows 10, using John the Ripper 1.9.0 Jumbo.

Things I know from this password:

9 to 11 characters
Alphabetics A B E F and a b e f (pretty much sure)
Digits 0 2 3 5 9
Specials @ and %

Can somebody please put instruction what is the most fastest way recover this zip file?

Only thing that I have done is using JtR code like this:

zip2john filename.zip > hash.txt
john hash.txt

I would use Hashcat (since I know it better), you can download the binaries and run it on Windows using the command line.

First, you need to prepare the hash from the zip file for Hashcat, since you are using Windows, open the hash.txt file and copy everything after the first : symbol (excluding the symbol) and put it in another file call it hash2.txt for example.

Then run Hashcat, using the command line navigate to the directory where you downloaded Hashcat and run this :

hashcat64.exe -a 3 -m 13600 hash2.txt -1 abef -2 ABEF -3 02359 -4 @% ?a?a?a?a?a?a?a?a?a?a?a  -i --increment-min=8

This would take a very long time though (maybe years) to try all possible combination of the characters you mentioned for those lengths and this specific hash (this would generate 9267412500000 passwords to try, 100 Tera Bytes of data).

I would highly recommend changing the "mask" which is ?a?a?a?a?a?a?a?a?a?a?a to the pattern of the password if you remember it, for example, if the old password started with two capital letters (A,B,E, or F), then four small, then four numbers, and a symbol the mask would be ?2?2?1?1?1?1?3?3?3?3?4.

You must use this for a specific length though, meaning you first try all the possible length 8 password patterns, then 9 ...

Example command:

hashcat64.exe -a 3 -m 13600 hash2.txt -1 abef -2 ABEF -3 02359 -4 @% ?2?2?1?1?1?1?3?3?3?3?4

You can place all the masks you think are possible in a file with one on each line and pass it to Hashcat to try all of those masks in sequence. Put the most likely masks in the first lines for Hashcat to try them first.

Example masks file structure:

?2?2?1?1?1?1?3?3?3?4
?2?2?1?1?1?1?3?3?3?3?4
?2?2?1?1?1?1?1?3?3?3?3
?2?2?1?1?1?3?3?3?3?3?4
...

Hashcat command:

hashcat64.exe -a 3 -m 13600 hash2.txt -1 abef -2 ABEF -3 02359 -4 @% masks_file_name

I hope this helps.


EMV(Chip) Cards - What's the point of having the chip card communicating directly to the authorising server? & Clarification of CDA in EMV Ok I understand from my research that the Chip Card creates an AC Key(MasterKey+AccNumber) to communicate with the authorizing server securely (3DES key to have encrypted communication) but I don't understand the following..

What's the difference between having the card talk to the server directly and having the card tell the point of sale system its details and then communicating with the authorizing server (Which can be done by a magnetic strip or proximity card)?
What are the benefits of this procedure that EMV cards have then? and why is it necessary (if it is)?

Another question that i have is that i dont understand Combined DDA/generate application cryptogram (CDA), the websites and reports that i have found only gave very brief explanation of could someone point me in the direction of where i can find out more about it (preferably the technical aspects of how it works and what kind of crypto it uses etc).

In answer to:

  What's the difference between having the card talk to the server directly and having the card tell the point of sale system its details and then communicating with the authorizing server (Which can be done by a magnetic strip or proximity card)?

The difference is that end-to-end encryption (also called point-to-point-encryption or P2PE in the payments industry) means that anyone between the card and the issuer is kept in the dark about the sensitive details of the transaction (PAN etc.).

As for:

  What are the benefits of this procedure that EMV cards have then? and why is it necessary (if it is)?

The benefit is that you don't need to trust anyone between the card and the issuer. In the case of POS malware the advantage here is obvious. But this also has advantages even if there isn't any malware along the path between card and issuer.

If the merchant can't see the card details then the merchant can't store the card details. If the merchant can't store the card details it narrows the scope of PCI-DSS audits and reduces risk for the merchant. And for processors who route the transactions. And anyone else between the card and the issuer.

The PR answer from organizations in the apyments industry is that this makes everything safer for everyone. A more cynical answer is that the merchant would rather pay a bit more now for a P2PE solution to prevent expensive investigations, fines and settlements later.

Your question and my answer deal with encrypting the sensitive information between the card and the issuer but P2PE is something that grew out of EMV cards. It's an extra security measure made possible by EMV cards (and other 'intelligent' media). A mag-stripe card is a dumb medium and not being able to implement P2PE is just one drawback.

As for your question about DDA and CDA I'm afraid I can't provide a better answer than the simplified answers you can find on Google etc.


Can Hydra crack a flash-based login? Is it possible to brute force a flash login with hydra?

If not, what is a good tool to pen test a flash login?

You could use Burp Intruder. This is only in the paid version of Burp, but it's not that expensive.

You would first capture a manual login using the proxy, then use Intruder to fuzz for valid passwords.


SSLstrip is not working in the local network My issue is the SSL stripping is not working in my LAN, but it works if I try to attack a HTTPS website with no HSTS. I am not using any domain name just the IP address of the server. Is there any difference between a local attack and a remote one? Maybe my application redirection prevent the SSLstrip?

Edit:

I use a CodeIgniter PHP framework and I created a simple blog application. I set my web server up in this way. It's a local environment, my host has an apache2 web server and I try to attack it with a virtual machine (Kali Linux). I followed this video, and it worked, when I attacked a remote webpage on the internet. I also set the base url up like this:

$config['base_url'] = "https://192.168.1.5/myblog

I would guess because you are arp spoofing the gateway IP address.

Therefore when your victim navigates to https://192.168.1.5, their traffic is going directly to 192.168.1.5 and not via the spoofed internet gateway (local traffic does not require the gateway).

With ARP spoof, enter 192.168.1.5 as the last command argument intead of the gateway IP, and it should work. Make sure you set target (-t) correctly, otherwise you might end up spoofing the IP to your attacking box (I'm not sure if it's clever enough to not target itself if -t is not specified).

Good luck!


openssl: does -keyform engine enables accessing TPM persistent handles with any key arguments ? Even with third party plugin like CMP? If I use the tpm2tss-engine coupled with openssl, can I substitute, optionally any file path to a private key by a TPM persisent handle ?
Will it work with extensions, like CMP for OpenSSL, for instance ?
What is the purpose of "-keyform engine" ?
Do you know any documentation that better eplain the use of "-engine tpm2tss -keyform engine" than the official one on https://github.com/tpm2-software/tpm2-tss-engine ?

Example 1: Generating a CSR

 openssl req -new -engine tpm2tss -keyform engine -key 0x81800003 -out csr1

Example 2: Getting a certificate from a PKI using CMP for OpenSSL

openssl cmp -cmd ir -server pki_server:8040 \
-path signing-cmp/test -cert /tmp/mycert.crt \
-key 0x81800001 -newkey 0x81800002 \
-subject '/C=FR/CN=domain.com/ST=London/L=London/O=Organization/OU=IT Administration' \
-certout /tmp/new.crt -srvcert /tmp/srvcert.crt

Thanks.

I am not sure to fully understand the question, but I recently encountered a similar situation.

I did not found evidence that it is possible to use TPM persistent handle in OpenSSL command in place of file path for keys. OpenSSL is not made to fully interact with the TPM, it can only use the tpm2 cryptographic calculations through the engine.

To know if an engine can work with some OpenSSL extensions like CMP, you can run openssl engine -t -c tpm2tss, it will return something similar if the engine is able to communicate with the TPM:

(tpm2tss) TPM2-TSS engine for OpenSSL
    [RSA, RAND]
        [ available ]

RSA and RAND are for example the OpenSSL commands supported by my OpenSSL TPM2 engine.

And for the purpose of -keyform engine, it indicates OpenSSL to use the key format proposed by the engine. In the case of the TPM2 engine, the keyform is a custom TSS format, a PEM-like format with the TSS key encoded inside, and when I looked up in the code, the struct of for example the TSS private key appeared to be:

typedef struct {
    ASN1_OBJECT *type;
    ASN1_BOOLEAN emptyAuth;
    ASN1_INTEGER *parent;
    ASN1_OCTET_STRING *pubkey;
    ASN1_OCTET_STRING *privkey;
} TSSPRIVKEY;

Source (Github)

It stores additional TPM related information in this custom format.

To finish with, I did not find lot of information about the use of the TPM2TSS engine to share, this is mainly what I ended up with through my experimentations.


Storing the password to a vault in the vault itself? Is there an additional risk associated with storing the master password to a vault inside the vault itself?
I would assume not, since in order to decrypt the vault you must already have that password. But maybe I'm missing something?
And without reuse concerns, anything that can steal the password from the unlocked vault can also just steal the vault itself, so no additional information is being exposed that way.
As to why, besides academic curiosity, I've also noticed that sometimes the web version of the vault does not automatically log me in, even if the native app is unlocked. So adding the vault password would simplify that process.

Definitely
You're primary assumption here is that the only way in the vault is with the master password. This is not true. Some other ways:

You walk away from your computer with it unlocked and a coworker/housemate sits down
You open up the vault and someone sees your master password over your shoulder
Your computer is hacked or the session for your vault is stolen (if an online one)

The trouble is that most of these imply temporary access, while if someone finds your master password they can gain permanent access or even lock you out. Imagine a coworker who knows that your password is in your vault and "for fun" waits for you to leave your desk with your computer unlocked. If they know what they are doing it will take 30 seconds to change your master password and kick you out of your own account.
Is that a concern for you? I have no idea! Are these real risks though? Absolutely!


Sniffing the sniffer A sniffs B while B is sniffing C.

What's the traffic in A? Does A catches both B and C traffic or only B's?

It depends on how the network is set up and how they are sniffing.

Broadcast Network - Passive

With passive sniffing on a broadcast network, everybody sees everything. In particular, if B is doing a fairly standard sniff (e.g. default settings in tcpdump), then A not only sees all traffic from B and C, but can detect that B is sniffing through "leaked" DNS requests.

Switched Network - Arp Cache Poisoning

If the network is switched, sniffing is slightly harder. Assuming the switch is vulnerable to arp cache poisoning (arp spoofing), and A and B are non-privileged, then it could be tricky for A to reliably poison the cache for B while B is doing the same to C. It's likely that none of A, B, or C will be able to send or receive reliably.

Switched Network - Mirroring

On the other hand, if A is an administrator sniffing via a mirror of B's port, then A will see all of the traffic that B is receiving, which means A will also see C's traffic. And it will be obvious to A that B is performing an attack.

Mixed

You can combine these scenarios too. Assume A and B are on a shared broadcast domain and C is on a different switch port. If B poisons the cache to receive C's traffic, then A can see all of that traffic. And again, the attack will probably be obvious to A. (This specific scenario is probably unlikely, but I've seen some odd setups.)

It may also be possible that B is the administrator and is inadvertently leaking a monitored port in a way that A can sniff it.


Password Management within an Organisation Within an organisation there are many passwords such as those for root accounts on servers, hosting accounts, router logins and other such things, that need to be kept track of.

I know in some organisations its a case of either the head of IT only knows these passwords, the passwords are written down some where, stored on a wiki behind a login, or passwords are stored in a file on a server (perhaps encrypted).

My question is simply what is the most effective way of managing these password and storing passwords in a secure way. I know this topic has previously been discussed in regards to a home user here, but I am specifically interested in the best way to go about it for medium to large businesses. I would also be interested to hear what approach has been used within other peoples organisations even if its not the most effective.

Although I've seen many implementations of solutions to this problem, I believe that the most complete, if not perhaps the most convenient, was a Git repository restricted to super users only containing encrypted text files of passwords by environment. Managing the password rotation on the devices, mixed servers and dedicated devices such as modems, was handled separately.

This solution greatly simplified the distribution of new passwords as a simple update needed to be performed by users to receive the latest revision of the passwords as well as providing a traceable history of previous passwords for record keeping.

As I recall the files were GPG encrypted, but there are numerous solutions and viable approaches to handling the files themselves.

The obvious downside to this approach is that, especially when passwords have changed, you are decrypting one or more files searching for the required password(s). Of course, as with anything, the more frequently you use a password the more likely you are to memorize it and, depending on the device(s) in question, access may be an infrequent event which is not greatly hindered by having to go through a somewhat more lengthy process to gain the appropriate password.

If you are also interested in strategies and/or scripts for generating and/or changing passwords on servers and/or other devices I would be glad to share those that I employ as well.

--

I would be glad to.

I will assume that you are familiar with file encryption, PGP or otherwise. If this is erroneous please feel free to ask and I will be happy to provide some examples.

Setting up a Git repository is relatively straightforward and will display similarities to most any content management solution with which you may be experienced. One note with Git: it is, by design, fully open and, as such, will require additional steps to restrict access to specific files or repositories. This can be accomplished relatively simply by leveraging file system acl's (just one possible solution). That being said, I would certainly recommend that you use a solution with which you are comfortable and familiar, especially if alternate content management solutions are already in use at your organization.

The file(s) will, by definition, represent a password database correlating device identifier(s), such as hostname, to passwords and, potentially, to user names. For example: router-1.internetdomainwebsite.com administrator soopersekretpasswerd. Ideally you will never store the file unencrypted, however, following this strategy does make retrieving passwords relatively inconvenient. For this reason I recommend scripting an accessor to work within your encryption framework, perhaps taking an identifier as a search term and writing only the requested password to a file for one-time use by the requester.

Any device that supports password changes can be scripted. Since most devices support changing passwords from a CLI, I would recommend taking a look at the Expect language and/or its libraries for Perl, Python, or the language of your choice. I personally use a script that accepts the desired username, accepts the current password, accepts and verifies the desired password, then changes and verifies the change on all hosts passed or provided when prompted. Its fairly bare-bones Perl with Expect.


How to intercept thick client application traffic (tcp or http[s]) Recently I am learning about thick client application pentesting and have found that it is hard to get a tool for intercepting thick client application traffic.

Has anyone come across a thick client application for pentesting, or know whether there is any software that can work as an interceptor proxy like Burp Suite for thick client applications? I am looking for a tool that is not only able to intercept http traffic but also tcp traffic.

I have done some searching on google and found Mallory. So far this is the best tool I can find out there. I have tested it and it is working as expected, however it is not stable and has not been updated for quite some time.

Another problem I am facing is, if the application is using windows domain authentication (NTLM Authentication), the TCP traffic will then be encrypted. Is there any way to see the plain text traffic and modify the data before it's sent to server (just like how Burp did it for HTTPS traffic)?

This tool https://github.com/jrmdev/mitm_relay seems to do this. It uses a trick:
It embeddeds every request into a HTTP POST Request so you can relay it through burp and use every function of burp with arbitrary protocols(well binary could be hard).
Burp then passes the request back to the proxy which strips the http part and forwards the content to the server/client.


security in banking app with 4 digit pin code and social security number The new banking app (for norwegian bank Gjensidige bank) for my android handset allows me to log in using only my social security number, and a 4 digit pin code. The social security number in norway is not a secret number (even though people usually dont post it online). The phone is registered in the internet-bank, to allow the app for each particular handset.

I dont understand how this can be a safe approach? Whatever happend to two-factor authentication?

I have even seen another bank app ( for skandiabanken, https://translate.google.com/translate?hl=en&sl=auto&tl=en&u=https%3A%2F%2Fitunes.apple.com%2Fno%2Fapp%2Fskandiabanken-mobilbank%2Fid380663360%3Fmt%3D8 (translated from norwegian) ) on IOS allowing to log in using only a 4 digit pin code (my father asked if this was safe, but I discouraged him from installing it).

How can it be more safe to log in from a cell phone or an ipad than from a computer? There seems to be some aspect of this that I don't understand, can anyone enlighten me? (hope I'm on topic here...)

Adding some info from the comments:
The phone / device had to be registered by digitally signing in the online bank. I did not need to provide any info about the phone, but the app needed to be activated with an 8 digit code after registration in the online bank.

My problem is I still cannot see the difference in principal of using an app from a phone or ipad, and using an applet (which is what is used for two-factor authentication in Norway) from a laptop.

Is two factor authentication is only necessary if the bank does not know where the request is coming from? So if I could pre-register my laptop with the bank, and in the process saving a certificate on the laptop, it would be OK to use only a 4-digit code to log in to the bank from the laptop? This sounds a lot like the login process in my I first online bank (only I needed a real password, it was not sufficient with a 4 digit pin).

From what you describe, the process may be the following:

During device registration, the application on the device (be it a phone or a laptop) generates some secret value and sends it to the bank; it also stores it. This "secret" may be a secret key, or a private/public key pair: it does not matter much here. The point is that the device can now be recognized by the bank as the device.
The "registration code" is a one-time password that you use to assert to the bank: "this is my device, remember it".
When you log in, the device connects to the bank and uses its stored secret value to authenticate with the bank.
The PIN code is sent to the bank for verification. The device does not store the PIN code or anything which would allow it to verify that code. The bank enforces an auto-lock policy, like smart cards do (after 3 wrong PIN codes, the bank refuses to talk any further).
We assume that the application code is safe (unmodified by attackers); communications use SSL so that the application code is always guaranteed to talk to the genuine bank server, and data can be exchanged securely.

This indeed embodies two-factor authentication: to successfully log in, you must use the registered device ("something you have") and enter the correct PIN code ("something you know"). If an attacker steals your phone, he can initiate the connection (the bank recognizes your phone) but he will be blocked when it comes to the PIN. Conversely, if an attacker learns your PIN code but cannot grab your phone, he will not be able to submit the PIN code to the bank for verification (the bank will accept to consider a PIN code only if it comes from a duly authenticated device).

The use of the social security number is mostly for the show: it makes the process look "more secure". But it improves things only insofar as that number is not known to the attacker. As you notice, social security numbers are not really secret. They may slow down a casual, not-very-competent attacker (e.g. the guy who stole your phone and ran for it, and is trying to see whether he may "get lucky" and plunder your bank accounts as well).

Now the tricky part: how come such a scheme with a phone (or tablet) would be "more secure" than the equivalent mechanism with a computer ? And the answer is: conceptually, it is not more secure. However, there is a widespread notion that malware such as keyloggers are less prevalent in the smartphone world than on general-purpose computers. In that sense, the bank considers that your laptop is less trustworthy than your phone. This relates to the last property I listed above: the protocol works only as long as the application code is indeed unaltered and runs on hardware which is not under hostile control.


Is it safe to whitelist CDN domains? I am trying to whitelist URLs for my PC but I want to eventually roll out the rules to my small company's firewall.

But I'm having trouble with CDNs since a page may load content from many distinct URLs.

Do CDNs do any content filter to allow me to trust general CDN URLs? (example *.cloudfront.net) or should this be generally avoided and create rules in a per page basis?

Cheers!

I note that you've gotten your answer from the comments, but I will chime in and create a proper answer to this question.

a CDN works just like a regular hosting company. You pay for diskspace, and the CDN makes sure the content you upload is available to you, and often distributed around the globe for faster access. Anyone who has the cash can register and upload their files on a CDN. Some even accept payment in Bitcoin, making it much less of a risk uploading malicious files.

CDNs rarely do any content filtering, and I would guess that very few do any proactive screening of the files uploaded. How should the CDN know if the uploaded file is malicious? One mans JavaScript may not differ to much from that of another, but one of them could be used with malicious intent while the other one just provide a slider for a blog. It's impossible to know for sure!

If you ever experience malware hosted on a CDN, you could send them an email to have it removed/flagged. (Like what MaxCDN does) But there is no guarantee that X CDN will remove it, and if they do, it might even be too late!

You could make a whitelist of well-known CDNs, that you know take quick actions regarding hosted malware, and that might protect you a little (and it's certainly better than nothing!). But this is no guarantee, and I would suggest adding additional software/hardware to protect against malicious intent, and not just a whitelist.


Letsencrypt not valid in Firefox or PHP, but valid in Chromium I just moved one of my websites to https, using Letsencrypt.

I am using Linux, and my Chromium correctly verifies website certificate, but Firefox shows it as invalid. I also have an API on the website, and using a simple PHP script (with curl) to test API also gives invalid certificate error.

I tried downloading curl certificate bundle, and giving it to my PHP script. No luck, as I have found the provided bundle is generated from Mozilla.

The question is, is Letsencrypt really OK to use? Any sources to find more information about this? I don't want my users to see the ugly browser page, saying website is not secure, because I have online payment in website and it really hurts business.

UPDATE:
Here is my sample Apache configuration:

SSLEngine on
SSLCertificateFile "/etc/letsencrypt/live/example.com/fullchain.pem"
SSLCertificateKeyFile "/etc/letsencrypt/live/example.com/privkey.pem"

And just to mention, I am running CentOS 7 with Apache 2.4.

UPDATE2:
I just found that my Android phone also treats website as invalid. HTC M8, both Chrome and Firefox give invalid certificate. Phone is updated (Android 6).

I just suspect the configuration is maybe wrong somehow, but why Chromium on my PC gives a green light?

I just suspect the configuration is maybe wrong somehow, but why Chromium on my PC gives a green light?

If you check your site with SSLLabs you will probably see that it has chain issues, i.e. missing an intermediate certificate. Chrome on Desktop tries to fill in missing certificates by itself and thus works. Firefox will only fill in a missing intermediate if it knows it from some earlier visit to some other site. Mobile browsers will usually not try to work around server side misconfiguration this way and neither to PHP, Python, Java... .


Generate one CSR for two Windows servers I have two Windows 2008 R2 servers which will be hosting a load balanced website. I will generate a private key and use it to generate a CSR using OpenSSL.

How can I make this CSR (or the resulting certificate) work for both servers? I assume I have to load the private key I used to generate the CSR on to both servers. If so, how do I do that?

This depends if you use a Apache or IIS webserver.

If you use apache, just copy the private and the public key on the second server and configure it like described here http://tud.at/programm/apache-ssl-win32-howto.php3

If you use IIS, I assume you have to export the certificate including the private key via the windows certificat store. Have a look here http://nl.globalsign.com/en/support/ssl+certificates/microsoft/all+windows+servers/export+private+key+or+certificate/