How to disable caching of form data? A web page accepts user name and password data within an HTTP POST request. This POST request actually shows up as an entry in the browsers history. After user logout from the application and ‘navigate’ back to this entry using back button, the browser notices that the content has already expired so it prompts with information that the content has expired and asks to resubmit the request to get the ‘updated’ version of that page from the server.

Once user click the retry/refresh button then this forms data is passed back to server and treated as a normal login request. Thereby allowing user to login to application using cached credentials of previously logged-out user. What are the possible ways to prevent caching of input request data ?

That should never happen.
Without any code samples which I can look it, one reason I can envision that happening is an authentication workflow as shown below:

In the following diagram, /login POSTs to /member, where the authentication check takes place.

If authentication passes, the pages continues to send the 'logged in user' content. This makes this page (/member) appear into browsers history. Anytime you click back/forward button on your browser to come to this page, it will ask you if you want to POST the form content on this page. In this case, the date is login credentials.

  WRONG WAY:

  +---------------------------+          +------------------------------+
  |   Login Page (/login)     |          |   Member Page(/member)       |
  |---------------------------|          |------------------------------|
  |          +--------------+ |          | if creds wrong               |
  | UserName |              | |          |   redirect_to /login         |
  |          +--------------+ |+-------->| else                         |
  |          +--------------+ |          |   "Welcome Back,             |
  | Password |              | |          |    Here is your super secret |
  |          +--------------+ |          |    member area where you can |
  |                           |          |    check out the cool stuff" |
  +---------------------------+          | end                          |
                                         +------------------------------+

Instead you should have this kind of authentication flow:

Login page posts to a /verify (or /auth whatever you call it) page.
The verification page does not have any http output. Based on whether the creds are good or bad it just redirects to the appropriate page. If login is good, it sets a cookie flag indicating a valid session.
Member page validates the session by checking the cookie value and redirects to /login page if session is expired/not-set.

In this workflow, /verify page never appears in the browser history and there is no way user can 'click refresh' on that page to trigger POST data getting sent again.

   CORRECT WAY                POST        +-----------------------------+
                            +------------>| Verify page (/verify)       |
                            |             |-----------------------------|
  +-------------------------+-+           | if creds wrong              |
  |   Login Page (/login)     |<---+---------+redirect_to /login        |
  |---------------------------|    |      | else                        |
  |          +--------------+ |    |      |   set_session_cookie        |
  | UserName |              | |    | +-------+redirect_to /member       |
  |          +--------------+ |    | |    | end                         |
  |          +--------------+ |    | |    |                             |
  | Password |              | |    | |    +-----------------------------+
  |          +--------------+ |    | |
  |                           |    | |      +------------------------------+
  +---------------------------+    | +----->|   Member Page(/member)       |
                                   |        |------------------------------|
                                   |        | if session_cookie not set    |
                                   +-----------+redirect_to /login         |
                                            | else                         |
                                            |   "Welcome Back,             |
                                            |    Here is your super secret |
                                            |    member area where you can |
                                            |    check out the cool stuff" |
                                            | end                          |
                                            +------------------------------+

This is the common Post/Redirect/Get model. You can check this wiki page for prettier pictures: http://en.wikipedia.org/wiki/Post/Redirect/Get

Also, if you want to prevent the browser to cache certain HTML pages, you can set the cache-control HTTP header to 'no-cache' for those pages.

  Cache-Control: no-cache


How do viruses transfer via USB? I have had an encounter with the paint virus and I noticed it infects OS files in order to target .exe files(it changes an original .exe file  to a hidden OS file and renames with a 'v' before the initial name and then names a 899KB size of itself as the original .exe for the user to click).

I was able to get rid of it via my anti-virus (probably the part of it that got bound to my OS) but I wasn't able to undo all the renaming it did to all .exe files on my PC plus the tiny 899KB fakes. I finally wrote a script to delete and do a re-rename.

The other day I was trying to pick a file from a USB flashdrive and I saw the paint virus file (configured my file explorer to always show all hidden files including protected OS files) and permanently deleted it like any other file.

How did this hidden paint virus file hope to get itself copied or transferred to my system without being selected by me from the USB drive when copying other files from it suppose I didn't delete it?

Ultimately, there are actually multiple ways malware can spread through removable media:

Windows Autorun functionality.

Years back, when new software primarily came in the form of physical installation media, Microsoft decided that users shouldn't need to hunt through directory listings to find the installer when they put the media into their computer, and as a result, Autorun was born.

In short, if you have Autorun enabled (all consumer Windows systems do by default), whenever you connect some form of removable media to the system (be it a floppy disk, a CD, a DVD, a flash drive, or even something really exotic like a ZIP disk or Thunderbolt storage device), Windows will look for a file called autorun.inf in the top-level directory of the media. This file, if present, can do a number of interesting things.  The simplest (and most common use) is to just change the icon for the removable media (usually to match whatever product it contains the installer for). However, it can also make Windows run a specific executable off of the media either when you try to open the media by double clicking the icon, or completely automatically.  The most common legitimate use for this these days is USB devices which need special drivers (when you connect it, it looks like a USB flash drive to the system, which sees the Autorun file, which in turn points to an installer for the drivers for the device), but such devices are increasingly rare.

Because Windows doesn't always prompt the user about what to do with the Autorun file, and on top of that most users just click through without thinking (and even if they tell it not to run anything, it may still do so if they manually double click the icon for the media), this is a very popular vector for malware to spread.

Other OSes also have similar functionality, although it's usually turned off by default (or at least, not as trivially exploitable as the Windows Autorun functionality).

Malicious filesystem images.

This one is a bit more technical.  Essentially, by carefully manipulating the filesystem on a device (often by hand with a hex editor), it's theoretically possible to exploit bugs in the filesystem drivers of the OS to do any number of things.  This can be used to hide files from the user (making the above exploit harder to detect), or just to attack the system directly through some exploit in the drivers.  This is not commonly exploited by most malware, but it's also really easy to do with some practice.

Malicious device firmware.

Even rarer than the other two possibilities, it'st technically possible for the firmware on a storage device to directly attack the system itself.  This can be used to produce results like either of the above two options, or just attack some other part of the OS involved with interfacing with the storage device directly.  This is almost exclusively limited to highly targeted attacks because pulling it off from software on an already infected system ranges from 'insanely hard' to functionally impossible', and is almost certainly not what happened here.


Hosting a minecraft server with a vpn I've heard about the dangers of port forwarding to let people play on a minecraft server hosted on your computer. But I was wondering, could having a VPN on the computer with the server possibly avoid the danger or make it safer?

To answer your question bluntly, "No, it would not make you more secure." However, your question shows that you are relatively new to networking and security, so I would like to expand my answer a bit, to give you some context for it.

  What is a port?

The internet works based on IP addresses. A typical IPv4 address will look something like 173.194.222.139. This address represents one computer1 somewhere on the internet. In order to communicate with a specific application on that computer (e.g. a Minecraft server), that application listens to a specific port, such as 25565.

A packet sent to a computer has to contain it's address, but also the port which corresponds to the application that is supposed to handle the packet. This is done so that a computer can have many different applications running at the same time, with each listening to different port. That means your computer could be running a Minecraft server on port 25565, an Unreal Tournament 2004 server on port 7777 and a web server on port 80 and 443.

  What is port forwarding?

If you are at home and have multiple devices at hand, you can search for your external IP address and you will see that all of them likely have the same address. How is this possible, if above I said each address corresponds to one computer?

The answer is NAT. I won't go into detail, but think of it like a hotel lobby. The hotel has one address, but many rooms internally. Mails sent from the hotel go to the lobby, which then send the mail out. The sender is the hotel, and the recipient sees that it comes from the hotel. The recipient will write a reply to the hotel, and the hotel lobby will give the mail to the person who initially sent the mail.

The disadvantage is that this only works if the person in the hotel writes first. If someone would like to send a mail to someone living in this hotel, the hotel wouldn't know what to do and just throws the letter away.

This is where port forwarding comes into play. It essentially means "If traffic comes to this port, I will forward it to this internal machine on that port". In terms of our mail analogy, it's akin to writing "To: Awesome Hotel, Room 1337". The lobby will know where to forward that to.

Concretely, if we set up the gateway computer (the hotel lobby in our analogy) to forward all traffic to port 25565 to your internal computer running the Minecraft server on port 25565, then people connecting to your external IP on that port will actually be forwarded to your internal computer on that port.

  Is port forwarding unsafe?

It's a necessary evil. By forwarding one port to your internal computer, it means everybody on the internet can attempt to connect to that port. This is necessary, as otherwise nobody could play Minecraft on your server.

The problem is that if the server has any security vulnerabilities, be it in the base software, a mod you installed, etc, then this directly affects your computer. It's a risk in theory, but in practice, I would not worry too much about it.

  Can a VPN help me?

I'm sure you've heard all the YouTubers talk about how a VPN can help you be safe from hackers and all that nonsense. It's just marketing talk, and very dishonest. VPN's do provide security, in specific scenarios, against specific attacks. Claiming they solve all problems and you're just 7,99€ per month away from perfect security is dishonest.

The only scenario in which a VPN would help you is if you ran a VPN gateway in your network and have the Minecraft server accessible only to those with access to your VPN. The problem is, that this is way more difficult to set up, and even more difficult to set up in a secure manner. Just forwarding a port to your Minecraft server is way less likely to get you into any troubles.

My own Minecraft server also runs on my local PC and just has a forwarded port, so it's certainly not an extremely insecure way to do it.

1: Yes, even if it's NAT'ed it's still one box that handles all the NAT.


Google Analytics on Checkout Are there any risks to using Google Analytics on my checkout page? The page is on SSL and I will obviously be serving the analytics script from their secured URL.

Thanks.

Allowing any third party script to run on a page capturing user data means that third party could potentially capture any of the same data themselves. Whilst Google is probably safer than "random-site-x.com" on the web, you're still trusting that:

