Proxy plain password authentication At my workplace we use a proxy for all outgoing connections. Recently I had to install a Linux VM inside Virtual Box to be able to connect from it to the Internet. So I have configured the proxy settings in the yum.conf file. The password is in clear text in the config and one of my colleagues told me that it's a security risk because password will show as plain text and this part I don't understand. Isn't the Linux VM only authenticating against our company proxy so why should I care if it's sent in the clear? Could anyone explain ?

one of my colleagues told me that it's a security risk because password will show as plain text

Show where? If you connect to your proxy using HTTP, then the password will either be sent as base64 encoded (negligible improvement over plain text) or as an NTLM hash (small improvement). If this is what your proxy requires, then you have not created the problem - all the proxy users will be affected by this. If your proxy uses HTTPS, then the password is not visible on the network.

It will still be visible in the VM image if you didn't configure the instance to use encrypted storage.

Is it a problem if the account details don't stay secret inside your organization?

In a lot of environments, the web proxy is simply a way to multiplex many clients access to the internet. Sometimes there may be some filtering on the proxy. Rarely is there any per-user policy constraints - and if there are any being applied here, then the account you are using should only have access to the Redhat / Fedora / Centos repositories.

On the other hand if you are not using a dedicated account, then you could be publishing a password which might give access to all sorts of other things.


Client Side Encryption algorithm: security + is padding algorithm needed in this case? I will be using CSE for a web application as follows.

Generate a random AES key
Encrypt the cleartext data with this AES key
Encrypt the AES key with the service's public key, using RSA

Obviously, all that will happen over SSL. I purposely skipped the process of how I retrieve the service's public key.

1) Is this algorithm secure? I assume it is because it seems to be the standard. Assuming of course you are correctly using AES and using a RSA key of a proper length.

2) I know that when encrypting a message using RSA, a padding algorithm such as RSA-OAEP should be used to add randomness to the message. But since in this case the message is random (it is the randomly generated AES key), is the padding algorithm still necessary / useful? If yes, why? Assuming here that the randomly generated AES key is random enough.

Thanks!

1) It could be, yes. See also Is this RSA/AES combination good? and should I be using RSA or AES?

2) Yes. See What specific padding weakness does OAEP address in RSA?

It looks like you are trying to implement your own crypto. This is a bad idea. Furthermore, you mention you already have an SSL connection, so I don't really see the point of adding additional encryption on top of that.

If you really want this, you should use a higher-level interface. If you use GPG or SSL you don't have to worry about padding or combining RSA and AES.


Infecting a vehicle with a virus? Referring to the security experts who demonstrated taking control of two popular vehicle models using a laptops connected to ECUs (http://www.bbc.co.uk/news/technology-23443215), what are the possibilities that there can be malware/trojans etc. written to infect vehicles?

I don't even drive yet, so I'm no expert when it comes to understanding the way cars work, but since they use the on-board diagnostics port used by mechanics to identify faults, doesn't that technically mean that they have full access to all sensors etc. located in the vehicle?

In the article is says they written software to send signals to the car, to do certain instructions which they desired. If they were capable of doing that, imagine what black hats would have in mind? (Obviously, at the moment the only way this is possible is physical access to the vehicle)

Considering nowadays modern vehicles are almost fully incorporated with a desktop computer, such as having in-built touch screens running some OS, video & audio players, image viewers, and so much more, don't you think it is possible for your average driver to place an infected  thumb-drive into his car, with the intention of listening to the latest tunes or watching a movie, only to have a trojan (which made it's way onto his storage device from his PC) in the background being executed by the vehicle, which can lead to destruction?

What are your thoughts?

Edit:

I have found this article which explains some researchers burned a trojan to a music CD, which allowed them to change the car's music player's firmware to get access to other components of the car.

A virus or a trojan are pieces of code which automate an attack, and propagate more or less automatically (the terminology is a bit sloppy). First there must be a vulnerability which can be exploited to run malicious code on the target. There are many kinds of vulnerabilities, including a gullible user who will "open executable attachments" (the core principle of many a trojan), but there must be some. Then, the virus/trojan/malware brings it up to a higher level through automation.

With a vulnerability, the attacker gains some control on one car. Most attackers will stop there, because they are car thieves and don't want to take the control of any other car than the one they are standing next to. Even more so, they don't want to steal a car which is "too much damaged", be it mechanically or logically.

A car virus, "infecting" a lot of cars, would allow for large-scale heists, e.g. plunging a whole car-loving country into pedestrian chaos, or blackmailing authorities with the prospect of killing random drivers (gee, when I write that, I almost hear the voice of Bruce Willis cracking jokes while shooting villains). While this would be a great Hollywood scenario, I expect massive car-stealing to occur first. We will get warnings.

A redeeming property of cars is that they are not electronically centralized, not in the same was as a smartphone. An iPhone has a single big CPU which does everything. A car has dozens of small CPU, each responsible for one or two tasks. Though they are linked together, they still have a lot of autonomy. A remote exploit on a car would probably allow for shutting it down, or blinking lights, but not override everything. Car manufacturing regulations are also adamant: come what may, the driver must still be able to brake by heavily pushing on the pedal, even in case of a total collapse of electronics, e.g. after having been hit by lightning. The hand-brake, also, is supposed to be entirely mechanical, with no electrical part. As long as these properties are maintained, you cannot be abducted by your own car, even if it has "automatic driving" abilities.


Is this algorithm safe enough? Depends.  What's your threat model.  That question literally cannot be answered without creating a model of how determined and how resourceful your threat is.

That being said, I would generally say, "no, not safe enough."  If you have found that the inputs are multiplied together in the first step, that automatically starts to create attacks.  You don't have 100*100 = 10,000 possible inputs, you only have 2,870 possible inputs.

Given that you don't have a threat model, that, on its own, is not enough to automatically make it fail to be safe enough.  However, it does show that the implementer did not understand security when developing the algorithm.  This suggests there are other flaws which have not been seen yet, and thus I instinctively distrust the implementation.


Is there something similar to DNSBL's for protecting against forceful browsing? I want to protect a couple of Apache webservers against forceful browsing. Lately there have been multiple scans querying for non-existent applications on them like phpMyAdmin, notably known for their weak security record.

This is starting to decrease the performance of said servers and I'm searching for ways to protect against them. I've found a couple threads in here about this:

5301
5001

From that, I gather my best bet is to throttle these requests.

I was wondering if there is some system like a DNSBL for spam fighting used for this effect. Maybe a global database of "attack queries" which could be used in conjunction with netfilter's conntrack or state module?

Select some popular non-existing folders on your server and install tarpits. Tell your friends to do the same.

Edit: It helps by slowing down the bots that scan you, so you'll have plenty of idle time regardless how many are scanning you. As for what it is and how to do it: Google maintains a regularly updated list of links at the address provided above.


Insecure to require numbers in passwords? Earlier, I went to a site that required a number and special character, and it got me thinking – wouldn't that make the password easier to brute force? If you assume most passwords have around 12 characters, wouldn't requiring a number remove about 90% of the possible passwords, making brute force much faster?

It removes a lot of passwords only if you consider that all combinations of 12 letters were possible passwords. In practice, users don't consider random passwords; they want to use passwords with a meaning and there are not many of those.

In other words, what matters is not the number of passwords which fit into the password entry field, but the number of distinct passwords that the user chooses among (the "generation process"). Requiring an extra digit enlarges that space for most users. Users for which the forced digit reduces the space of possible passwords are users who choose really random passwords, and even at 11 letters and 1 digit, these will be strong.


Is RDRAND used in a safe way by Windows 10? This question was already answered by Linus Torvalds for Linux, and is also cited in this Q/A on this stack:

  We use rdrand as _one_ of many inputs into the random pool, and we use it as a way to _improve_ that random pool. So even if rdrand were
  to be back-doored by the NSA, our use of rdrand actually improves the
  quality of the random numbers you get from /dev/random.

What is the status for Windows 10? Does Windows provide a random source mixing RDRAND with other sources or any sofisticated processing that can countermeasure possible backdoors in RDRAND? Or is there a set of possibilities and one should scrutanize every windows library case by case?

In short:
Maybe (see the Conclusions).

Documents
Windows's default random generation process is described in considerable detail in its Common Criteria and FIPS 140 validation documents.
For Common Criteria in the Windows "Security Target" documents.
For FIPS in the Microsoft's "Kernel Mode Cryptographic Primitives Library" and "OS Loader" ones.
Do get all three of them, there are details in the Common Criteria documents absent from the FIPS ones, and vice-versa.

These are the most recent versions at the moment of writing, which apply to Windows 10 Fall Creators Update:

Common Criteria Microsoft Windows 10 and Microsoft Windows Server (Fall Creators Update) - Security Target (2018-07)

FIPS 140-2 CMVP #3196 - Microsoft Kernel Mode Cryptographic Primitives Library - Security Policy (2018-09)

FIPS 140-2 CMVP #3194 - Windows OS Loader - Security Policy (2018-09)

I also found this paper from 2015 which analyzes the topic in some detail:
Windows and Linux Random Number Generation Process: A Comparative Analysis.
It treats Windows 8, though  (for example, you might notice that it mentions the infamous Dual_EC_DRBG, but that was removed in Windows 10).

Details
Since StackOverflow usually doesn't like links, I replicate here most of the details:

| Boot-time seed
First, a 512-bits boot-time entropy seed is generated:

Entropy is gathered from the following sources, when they are available on the computer:

The contents of the registry value HKLM\System\RNG\Seed, which is written by the Kernel
Mode Cryptographic Primitives Library (cng.sys) during its normal operation.
The contents of the registry value HKLM\System\RNG\ExternalEntropy, which can be
populated by system administrators. This value is overwritten after reading, to ensure that it
is not reused.
If a Trusted Platform Module (TPM) is available, the output of a TPM_GetRandom call to the
TPM.
The current system time.
The contents of the OEM0 ACPI table in the machine firmware.
If the CPU supports instructions for the RDSEED ( used when available) or RDRAND (used if
RDSEED is not available), the output from RDSEED or RDRAND.
The output of the UEFI random number generator.
The CPU timings.

These inputs are then combined using SHA-512, and the entropy source is conditioned using a
non-Approved RNG. From this NDRNG, a block of output bytes is passed to the Windows kernel
at boot time

source: FIPS OS Loader
Notes:
I'm not sure what they mean with "conditioned using a non-Approved RNG".

| Entropy pool
At runtime, at all times, there is then a "Windows entropy pool", which

is populated using the following values:

An initial entropy value from a seed file provided to the Windows OS Loader at boot time (512
bits of entropy). (the boot-time seed)
A calculated value based on the high-resolution CPU cycle counter which fires after every 1024
interrupts (a continuous source providing 16384 bits of entropy).
Random values gathered periodically from the Trusted Platform Module (TPM), (320 bits of
entropy on boot, 384 bits thereafter on demand based on an OS timer).
Random values gathered periodically by calling the RDRAND CPU instruction, (256 bits of
entropy).

source: Common Criteria

The Windows DRBG infrastructure located in cng.sys continues to gather entropy from these sources
during normal operation, and the DRBG cascade is periodically reseeded with new entropy

source: FIPS Kernel Mode
Notes:
I was unable to find out how these sources are combined, if they even are.
Maybe they use the same system as the boot-time sources, maybe they are just laid out one after another and taken up in turns :o .
The 2015 paper seems to assume that they're combined in the same way as the boot-time seed, but I couldn't find any sources to substantiate that and I think it's likely that the authors jumbled up the two by mistake.

| BCryptGenRandom
The recommended function for obtaining random data, BCryptGenRandom, then works by using this pool
as a seed for a NIST SP 800-90A AES-256 counter mode based DRBG.

Conclusions
It might be a good system, and so RDRAND might be being used in a good way, but until someone clarifies if and how the entropy pool sources are combined, I don't think we can really tell.
It would be very surprising if the pool sources were not mixed-up, but then again... maybe not so much.
In any case, I must emphasize that I'm not really an expert in this field, I might well have missed something and it might even be that it wouldn't matter if the sources weren't mixed.
I meant to only reports the documents that I found, but as I noticed these things I thought I would mention them as well.
Wait for the opinion of some qualified cryptographer before drawing a conclusion (and most of all, of course, try to find out how this pool really works).

Notes

Of course keep in mind that this is just the recommended way to get random data, any application is free to use what it wants.

Note also that as these certifications might (I'm not certain) apply only when Windows is running in FIPS mode, this information might be guaranteed to be valid only when that mode is enabled.
One sure difference is that only in FIPS mode there are some self-tests performed on the DRBG on start-up and during a reseed, as mandated by SP 800-90A (but there are probably few circumstances in which they would be useful).

Of course this is always a closed-source system, updated all the time, so we can't be a hundred percent sure of what it really does (unless we don't reverse-engineer our own and block further updates).

P.S.: Long links look really bad with the new theme


Guidelines to make Windows Server 2008 Common Criteria Installation I'm new to certification arguments. I have an issue with a requirement that is to make an application in a certified Windows 2008 environment.

What are / where can I find a guide to WS2008 CC-compliant setup: which features can I safely install and which I shouldn't (so I have a system on which I could do some tests and 'touch' the features available).

Since your question has too many unknowns I'll try to address the most common things that you will probably need on this.

Microsoft has some guides that you can download on this listed on their site under:

Common Criteria Supplemental Admin Guidance for Windows 7 and Windows Server 2008 R2

As well as additional information under Common Criteria Certifications

But this is for THEIR certifications and configurations which yours would be based on top of being configured as they specify. If your application is to be certified as well then you will need to hire an outside company to certify you and that isn't cheap and can take around a year with all of the flaws that they find. Here's one I found on Google and I am not affiliated in any way, just the first result I found.

If you JUST need to validate the installation as per CC then the Microsoft guide references THIS guide.

After installing the OS the CC guide references to follow the hardening guide:
Windows Server 2008 R2 Security Baseline

I would advise who ever submitted this requirement that they be notified that Server 2008 is EOL on 1-14-2020 so IF they choose to NOT upgrade to a newer version of Windows then even if it's secured today that it will get hacked once updates are no longer available. There is a migration guide available on that link but I've worked in "legacy" environments and the best thing to do is start from scratch from the OS on something supported then reverse engineer the registry and installation of programs that will no longer re-install on modern OS's and create your own installation scripts to hack together a solution. During this phase I would HIGHLY recommend using snapshots of before any changes on your target VM so you can roll back over and over until you get it figured out. Then do a final roll-back and run your latest script and validate it is working. I have done this too many times and it's a royal pain, BUT it’s the cost of doing inefficient business when for whatever reason when someone claims that a "legacy" system cannot be replaced, just move it.

Lastly, I have had Windows updates kill "legacy" programs which needs to be mentioned to the person, group, or company with the requirements that IF an update kills the application then you cannot guarantee that you can roll back the update because sometimes you can't so while the solution may bridge the transition today long term it needs to be properly addressed.


Is it OK to store encryption key on Windows fileserver? Is it considered secure to store a symmetric encryption key in a file on a networked Windows file server, accessed through a "share"?  I would use the "Security" tab on the folder containing the key file to make sure only the needed service accounts have read access and the relevant support group has read/write access.

This totally depends on whether it meets your risk assessment for the task in which you are using it. It maybe totally fine or it maybe a very bad idea.

You need to know. What are the results of your risk assessment and what are your security policies?

No one on here can answer this without a more detailed question relating to the what you are are wanting to secure.

Just make sure if you do this that it meets all of your policy and legislation/compliance requirements you maybe following.


Secure Authentication options for NFS Are there any Secure Authentication for NFS other than Kerberos?

No. Anyway, depending on which version of NFS you plan to implement, you have more options inside Kerberos auth.

For example, if you use NFSv4. NFSv4 includes ACL support based on the Microsoft Windows NT model, not the POSIX model, because of its features and because it is widely deployed. NFSv2 and NFSv3 do not have support for native ACL attributes.


What will the effect of the GDPR be on password dumps? The GDPR changes a lot of data protection law, but how will it affect dumped databases of passwords?

At the moment these can be used to work out the most common passwords, and sites can use this knowledge to prevent people choosing overly common passwords.

Will this still be allowed under GDPR, as the password databases can be considered personal data, and if not would anonymising the passwords, so that they are stored without account details fix the issue, or would the passwords still be treated as personal information?

GDPR relates specifically to personally identifiable information, that is information that could be reasonably used to identify a person, like address, email address, user names, IP address.

If the password dump contains only a password and no username, account details or IP address, it is likely that they would not be considered PII for the purposes of GDPR.

However, remember that if you have the plain text password and someone has used something personal as their password, maybe firstname_lastname_dob , that could be construed as personally identifiable.

Standard caveat: This is not legal advice, I am not a lawyer but I am based in the EU and working on a team ensuing GDPR compliance for a company processing sensitive data.


Can you tell if your computer was hacked and pictures stolen from 2-6 months ago? Can a home computer, not wireless, be hacked from the outside and have pictures copied? Can I track and see if that happened?

Home computers are hacked all the time. Infected downloads, infected websites, etc can all result in compromises.

You can run tools to see if you might have been compromised, but no way to tell if pictures were removed.


Allow external Internet connection when also connected on VPN I'm using Mac.
My company is using Checkpoint VPN client and every time I connect via VPN my external internet connection drops.
Is there a way I can solve this problem? I.e. keep external connection while also connected on VPN?

A properly configured VPN should be working exactly like your system is functioning.
What you're asking for is a split connection. Yes it is possible, but doing so is considered to be a security threat.
Fundamentally you need a second layer 2 (ethernet) port. This can be done with either a real physical second connection, or a virtual second port on one physical device.
I encourage you to carefully consider your reasons.


Decline any custom ssl certificate in a mobile application Consider the following scenario.

Eve creates an access point in a public place.
Alice connects to the AP via mobile phone and starts browsing the Web.
Eve redirects Alice to a registration page and suggests to Alice to read and accept terms and conditions bla-bla and install an SSL certificate.
As far as Alice is an ordinary mobile user, she thoughtlessly installs the certificate (she just clicks the Okay button since the registration message contains more than 140 characters). Most important is that it's a one-step procedure on most mobile devices.
Now Eve can perform a MITM attack. She can hijack HTTP(S) traffic.

Consider yourself as a Bob's mobile application developer. How can we prevent the described attack? Can we even do that? Feel free to suggest your solution for any mobile OS.

If you're the application developer the best you can probably do is pin the certificate, meaning if you see any certificate other than a specific one you know and trust (e.g. by comparing thumbprint or public key), drop the connection and get out of there.

Otherwise you're relying on a system that you have proven to be broken, as per your example. There are some practical issues with your attack though, in that installing a root certificate is a wee bit more complicated than a single click and hopefully users aren't that dum--nevermind.


Sending credit history report to potential landlord I have a credit report from TransUnion that contains:

My real name, current and past addresses
Current and past credit card accounts, last 12 monthly balances and payments
My past mortgage
Past credit queries by banks and other credit providers

A landlord in the United States wishes me to submit this report to him. All of my info above (except for my name of course) pertains to another country that I'm moving from.

  What risks should I be concerned about with this submission?

It's pretty common in the USA that landlords want to know your credit history before they let you sign a lease. They want to know how much you make as well as how much debt you have so they can verify your ability to pay rent. Tenants tend to have pretty strong protections in the USA (some states more than others), and the cost of having a bad tenant can easily run into the tens of thousands of dollars.

The landlord usually has fixed costs that continue regardless of whether or not they're paid (mortgage, insurance, certain utilities), so if a tenant refuses or is unable to pay their rent they're not just out the cost of that rent, they also have to pay those substantial fixed costs out of pocket: essentially they lose two month's rent for every month a tenant doesn't pay. If the tenant refuses to move out then the landlord needs to go through the legal process of eviction, which can take months or up to a year, all the while the tenant isn't paying.

My only concern about your story is that the landlord wants you to submit your credit report to them. Typically the credit report is gotten directly from the credit bureaus, otherwise you could falsify the information and send him a fake. All of the major credit bureaus in the US market their services directly to landlords:

https://www.transunion.com/product/smartmove

https://www.equifax.com/business/resident-and-tenant-screening/

https://connect.experian.com/credit-check/landlord-credit-check.html

Your landlord might ask for your social security number (or whatever your country's equivalent is). However, services now exist that allow your landlord to get your credit history without handing over your personally identifying information. The landlord just needs your email, then the credit bureau verifies your identity directly and sends your landlord a verified report that does not include your personally identifying information.


Identifying cipher mode in TLS I'm trying to check my private server for TLS poodle attack. In Microsoft's article it says:

"TLS 1.0, TLS 1.1, TLS 1.2, and all cipher suites that do not use CBC mode are not affected"

How can I identify the cipher mode which is used by TLS?

How can I identify the cipher mode which is used by TLS?

There are many ways to enumerate your cipher suites and protocols enabled on your sever. Here are solutions that are assessment or script based that have little overhead and are light on the technical requirements.

If it is externally available:

Try out SSL Labs' test here: https://www.ssllabs.com/ssltest/. They have all your needs for cipher suites, as well as guidance for any issues they may find in your configuration beyond just CBC findings.

If it is not available externally:

https://github.com/nabla-c0d3/sslyze provides a good command line script to enumerate, but does not provide guidance.

https://github.com/drwetter/testssl.sh is bash based, and does provide guidance similar to SSL Labs but on command line.


Vary: origin response header and CORS exploitation Recently PortSwigger (guys behind Burp Suite) came up with a blog post discussing the security risks associated with CORS mis-configurations.

http://blog.portswigger.net/2016/10/exploiting-cors-misconfigurations-for.html

In summary, the blog talks about insecure ways of enabling CORS which can allow malicious web sites to read data from a target site. Towards the end, the blog talks about a prevention mechanism involving the Vary: Origin header:

  If you take a look at the 'Implementation Considerations' section in
  the CORS specification, you'll notice that it instructs developers
  specify the 'Vary: Origin' HTTP header whenever
  Access-Control-Allow-Origin headers are dynamically generated.

I am having a hard time understand how exactly the Vary header helps prevent CORS exploitation (XSS using cache poisoning) in a scenario where the Access-Control-Allow-Origin header is dynamically generated (controlled by client).

It's important to include the Vary: Origin header to prevent caching. The header indicates that the response is in some way dependent on the origin and should therefore not be served from cache for any other origin. If the header is missing, cache poisoning attacks might be possible as explained in the article by the example of XSS via a reflected custom header. A missing Vary header doesn't create a vulnerability on its own.


Do major linux distributions differ with regard to releasing security patches? For a non-commercial user, is there any difference between major distributions regarding the time needed for security patches to be available? Does the "enough eyeballs effect" takes places in this context?

I wonder if there is some objective data available like track records for instance allowing to compare the security patches delivery speed from several distributions:

For example, good distribution would have most fixes available as updates within hours.
Another aspect would be that bad ones would make applying critical patches unnecessarily hard (and no way to make them automatic).

Your question is a good one as it is used by some marketing department to praise their own Linux distribution.

Most often Linux distributions are not the patches authors: as their name states they are just distributing otherwise already existing content.

A security vulnerability is discovered and notified privately to the software development team,
The software team develop a fix and forward it to the main distributions (this may take a variable delay depending on the correction complexity, hopefully at this step the issue is known only by the software development team and the vulnerability discoverer),
The main distributions produce an security update, and sometimes all of them including the software author coordinate themselves to release the fix at the same time, thus maximizing the number of people getting the fix before any exploits gets developed by analyzing the fix content,
After a variable delay (most often a few days but it can be longer depending on the software development team transparency policy) the vulnerability is publicly documented so administrators can now compare the behavior of vulnerable and fixed environments and ensure all of their environment is properly fixed.

Security updates are therefore most often upstream updates that the distribution team must:

Apply, which include recompiling all required software for all supported platforms,
Test to ensure it doesn't break anything on the distribution,
Customize if the patch cannot be applied as-is, and then go again on the previous "test" step,
Release to the distribution users when the patch has been properly qualified.

The issue then with the Linux distribution regarding security updates release is not really the "enough eyeballs effect" you mention, but the number of developers available for these steps, even more since upstream security updates cannot be planned in advance and that most developers act on a voluntary basis.

Large well-known distributions will have generally no issue with this: there will always be enough people available somewhere on the planet to work and coordinate themselves in order to release the update quickly (however even then the whole process will most likely take a few days instead of the few hours you seem to expect). However for smaller distributions (or somewhat confidential derivatives from larger distributions) this may be a real issue.

So, to answer your question, any large and well-known distribution will be approximately equivalent (and very good) into their response time into releasing security updates.

However, in all cases, you should read the distribution update policy and procedures upfront:

As you mention, different distributions may have different update procedures adapted to different needs. As it appears in your question, you deem binary update to be more secure because quicker to apply, while other consider source code diffs more secure because it can be inspected.
Different distributions may also adopt different life-cycles. Some may need a full system upgrade every 6 or 12 months, no update being provided for previous versions. Some will provide updates for a longer period, covering several years, and possibly cover both the current and a one or more previous releases. Some distributions rely on a Long-Term-Support (LTS) basis: some releases are flagged LTS meaning they will get updates during a longer period than releases which are not. At last a few distributions rely on a rolling-update principle: there is a single release which evolves over time, all installed products being always at the most recent version but updates may require manual configuration changes.

This distinction is important because while a stable security update should not require any manual configuration changes after the patch has been applied, the amount of changes needed after a full system upgrade can be quite substantial to say the least. Therefore some people will prefer to keep the same version a longer time, even if they do not benefit from the latest features, while other people prefer to upgrade to the most recent release in order to benefit from the latest features, even if this require more work (this will be the case mostly only for individual users, corporate users will usually go to the longer support period).

However, if you need serious guaranties (like an insurance for your business), then you should choose a commercially supported Linux distribution where:

Update delivery will not rely on benevolent work any more but on paid employees,
Your Linux distribution provider will be accountable to you in case of issues,
You will benefit from professional support to assist you for the update application (it is good to have a security update available, but what if it breaks your environment?).


Is malware distributed with pirated software actually common? An often-repeated piece of conventional wisdom goes like the following.

  Don't download pirated software, they often contain malware.

I'm curious to know if there are any hard facts to backup this claim.

I've seen plenty of software vendors making this claim over the years, but they have a vested interest in having people believe pirating their software is risky.

There are many anecdotal claims out there on the internet, such as Software Cracks: A Great Way to Infect Your PC, but even the provided stats are vague.

For the sake of this question, only pirated software distributed with  malware counts, not completely fake software which are actually just malware in disguise trying to trick people to run it.

Are there hard statistics to backup the claim that actual pirated software commonly contains malware?

If so what is the risk factor?

I realize the risk is non-zero, which many would consider good enough to steer clear of P2P networks (I only install software from trusted sources myself), but I'm curious to know how much of this is actually true and how much is just propaganda.

UPDATE: For the sake or narrowing down software, we can exclude operating systems like Windows.

Finding statistics for this is rather difficult, but here are some sources that are close (I say close, because most look at platforms that are often used to distribute pirated software, but also to distribute legal software).

The percentage of malware seems to vary greatly based on distribution - eg P2P like Kazaa and Limewire contain more malware than torrents - and type of pirated software.

Moshchuk et al performed a study were they crawled the web and looked for spyware. They classified the websites, and in the category "pirate", 7.1% of the domains contained some malware. Other categories were "adult" (7.5% contained malware), "celebrity" (7.6% contained malware), "games" (20% contained malware), or "news" (0% contained malware). Moshchuk et al, 2006. A Crawler-based Study of Spyware on the Web.

From a paper looking at torrent sites:

  18.5% of all downloads contained malware Berns & Jung, 2008. Searching for Malware in BitTorrent.

Applications like key generation apps seem to be more likely to be infected (which makes sense, as they are smaller, and there is no need to first crack a legitimate program).

I wasn't able to find the original paper, but Bruce Hughes seems to have done research regarding malware in Kazaa:

  Bruce Hughes [...] found that about 45% out of 4,778 files he downloaded with Kazaa contained malicious code Dowland & Furnell, 2006. Advances in Networks, Computing and Communications 3.

Here is a study analyzing Limewire:

  Our results from over a month of data show that 68% of all downloadable responses in Limewire containing archives and executables contain malware. [...]  [I]n Limewire, the top three most prevalent malware account for 99% of all the malicious responses.Kalafut et al, 2006. A Study of Malware in Peer-to-Peer Networks.

From a 2006 study sponsored by Microsoft:

  11% of the key generators and crack tools downloaded from Web sites and 59% of the key generators and crack tools downloaded from peer-to-peer networks
  contained either malicious or potentially unwanted software.Gantz et al, 2006. The Risks of Obtaining and Using Pirated Software

Note the phrasing of "potentially unwanted software", which includes toolbars, which are often bundled with non-pirated software as well.

This report by Microsoft states that 14% of Web or P2P downloads contained viruses, trojans, or keyloggers.

The warez scene sees things a bit differently of course. Here for example is an article which describes how the scene reacted to a group that distributed malware.

It should also be noted that legitimate software may not be free of spyware, especially DRM software may act as a rootkit and may contain backdoors or otherwise make a system vulnerable to outside attacks (see eg Sony BMG or UPlay).


Phonegap/Cordova InApp pinlock, difference if its on Java Layer/HTML5 layers? I am going to build a PIN lock on Phonegap, trying to understand the security layer. As Phonegap is just a webview, it can be easily altered, if you are connected to a device.

I believe that you can also decompile the Java as simple as the HTML5 from Phonegap. So would it makes a difference if I put a screen lock on the HTML5 layer or the Java layer?

I am trying to figure out if I can do anything else to make the pinlock more meaningful, instead of simply just remove the layer. I am also already obfuscating the JavaScript.

But it still means that if you obtain another phone that has the app, you can unroot it, and de-obfuscate the JavaScript then unlock it?

So if Java is just as easy to alter as HTML5 after rooted, then it makes no difference if I just build a JavaScript screen lock?

Once the attacker has physical access to the device, it's game-over as far as software solutions go. You may be thinking that a Java-enforced PIN code is hard to break, but even a C or ASM enforced PIN code can be broken given enough time and effort.

What you need to do is to put whatever secret you're trying to protect either on a remote server (where you can implement bruteforce protections) or behind strong encryption (but a 4-digit PIN is a piece of cake to break even with good key derivation functions so make sure to use a strong password).


Can a site vulnerable to XSS be used to attack a site with a CSRF vulnerability? I heard of the attacks Cross Site Scripting (XSS: An attack where an attacker injects malious client side code (For example: JavaScript) into a web application.) and Cross Site Request Forgery (CSRF: An attack where an attacker tricks an already authenticated user of a web application into sending a forge request to that vulnerable web app.) Mostly in a CSRF attack the hacker will create a site which when someone visits it or do some action a request will be sent in the background. But, what if the attacker uses a site with a XSS vulnerability and adds the request code to that site so the attacker is using someone else's site as the trigger for the forge request.

I will like to know can this happen and is there any good reason to do this?

Yes. But first, lets understand what each of these attacks are:

XSS: An attack on the user; specifically through the browser and client-side.
CSRF: An attack on the server; often used to imposter a user; specifically through lack of a CSRF token during "privileged" requests.

With that being said:

The type of XSS attack is reflected or stored (this depends on how you want to execute the attack).
To pull off the CSRF attack, the site must have a predictable form privilege action (ie, no CSRF tokens). For example, if it's a bank when you transfer funds or updating email, etc.

If you were using stored XSS to CSRF you'd store the payload on the site, and then when the user loads the page with your stored XSS, you'd execute your vulnerable CSRF payload.

If you were using reflected XSS to CSRF, you'd be looking to phish users into execution of your malicious code (via XSS); a link would be sent to the victim, and upon clicking the link, your reflected XSS payload would execute the CSRF payload.

Why wouldn't this be a good attack, you get to:

Phish users.
Potentially harvest privileged information from a victim.


How to back up and restore personal data safely from possibly exploited android phone? I'm using a Samsung J7 Prime with Android version 7.0, not rooted.
Recently, I grew suspicious I had become the target of some kind of exploit/network attack/mitm. Since I suspect the exploit is probably running on the OS/firmware level, I'm going to try and do a clean install of the OS. However, I'm not sure as to how I can safely back up my personal data first. I don't want to back up any app data or settings whatsoever, just some documents and pictures and a messenger chat backup, using Google drive and an external USB drive. But every time I plug the USB in via OTG cable, all these unnecessary system files like com.kms.free, com.sec.android.gallery3d, com.google and such automatically get loaded onto the USB. I'm guessing these files are coming from my external sd card, as I read in another thread here that the OS creates some back up files on external media in case it fails to boot from the system partition. But assuming some malicious exploit is running on firmware level, these files could potentially infect both the USB and sd card, and thus by restoring any files from them, I will probably risk reinfection.

Is there any way to stop this autobackup of system files and  safely backup and restore only my personal data from the USB and Google Drive? I learnt that if the exploit is in firmware or OS level, formatting doesn't help either, so I'll probably have to ditch the external SD card altogether. But I want my USB drive to avoid this infection, so that the personal data on it can be restored safely on the clean device. Same goes for the documents I have on Google drive, how can I be sure that the data uploaded to it is clean and therefore safe to restore?

Please help me out a little, I'm really in a bind here. Need some guidance urgently, phone has become very unstable.

Great question. Sorry to hear about your phone. If your phone still functions, you can back up to cloud. Google Drive being one highly integrated options. Just save your files to your cloud (I'd create a separate folder so you can clearly see if any malicious looking files end up there somehow, unlikely but worth looking). Then do a OS reset and wipe the SD.

This phone also has a wifi-direct option so you could use that to transfer files.
https://www.verizonwireless.com/support/knowledge-base-210398/

If you can't make those happen, and assuming you are correct that the USB backup options is dumping malware... really the only option left is manually wiring into the storage on the phone and that is pretty next level hardware stuff. I'd say worse case take the full back up to usb, then sort through for your files and delete the rest. Be careful to make sure you do the backup to a computer you can "wipe" if needed or infected (not likely as different OS, but I'd be careful).


My Magento shop is vulnerable to hacking I have a headache with my shop using Magento, my shop is very vulnerable to hacking by bots or other people. They often add some scripts and files to sending spam mails.

I think they come to me from old files, so I try to update all addons and Wordpress (integrated with Magento). I update all without Magento files I got 1.8 CE version. I try to keep safe my shop using some security tricks from some blogs which I found. When I did it I think it's end of my problems!! But today I open mail from my host provider with call that my server sent a lot of spam.

There is some ways to secure my shop to future attacks? What do I have to do when I clean up my shop?

if your shop is as compromised as you say here the only way to protect yourself is to start from scratch. A new Host (or reinstalled host), Install proper Defenses (like firewalls). Use a proper Webshop that have withstood Security tests (Drupal commerce for example, but I am biased towards drupal). I would also suggest you get a local Webshop Expert and help you get a safe environment.

good luck


How should one manage authentication on custom line of business software I am writing line of business software for a company, and we want to authenticate users, so we can manage workflow and do some auditing. Basically my employers don't want me to piggyback off of windows authentication because of certain network restrictions (I really don't want to get into it but its a mixture of poor network setup and bosses wanting to know if there is another way to do it)

I am using c#, wpf, MVVM, PRISM

I've read a bit about hashing passwords, salting, etc and the more I read the more I realise that I really should not be writing the security section of this program, as I am basically faaaaaaar from qualified.

Eric Lippert has a very good basic intro into security, in which he warns the reader at the beginning that you should not be designing your own security system as you do not know enough.

I want to know, what are the alternatives?

Seeing as I'm not supposed to write it myself, I would like to know
where should I get it from?
Do I hire security experts to write it with?
Is there a third party security program I should interface with?
Do I outsource the design but implement it myself?
Who is the big player in this industry that I should look at?

EDIT

In answer to questions raised by Steve:

Where is the data?

Well this hasn't been decided yet. I thought there might be some system which can house the authorisation data (and calls to and from it) in a secure way and was wondering what that system might be. However we have a SQL server which I imagine will probably be where the data would be kept. So the data is stored on a Microsoft SQL server and would be accessed somehow by clients on the network (in order for the clients to authenticate). It is conceivable that I write an authentication service that runs on this server and accesses the data directly through SQL (so its not over the network). The clients would then interface with this service.

How are you accessing the data?

Well as I said its a SQL server. The system is purely internal (we will design a web interface for clients at a later stage but that will probably use some other web-based authentication which as far as I know will be a lot easier because these things are built into most web development technologies). There is a diginet line that has a VPN to a second office which will probably want access as well.

Where do I want to store users?

We are pretty much ok with anywhere, with 3 restrictions

Can't cost too much, so we should probably use technologies we already have (one of our servers, SQL or something like it)
Management wants security. As much as is possible on our small budget.
Management is a bit touchy about hosting such sensitive data externally, so we pretty much have to own and control where ever it's stored.

How do you want to manage users?

To be honest I'm not sure what this question is really asking. However I feel like it is important for me to mention here that we are writing a custom app for the business. This app needs to be able to interface seemingly seamlessly with this solution, so the user logs in through our system (which probably uses an API offered by this solution to make calls directly to the system), and this system's authentication controls what access the user has to our custom app.

The more I talk about it the more I think it is a tall order to get some prepackaged solution here, but I keep coming back to what Eric Lippert said:

"Let me give you all my standard caution about rolling your own cryptographic algorithms and security systems: don't."

I'm not qualified to write this properly. It will not be secure. So what is it that people actually do when developing their own software?

As Graham had said it really depends on what you are wanting to protect against. But given the technology you listed, the big (marketing) push from Microsoft is to use Claims Based Authentication/Authorization through Federation: http://msdn.microsoft.com/en-us/magazine/ee335707.aspx.

However, since that alone probably doesn't help you at all, some more questions might need to be asked:

Where's the data?
How are you accessing the data? (E.g. directly through SQL connections/ORM, or through a web service)
Where do you want to store users?
How do you want to manage users?

From a technology perspective there are lots of options that don't involve writing things from scratch, including 3rd party products to integrate with. However, the 3rd party products usually exist for very specific feature sets, e.g. multifactor authentication.

EDIT:

  So what is it that people actually do when developing their own software?

They continue to write their own security code even though its insecure.

Thinking longer term, you are probably best off creating a WCF service protected by WIF and storing the credentials in the database using ASP.NET Membership providers. There's an open source project that would get you what you need: http://identityserver.codeplex.com/

All calls to the WCF service will require authentication, so the service would be the common interface for various types of applications accessing the data. It does require a little more work, but it will save you in the long run.


Historical IP reputation data I have a firewall log with events from 2 years ago. I want to examine that log as if I was investigating at the time of collection (2 years ago).

However, I would like to use IP address reputation data. But I was not yet able to find a source that provides historical IP address reputation data.

What are your ideas/sources to deal with that situation?

IPs get changed and reassigned all the time. Any automatically collected reputation data gets stale fast. It's unlikely sites will archive that info.

But, I have been in the same situation. What I ended up doing was using my Google Fu and the Wayback Machine to search during that timeframe to see if forums, reputation sites, etc. mentioned the IPs in question and I was able to find enough information to help an investigation.

But there will be no guarantees that you will have similar success.


Proving SQL Injection Vulnerability I have recently come across what I believe to be a serious flaw in the security of a 3rd party computer program used within my company. Apologies for deliberately keeping details vague, but I hope you understand!

When entering items into the database, one cannot enter a single apostrophe into the name field - users have typically resorted to using '' instead. I hence discovered this problem when attempting to parse CSV output from an export run by this program, when the value delimiting broke the parser I was using.

I spoke to the support team responsible for this 3rd party piece of software, questioning whether this was an attempt to avoid SQL injection, who confirmed that the reason for this was to "to avoid issues in SQL". Whilst this is an internal use only system, I cannot help but feel that

This is horrendous coding practice - simply using prepared statements instead would instantly resolve this issue (as well as allowing single apostrophes in CSV exports and preventing a lot of hack-y workarounds as a result).
There has to be some way that one can arbitrarily execute SQL without using a ' on it's own. I.e. '' or ''' is fine, just ' is not.

I raised this with my manager as soon as I discovered it (and jumped to the SQL injection conclusion), but before I really start to escalate things I would like some confirmation that it is the security hole I believe it to be (in addition to just awful coding practice).

If someone can confirm that my suspicions that would be great, and if you can come up with an example of malicious SQL code not using an isolated ', I would greatly appreciate it.

I'm assuming data is entered by some sort of front end, with a list of fields?

For arguments sake I'll assume 4 fields. In the first field do this:

''',(SELECT @@version), (SELECT @@version), (SELECT @@version))--

In the other fields put anything you want because they're commented out by the double dash anyway. This should return the server version to you in the second column of the data.

Edited to Add: You may need a space and another dash at the end. (So -- -)


How does KeePass master key derivation increase security? I don't understand how KeePass key derivation increases the security of the password db at all.
First I'll try to explain what I understood from the key derivation described here. I'll use some pseudo code:

const WORKFACTOR = 6000;

var userKey = UserEnteresPassword();
var userKeyHash = SHA256(userKey);

var randomKey = GetStoredSecureRandomKey();

var tmpKey = userKeyHash;
for(i = 0; i < WORKFACTOR; i++)
{
    tmpKey = AES(tmpKey, randomKey);
}

var finalKey = SHA256(tmpKey);

Then it uses the final finalKey to encrpt the password database. This is then stored on the hard drive.

If I now want to decrypt the password database, why would I have to use this key derivation function? I could simply directly guess the finalKey instead of guessing userKey and having it run though this function. So I would save all the time I would othwise need for this key derivation function.

I am aware that, if I simply guess the finalKey I won't be able to get userKey, but I won't need that since I already have finalKey, I can simply decrypt the password db with. I am not interested in userKey at all.

Or is this completly about dictionary attacks to prevent an attack from using commly known words/passwords and simply see if the db decrypts?

The key derivation is entirely to take the users password and turn it into a 256bit long key to use whatever it's length and hopefully in a secure way.

If running a pure brute-force, yes one could directly guess the key by cycling through all possible patterns that are 256bit long, for this one wants to be sure the key derivation can't narrow the possible key space so all 256bit long keys are still possibilities.

One could try running a dictionary attack and passing all the dictionary words through the key derivation function to generate keys to try one of the points of the key derivation is to make this slow enough that this is not sensible on given hardware.

Now there are some flaws in the pseudo-code you gave depending on a couple of functions (CreateSecureRandomKey() would need to give the same data every time one opens the database to get the same key to use), I'm not sure as I would have to look into key derivation in KeePass myself.


Is this scenario a file upload vulnerability? I'm testing for file upload and the website has an extension and content type check (png/ jpg). But on intercepting using burp, I'm able to change the content to php code (content-type being image/png). The file gets uploaded with .png (not .php) extension. Is this vulnerable?

First off, you don't have to tamper with the request. Some PHP code could be simply written in EXIF fields or any other metadata field. Or even just bluntly added to the actual binary code of the image before upload.

It means that, in fact, uploading some PHP code is not big deal by itself. I would say most sites allowing image uploads allow it whatsoever. The question is how to activate it.

So to answer your question directly- nope, uploading a php code doesn't make a site vulnerable by itself. What are you looking for is another vulnerability, called LFI, or Local File Inclusion.


How do to keep programs updated We all know we should keep our programs up to date, after all each of them could have an unlatched security hole that was fixed in the latest update. However the average computer easily contains 200+ programs and only few of them actually contain automatic updaters. This leaves most of them open to all kinds of attacks. So ho do you deal with this? How do you keep all your programs up to date?

apt-get update
apt-get upgrade

If you are on Windows or OSX just enable "check for updates" in any important programs. All the ones I use have that option. Also, you don't need to update those "200" programs. I would say update any text editors, PDF viewers, antivirus etc. Some antivirus clients can alert you to updates to some programs as well.

Check out this article for other suggestions. http://lifehacker.com/5384140/five-best-software-update-tools


Which layer of OSI model does end-to-end encryption and decryption happen in a network? Why? I thought it happens at Layer 6, but some resources state that it happens at either Layer 3 or 4.

Encryption can happen at any of the levels of the OSI model.  TLS happens at something like the session or transport level.  Quantum Crytography isn't exactly encryption, but would be at the physical level.  PGP in an email would be at the application level.

Remember that the OSI model is just one model, and largely represents an idea of separation of concerns and layering.  TCP/IP doesn't map entirely to the OSI model, and encryption doesn't really fit within the model at all.

Speaking from a "separation of concerns" perspective, where you put encryption depends entirely on what you're trying to do.  If you had to put encryption in a "place", you might say that it lives outside of the OSI model.


Difference between two TLS cipher suites I want to know the difference between these two cipher suites:

TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
TLS_RSA_WITH_AES_128_GCM_SHA256

My questions are:

In the (2) there is no key exchange algorithm (like DH, DHE, etc) hence, RSA public key cryptography will be used for the key exchange along with the RSA key pairs?
Then in the (1) Only RSA key pairs will be used along with ECDHE key exchange?
Then (1) and (2) will have the different pre-master key, master key generation?

I went through these two topics and googled, but still didn't get enough clarity.

There is really no substitute for reading the TLS spec, but here's a quick explanation.

There are essentially 4 different parts of a TLS 1.2 cipher suite:

Authentication - what crypto is used to verify the authenticity of the server?
Key exchange - what asymmetric crypto is used to exchange keys?
Cipher - what symmetric crypto is used to encrypt the data?
MAC - what hash function is used to ensure message integrity?

Your two examples share three of these and differ in one.

Both use RSA certificates to authenticate the server (and possibly the client).
Both use AES-128 in Galois/Counter Mode for encryption.
Both use HMAC-SHA256 for message integrity

They differ in the key exchange method. TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 uses ephemeral elliptic curve Diffie-Hellman to exchange keys, providing forward secrecy. Because the parameters are ephemeral, they are discarded after use and the key that was exchanged cannot be recovered from the traffic stream without them. TLS_RSA_WITH_AES_128_GCM_SHA256 on the other hand uses the RSA keys in the server certificate to exchange keys. This is still strong crypto (assuming large enough keys), but the session key that was exchanged can be recovered from the traffic stream using the server's private key, which obviously cannot be discarded frequently.


SQL truncation vulnerability I came to know the SQL truncation vulnerability that I wasn't aware of.
It is my understanding that this vulnerability is based on the fact that MySQL truncates the value of an "insert query" whether the value exceeds the width of the corresponding column.
The fist appearance of this vulnerability is in CVE-2008-4106 which reports the problem in the WordPress CMS.
The CVE reports that the problem was related to a WordPress implementation.
But I would have said that this is a problem related to the MySQL implementation that truncates the input instead of raising an error and blocking the query.

So is SQL truncation vulnerability a problem in the DBMS (MySQL) or in the web application that doesn't check the string length?

I installed the latest version of MySQL (5.5) in order to make some tests and apparently if the inserted value exceeds the column width, I receive an error:

Error: Data too long for column 'name' at row 1

and the query is not performed. This suggests me that MySQL now implements a better check for input length and thus the web application shouldn't be responsible for this check.
What am I missing?

I answer my own question thanks to @SilverlightFox.

MySQL has two modes it can operate: STRICT_TRANS_TABLES and STRICT_ALL_TABLES
and quoting MySQL doc:

  Strict mode controls how MySQL handles invalid or missing values in data-change statements such as INSERT or UPDATE. A value can be invalid for several reasons. For example, it might have the wrong data type for the column, or it might be out of range. A value is missing when a new row to be inserted does not contain a value for a non-NULL column that has no explicit DEFAULT clause in its definition. (For a NULL column, NULL is inserted if the value is missing.)

If the two modes are disable, MySQL automatically truncates inserted string in the case they exceed the column length. So the behaviour of MySQL is "legitimate" and the reason why I should check the length of input in the web application is because I should not rely on the fact that MySQL has STRICT_TRANS_TABLES and STRICT_ALL_TABLES enabled.


Encrypt pdf by the server to prevent printing and copying We are building a portal where users can upload few materials. we have been successful in using the command lines of linux to convert doc,ppts to pdf directly through the server but we are not able to encrypt those files from printing, editing and copying.
Please provide us with some solution so that we can do it through our server directly.

Preventing of printing, editing and copying are just flags inside the PDF file which the reader might ignore. Probably most readers in Linux will ignore these flags by default, but readers like Adobe Acrobat Reader will enforce these restriction.

Encryption on the other side has nothing to do with these flags, it's for encrypting the content so that it is only accessible by someone who knows the password. It might be combined with these flags but it does not need to be.

To set these flags at the command line have a look at pdftk option allow.


Is the most (theoretically-) secure OS/distro something minimalistic like Gentoo or something security-focused like Qubes? Assuming you only use mainstream software like Firefox, Thunderbird and Libreoffice, and update/upgrade every day and use strong passwords and encryption. I know this is probably a very basic and unprofessional question for this site, but I get mixed messages regarding what the best choice is for someone paranoid about government spying and all, despite the fact that computers already have black boxes, so you can't be 100% secure/private, but that you can at least do what you can.

... mainstream software like Firefox, Thunderbird and Libreoffice,

This is actually highly complex software, so bugs are likely.

...  and update/upgrade every day

Updating every day assumes that issues are fixed immediately after somebody has known about. In practice the attacker might actually know about a vulnerability before anybody else and thus can exploit it before anybody fixed it, i.e. a zero-day attack.
Of course updating is important but it does not prevent all attacks.

... something minimalistic like Gentoo or something security-focused like Qubes?

Qubes cares about more and stronger separation on the same computer.
If you just use plain Gentoo you likely run Firefox, Thunderbird and Libreoffice under the same account and all of these have access to your sensitive data. Proper use of Qubes instead means that you have stronger separation inside the computer, at least as long as you don't run the internet exposed Firefox in the same VM as a Libreoffice working with sensitive data. This way even a zero-day attack is restricted to the internet facing VM and has no access to the sensitive data in the other VM.
While you could achieve something similar with different user accounts on Gentoo the separation is less strict, (different user accounts provides less separation than different virtual machines) and maybe less comfortable to use too.
Of course, if you just run everything in the same VM then Qubes does not offer that much in additional security, but this is not how you are supposed to use it.


Where to find papers / information about spyware, tracking and cookie problems? I am right now working on a problem and looking for some papers / information about spyware, tracking and cookie problems. I am no expert in that area, so I lack the knowledge where to find material (papers, master thesis, specific blogs,conference material etc) about that kind of problems.

I'm not looking for trivial explanation or definitions (wiki), but kinda more a scientific approach.

Here are some papers that I enjoyed and think are worth reading:

Flash Cookies and Privacy II: Now with HTML5 and ETag Respawning, by Mika Ayenson, Dietrich James Wambach, Ashkan Soltani, Nathan Good, and Chris Jay Hoofnagle. 2011.

Flash Cookies and Privacy, by Ashkan Soltani, Shannon Canty, Quentin Mayo, Lauren Thomas, and Chris Jay Hoofnagle.  August 2009.

A Crawler-based Study of Spyware on the Web, by Alexander Moshchuk, Tanya Bragin, Steven D. Gribble, and Henry M. Levy. Proceedings of the 13th Annual Network and Distributed Systems Security Symposium (NDSS 2006), San Diego, CA, February 2006.

Behavior-based Spyware Detection, by Engin Kirda, Christopher KruegelGreg Banks, Giovanni Vigna, and Richard Kemmerer.  15th Usenix Security Symposium, August 2006.

An Empirical Study of Privacy-Violating Information Flows in JavaScript Web Applications, by Dongseok Jang, Ranjit Jhala, Sorin Lerner, and Hovav Shacham.  CCS 2010.

SpyProxy: Execution-based Detection of Malicious Web Content, by Alexander Moshchuk, Tanya Bragin, Damien Deville, Steven D. Gribble, and Henry M. Levy. Proceedings of the 16th USENIX Security Symposium (USENIX Security 2007), Boston, MA, August 2007.

Measurement and Analysis of Spyware in a University Environment, by Stefan Saroiu, Steven D. Gribble, and Henry M. Levy. Proceedings of the First Symposium on Networked Systems Design and Implementation (NSDI '04), San Francisco, California, March 2004.

Automated Spyware Collection and Analysis, by Andreas Stamminger, Christopher Kruegel, Giovanni Vigna, and Engin Kirda.  12th Information Security Conference (ISC), Lecture Notes in Computer Science, Springer Verlag, Italy, September 2009.

Dynamic Spyware Analysis, by Manuel Egele, Christopher Kruegel, Engin Kirda, Heng Yin, and Dawn Song.  Usenix Annual Technical Conference, USA, June 2007.

Do Not Track: http://donottrack.us/.

An Analysis of Private Browsing Modes in Modern Browsers, by Gaurav Aggarwal, Elie Bursztein, Dan Boneh, and Collin Jackson. USENIX Security 2010.

Fingerprinting Information in JavaScript Implementations, by Keaton Mowery, Dillon Bogenreif, Scott Yilek, and Hovav Shacham.  W2SP 2011.

Timing Attacks on Web Privacy, by Edward W. Felten and Michael A. Schneider. Proc. of 7th ACM Conference on Computer and Communications Security, Nov. 2000.

RequestPolicy: Increasing Web Browsing Privacy through Control of Cross-Site Requests, by Justin Samuel and Beichuan Zhang. PETS 2009.

What Californians Understand about Privacy Online, by Chris Jay Hoofnagle and Jennifer King.  September 2008.

Americans Reject Tailored Advertising and Three Activities that Enable It, by Joseph Turow, Jennifer King, Chris Jay Hoofnagle, Amy Bleakley, Michael Hennessy.  September 2009.

Cookies and Web Browser Design: Toward Realizing Informed Consent Online, by Lynette I. Millett, Batya Friedman, and Edward W. Felten. Proc. of CHI 2001 Conference on Human Factors in Computing Systems, April 2001.

Informed Consent in the Mozilla Browser: Implementing Value-Sensitive Design, by Batya Friedman, Daniel C. Howe, and Edward W. Felten. Proc. of 35th Annual Hawaii International Conference on System Sciences, January 2002.

Adnostic: Privacy-Preserving Targeted Advertising, by Vincent Toubiana, Arvind Narayanan, Dan Boneh, Helen Nissenbaum, Solon Barocas. NDSS 2010.

I Still Know What You Visited Last Summer: Leaking browsing history via user interaction and side channel attacks, by Zack Weinberg, Eric Chen, Pavithra Ramesh Jayaraman, and Collin Jackson. IEEE Security and Privacy Symposium 2011.

This should be enough to get you started.  I recommend using standard literature search methods.  For instance, read the related work sections of these papers to see if they identify/cite other papers worth reading.  Then, plug each paper into Google Scholar to find what newer papers cite them, and see if any of those are interesting.  Keep expanding your pool in this way.  If there are any researchers who have written multiple papers you really liked, check out all of their publications.  Look at the proceedings of PETS, WEIS, and SOUPS, as they may have more that is of interest to you.

P.S. I also want to point you to an excellent blog by a leading researcher that you might enjoy, 33bits.org.  Check out especially these topics on that blog: ubercookies, history stealing, tracking.


Is booting from a freshly downloaded linux CD safe from trojans? Let's say you're using Windows 7.

For storing Bitcoin on your computer ... is downloading a fresh copy of linux (say Ubuntu), burning it into a CD, booting from it ... safe from trojans?

Are there trojans "in the wild" that would be able to "jump hosts" from a Windows machine via the BIOS into the new linux OS, running from the CD? Is there a good way to make sure your BIOS is clean?

While we're at it - what about dual-boot systems with an encrypted linux partition?

Interesting range of questions here, which you may need to address separately.

Is booting from a freshly downloaded Linux CD safe?

Relatively safe, as long as you download from reputable source and check the hash you can be confident it hasn't been tampered with in transit. There is a small chance the source may have been tampered with, so you should be aware that you can't guarantee 100% security.

Can malware jump hosts via BIOS?

Theoretically yes - but I don't know of any in the wild that does this...yet. You'll be pretty safe here

How can I ensure the BIOS is clean

Not easily - a good BIOS rootkit could subvert updates and overwrites, so this will be very difficult to do.

Dual boot systems

What do you mean by this? Dual boot can be effective at separating the operating systems and is possibly preferable to running a CD boot each time you want to use Linux. Depends on the risk profile.

Back to your stated use - you want to do this to store Bitcoin on your computer. If you use your Windows OS to mine/trade bitcoins the added security of booting into Linux to store these coins is minimal - your Windows OS caches so much data anyway. So I wouldn't bother.


Do multiple routers increase security? My traffic goes trough 6 routers in sequence.
+----------+                       +----------+
|          |           192.168.3.2 |          |
| Internet |           +---------->+ Router 4 |
|          |           |           |          |
+-+--------+           |           +-+--------+
  ^                    |             ^  192.168.4.1
  |                    |             |
  v  203.0.113.74      |             v  192.168.4.2
+-+--------+           |           +-+--------+
|          |           |           |          |
| Router 1 |           |           | Router 5 |
|          |           |           |          |
+-+--------+           |           +-+--------+
  ^  192.168.1.1       |             ^  192.168.5.1
  |                    |             |
  v  192.168.1.2       |             v  192.168.5.2
+-+--------+           |           +-+--------+
|          |           |           |          |
| Router 2 |           |           | Router 6 |
|          |           |           |          |
+-+--------+           |           +-+--------+
  ^  192.168.2.1       |             ^  192.168.6.1
  |                    |             |
  v  192.168.2.2       |             v  192.168.6.2
+-+--------+           |           +-+--------+
|          |           |           |          |
| Router 3 +<----------+           | Computer |
|          | 192.168.3.1           |          |
+----------+                       +----------+

Each router is of a different make with different firmware (German, American, Chinese, Swedish..)
If a fault is found on a router, or backdoors installed, or for any reason, one RouterLvl1 is compromised, the attacker should hack all the other routers from lvl2 to lvl6 to get to my PC.
I did this because I had a lot of old unused little and cheap routers.
Does it make sense? In your opinion, is the security of each router adding to the global security?

It may look good on paper, but it's a terrible idea.
You assume that the only way to get in your PC is from the first hop, the router closer to you, and that to hack one device, the previous one should have been hacked too. That assumption is incorrect.
Extending your network a little further, there are several enterprise-grade routers, managed by a team of experienced system administrators, and if your assumption were correct, to hack your PC those routers should have been hacked too, right? But we know that is not how it works.
Now, back to the real world. One attacker does not need to hack every single device between their computer and yours, only one (or even none) is enough. If the attacker wants to employ a MitM attack against you, now he have 6 routers to attack and need to achieve only one. As they are chained, MitM in one means most traffic is under his control. SSL will protect you here, but non-SSL protocols (SMTP, IMAP, DNS, FTP) are all vulnerable.
So instead of having only one target, the attacker can have six. And you will have six times more work keeping those routers updated and secure. One 0-day in one router is less probable than one 0-day in any of six routers.
And if seems unlikely to an attacker to target one of the internal routers in the chain, remember that the user can be lead to a page making requests to internal IP subnets (10.0.0.0/8, 192.168.0.0/24, 192.168.0.1/24, and so on) while he watches cat videos. If any router responds, it can be attacked from the user PC.
If the attacker can execute code on the user PC, it can run traceroute and get the address of every router, and use the user PC as a proxy to attack each one directly, from inside. NAT does not protect them at all.
We use to say that any chain is as strong as its weakest link, and you are adding lots of non-necessary links on your chain.


Why PHP password_hash does use blowfish intstead threefish? I was wondering why PHP's hash_password function use blowfish instead of threefish. According to Bruce Schneier blowfish is outdated and He is recommending twofish or threefish. Is blowfish enough secure and threefish just slow the login authentication down?

PHP uses bcrypt for password_hash(), but since PHP is PHP, they have to maximize confusion, so they call it "Blowfish".

Besides being a family of highly poisonous fish, Blowfish is a block cipher for more than 20 years ago. Bcrypt is a password hashing function that happens to be derived from an internal block cipher which is similar to Blowfish -- but it is used for something completely different from what block cipher are meant to be used for, i.e. encryption.

Threefish is another block cipher, which was designed much later on for yet another purpose, which is the design of the Skein hash function. Now pay attention, for here comes the tricky point. "Hash functions" and "password hashing functions" are completely different things. Despite the similarity in name, they are very distinct beasts, that take different kinds of inputs, produce different kinds of outputs, and have very different security requirements and properties.

Threefish was designed as a block cipher for a variety of reasons, the primary of which being the need for large blocks (512 bits or more), because you need large blocks to make a hash function that resists collisions. However, collisions are completely irrelevant to password hashing, and the short block size of Blowfish (64 bits) is not a problem for bcrypt.

As block ciphers, Threefish is "better" than Blowfish in a lot of ways (bigger blocks, faster, can be implemented without tables...). As a building block for a hash function, Threefish is again better than Blowfish, but in different ways. As a building block for a password hashing function, Threefish is actually worse than Blowfish, for about the same reasons that Threefish is better than Blowfish for a hash function; in particular, Threefish can be implemented without tables. This means that Threefish allows for thoroughly optimized parallel implementations on GPU, something which is good in general, and very bad for password hashing.

None of this really explains why PHP has not "switched to Threefish". This just tells why such a switch would be a bad idea.


Recovery email for email services The famous Mat Honan hack got me thinking about e-mail password recovery, and how any link in the chain can break all the links preceding it. In Mat's example, that link happened to be the last link, and the entire chain broke down.

Specifically, Mat used his GMail address as the recovery email for all his services, and used his Apple e-mail as the recovery address for GMail. Therefore, once his Apple e-mail account was compromised, GMail was compromised, and all of his services soon followed.

I understand the need for email recovery for web services in general. However, using an e-mail recovery address for an e-mail service sounds like adding a redundant link to the chain, doubling your points of vulnerability (now your attacker can hack into either your primary or your recovery email account). Also, what is the recovery email you use for your recovery email? Having a recovery recovery e-mail adds yet another point of failure, and when you finally stop the chain and don't use one, you could find out you're locked out of it just when you need it the most!

True, the attacker may not know the address of the recovery mail, but as Mat's case demonstrated, he can deduce it (in his case figuring out Google's obfuscated pattern, where they hide some of the characters). And if you make it hard for them to deduce, you're making it hard for YOU to deduce - most of us use a single E-mail address, and if you set up a special address only for verification purposes you are likely to forget it a few years after.

I had a couple of ideas:

Don't use a recovery e-mail for your primary e-mail at all. Simply activate 2-factor authentication and make it your strongest link (which you should do with all your important services anyway).
Use a friend's e-mail address. If you have a friend/family member that you know cares about security as much as you do (and thus has 2-fact auth set up as well), you could use his address. Now an attacker has to hack two people, and it's highly unlikely he'd even guess which mail he needs to hack - you however will probably recognize it immediately (I suppose you could fall out of touch with that friend after many years, so perhaps a family member is preferable here). You could even set each other up as mutual recovery enablers.

I'd love to hear your thoughts on my analysis.

I would not consider using a family member or friend's email to be a good idea, for reasons you mention yourself or simply if they ever change a password. I would create a new email address and use that, but for no other purpose. That way you would also not be putting others at risk.

2-Factor is not a bad idea. The harder you make it for an attacker to compromise you - often by adding a personal touch, the better off you are. Nothing is ever completely secure based on the determination and skill level of a person or team of people determined to break in but by requiring steps and delaying their efforts allows more time for intrusion detection and countermeasures.

If you have more than one account online, like a bank account, a paypal account, and a main email account for example (among others) it might be smart to have different email addresses for recovery for each one. That way if one is compromised, then the others are not also compromised.


Unknown TLS protocol detected on network We've detected an unknown protocol attempting to communicate on port 443 on our network. The first five bytes are:

[67 66 75 80 80]

I haven't been able to match this up with any known TLS protocol but perhaps I've missed something. As reference, the first five bytes of TLS 1.2 are:

First byte: Content Type - typically 22 (Handshake)

2-3: Protocol version

4-5: cipher length - max allowed is 16384. Length above (80, 80) equals 20,560.

Question: What is this protocol?

For clarity, these are the first five bytes of the (possible) ClientHello portion of the TLS handshake.

Edit 2: Here's the full message being transmitted (in decimal):

67 66 75 80 80 82 5 80 70 2 54 0 0 0 0 208 45 246 211 76 241 199 209 119 166 249 155 90 161 37 74 180 147 167 229 45 169 151 37 41 5 98 128 154 101 134 242 105 139 201 35 8 14 78 222 188 96 64 26 151 133 163 92 148 135 172 237 253

We solved it. This was a proprietary protocol used by Honeywell in their alarm systems. They are sending it over port 443, which is a terribly bad idea as their documentation states they have problems with many different routers (because of it).

I wish I could say that we figured this out in some elegant manner. I proceeded by trapping the failed TLS/ClientHello message, then looked up the original destination in the conntrac tables. A reverse IP lookup indicated that this was owned by AlarmNet, which then led to us experimenting with turning network interception on/off while observing the alarm system. Just old fashioned detective work and elbow grease.


Does anything stop applications from reading your saved passwords and cookies from your browser's AppData folder? Obviously the first answer is "a malicious application can do much worse than that." However, it seems like a really easy thing for an application to read your cookies, saved passwords, etc. from your browser settings that are saved in your browser's folder inside AppData (on Windows). It seems like a really hard thing for antivirus to detect, since AppData is supposed to have easy read/write permissions for all apps. Is there anything to stop software from silently reading this information alongside its normal function?

This can very well be a concern. Different browsers handle it different ways. Chrome passwords on Windows are not stored in some file in AppData; they're stored using Windows's DPAPI, which means that they're encrypted with a key derived from your Windows password, so they're secure if someone doesn't have access to your Windows account. However, while it's not necessarily trivial for other programs running under your user account to access the passwords, it's by no means impossible to do so. The basic principle seems to have been "there actually is no secure way to have the passwords stored in memory (not on disk) and keep other programs from accessing them, so let's not pretend there is" -- thus, for a long time, it didn't prompt you for a master password at all (you were logged in, and that's your master password. Nowadays, they have implemented a Windows password prompt to view stored passwords; there's no technical benefit, but it's much harder to casually view someone else's passwords.

Firefox instead implemented its own crypto modules from scratch, starting from Netscape days (other browsers tend to use OS functions for crypto). Its passwords are encrypted by Firefox, with an optional master password that the user must enter before it will autofill passwords (and again each time you want to show all passwords). This is probably more secure when Firefox is not running -- the Chrome password DB is open to all programs running as your user, but the Firefox one is only open when Firefox is actually running.

However, when Firefox is running, any program running as you can see what it has in memory. Because it doesn't prompt for a master password each and every time you need a password filled, other programs can then read the password DB because you decrypted it for Firefox. They can do this until Firefox is closed.


Necessity of physical access to air-gapped computers In an intriguing paper Fansmitter: Acoustic Data Exfiltration from
(Speakerless) Air-Gapped Computers (also see this summary) the authors demonstrate that they are able to exfiltrate data from an air-gapped computer by modulating the rotation speed of the cooling fan. A similar thing has been done using a computer's internal microphone. Obviously this type of attack requires physical access at some point to install the malware.

What I don't fully understand is this: why go to all this trouble if you need physical access to your target anyway, and could then just extract whatever data you're interested in? What am I missing?

What I think is important to point out about malware targetting air-gapped systems is that as much as these methods require physical access, it doesn't require that the attacker himself has physical access.

The idea is to spread the malware on as many computers as possible around the targeted system so that someone who is allowed to physically access it will eventually plug a contaminated USB key to the said system.

However, these methods seem to still require the attacker to be fairly close to the target to pick up the sounds produced. I think it is usually more efficient when the objective is to cause damage to the air-gapped system (erasing data, causing disfunction in automated industrial tools etc...).


Whitelist outbound mail Is there a way to limit the list of mailadresses a user can send mail to, to a small whitelist of approved addresses?

The only option I can think of right now is a customized contact form, but I'm looking for a better way that is or can be integrated in an existing mailclient?

Yes. Set up whatever mail server you use to filter mail based on destination. This is trivial.

For Postfix this is solved with the check recipient access table configuration directive, which lets you configure either a system wide, or per user allowed destinations. For different MTA's there's different options.


how long does it take to crack wpa or wpa2 I have a laptop with processor intel core i7 with turbo boost up to 2:7 ghz 8gb rams and gpu NVIDIA GeForce GT 740M (2 GB DDR3 dedicated) i want to know in approximation how fast ( in word/sec) can this computer crack a wpa password in bruteforce attack using airecrack-ng tools before i get linux kali and try cracking

It mostly depends on the password length.

In a tradeoff you can download WPA Tables to crack the PSK faster, if it is in the dictionary used to create the tables.


Definition of what is log data in context of VPN Does it make any sense that a VPN provider (in this case VyprVPN, but this does not matter I am asking how to understand privacy claims in general, and what is considered as "log" data) claims (accessed here 2021-05-16)

Exceptional Privacy ... our no-log policy independently audited.

and then (at least honestly) admit (accessed here 2021-05-16)

...only collects a minimal amount of information when you
connect over our VPN product (VyprVPN), and only retains it for a
period of 30 days. We retain:

Customer’s source IP address (generally the IP address assigned by the customer’s ISP)
VyprVPN IP address used by the user
Connection start and stop time
Total number of bytes used

Wouldn't keeping time, source and target IP address make the user's online activity quite transparent (aka "log files" in their genuine meaning), and in clear contradiction (at least for 30 days) to a "no log" policy?

There are many different things that could possibly be logged. They are certainly able to define things how they want for advertising purposes; it sounds like while they log the who and when, they don't actually log what sites you are visiting (which is probably the privacy concern for most users). However, "no-log" would probably imply to most that absolutely zero logs for anything are kept, which is clearly not the correct interpretation here.


Are subdomains a cure for phishing? Seeing as phishing is getting more popular and users are becoming less concerned about security, I am trying to come up with a solution for a new site of mine that can stop phishers. For instance, any one can create a new site that looks exactly like Gmail and phish users to it in order to obtain their UN/PW.

However, what if we made the user pick their subdomain at registration? They can only login on this subdomain, ie. mysubdomainchoice.domain.com. Now when the phisher gets the credentials from an innocent user, he no longer knows where he can apply them. After several invalid login attempts we can safely lockout the user and have them change their un/pw if they come to their correct subdomain and answer their security questions.

Is this a valid way of defending against phishing and have others thought of this before?

Let me ask you a question.

Do you really think that your users will be able to remember the subdomain he should be using? I know that I most definitely will not.

So what happens when a user forgets what subdomain he should be using? Chances are he will try out a few of them to see if it works. This will trigger a lockout according to your scheme. Now, you have an angry user calling your support line screaming at you to fix things. An angry user is a careless user.

So what happens if an attacker sends said user a phishing link? After going through the annoying process of screaming at customer service a couple of times, the user will probably not question the fact that he is able to login the very first time through the phishing link. In fact, he will be quite happy.

So no, I don't think this is a good scheme as it has the likelihood of pissing off your users. When it comes to security, you really want users to be on your side.


Preventing tampering of ~/.ssh/authorized_keys If a server is compromised, an attacker could add his own public key to authorized_keys. How is this prevented? Who should have what access to the file?

If a server is compromised, it is basically game over. You can restore from known good backups or reinstall, and you can do some post-mortem analyses to find out how they gained entry, but that sistem is hosed and should not be repaired but reinstalled.

So, nothing prevents attacker who've gained superuser privileges to modify authorized_keys. Normally, only the user to whom this file belongs (and root, of course) should be able to access it.


How realistic is to be 'hacked' by ONLY clicking a link In the case of phishing training, most training will say "don't click the link, you can get hacked!"
If there was an exploit that could bypass the chrome sandbox on an up-to-date verison of chrome, would that person realistically target an employee at a regional insurance provider or some other non fortune 100 company? Seems like exploits of that magnitude would be rare, and highly valuable.
Obviously, a hacker can get some pieces of information about your PC and correlate those with your email, but besides that, what can they really do if you don't click or fill out information, etc.

Seems like exploits of that magnitude would be rare, and highly valuable.

True, 0-day exploits are expensive, especially for browsers (and mobile devices). It likely doesn't make economic sense for an attacker to buy and burn one on a minor target.
However:

Can you guarantee you're always running the latest update? Even if yes, there may still be a patch gap.
A good example is the recent Chrome security update from just a week ago. It fixes CVE-2020-15999 which had already been actively exploited before the patch.

Project Zero discovered and reported an actively exploited 0day in freetype that was being used to target Chrome. A stable release that fixes this issue (CVE-2020-15999) is available here: https://t.co/ZRQe72Qfkh

(@benhawkes, 9:49 PM · Oct 20, 2020)
Now it's much cheaper (and common practice) to reverse-engineer the security patch and develop an exploit against users who didn't update yet. As ZDNet notes:

The finer details about CVE-2020-15999 active exploitation attempts have not been made public.  [...]
However, since the patch for this zero-day is visible in the source code of FreeType, an open source project, it's expected that threat actors will be able to reverse-engineer the zero-day and come up with their own exploits within days or weeks.

(Source)

They may not target your browser, but a web application or browser extension.
An attacker may have discovered or acquired a vulnerability in a password manager extension, or, possibly, an XSS vulnerability in a web application your company is using. This could be the web interface of your internal email server, a workspace app, an intranet bug tracker, etc. Exploits like these can often be triggered just by following a prepared link, and don't require additional user interaction.


Lock account for a limited time and automatically unlock If a user fails to authenticate over and over again his account will be locked due to certain conditions.

But I am wondering, what would be the best practice or a good practice to automatically unlock the account.

I am thinking of this:

Solution A

Should I lock the account for 5 minutes or an hour and totally "ignore" what happens during this hour and allow the account to be usable after this timeout again?

or

Solution B

Should I take into account what happens during this one hour timeout like:
If the account is still brute forced lock the account for another hour.

Can I rely on, that the account would be immediatly locked again after this one hour?

What are your thoughts on this?

The goal of such an account locking mechanism is to limit the number of password guesses in a period of time to mitigate brute force attacks. So you should think about how many attempts you want to allow
in a certain time frame. Which solution do you use is not so important for security.


Does it make any sense to alter a hashed password? I've always wondered if it would make any sense to put fake characters into a hashed password?

For example this is my password: 1234

and after hashing the password , this is the result: abcd

Then add characters to the hashed password: aKbjczdx (every 2nd character is fake)

Would this make any sense?

There is a basic rule when considering hashing passwords and other secret-keeping within an application:

  The attacker knows everything the application knows.

So in this case, you don't gain anything, since the attacker can simply remove your obfuscation and then go about cracking your passwords directly. The same goes for:

"secret" salts
custom hashing algorithms
reversible encryption

Don't waste your time here. Get a standard, best-practice password hashing algorithm (bcrypt, scrypt, PHPass, PBKDF2) and spend your time securing your application.