They won't capture your users' personal information and bank details and let them leak
They won't modify any of the data users are submitting in any way
They aren't letting any sources modify their script before serving it to you
They haven't let their server be compromised by some other third party
Your user doesn't have any malware that may redirect Google requests elsewhere

Google are likely a bigger target than whatever website you're managing, so you're leaving a lot of trust in their hands to keep their script/servers at least as safe as your own website. You're also leaving a lot of trust in their hands to play nice with your customers' personal data.

Depending on your jurisdiction you may also be responsible for ensuring that you don't share certain customer data with third parties (e.g. certain interpretations of EU data protection laws), so you should consider if that applies to possibly sharing customer purchase data as well.


How can I block an IP, if I'm getting many http requests in a second? If some one tried force burst attack on my website, how can I block them?

Ideally, I want to block an IP if I have many http/Apache requests in a second.

fail2ban is an easy-to-implement solution in these cases.

Add a block-all-dem-noobs.conf file to your filter.d directory, something like this

[Definition]
failregex = ^<HOST> -.*"GET.*

Translation: a RegExp to find GET requests

Then create a new entry in your jail.conf, something like this

[block-all-dem-noobs]
enabled = true
port = http,https
filter = block-all-dem-noobs
logpath = /var/log/httpd/access.log
maxretry = 100
findtime = 5
bantime = 600
action = iptables[name=HTTP, port=http, protocol=tcp]

Translation: Look through my access.log file, then block for 600 seconds (10 minutes) the IP addresses that made 100 requests in 5 seconds

One major drawback, though, is that this might produce false positives for NATed users, as they'll all appear as one IP address to you.


Why do public wifi networks often have a click screen to join? At many if not most coffeeshops and other public Wi-Fi locations, even though Wi-Fi is free and not password protected, there are click screens with "join" buttons that need to be tapped to access the internet like the one below. Why is this?

This article has some legal advice for wifi hotspot owners.
It explains that a splash screen is a useful tool to make users explicitly accept the terms and conditions for using the hotspot and thereby reduces potential liability:

Consult your attorneys before setting up a Wi-Fi Hotspot at your business location. The following are some steps a business owner can consider in setting up a Wi-Fi HotSpot to reduce potential liability:
[...]
(b)   The Wi-Fi HotSpot access point can contain a use agreement and disclaimer (sometimes called a “splash page”) that requires the user to click through an agreement before enabling access;
(c)   The use agreement and disclaimer can disclose appropriate terms and conditions of use, which prohibit and do not authorize, for example, illegal activity, copyright violations, pornographic or corrupt content, spam, solicitations, advertising, or use of the service by unsupervised minors.


Do you need DNSSEC if you use HSTS? I'm trying to understand the benefits of DNSSEC.

If a user goes to my site example.com and the DNS cache was poisoned redirecting the user to the bad guy's IP, what would happen?

I've enabled HSTS.

My understanding is the user would see the 'Your connection is not private screen' and would not be able to continue (unless they are using an older browser like IE 10 which doesn't support HSTS).

Could the bad guy redirect my site to another domain bypassing the HSTS protection or does HSTS stop the redirect happening because it can't find a valid cert?

With DNSSEC enabled would this stop the bad guy poisoning the cache and the user would be none the wiser or would they see a different error page?

I know DNSSEC doesn't protect the last hop.

These are very different technologies and they do not really rely on each other. In fact, some arguments find DNSSEC unnecessary in general. I would say no, DNSSEC is not needed if HSTS is used properly (long duration, preloaded). Most clients don't even use DNSSEC, so effects of having it may be minimal.

I think you are correct in observing that the effects of DNSSEC on a website served over HTTPS with HSTS configured are minimal. In this case, whether or not the DNS response is correct, the browser will refuse to load the website unless it supplies a valid certificate (assuming the website is in the HSTS preload list or the browser has already seen it).

Also note that these technologies work at different layers on the client. While the browser is aware of the HTTPS/HSTS situation, it does not know or care about the state of DNS/DNSSEC, as this is typically handled by the OS's resolver or an upstream server. Without using a browser extension for DNSSEC, it only can be told whether or not a response came back.

DNSSEC shines in other, non-web scenarios. One example, in the mail realm, is DANE (DNS-based Authentication of Named Entities). It uses DNS to retrieve certificate information for various servers. DNSSEC is critical here to protect the DNS traffic from tampering, since such tampering would allow an adversary to substitute their certificate fingerprint. Other non-web applications may have similar requirements for DNS integrity.


Why does a PKCS12 file have a private key As per my understanding, a PKCS12 file supplied by the server needs to be imported into the application as an application if we want to hit the secured endpoints of a server.

PKCS12 file contains the certificates as well as the encrypted private key of the server. This file is then distributed to all the clients who wish to make a secure connection to the server's REST endpoints. Is my understanding wrong? If not, then my question is why does a server need to add a private key in the PKCS12 file? Isn't is potentially a security issue?

Encryption is only done using the public key, no one needs to know about the private key.

A PKCS12 used by a client should contain a privatekey and cert/chain for the client, which is used to authenticate the client so the server knows an SSL/TLS connection is from a legitimate/authorized client and thus requests on this connection should be accepted and/or given appropriate privilege(s). Ideally a client should use a key generated by itself combined with a cert either issued by a CA the server trusts or issued by the server itself, but in some situations an authority like the server admin just provides a key and certs in a PKCS12 so they don't have to spend 20 or 30 hours a day instructing users on how PKI works and how to generate a key and how to generate a key that is not the wrong type or too short or otherwise unacceptable and how to type data into a CSR and what is a CSR and why a CSR isn't a cert and also isn't a key and why their CSR was defective and how they should type the correct data into a CSR so it will actually work and how to look for the key they generated 2 hours ago but have now lost or deleted or overwritten or converted to something else or put on the wrong machine etc etc.

The client keypair(s) should be different from the server keypair, and the server privatekey indeed should never be distributed to a client, or anywhere except a key backup facility or a replacement server. If the server uses either a selfsigned cert or a cert issued by a CA that is not pre-trusted then a cert (not key) serving as a trust anchor for the server, the cert itself if selfsigned and otherwise usually the CA root cert, must be imported as trusted on the client(s).


Why doesn't public or open WiFi use unique encryption for each client (like GSM)? I wanted to ask a networking security question about open or public WiFi.
This question is not a duplicate of Why isn't open WiFi encrypted?

Reading about cellular networks I found out that cellular data is uniquely encrypted for each user between the network/base-station and him with the help of the SIM card.
Why does't something similar happen in public/open WiFi (taking into consideration an analogy of the base station with the router and the SIM card with a NIC card perhaps)?

This would allow encryption for every single user and avoid the problem of insecurity in public/open WiFi where there is no password (no encryption-in data link layer at least, not referring to https which is application layer) or a common password (making the encryption useless to someone that knows it and is seating in the nearby coffee shop sniffing packets).

cellular data is uniquely encrypted for each user

Yes, because every cell phone have a SIM (Subscriber Identity Module) card. This SIM card holds, among other things, the identity of the user, and identifies him to the operator. This would be more or less analogous to username and password on a WPA2 wireless network. You buy a SIM, you have right to access the operator network, until you stop paying and the company disables your record on their databases, and your SIM cannot connect anymore.

  Why does't something similar happen in public/open WiFi

It's because a public WiFi lacks the central entity responsible for handling out usernames and password, like the telecom company does with a SIM card. To work the same, someone would have to be physically available around the router to register people, giving them usernames and passwords. And that would very much look like a protected WiFi network.

But with WPA3 it will be possible to have passwordless mutual authentication, so it will be possible to encrypt data between each client and the AP, but that will not prevent someone to employ an Evil Twin attack against the clients.


How should I securely generate random passwords when importing new users? I need to generate random passwords when importing new users from an external source.  I'm currently doing it by taking a random assortment of 8 lowercase/uppercase letters, and numbers.  I am also using Ruby's rand as a PRNG.  Is this cryptographically secure?

First of all, you need to use a secure random number generator, like Ruby's SecureRandom.

Second, you should choose a target security level for the generated passwords, i.e., how hard should they be to crack?  Security levels are often given in bits, i.e., the base 2 logarithm of the number of distinct equiprobable passwords.  In simpler words:

A 64-bit security level means that there are 2^64 distinct passwords, and your system is just as likely to be choose one as any of the others;
A "random assortment of 8 lowercase/uppercase letters and numbers" is 62 distinct characters, which means that choosing one such character at random provides log2(62) ≈ 6 bits of security.  Choosing 8 such characters independently at random provides log2(62) * 8 ≈ 48 bits of security.

48 bits is crackable in practice for a really dedicated attacker; I would recommend about a 64-bit security level as the bare minimum for passwords, and I prefer about 80 bits for my own.  With lowercase/uppercase letters + digits, you need 11 random characters for a 64-bit security level, and 13 characters gives you a 78-bit security level.

Before an edit your question asked about the effect of adding symbols to your passwords as well bumps the alphabet size to about 95 characters, and log2(95) ≈ 6.6, which brings those password sizes down by one character: 10 characters for a 64-bit password and 12 for a 79-bit password.  If you're generating passwords at random, you can therefore see that it's not a huge effect.


Hashcat passwordcracking separator unmatched I have the task to crack a bunch of passwords like:

$1$V5l3qvml$Q.fDn30gGhjcEIZH8utah/
$1$DcuX.dRK$bR4utyGQ4ET4sobpMMtfo0
$1$WbXWIqFu$Qu1fT/MmTIvSUz4xw4mlI0
$1$8Y7TfkZ5$LnuF99mgFbV1wvQ61dMZB1

I was only told that these were Linux-like encrypted (I have removed the username: from the front, e.g. sBerhhard: and ::1:0:1:1::: from the end). I have read here that these are shadow style password hashes. Furthermore, I have tried to use hashcat 0.49 to crack these passwords. However, when trying the following command I got the following result and I cannot figure out why:

hashcat-cli64 -m 10 -o found.txt ..\..\1 dictionaries\Top10000.dic

I have also tried the example from here, and it worked, so I probably have an error in the command.

I am using the dictionary of InsidePro. Am I using the right m parameter (md5($pass.$salt))? If not, what would be the proper one?

I believe those hashes are  MD5(Unix) format, so -m500.
You can compare your hashes to the ones here: hashcat.net/wiki/doku.php?id=example_hashes.

By the way, $1$DcuX.dRK$bR4utyGQ4ET4sobpMMtfo0:bb


Strange Pharma Spam Site resulting from DAT file created by SQL Injection? Working on cleaning up a site compromise for a client. Leaving aside that the site is using  bunch of custom CodeIgniter code written by someone who had no concept of security, I've ran into a roadblock and wanted to see if some other IT Security guys could sort of double check my work flow. Additionally the site is hosted on DreamHost who seems to have had some sort of trouble with Pharma Spam redirect in March, so I'm not sure if the issue is my clients site, or DreamHost got pwned and won't pony up to it.

Essentially what is happening is upon inputting an ORDER BY statement into the search parameter of the site URL, a file titled quickstart.dat is placed in the user's home directory. This dat file is populated with the exact HTML of the pharma site, so that afterwards when ever using one of the anchored links on the site the HTML from this dat file is loaded. It does NOT redirect to the pharma site, it creates local web content which in turn links to the Pharma site.

I can replicate this every time after deleting the quickstart.dat to restore normal functionality, than use the ORDER BY statement and start the whole process over. This leads me to believe I should be searching through the MySQL databases looking for malicious code inserted into the tables which are referenced by the search.php file?

UPDATE: OK so I found the issue as far as I can tell. Going through one of the index.php files something caught my eye. There was a require_once statement pointed towards a pdf file in a tmp directory. Pulled that pdf down, put it through an online sandbox, indicated it was actually PHP script. When I changed the file extension and opened it up in notepad, blamo, base64 code everywhere. So I deleted the PDF and removed that line from index.php file, normal functionality is restored. Thanks for everyone who steered me away from the database.

There are just so many things that could have happened. I'll try and list all ideas I have of what could possible have happened.

You could try the following:

Check the .htaccess file if it contains anything
Check the routes file in codeigniter which handles redirection, it is located at /application/config/routes.php and check if there are any re-directions in there.
search through all php files using the command line and look for "base64_decode("
Delete the .dat file perhaps?

You could also try and search for files with large hashstrings that are usually used to obfuscate code, enter the following code in shell:

find ./ -name "*.php" -type f -print0 | xargs -0 grep '[a-zA-Z0-9]\{400\}'


What are the vulnerabilities of VOIP-specific security protocols? Existing relevant questions:

How do you Secure VOIP in a large organization
What are the main issues and best practice security controls when exposing SIP and H.323 to the Internet?
Do secure phone lines exist? - especially advice by a certain member of the ursine race to use insecure SIP and H.323 over VPN

However, almost two years have passed since these questions were asked and answered, a few new vulnerability modes were discovered and patched, and I'm wondering how best to implement secure VOIP and videoconferencing in the coming several years.

Basically, which open real-time protocol will protect video- and phone calls better from casual eavesdroppers (who may have hacked a few servers along the route) and MitM'ers given present-day state of the art?

insecure SIP/H.323 over TLS VPN;
SRTP/ZRTP;
anything else I have left out...

Putting findings in an answer instead of comments seems to be the best approach.

As usual, turns out this has been discussed before. A quick search on CiteSeerX gave 50 papers, however not quite up-to-date:

Angelos D. Keromytis (2009) Voice over IP: Risks, Threats and Vulnerabilities
Prateek Gupta, Vitaly Shmatikov (2006) Security Analysis of Voice-over-IP Protocols

  We present a structured security analysis of the VoIP protocol stack, which consists of signaling (SIP), session description (SDP), key establishment (SDES, MIKEY, and ZRTP) and secure media transport (SRTP) protocols.

  Using a combination of manual and tool-supported formal analysis, we uncover several design flaws and attacks, most of which are caused by subtle inconsistencies between the assumptions that protocols at different layers of the VoIP stack make about each other.

  The most serious attack is a replay attack on SDES, which causes SRTP to repeat the keystream used for media encryption, thus completely breaking transport-layer security. We also demonstrate a man-in-the-middle attack on ZRTP which disables authentication and allows the attacker to impersonate a ZRTP user and establish a shared key with another user. Finally, we show that the key derivation process used in MIKEY cannot be used to prove security of the derived key in the standard cryptographic model for secure key exchange.

G.Aghila, D.Chandirasekaran (2011) An Analysis of VoIP Secure Key Exchange Protocols against Man-in-the-Middle Attack

  We have come to notice that the three key generation protocols ZRTP, SDES and MIKEY are vulnerable to the Man-In-The Middle attack. Our analysis suggests that the key management protocols that operate in the media layer are indeed suitable media keying protocols despite their operational differences.

As pointed out by Philippe Lhardy, audio streams in their compressed form present an attacker with an opportunity to infer: identity of the speakers, language being spoken and a few other details.

Two modes of compression have been analysed in the literature:

VAD (Voice activity detection) - Speaker Recognition in Encrypted Voice Streams
VBR (Variable bit recording) (pointed out by Seth from Crypto SE in this question)

Spot me if you can: Uncovering spoken phrases in encrypted VoIP conversations
Language identification of encrypted VoIP traffic

Would be grateful for any other ideas and suggestions, especially related to videoconferencing.

EDIT: A related question: Can voice chat be spied?

EDIT #2: Cryptocat is an implementation of Off-the-record messaging: Flaws in Crypto Cat

Any discussion of VoIP should include this possible requirement.

Following a suggestion from landroni, here's a link to vulnerabilities found in the ZRTPCPP library: http://blog.azimuthsecurity.com/2013/06/attacking-crypto-phones-weaknesses-in.html


What are modern protections against mobile application cloning I recently started thinking about an attacker which would clone a mobile application, and add some code which would do something malicious, e.g. credential theft. This cloned app would communicate with a legitimate server and therefore offer a legitimate service to the user.
On the web this is solved by relying on user to check the URL, but also with protections like CORS.
I am wondering how the mobile attack variant can be prevented on the server side. First thing that comes to mind is using some form of credentials. However, with enough effort, this be broken with reverse engineering.
Can you think of anything better or more reassuring?

After some digging, I’ve found the answer to the question.
Essentially, the application needs to authenticate to the server. This means that there has to be a shared secret between the application and the server. However, the secret cannot be hard coded into the application, because it would be copied by cloning.
In Android and iOS, each application instance is given a unique ID. Verify this ID on the server side proves app authenticity. Source: https://developers.google.com/instance-id


What type of hashing method is used for the private key to encrypt for signing messages? To use RSA for signing, Alice takes a hash of the message, encrypts the hash using her own private key, and appends the result (this is the signature) to the message. Eve can of course still decrypt this using Alice's public key. However, Bob can decrypt the signature using Alice's public key and see if it matches. If it does, it must have been encrypted using Alice's private key, which only she has, so it must have come from Alice.

How is the hash derived, and how is it secure? Do 2 identical messages "hello bob 12" have the same signature? And if they are different, how so?

You don't use a hash function to encrypt things. You use an encryption algorithm.

You don't use an encryption algorithm to sign things. You use a signature algorithm.

The text you quote uses to traditional explanation of signatures as "encryption with a private key", which is a very confusing way of stating things, and works only for a specific signature algorithm (RSA), and in fact is wrong and does not work at all for RSA. You'd better forget it altogether.

Instead, let's see how RSA signatures work. The main signature algorithm that is called RSA follows the PKCS#1 standard, and more precisely the "old-style v1.5" method that PKCS#1 calls "RSASSA-PKCS1-v1_5". That method looks like this:

The message to sign is m (a sequence of bits).
The RSA key pair uses modulus n whose length is k bytes. For instance, if the key is said to have length "2048 bits", then this means that 22047 < n < 22048, and k = 256 (2048 bits are encoded over 256 bytes).
To sign the message m, first hash it with a hash function, e.g. SHA-256. This yields a sequence of bytes with a fixed length, 32 bytes in the case of SHA-256. Hash functions are public (no secret parameter) and deterministic (for the same input you always get the same output).
The hash value h(m) is then padded: a sequence of exactly k bytes is built as follows:

    0x00 0x01 0xFF 0xFF ... 0xFF 0x00 id h(m)

In plain words, you take one byte of value 0x00, then one byte of value 0x01, then some bytes of value 0xFF, then one byte of value 0x00, then a fixed header (id) that identifies the hash function, then the hash value. The number of 0xFF bytes is adjusted so that the total length (in bytes) is exactly k. This padding process is described in section 9.2 of PKCS#1.
The padded hash value is then converted into a big integer x by interpreting it with big-endian encoding convention. Since the padded value has length exactly k bytes (the same as n) and begins with a byte of value 0x00, it is guaranteed that x will be lower than n (numerically).
The signer uses the private key to compute a number y which is the e-th root of x modulo n, where e is the public exponent (a part of the public key). That is, y is such that:

    ye = x mod n

The private key contains some values that make that computation feasible.
The signature s is an encoding of y into a sequence of exactly k bytes, there again using big-endian convention.

To verify the signature, one decodes s into y, uses n and e to recompute x, re-encodes x into bytes, and checks that the resulting string contains a correctly padded hash value, and that the hash value matches that of the purportedly signed message m.

All of the above is deterministic, so if the signer tries to sign the same message again, with the same key, then the exact same signature will be obtained. However, note that:

If a distinct private key is used, then the signature will be different. This is expected: a signature value is specific to a given signed message and to a given signer; otherwise, it would not prove anything.
Though the old-style PKCS#1 v1.5 signature scheme explained above is deterministic, not all signature schemes have that characteristic. Even PKCS#1 includes a "new-style" signature scheme (RSASSA-PSS), that still relies on the RSA modular exponentiation, but with a different padding that includes random bytes. With PSS, the same signer using the same key to sign the same message twice will get two distinct (but equally valid) signature values.

RSA encryption is a different beast, but it is also described in PKCS#1 (in different sections; search "RSAES"). At its core, the same mathematical operation (modular exponentiation) is used for both encryption and signatures, but the padding methods differs a lot, and the padding is crucial for security. RSA signatures really are not a kind of encryption. Also, while RSA signatures and RSA encryption appear to be able to use the same kind of public/private key pairs, there are good reasons not to actually use the same key for signatures and for encryption.


Are Android Snapdragon Vulnerabilities a Real-World threat already? The newly disclosed vulnerabilities CVE-2016-0819 and CVE-2016-0805 are based on vulnerable kernel or kernel-related code.

These two vulnerabilities combined can lead to unintended root access.

Did anybody witnessed attacks based on these vulnerabilities in the real world although the disclosure with more details will be late May 2016?

TrendMicro Report: Link

@Wish_Wu recently did a demonstration of these exact security vulnerabilities to full exploitation at the HITBSecConf in Amsterdam.

Here is the slide deck.

The bugs involve the perf_event_open capabilities shipped in many Android OSes including the recent Nexus line of phones as well as many Samsung Galaxy and LG Android phones of recent note. Wish_Wu goes over which ones are likely in the prezo above.

CyanogenMod also reviewed these vulnerabilities.

There is also additional detail on CVE-2016-0819 including Qualcomm patch (information here).

By searching for the Android IDs in Wish Wu's presentation, you can also see the Android OS and other CyanogenMod patches. The presentation also goes over some additional fuzzing suites that will aid in exploit development.


Is Diceware more secure than a long passphrase? I recently investigated best-practices in regards to passwords, and the overwhelming majority of sources recommended using a password manager. This is great advice, but not usable in every situation. Certain situations, such as OS login, Disk Decryption or Password Manager unlocks do not allow me to let a password manager "type my password in for me".

As such, I have looked at the second-best alternative, which seems to be Diceware and Passphrases. What had me stumped was this answer of a related question, which hinted that Diceware was superior. An excerpt from the answer:

  Passphrases are great (Diceware is better) for locking password managers, [...]

Emphasis mine

What confuses me is why this claim that Diceware is supposedly superior? I used zxcvbn to compare the strength of the two example passwords below and it seemed as if the passphrase was more secure than the Diceware password. Further, the Passphrase generates a visual image, although nonsensical, which is easy to remember. The only disadvantage I can imagine is that the passphrase takes longer to type, which is a marginal disadvantage considering it would only need to be typed once before a password manager can be used again.

Examples

Diceware

Diceware is the process of rolling a set of dice, which would indicate a random word from a pre-defined list. Depending on the desired security, more words are chosen.

An example outcome of a Diceware process might be the password:

cleft cam synod lacy yr wok

Passphrases

A passphrase is in essence a sentence, which make sense to the user and hopefully nobody else. It might make grammatical sense, but is very unlikely to make semantic sense.

An example of a passphrase would be:

Blue Light shines from the small Bunny onto the Lake.

Most people that use passphrases, use passphrases wrong.

The remark that Diceware is better probably comes from the fact that, when people use passphrases, they usually take a well-known or otherwise logically structured sentence and use that. "Mary had a little lamb" is a terrible passphrase because it is one of a few billion well-known phrases that a computer can run through in a short amount of time. I know this works pretty well because I tried it.

Diceware is just random words. It's as good as any other randomly generated set of words, assuming you use a good source of randomness: for Diceware, you should use dice, which is a reasonably good source. Digital password generators are usually also good, though homebrew implementations might use an insecure random generator by mistake.

We know that any random passphrase is good because it's basic math. There are two properties to a passphrase:

Dictionary size
Number of words in the phrase

The 'randomness' of a passphrase is simple to calculate: dictionary_size ^ words_in_phrase, where ^ is exponentiation. A passphrase of 3 words with a dictionary of 8000 words is 8000^3= 512 billion possible phrases. So an attacker, when guessing the phrase, would have to try 256 billion phrases (on average) before s/he gets it right. To compare with a password of similar strength: a random password using 7 characters, consisting of a-z and A-Z, has a "dictionary size" of 52 (26 + 26) and a "number of words" of 7, making 52^7= ~1028 billion possible passwords. It is well-known that 7 characters is pretty insecure, even when randomly generated.

For randomness, it's the more the better up until about 128 bits of entropy. A little more than that helps buffer against cryptographic weakenings of algorithms, but really, you don't want to memorize 128 bits of entropy anyway. Let's say we want to go for 80 bits of entropy, which is a good compromise for almost anything.

To convert "number of possible values" to "bits of entropy", we need to use this formula: log(n)/log(2), where n is the number of possible values. So if you have 26 possible values (1 letter), that would be log(26)/log(2)= ~4.7 bits of entropy. That makes sense because you need 5 bits to store a letter: the number 26 is 11010 in binary.

A dictionary of 8000 words needs about 7 words to get above the desired 80 bits:
log(8000^7)/log(2)= ~90.8 bits of entropy. Six words would be:
log(8000^6)/log(2)= ~77.8 bits of entropy.

A large dictionary helps a lot, compared to the relatively small Diceware dictionary of 7776 words. The Oxford English Dictionary has 600k words. With that many words, a phrase of four randomly chosen words is almost enough:
log(600 000^4)/log(2)= ~76.8 bits of entropy.

But at 600 thousand words, that includes very obscure and long words. A dictionary with words that you can reasonably remember might have a hundred thousand or so. Instead of the seven words that we need with Diceware, we need five words in our phrase when selecting randomly from a dictionary of 100k words:
log(100 000^5)/log(2)= ~83.0 bits of entropy.

Adding one more word to your phrase helps more than adding ten thousand words to your dictionary, so length beats complexity, but a good solution balances the two. Diceware seems a little small to me, but perhaps they tested with different sizes and found this to be a good balance. I am not a linguist :).

Just for comparison, a password (consisting of a-z, A-Z, and 0-9) needs 14 characters to reach the same strength: log(62^14)/log(2)= ~83.4 bits of entropy.


Are emails from the Necurs bot net DKIM and/or SPF signed? As the questions title already asks: Are emails sent by Necurs DKIM and/or SPF signed?

Or are they unsigned and simply spoofed?

As far as I know necurs spam is spoofed and/or sent from infected machines acting as MTAs.

Other bot nets however obtain valid credentials which they then use for sending emails via the respective MTA which might - or might not - are DKIM signed and/or SPF controlled.


Public / Private Key Cryptography for offline systems Are there any best practices around distributing an encrypted package to multiple end user systems, specially if the end system are offline ones, in context of asymetric cryptography?

Is it a must to create unique public/private key sets [ per end user system] and encrypt the same package many times uniquely with the public keys, resulting in a specific package per end user system? How will this scale?

Will it be a good practice to sign the original private key [ corresponding to public keys used to encrypt the package] with senders private keys and then encrypt using end user systems public keys and share it directly with end users, through trusted communication?

Or encrypt the private key with end user systems public key, sign with senders private key and re-encrypt[symmetric] this with the hash of certain string uniquely identifying a end user system? This hash should be programtically reproducible using system unique identifiers later during decryption processes. This way, to retrieve the original private key to decrypt the package, it will require both a corresponding public key[end user clients] as well as end user machine [the hash of string to be generated at runtime on end user system.] and senders public key to manage the authenticity?

You can programatically generate a symmetric key on every client, and generate the same key on the packaging server. Generate a keypair and distribute a single public key to each client.

When you generate a new package, encrypt it with the symmetric key, sign with your private key, and distribute. On the client side, check the signature with the public key, and if the package passes the check, use the generated symmetric key to decrypt.

If you don't need to create a unique package to each client, you can distribute the public key, and encrypt the package with your private key. Sign the resulting file and distribute. After receiving the file, the client checks the signature, and decrypts the file. Side effect is that every client can decrypt every package, but if the clients are offline and isolated from each other (or don't know each other), it should not be a big issue.


Vulnerability scanning: White list pentester or not? If your company engages a third party pentester to do vulnerability scanning, do you

whitelist the pentester so that they can thoroughly scan the machines on the internet, or
do not whitelist them so that you have a better gauge of the effectiveness of your countermeasures?

If you are getting your network assessed for the first time I would suggest giving the pentesters complete access.

You will get a report that is comprehensive which would include all the vulnerabilities that exists in your assets.

This will give you the complete understanding to plan upgrading the security of your network.

Moreover, during a pentest, the testers attempt a large number of attacks within a very short time. Please remember that in practice, an attacker might try these attacks slowly, over a longer period of time, and slip beneath the radar. To enable the testers to test efficiently, white-listing the testers is a essential.


Does the Oracle Database Built-in Password Protections prevent pass-the-hash or replay attacks? Does the Oracle Database Built-in Password Protections prevent pass-the-hash or replay attacks?

Reading the "What Are the Oracle Database Built-in Password Protections?" from http://docs.oracle.com/cd/B28359_01/network.111/b28531/authentication.htm#DBSEG30031 I see AES encryption is used as well as SHA-1 hashing.

I understand that data in-transit over the network is unencrypted, but the initial session setup and authentication is suppose to not send the password in the clear.

So WITHOUT using Oracle Advanced Security (for full network layer encryption) does the built-in method prevent pass-the-hash or replay attacks?

Is there some type of noonce?

I'm guessing the AES is done with the user's password or is the key exchanged some other way?

I assume you are talking about the TNS login process and not about the stored hashes. But just in case: Oracle up to 10 stored password hashes as simple 2-iteration DES over uppercased user+password since 11.1 it is a salted SHA-1.

For the TNS Logins with password authentication (there are others like Kerberos), the protocol use a challenge response where the password hash is encrypted with a session key. Starting with 10g the session key is larger and contains a client and a server part (as opposed to only a server part before).

The most problematic aspect of this is, that if you have the password hash you can use it to brute force a sniffed login package.

So short answer to your question: yes (but it is not very secure).


ISP glitch or a malware? Has this ever happened to you? Brief background: I consider myself a relatively paranoid power-user, if not an absolute pro. I regularly update my AV and keep up with all the latest updates on my Windows 7 machine. But what happened today surprised me for the first time.

Today morning at around 13:30 India time, I opened www.google.com in my Firefox 32 browser. But instead, my browser forwarded me here:

WARNING!! POTENTIAL MALICIOUS SITE: http://demo.opera-mini.net/public

Tried with IE 11, the same result.

Then I did a ping www.google.com and browsed using that IP address instead. It worked and took me to Google India site.
I then opened the .co.in instead of .com site, that too worked!
I went to a vm inside VirtualBox (Ubuntu/Firefox) and browsed from there instead. That too worked!

At this point, I disconnected my machine from internet and ran a complete AV scan. It came up clean. Then I tried the only logical thing that occurred to me: Clearing the browser cache for google.com domain. I did it on IE and lo! it started working. On Firefox, I didn't have to do that either, it started working on its own (though I don't understand why).

After that brief anomaly, I faced no issues until now. So what do you hackers make of this situation? Could it be a malware issue or something from my ISP end?

You're either behind a malicious proxy/VPN or your host file is effected. Most likely the latter.

On windows 8 you can check your hosts file here

C:\Windows\System32\drivers\etc\hosts

Remove any lines with strange IPs. Infact you can remove everything if you aren't running any cracked software or have routes setup for a web server.

This could also be DNS poisoning on your local network, so be sure that's secure too.


My dlink router seems to be compromised By chance I read today about this huge vulnerability regarding my router Dlink DIR-600. ( http://www.s3cur1ty.de/m1adv2013-003 )
Just out of curiosity about what I would find, I tried to send some commands to it and it also worked on the first attempt. Something like ls or ifconfig was funny to see from it...  until I tried the ps command which printed out the following:

PID USER       VSZ STAT COMMAND
    1 0          592 S    init
    2 0            0 SW   [kthreadd]
    3 0            0 SW   [ksoftirqd/0]
    4 0            0 SW   [events/0]
    5 0            0 SW   [khelper]
    6 0            0 SW   [async/mgr]
    7 0            0 SW   [sync_supers]
    8 0            0 SW   [bdi-default]
    9 0            0 SW   [kblockd/0]
   10 0            0 SW   [cfg80211]
   11 0            0 SW   [rpciod/0]
   12 0            0 SW   [kswapd0]
   13 0            0 SW   [aio/0]
   14 0            0 SW   [nfsiod]
   15 0            0 SW   [crypto/0]
   21 0            0 SW   [mtdblockd]
   60 0         1368 S    xmldb -n wrgn49_dlob_dir600b -t
   61 0          888 S    servd -d schedule_off
  177 0          852 S    logd -p notice
  178 0          828 S    klogd -p notice
  185 0          852 S    gpiod
  453 0          996 S    /var/run/fakedns --port=63481 --address=/#/1.33.203.3
  490 0          872 S    ddnsd
  502 0          832 S    telnetd -l /usr/sbin/login -u Alphanetworks:wrgn49_dl
  510 0          592 S    init
  693 0            0 SW   [RtmpCmdQTask]
  700 0         1008 S    hostapd /var/servd/hostapd-ra0.conf
  701 0          852 S    updatewifistats -i ra0 -x /phyinf:3 -r /runtime/phyin
  723 0          836 S    portt -c DNAT.PORTT
 1127 0          988 S    udhcpc -i eth2.2 -H dlinkrouter -p /var/servd/WAN-1-u
 1656 0          852 S    neaps -i br0 -c /var/run/neaps.conf
 1665 0          828 S    netbios -i br0 -r dlinkrouter
 1666 0          844 S    llmnresp -i br0 -r dlinkrouter
 1683 0         1012 S    udhcpd /var/servd/LAN-1-udhcpd.conf
 1769 0          960 S    lld2d -c /var/lld2d.conf br0 ra0
 1853 0         1008 S    proxyd -m 1.33.203.39 -f /var/run/proxyd.conf -u /var
 1944 0          984 S    dnsmasq -C /var/servd/DNS.conf
 1973 0         1508 S    httpd -f /var/run/httpd.conf
 4379 0          968 S    /usr/sbin/phpcgi /htdocs/web/command.php
 4380 0          692 S    sh -c ps >> /var/cmd.result
 4381 0          592 R    ps

Here I am especially concerned about the telnetserver (pid 502), the fakedns (pid 453) and also the cockiness of my provider, providing a router that is not updated for security vulnerabilities anymore, and taking my money for renting that box to me...
So the first thing to do was to kill all those suspicious processes but, as expected, after a reboot of the machine everything was like before, up and running. I checked several standard config-files but they seemed normal..

So my questions are now: is my router seriously compromised? Is it enough to prevent those processes from starting up? Did I miss something? Also this "xmldb" (pid 60) seems kind of suspicious to me.

When you run ps the output is the current running process list. Sometimes this will list the process including the command line arguments used to start the process. Here are some possibly dangerous looking commands from your output:

  453 0          996 S    /var/run/fakedns --port=63481 --address=/#/1.33.203.3
  502 0          832 S    telnetd -l /usr/sbin/login -u Alphanetworks:wrgn49_dl
 1127 0          988 S    udhcpc -i eth2.2 -H dlinkrouter -p /var/servd/WAN-1-u
 1853 0         1008 S    proxyd -m 1.33.203.39 -f /var/run/proxyd.conf -u /var
 1944 0          984 S    dnsmasq -C /var/servd/DNS.conf
 4379 0          968 S    /usr/sbin/phpcgi /htdocs/web/command.php
 4380 0          692 S    sh -c ps >> /var/cmd.result

I see fakedns is pointing all of your dns requests to
1.33.203.3.
Telnet accepting connections from only Alphanetworks.
It appears as if your traffic is being proxied to 1.33.203.39 (can't find any documentation on the -m flag).
You have a php page running under the name "command.php" I would suggest checking out the source code to that file.
The output of 'ps' is being appended to cmd.result (that may have been you).

In a possibly related note a google search for "proxyd -m" returns this gist.

If any/all of this seems phishy to you, I suggest factory resetting your device. If there are no available patches for your device see if you can load any open source firmwares (such as OpenWRT) and confirm the hash of the image when you download it.


Web server attack methodology: why bother with manual tests if vulnerability scanner does it all? I'm reading a white hat hacking book from a famous certification.
They say the methodology for hacking a web server is:

information gathering (domain name, DNS, IP, etc.)
footprinting (ex: banner grabbing)
website mirroring
vulnerability scanning
session hijacking
password cracking

Apart from session hijacking and information gathering, I don't see why I would not just launch Acunetix Web App Scanner and/or Nessus to find all weaknesses.

What is the point of performing manual tests if you can automate them?

For instance, if the vulnerability scanner does not know how to find vulnerable cookies, and if I manually find a way to do session hijacking, I won't be able to train Acunetix of Nessus for that. Even if I did, I don't how beneficial it would be.

Please explain why I would not just let my tool do the hacking for me.

You have several assumptions here:

scanners can find all vulnerabilities
if a scanner cannot find a vulnerability then there are no vulnerabilities
all manual tasks can be automated
attackers would only use automated tools and not manual approaches
manual approaches cannot be turned into bespoke automated tools
finding vulnerabilities is the same as exploiting the vulnerabilities

None of these assumptions are universally true.

Automated scanners help make the process of finding vulnerabilities more efficient, but they are far from perfect and far from complete. Scanners are also not designed to exploit the vulnerabilities in a useful way.

In practice, you want to manually test the results of a scanner (false positives) and perform manual tests to look for things that the automated tool might have missed.

Attackers will use a mix of approaches and then often create or modify a tool to exploit the vulnerability so that it is repeatable and reliable. But that doesn't mean that the tool will work in other situations.

Automated tests are the basic threshold. If your site/program fails an automated test, then you've made a pretty bone-headed error and it should be fixed immediately (because it will be easy to find). But I've seen some cases where a developer has added a check for 1=1 in their SQL in order to hide from automatic scanners, but I was able to exploit the site using 2=2 (modern SQL scanners account for this now). I only knew that from manual testing and personal experience. You can't encode experience and intuition in a tool.

Coding is an insanely complex activity. That means that the errors can be complex, too. No tool could be created to look for or to exploit all vulnerabilities.


What is the best way to secure your web resources when you provide API as web service? Here is the condition:
I have a web service API that I am planning to sell as a service. The output of the API contains URI of some resources (say images, videos) that should be accessible to that guy using API.

Exposing URI as is, seems like a bad idea since they can just visit that resource and navigate through.

  What I tried?

Selective Passsword protecting the URI resources from apache server configuration. But this would prevent every client from displaying those resources.

  What others are doing?

I just looked at how facebook was doing this and it seems they have some sort of encrypted URL for image resources.

Following is an example I got from  Barack Obama's FB  page:

https://scontent.fblr1-1.fna.fbcdn.net/v/t1.0-9/14925612_10154300250296749_7922327253356496348_n.png?oh=54935f1f517c995295580b55a9a058a0&oe=5925CCFC

How do I achieve this level of security? what are the standard practices and how should I go about implementing them? Any leads would be appreciated!!

Normally an API will be protected by an API Key or an API Secret which is commonly sent in the headers. However, with the wide acceptance of OAuth, developers seems to use this method, which they can set the time for refreshing an OAuth token which is a much better way.

If you still need more protection for your API, (Which I Guess some bank or payment related ones), normally the client send an encrypted string to the server, the server decodes it, then send the response back again in an encrypted string.

So the person with the key can only decrypt the string.

So, in fact, you can mix API secret method with API string encryption for a stronger method.


I have a client that is worried about DDOS attacks on their site, and they want penetration testing. Will that help? My client wants to look into hiring a third party to perform penetration tests on the website that we're developing for them. The website is just a simple 3-month contest site where people can upload their photos, and the photos are judged by moderators for a winner. The site will be hosted on a Rackspace Cloud Server (virtual server). Their main concern, for whatever reason, is DDOS attacks. They asked that we find someone to do penetration testing for the site (manual, ie, not the automated kind).

My hunch is that penetration testing doesn't do much good against DDOS attacks. Is a penetration test overkill in this situation?

If your customer is concerned about DDoS then a standard Pen. test isn't the route to go.  Leaving aside the question of whether it's a valid concern, one approach would be to look at doing load testing on the site.  There are companies who will perform load testing to see how much traffic the site/server can handle before becoming unavailable.  This would give you an idea of how it will react to heavy load.  Obviously if you do that sort of testing, you should inform and get approval from Rackspace, so they don't misinterpret it as an attack. :)

That said, some DDoS attacks don't follow similar patterns to standard traffic (e.g. attacks which use DNS amplification).  If that's a serious concern I'd recommend looking at DDoS protection services (e.g. CloudFlare/Akamai) as realistically there's not a lot you can do about that kind of thing at the server or even potentially the ISP level in the case of large attacks.


Android: Are locally-stored encryption keys readable by attacker who gained root access? i have a question:

i'm trying to understand a specific point in android encryption.

All the encryption keys are software based and are stored locally on the machine, so correct me if i'm wrong but doesn't it mean that attacks on android phones where the attacker gains root access means that the attacker can retrieve the encryption keys?

Yes, if an attacker has root on the machine they will be able to read all secrets stored on the device.  root can attach a debugger to any process and observe memory or hook function calls.

A mobile app should not attempt to hide secrets from the user, and server-side functionality should not trust mobile clients.  These are common mobile vulnerabilities.    Some apps attempt to detect root'ed devices,  but this can always be bypassed.


Should self signed wildcard certs be used? I think this is more urban legend around where I work than anything. I do not see anything in RFC 2459 that specifically says whether or not they should be used or if there are any known problems with using them. It only says:

From RFC 2459

  Finally, the semantics of subject alternative names that include
  wildcard characters (e.g., as a placeholder for a set of names) are
  not addressed by this specification.  Applications with specific
  requirements may use such names but shall define the semantics."

That whole statement is difficult for me to interpret. I'm really more interested in the functionality of a self signed wildcard but if there is any security issues around using them I would certainly like to know that as well.

Should wildcard certs be used?

Generally not, and here's a good list of reasons why.  Subject Alternative Name (SAN) certs provide most of the functionality without the same level of security drawbacks.  Wildcards had turned mostly into a lazy shortcut for people who didn't care about security, which is why they're discouraged these days.

Should wildcards be used in SAN names?

The RFC you've quoted says that you're welcome to use wildcard characters in a SAN name, but that they are not reserved to mean "wildcard", so the interpretation is up to the client.  If you're writing your own client to use your own service and your own certs, hey, go wild.  But nobody else's browser is likely to play.

Should self-signed certs be used?

Depends on what you're using them for.  Internal resources where you control the trusted root store for the client browsers?  Sure.  Cheap web hosting of your kitten pictures?  Sure.  Otherwise, use caution.  There are plenty of good questions on this site if you want to learn about the nuances of self-signed certs.

Does self-signed have anything to do with wildcards?

No, not particularly.  As per my comment above, you may have confused SAN and self-signed.  Wildcard certs should be avoided equally for self-signed and CA-signed certs.  The potential negative impact is somewhat less when self-signed, due to the limited client trust of the self-signed CA, but that doesn't make them a good idea.


Do Javascript malware signatures exist? Are there signatures for malicious JavaScript codes as they exist for other viruses/worms/trojans developed in other programming languages ?

If so, are these JavaScript malware signatures defined the same way as they are defined in other "standard" malwares ?

I ask this because I need to download some signatures of known JavaScript malwares for a harmless test on my 'anti-malware' like script programmed in Python.

There are both dynamic and static signatures.
The dynamic signatures are used by dyanmic detection  tools such based on analysis of the behaviors of JavaScript malware: whatever the depth and complexity of code obfuscation of a given JS malware the fingerprint and the execution level is the same.
Examples of such tools that rely on fingerprinting the danymic side -execution- of JS malware are:

Iceshield
Zoozle
Spyproxy
EarlyBird
Profiler

Static signatures of JS malware also exist and are used by traditional antiviruses. They either rely on the source code of the malicious JS (the whole of it, or portions of it) or by statistical analysis of some suspicious JS functions such as eval() and unescape().


Bypassing valid certificate requirement for websockets I'm attempting to connect to a websocket server hosted in C# using SuperWebSockets from a page. The issue is that the websocket server generates a self-signed certificate making it difficult to connect to from the browser. The ServerConfig of the SuperWebSocket has "tls" for Security and passes on a self-signed certificate filepath through the Certificate member of the ServerConfig.

I was wondering if anyone knew any hacky tricks to connect to this web socket server from a web page, I'm open to ideas for either/both Firefox or Chrome. I know there are ways to do this if the user adds an exception for the certificate or disables certificate validation, but I need a method that's pure javascript. Perhaps emulating TLS?

There is no way to disable certificate validation or accept an invalid or self-signed certificate using pure Javascript in the browser. And it would be a very bad idea if something like this exists since it might enable attackers to man in the middle critical sites when you've visited the attackers site.

You might explicitly import the certificate as trusted in each browser or you might offer access to this site by HTTPS (i.e. not only wss://) so that the user can create an explicit exception for this site. But this can thankfully not be automated, i.e. it requires explicit user interaction.


Is comparing unsanitized user input enough to be vulnerable to XSS? Say I receive user input from window.location.hash. Is comparing this unsanitized input to whitelisted values enough to open myself up to XSS vulnerabilities?

Take the following example code:

jQuery(function ($) {
  var hashVal = window.location.hash;
  $('.some-container').children().each(function(){
    var link = $('a', $(this));
    if(hashVal === link.attr('href')){
      //do something with link
    }
  });
});

I've tested it against a few potentially troublesome strings with no success (or total success depending on how you look at it).

I'm curious if the if(hashVal === link.attr('href') could be exploited with something like #1 || true){}; //some malicious code...; //.

Your code looks fine, and it's not exploitable.

A JavaScript string just contains, well, a string of letters. Sometimes those letters form a piece of code. That is not dangerous in itself, as JavaScript only treats it as a collection of letters most of the time, e.g. when you do string comparison.

For it to open up a XSS vulnerability, something must execute the code. There are two ways that can happend:

If you give the variable as input to a function that executes string as code. The main one here is eval, but there is also new Function, setTimeout and setInterval.
If you put the string into the DOM, e.g. using innerHTML.

As long as you stay away from those two, the code will not be executed.


Why does COMODO have 5 root certificates on a new Apple laptop? Why does Apple include 5 COMODO root certs in OS X? There's "AddTrust {Class 1, External, Public, Qualified} CA Root" and also "COMODO Root Certificate".

Why isn't one enough, if it's owned by a company?

In my browser (Chrome on Windows) I have certs for both of those CAs. I'm not entirely sure what your question is getting at (Why a CA would have more than one cert? Why a CA would issue off a non-root cert? Why OS X doesn't ship with the root cert?). If you could update your question with more detail, that would be great, but in the meantime I'll try to answer the most general question.
Why a CA would issue off a non-root certificate?
It is very common for a public CA to use a non-root CA for issuing customer certificates. As far as establishing trust, it only matters that the customer certs can chain back to the root that's in your browser, which intermediate CA actually issued it is mostly irrelevant.
There are a number of reasons for setting up a CA hierarchy like this, some are security-related, some are IT-related. Let's look at an example CA setup (not the best image, but let's go with it):

Reasons that you might want to set it up this way:
IT / Administrative
A CA may have multiple marketing departments that all issue SSL certs. Maybe these departments are in different physical locations, maybe they're subject to subject to different laws, or maybe they're just in different departments of the company. Either way you probably want the admins for each department to not have access to the CA for other departments.
Security
What happens if your Root CA gets compromised? How do you recover from that? You don't, your company goes bankrupt, it's happened before.
If instead, it's a intermediate CA that gets compromised you have options. If each intermediate CA is on a different network with different admins then chance are good that you can shut it down without compromising any other CAs. You have to be careful with both the technical and PR aspects, but it's possible to move customer certs on the compromised CA over to another CA without people losing trust in you. It's not easy, but you have options.
Offline Root CA
For these reasons it's common for commercial CAs to have their root be a machine that is never, at any point, connected to a network. Its only job in life is to issue certificates for the CAs immediately below it, then you turn it off and put it in a vault. Good luck hacking into that.
My guess from looking at those two certs you linked is that
C=SE, O=AddTrust AB, OU=AddTrust External TTP Network, CN=AddTrust External CA Root

is an offline root, and
C=GB, ST=Greater Manchester, L=Salford, O=COMODO CA Limited, CN=COMODO Certification Authority

(which is subordinate to the first one) is a regional departmental CA (though clarification of your question would help).


Non SSL website with external SSL secured service I'm working with site that is served via HTTP. Authentication service is external and served via HTTPS. I'm not sure that this isn't security concern that is website is not using SSL.

It is a security concern, because half of transport between end user and end application is unencrypted and will be a subject for MITM. That is, SSL between your app and end app doesn't make much sense, because transport between user and your app is wide open for any kind of manipulations. You really should protect all communication transport with SSL certificate.


Can I modify my certificate chain? I've had SSL/TLS running on my site now for a while. In order to learn a bit more about general PKI, I studied Qualys' SSL test, and optimised my configuration (including the adoption of OCSP stapling).

My specific web server of choice is Nginx - and there is the option ssl_trusted_certificate, which, if I'm not mistaken, allows an OCSP response's signature to be validated. As far as I know, this is a chain that goes from the CA's root certificate, down to the final intermediate certificate before your server's "acting" certificate (I forgot the proper name for these!).

In my specific situation, I'm using Gandi as a certificate provider. I got two different certification paths according to the test. The USERTRUST root (which issued the Gandi intermediate certificate), didn't seem to work on some devices (recent phones, I found an instance of Android 4.4.4 didn't have the certificate installed), so I opted for the longer chain, with AddTrust at the root (which issued a USERTRUST cert., which in turn issued the Gandi cert., and finally my server's own).

This resolved the issue. However, I'm wondering whether or not this is recommended to deviate from the given bundle provided by Gandi? Also, getting back to OCSP, my OCSP URI turns out to be http://ocsp.usertrust.com.

If I was just blindly changing ssl_trusted_certificate, I'd put the AddTrust root, the USERTRUST intermediate, and finally the Gandi intermediate certificates in that order (I can't find any documentation that goes into which order I specifically need it in, and which certificates I actually need to include).

If my OCSP responses are coming from USERTRUST, do I just need the USERTRUST root, and the Gandi intermediate?

Thanks for taking the time to read. :)

(I can't find any documentation that goes into which order I specifically need it in, and which certificates I actually need to include).

RFC5246 is pretty clear on this:

certificate_list
  This is a sequence (chain) of certificates.  The sender's
  certificate MUST come first in the list.  Each following
  certificate MUST directly certify the one preceding it.  Because
  certificate validation requires that root keys be distributed
  independently, the self-signed certificate that specifies the root
  certificate authority MAY be omitted from the chain, under the
  assumption that the remote end must already possess it in order to
  validate it in any case.

  However, I'm wondering whether or not this is recommended to deviate from the given bundle provided by Gandi?

Why would you like to deviate from this? If Gandi is the CA that issued your certificate, you should definitely use its OCSP responder. Any OCSP responder further up in that chain is not responsible for any certificates issued by Gandi. After all, nobody (but Gandi) knows the private key, which is needed to sign the OCSP responses with (and/or the certificate that is used to sign OCSP responses).


CSRF with a CORS JSON API We have api.example.com that communicates with app.example.com, a native Android app and an iOS app. We want to allow other third parties to communicate with the API too if they want, and as such we have Access-Control-Allow-Origin: * header set.

We have some API routes that do not require prior authentication such as /reset-password and /login.

Every other API route requires an authentication token appended to it, for example /important-action?authtoken=abc123. It does not accept cookies in headers or the body of requests. app.example.com saves the auth token in a cookie to preserve the session.

What I'm struggling to understand is how evil.com can exploit this setup- Can somebody please give some examples of how an attack could work or stop me worrying and let me know CSRF isn't an applicable risk.

I've read other answers that refer to "using cookies" but they do not clarify what exactly "using" means. In our case, we're storing the authtoken in a cookie and appending it to the request URL. The API ignores any cookies sent in the request header.

There are two possibles paths an attacker has to explore here:

Can anything be done with the paths that does not require authentication?
Can I somehow get my hands on the token?

Lets look at #1, and the two paths. If the /reset-password path just sends an email to the account owner, it isn't of much use.

The other, /login, is more problematic. If you also set Access-Control-Allow-Credentials: true evil.com could "force" a login (by having the token cookie set). This opens you up to login CSRF, which can be anything from not a big deal to very bad depending on your application. If you don't set that header, the cookies in the response will be discarded and you're fine.

As for #2, it depends on if that token is available anywhere else than in the cookie. The sender of cross origin requests is never allowed to read cookies, so it can't read the token from there. But maybe it is included somewhere else? Perhaps the response contains some URL with the authtoken param in it?

Not that if the cookie itself was used as authentication when sent from the client, this would be a different story. Then you could indeed have a huge problem here.

CSRF aside, putting secrets in the URL is discouraged. After all, URLs ends up in all sorts of logs, not to mention browser history. If there is no reason not to, I would just put the token in a header instead. The header would actually help protect against CSRF as well, since evil.com wouldn't be allowed to set it.


Is it safe to use this online tool to generate my Windows Answer File? I found a Tool to generate an unattended Windows Answer File for Windows Installation but I'm not sure if it is safe to use.

It asks for the default password to setup a local admin user and the domain name and everything, so if that data gets submitted anywhere this thing just isn't as safe to use as it is convenient.

You could look at the sourcecode of the script behind that website and see that it is completely client-sided and doesn't communicate with a server.

But just because the website delivered this script in that form to me does not mean that it will deliver the same script to you. Websites can easily deliver different content to different users. Also, there is no guarantee that this behaviour won't change tomorrow. But if the website is malicious, why would they target you but not me?

Another sore point is that the website doesn't seem to be available over https. That doesn't help a passive eavesdropper because, as I said, the file doesn't leave your computer. But an active MITM attacker could manipulate it in-transit to add a spying script. But that's a pretty unlikely scenario.

Bottom-line: It's probably safe enough for average people, but not safe enough for the paranoid. When you belong to the latter group and want to be completely sure, you could easily use it offline. Just safe the website to your local machine and open it from there. That way there is no way for the website to alter the script.


How secure is VPN addons for browsers I regularly uses VPN addons like browsec, Zenmate etc in my browser. These addons/Plugin boast about hiding IPs, bypass firewalls, faster and encrypted services, tracking protection etc which they provide for free. I want to know how secure is these VPN services. Is it possible to encrypt our internet activities using these VPN's?. Can or cannot ISPs or any other third parties can track our internet activites while using these VPNs?

After it has been blamed for not informing its users which protocols it uses, Zenmate says it relies on  TLS 1.2 (RFC 5246) protocol with 128-bit AES-GCM data encryption, SHA256 data authentication and ECHDE RSA handshake. So from the encryption standpoint, it is good and it is even rewarded for that. The problem with Zenmate is that its free service may be more limited by time (Zenmate is a commercial company) and the plugins itself keeps running even if the browser is closed thus consuming CPU and memory resources, and remember that Zenmate is not a full VPN service but it only encrypts your Chrome sessions.

As for Browsec, it is also recommended and just as well seen as Zenmate but for the etc you used in I regularly uses VPN addons like browsec, Zenmate etc in my browser, it all depends on which plugin you are talking about: As a good safety practice, you should use a browser plugin only if really necessary. And before installing one, being informed about it (why not review its code or see if some community did that, its rating and so on) is a good thing. There are even free opensource browser plugins developed as  POCs of how a plugin can compromise seriously user's privacy such as ZombieBrowserPack that can be manipulated remotely to steal authentication credentials, and even bypass two-factor authentication mechanisms such as the ones implemented by Yahoo and Google. It can also hijack your Facebook account, or get your bank account credentials if you perform an online purchase. You can imagine such a plugin purposed to fulfill this or that feature (shim) and doing something nefarious behind in the background.


Does a domain with no SPF record count as a DMARC pass or fail? Learning about how SPF/DMARC work right now. What I don't see a lot of the articles covering is what happens if there is no published SPF record for the domain. From what I can see most mail servers count that as a pass and let the email through. If the domain has no SPF record, but does have a DMARC record, would it count as a DMARC pass?

A DMARC pass requires that there is either a valid and aligned DKIM signature OR an a SPF check which returned Pass and which has an aligned claimed sender.

This means, that if there is a valid and aligned DKIM signature the result of SPF does not matter at all, i.e. it will return DMARC pass no matter what the result from SPF is, which includes the cases where the domain does not have an SPF policy at all.

If instead there is no valid and aligned DKIM signature then the DMARC result fully depends on the SPF result, i.e. a DMARC pass will only happen if there is an SPF Pass with an aligned claimed sender. If there is no SPF policy on the domain the SPF result is None, which means that it is not Pass and thus the DMARC cannot be pass either.


Initial steps of network mapping In light of recent security breaches hitting the news, it's been all hands on deck at my work as far as security.  I'm trying to pen test our network.  I have a very basic question.

My Question

You can ping someone's website and grab their IP.  I can scan that box of course for vulnerabilities.  However, most public facing web servers are locked down.  How would I go about looking for additional IPs that would be open to the outside in their DMZ?  How do you discover additional boxes?  I have Backtrack 5.  Anything specific to backtrack is obviously welcomed.

Check out The Penetration Testing Execution Standard (PTES).
And in particular: Intelligence gathering

This video may interest you as well:
Finding general information about an organization via the web (from the show notes he covers how to use Backtrack 5 to do a lot of reconnaissance type work)

Popular tools for quick (i.e. just interested in IPs) reconnaissance:

whois
nslookup, dig
dns recon tools  -> dnsenum, dnsmap, fierce + more ("DNS Analysis" folder in Backtrack)
nmap


Why does the file "shell.php.jpg" can execute as a php file but "shell.jpg" cannot? I am learning about file upload vulnerabilities using DVWA.

After cranking the website's security level to High,
the website checks both the post request's content type & file extension, so in order to bypass it I changed the file extension to .jpg and used Burp Proxy to change the file name to shell.php.jpg from shell.jpg in order to execute the shell.

It works.
What I don't understand is why it works. I read that only the right most file extension pattern is treated as the file extension, So that must mean shell.php.jpg should be treated as a .jpg file, and It is treated as such - the upload succeeds.

But why can I execute this file and not a shell.jpg file if the file extension stayed the same and the .php part is just part of the file name?

root@kali:~# weevely http://10.0.2.4/dvwa/hackable/uploads/shell2.php.jpg yuval

[+] weevely 3.7.0

[+] Target: www-data@10.0.2.4:/var/www/dvwa/hackable/uploads
[+] Session:    /root/.weevely/sessions/10.0.2.4/shell2.php_0.session
[+] Shell:  System shell

[+] Browse the filesystem or execute commands starts the connection
[+] to the target. Type :help for more information.

weevely> id
[-][channel] The remote script execution triggers an error 500, check script and payload integrity
uid=33(www-data) gid=33(www-data) groups=33(www-data)
www-data@10.0.2.4:/var/www/dvwa/hackable/uploads $

Example of the file working as expected named as shell.php.jpg.

root@kali:~# weevely http://10.0.2.4/dvwa/hackable/uploads/shell.jpg yuval

[+] weevely 3.7.0

[+] Target: 10.0.2.4
[+] Session:    /root/.weevely/sessions/10.0.2.4/shell_1.session

[+] Browse the filesystem or execute commands starts the connection
[+] to the target. Type :help for more information.

weevely> id
[!][terminal] Backdoor communication failed, check URL availability and password

Example of the same file NOT working as expected named as shell.jpg.

shell.php.jpg should be treated as a .jpg file

You're exploring DVWA, so not every should be means is. If I had to guess, the upload script properly checks the extension of the file and allows it, but the webserver doesn't check it the same way and allows execution.

You can learn more by exploring web server's (nginx or apache) config files, look for a block that performs handover to php parser for request processing.

Clarification:

  But why can I execute this file and not a shell.jpg file if the file extension stayed the same and the .php part is just part of the file name?

The extension is just letters in a file name, they do not determine how the file is handled by the web server, web server determines it. One of the common algorithms is:

If the requested file name ends with “php”
    Invoke php to handle the request
Else
    Serve the requested file like any other static file
End

I’m guessing that in your case requested file name ends with “php” is changed to requested file name contains “.php”. You can find this rule in the configuration file of the web server that’s processing your requests and find out for yourself.

Update:

This is the expected and documented behaviour of apache. I'm a little bit surprised, but this is the world we live in. Goddamnit.

In configuration file /etc/apache2/mods-enabled/php.conf line AddHandler php5-cgi .php registers handler for .php files. Everything is OK, unless you read what AddHandler does.

  The extension argument is case-insensitive and can be specified with or without a leading dot. Filenames may have multiple extensions and the extension argument will be compared against each of them.

Sooo... Yeah. Of course filenames may have multiple extensions. This is the only logical default.

If you're a weirdo expecting that the file would have only one extension, apache has the answer for you:

  If you would prefer only the last dot-separated part of the filename to be mapped to a particular piece of meta-data, then do not use the Add* directives.

They helpfully suggest the solution to your weird wish of one-extention-ness – just use regex. So in order to execute only .php files as php you need to replace AddHandler directive in php.conf with

<FilesMatch "[^.]+\.php$">
  SetHandler php5-cgi
</FilesMatch>

In conclusion:

common sense doesn't exist in software
never trust any data provided by user
store original filenames in the database if needed and rename them after upload
treat filenames like a live bomb


Which PCI SAQ would you say to use if you are neither a merchant nor service provider? Low down:  This client does zero with credit card data (no processing, no passing of it, nothing), but they do have a device often placed on the same network segment of a POS (Point of sale) system.

The key is their clients are expecting them to follow PCI security requirements and to produce an attestation.  Given this, which PCI SAQ is appropriate to use?

PCI document library:  https://www.pcisecuritystandards.org/security_standards/documents.php

SAQ A is the most applicable, which is defined as " Card-not-present Merchants, All Cardholder Data Functions Outsource".

In all honesty, they can sign their name to any of the SAQs because without storing, processing, or transmitting cardholder data, they are meeting every point on the DSS. If I were them I would sign an SAQ D (which is the full DSS) because it looks better.

A better approach for them would be to show how the device that they place in the Cardholder Data Environment (CDE) is compliant with the PCI DSS.


How can you protect Windows installation drive from "repair your computer" hack? It's well known that you can crack a windows account password using repair your computer (I'm not giving anymore details here)

What I'd like to know is if you know of technique to defend against it.

Idealy, even after booting from a USB, Windows installation drive should be locked (sort of in a box) so that you can't access and modify any file or escalate priviledges using windows cmd shell

Any idea ?

Pre boot authentication + full disk encryption. This will require a password (or some other authentication factor) before allowing any disk access.


How secure/safe is Eduroam? The higher education institution that I attend uses Eduroam, a infrastructure and IT company that often caters for the infrastructure and network needs of research and educational organisations. I am a bit concerned about the risk of sensitive information (such as login details) being stolen while I use the internet at the institute I attend (such as through other malicious users on the institutes LAN intercepting my traffic.) This may just be my paranoida, but do I have anything to worry about my information being stolen while connecting my personal laptop to my educational institutes network?

The higher education institution that I attend uses Eduroam

If you are using eduroam, then you are connecting to your wireless network with some form of 802.1X authentication and the wireless infrastructure must support WPA2/AES per eduroam requirements (they may additionally support WPA or TKIP).

802.1X uses a supplicant on the client device that connects to a RADIUS server to authenticate. The vast majority of eduroam authentications use EAP methods that utilize a TLS tunnel from the supplicant to the RADIUS server to protect user credentials. (I have only personally seen statistics from eduroam US, but for those 99.99% of authentication attempts use EAP-PEAP, EAP-TTLS, or EAP-TLS).

Once you are authenticated, unless the wireless deployment is old (pre-802.11n) or poorly implemented AND your wireless device doesn't prefer WPA2/AES, your wireless traffic is secured using AES encryption that is negotiated using unique keying material generated during your authentication. The use of TKIP (predecessor to AES) causes a wireless network to disable HT/VHT data rates (802.11n and newer data rates) so isn't even available on most wireless networks utilizing 802.1X authentication today.

  I am a bit concerned about the risk of sensitive information (such as login details) being stolen while I use the internet at the institute I attend (such as through other malicious users on the institutes LAN intercepting my traffic.)

Since you seem primarily concerned about malicious users on the network (and in the sake of brevity), I am going to disregard concerns about your school/staff intercepting traffic or your data being captured due to compromises on your device. Especially since you don't provide any information in those regards.

Assuming the use of AES encryption, your traffic is secure between your device and the access point (AP) of your school. Since AES encryption employed in wireless is still considered secure, no other device will be able to capture and decrypt this traffic.

Once your traffic reaches the AP, there would need to be some sort of compromise on your school's network for your data to be compromised. But then most services you access will be using TLS to encrypt traffic between your application and the server (for example, HTTPS in your web browser), especially when passing sensitive information (and if it isn't I would be more worried about that information being passed unencrypted on the Internet than even a compromised school network).

There is a possibility of compromised data if you let your device connect to rogue AP impersonating your school's wireless network. Most EAP supplicants provide protection from this in some way, either through configuration or at least providing you the option to confirm that the RADIUS server/SSL certificate your device is presented is valid. So make sure you configure this in your EAP supplicant or actually confirm the information you a about to approve is valid.

  This may just be my paranoida, but do I have anything to worry about my information being stolen while connecting my personal laptop to my educational institutes network?

Never hurts to worry about information being stolen, and not just when connecting to [insert service here].

During your authentication when connecting to a "eduroam" wireless network? No (as long as you are connecting to your school's RADIUS server). Even if you connect to eduroam at another school, the TLS tunnel is formed between the EAP supplicant on your device and your school's RADIUS server.

From users capturing wireless traffic between your device and the AP? No, 802.1X and AES on wireless is still generally considered the most secure method of connecting to wireless (as long as you are connecting to your school's RADIUS server).

From your school's network being compromised? No more so than any other traffic you send over the Internet (i.e. you should assume traffic over the Internet is compromised so sensitive information should be encrypted).

From your school or their staff capturing data? Possible but probably unlikely. Of most concern would be if your school is one that has implemented some form of TLS intercept (most school's do not).

From your device connecting to a rogue AP or your device being compromised? Absolutely, but then again in the first case you aren't really connected to your school's network (and there isn't a good reason for someone to impersonate your school's network) and in the second case it wouldn't matter to which network you were connected.


When I disable an installed extension in Chrome, will it still try to connect to the internet? I have an extension in Chrome, called Daxab ultimate, that I use, because on certain adult sites it lets me stream the video in 1080p and without the extension its 720p.

So, if I turn on the extension, that is, if I enable the extension only while I am on the site, and the rest of the time, I manually go into chrome extension settings and disable it there, will it still be "active" and possibly checking my browser history?

And its not just about Daxab, it is in general. When you click DISABLE in the extension settings, how does Google sandbox it exactly? Meaning, I have not uninstalled it, its simply disabled from functioning and doing its job.

So, do you security experts think that its effectively sandboxed or hibernated?

When you disable an extension, Chrome doesn't execute its code anymore.

It's still here, on your disk, but Chrome knows it's not active, so it won't load or execute anything.


Ubuntu 14.04 Laravel Web Server - What should I be concerned about? This is my first web-server which I'm looking to construct for my client. I have developed a Laravel application which has been fully deployed onto this server; now i'm looking for any security issues.

What security concerns are there regarding Ubuntu 14.04 running Apache, Laravel, PHP7 & MySQL?

What steps should I take to secure my web server from attacks?

Wow. I'm afraid no answer will be sufficient, and you'll likely need to hear from several different experts. Perhaps I will provide a simple overview [0].

Uninstall all unnecessary services (complexity is the enemy of security)
Enable and configure the firewall (UFW)
Consider upgrading to 16.04 LTS [1]
research and change all default passwords (for the remaining services)
use ssh public key authentication and disable ssh password authentication and ssh root login (assuming ssh is enabled)[2]
Follow hardening guides for each service running on your server.
Updates need to be applied quickly (or if they can't be applied, workarounds to the issues they fix should be implemented)
Backups.  Eventually something will fail. Be ready to redeploy quickly.

[0]

You've already built your application, so I can only assume your design doesn't have any security flaws, and your code handles user data very carefully.

[1]

2 extra years to upgrade before it falls out of support
not all patches are provided to older releases. Occasionally the security benefit of a patch is recognized long after release.

[2]

The world will continuously attempt to brute force your passwords.
Forcing public key authentication will render these attempts futile.
use a firewall LIMIT rule for SSH. It isn't perfect, but it reduces the log noise, and perhaps a trivial amount of CPU and network bandwidth.
moving SSH to a non-standard port reduces the log noise even more, but you'll have to remember the new port to perform maintenance.