Malicious link? Apache? I've got a link from spammer, the link is very strange, but after redirects I got the web page full of ads. Here is the link(doesn't require "http://"):

  /0xD805A9E4///RLI=590-UI=273411771-OI=6313-ONI=325215-SI=0-CI=10360210-BI=0-II=1997780-IDSP=58-KLEM=11-TIE=16-IDE=11362537-MID=384-FID=57172-DIOM=0

The link is strange, but it works, is it malicious? Will this link install something on my device and what type of encription is that? Even link scanners don't work. Please help me.

It's an IP address in octal format, followed by an arbitrary path, which happens to be formed of elements that look like query parameters.

You can generate octal representations of IP addresses using various online tools: 0xD83AD60E should link to Google at 216.58.214.14. They're not inherently malicious, but the fact that you received it from a spammer suggests that there is a reason they wanted you to follow it, and the page it loads may well attempt to install malware. Since you did follow it, you may already be infected, in fact.

Links don't (generally) infect computers, but the pages they link to may well do. Never follow links sent by spammers - at the very least, you verify that your email address works. At worst, you end up infected with cryptoware and lose your data.


Storing privacy sensitive data in a local application We have multiple desktop applications that are being used by clients on unconnected desktop computers. The application instances are being used by multiple users secured by username and password. The problem is that these users share the same windows account and thus have the same security level in the operating system. In addition to this these applications store privacy sensitive data in a local database (LocalDB).

In an ideal world the applications would be connected to a secured server that stores the data, but this is not possible. What would be the best approach to improve the security of handling privacy sensitive data in a local windows application? These applications should in theory conform to the privacy regulations in Europe and Hipaa in the US.

Quoted from the Health Insurance Portability and Accountability Act of 1996 (HIPAA):

  A covered entity must, in accordance with §164.306… Implement a
  mechanism to encrypt and decrypt electronic protected health
  information.” (45 CFR § 164.312(a)(2)(iv))

Encrypting data in a local database is not easy, because our current solution (LocalDB) does not support it. The harder question is where should we store encryption keys on a desktop machine?

We've been getting an increase in questions like this on this site: standalone workstations processing sensitive data.

You want to be able to gain the benefits of a networked solution but you can't because everything needs to be local. There is a way around this: Docker.

Using Docker, you can create a network and host the elements that you need to secure on different containers. These containers can only be accessed from the docker command or by the exposed ports on the container. This becomes an attractive solution to separate an authentication database.

Securing the ports should be simple enough, but securing the docker command might be a trick, depending on how your workstations are set up and what permissions they have (local Admin?). If they are not local admins, you can use the Access Authorization Plugin.

This way, you can gain all the benefits from a MVC architecture, but on a self-contained, disconnected workstation.

This is not a perfect solution, and Docker is still trying to "find itself", but it is a potential solution depending on your requirements.


Are there any security disadvantages of using production SSL certificate in non-prod environments? My client has a wildcard certificate *.thierdomain.com that they are using for half a dozen of production web sites.

For each of theses sites there are duplicates in several environments, dev, qa, pre-prod, etc.

Up until now other environments than prod did not have a SSL certificate at all as there were no https specific functionality. So the sites ran only over http (within corporate network) for non-prod, and https only for prod.

Now we are adding some functionality that I'd like to test over both http and https in a single environment.

I would usually use self-signed certs for that, but this client has a wildcard certificate already available. It would be so easy just get this cert installed on other environments web servers.

Are there any negative security implications of that?

I would assume that the test/dev environment is more 'open' than Prod, in terms of who can access it with admin privileges, etc. If this is the case, and e.g. the dev team and/or external resources have access to the additional environment then that potentially increases the risk that the private key is compromized.

If this is a concern, I would splurge out and buy $10 SSL certs for each dev/test/etc environment. That way the wildcard prod key stays on prod, and won't have to be revoked+replaced if the key for any reason would fall in the wrong hands...


Why do registers get overwritten upon overflow? I know that upon a overflow, the stack gets partially overwritten, but I do not understand why registers such as EIP or RIP get changed in this process.

How come some registers are modified by such an attack?

Buffer overflows do not directly modify registers; rather, they are used to overwrite the function return address (the first element in the function's stack frame, 4(%ebp) in x86) and place custom code on the stack which will be executed when the overwritten return address is loaded into EIP/RIP.
In x86 machines, the operations performed by call and ret are of particular interest:

call:

When executing a near call, the processor pushes the value of the EIP register (which contains the offset of the instruction following the CALL instruction) onto the stack (for use later as a return-instruction pointer). The processor then branches to the address in the current code segment specified with the target operand.

ret:

Transfers program control to a return address located on the top of the stack. The address is usually placed on the stack by a CALL instruction, and the return is made to the instruction that follows the CALL instruction.

Taking control of EIP/RIP is accomplished by overwriting the return address call pushed onto the runtime stack with an address that points to the location in memory of code crafted by the attacker. When the ret instruction writes this memory address to EIP/RIP, execution jumps to that address.
You can see this for yourself by stepping through program instructions using a debugger.


MasterSecret expansion into keys I'm trying to deeply understand the steps during a TLS handshake.
I've read this answer (which is btw pretty complete), but I still got a question about the utilization of the MasterSecret, in the frame of a ECDHE-RSA-AES-GCM-SHA TLS handshake.
At the end of the handshake, we have used SHA as PRF to generate the Mastersecret (from the pre-MS and the random numbers). We expand it to create key and MAC key. The key is used to cipher the messages, and the MAC key to compute the hash (on the ciphered message if GCM mode). OK.
I have 2 questions about the expansion of the MasterSecret :

In section 8:3, they say that we create 2 MAC keys and 2 keys. Isn't that enough safe if the client and the server use the same key and MAC key ? (given that these key are generated from no less than a MasterSecret). I kind of think that it seem a bit overprotected..

When you have the MasterSecret, how do you expand it to create MAC keys and keys ? I doubt that we just take the first N bytes for the key and the rest for the MAC key...
Moreover, the phrase When keys and MAC keys are generated, the master secret is used as an entropy source. (section 8:3) bothers me. Is it why I'm not able to understand how expanding the keys ?

Q1. Why two sets of key material?

In section 8:3, they say that we create 2 MAC keys and 2 keys. Isn't that enough safe if the client and the server use the same key and MAC key ? (given that these key are generated from no less than a MasterSecret). I kind of think that it seem a bit overprotected..

No. This is done for a serious reason. This makes it actually harder to attack. There is a class of attack, where you just reflect what one side said back to itself. This is called a Reflection Attack. And by having direction fixed keys, you make that class of attack impossible.
Q2. How to chop up the key block?

When you have the MasterSecret, how do you expand it to create MAC keys and keys ? I doubt that we just take the first N bytes for the key and the rest for the MAC key

Sorry to disappoint you, but that's it actually. There is not much magic here.
You have the key block which is a long octet string. And then you simply chop it up into 6 smaller parts.
RFC
Here's the section in the TLS 1.2 RFC:
  client_write_MAC_key[SecurityParameters.mac_key_length]
  server_write_MAC_key[SecurityParameters.mac_key_length]
  client_write_key[SecurityParameters.enc_key_length]
  server_write_key[SecurityParameters.enc_key_length]
  client_write_IV[SecurityParameters.fixed_iv_length]
  server_write_IV[SecurityParameters.fixed_iv_length]

So that's six parts. And in that exact order. Odd entries (1, 3, 5) are for the client_write direction. Even entries (2, 4, 6) are for the server_write direction.
OpenSSL
Here's the chopping bit in OpenSSL:

p is the key block.

This gets chopped up into:

ms, MAC secret
key, bulk encryption key
iv, initialization vector

Source code from OpenSSL's t1_enc.c:
if ((which == SSL3_CHANGE_CIPHER_CLIENT_WRITE) ||
    (which == SSL3_CHANGE_CIPHER_SERVER_READ)) {
    ms = &(p[0]);
    n = i + i;
    key = &(p[n]);
    n += j + j;
    iv = &(p[n]);
    n += k + k;
    exp_label = (unsigned char *)TLS_MD_CLIENT_WRITE_KEY_CONST;
    exp_label_len = TLS_MD_CLIENT_WRITE_KEY_CONST_SIZE;
    client_write = 1;
} else {
    n = i;
    ms = &(p[n]);
    n += i + j;
    key = &(p[n]);
    n += j + k;
    iv = &(p[n]);
    n += k;
    exp_label = (unsigned char *)TLS_MD_SERVER_WRITE_KEY_CONST;
    exp_label_len = TLS_MD_SERVER_WRITE_KEY_CONST_SIZE;
    client_write = 0;
}

I don't speak C too well. So I don't really get it.

I don't understand the indexing into p.
I don't understand why they only select one half of the keys. Each end needs both sets. One set to write to the other end. And one set read what the other end said. -- I guess that chopping happens elsewhere.


Elaborate Hacking attempt detected - now what? I am in the process of developing a php/mysql based web application. I took the complicated route and rather than to use a framework or anything I built the entire foundation of my app from scratch. This all while I learned how to REALLY code (I knew very little, now I'm quite advanced. But faaar from expert or professional I think...)

I made myself custom 404 error pages, which record the URL the user tried to see, the URL they came from, and all variables that are active in the context, including IP address. This is to track down errors on my site, and to kinda detect hacking attempts.

Ever since I've put a BETA version of my site live like 5 months ago, I've had a few (less than 3) bots come by, trying to get access to wp-login.php Usually those were not more than 5 requests made and quite certainly from a bot, because of how fast the requests were made.

Those didn't bother me much (eventhough I did report the on IP to godaddy, because their name showed up with it). Since I don't use wordpress and the directories that were attempted for penetration don't even exist.

Today however an IP address located in Spain spent 20 minutes on my site and made over 60 requests to URLS like

  /base/captcha/index/
  /join
  /signup.php
  /register.php%22%3E%3Cspan
  /?page=login&cmd=register
  /sign_up.html
  /action/sign_up
  /modules.php?app=user_reg
  /index.php?app=home&mod=public&act=register
  /index.php?app=home&mod=Public&act=isEmailAvailable
  /reg.asp?reg=reg
  /ucp.php?mode=register&change_lang=en
  /member/register
  /includes/captcha.php
  /login.php?part=register&action=person
  /User/Register.aspx

The list goes on and on...

I am uncertain if this was an automated attack or if there was a person actually trying each URL, since it's only about 3 requests per minute.

Fortunately none of those requests yielded any results, since most of them were targeted to non existing directories, those that tried to pass GET variables did not have an effect, because those variables wouldn't have been used by my scripts.

So while I am a little proud of myself, that such an elaborate attack has not done anything, which shows me that my code base is quite solid, and not easily to penetrate, I am also nervous because a bit I feel like I might have gotten lucky that I use rather unconventional directories and file names... I was very mindful of security when programming my application, but I feel so weak, because of my background...

Also I wonder what the hacker's goal was to try all these URLs. It's free to register an account on my site... ?! And the exploits of my site are currently super duper low... only about a hundred email addresses is about the most valuable thing I have in my DB.

The entrepreneur in me is thinking that a competitor of mine tried to penetrate my site... :-D

So besides the highlighted indirect questions, my main questions are:

What should I do with the information I got today?

Should I put mechanisms in place that simply block IPs after a certain number of unsuccessful page requests within a certain amount of time?

Is anyone familiar with this specific attack?

Welcome to the wild wild interwebs.
Both the attacks you described seem pretty much automated scans done via some tool. Some tools can even throttle the requests to avoid detection by IDS so that could be a reason for a slow request rate of the scan you mentioned.
This specific scan you mentioned appears to sniff for presence of a forum software on your website. ( e.g. ucp.php is a phpBB forum file).

  I wonder what the hacker's goal was to try all these URLs

The attacker's goal here is to identify the framework/scripting language/software running on this domain.

  What should I do with the information I got today?

Well, if you are curious to know more about the intentions behind these attacks, you could search the IP address on google and check if there are any known instances of attacks from this IP.
For example, I just checked my server logs for such automated scanning in past 1 hour and I saw extensive scans from this IP 88.190.60.68. Searching this on google immediately led me to this report and this page which detail more about this rouge IP and its activities. So at least I can rest assured that this wasn't an targeted attack (most are not).

If you want to go a step further, you could install software like fail2ban and configure it to automatically detect such scans and blacklist the IP address for a specified duration of time.

  Is anyone familiar with this specific attack?

I am afraid you might see more of such scans as your site (domain) gets popular/old. There are tonnes of scripts with various intentions. Some try to find comments/feedback pages where they can just post link spams. Others might be looking for some very specific vulnerability.


NMAP shows multiple outputs in OS detection I am experimenting with NMAP in our network as an assignment, and I meant to do OS scan on one specific host 192.168.2.18, for which I chose the following command,

nmap -O 192.168.2.18

and I was expecting the output of this command to be FreeBSD, since I know that the host is running FreeBSD (as we have been told), but scan result shows more than 2 Operating system which is confusing,

Device type: general purpose
Running: Microsoft Windows 7|2012|XP
OS CPE: cpe:/o:microsoft:windows_7 cpe:/o:microsoft:windows_server_2012 cpe:/o:microsoft:windows_xp::sp3

OS details: Microsoft Windows 7 or Windows Server 2012, Microsoft Windows XP SP3
Service Info: Host: 18; OSs: Unix, FreeBSD; CPE: cpe:/o:freebsd:freebsd

I read about OS CPE and learned that it is "Common Platform Enumeration," but shouldn't there be just one of those i.e CPE: cpe:/o:freebsd:freebsd ?

I do not understand why there are 3 CPEs, i.e, windows 7, windows 2012, and windows xp. Can they be honeypots?

It can be something in front of that host, but sometimes Nmap can give you near-matches possibilities, which I doubt that's the case in your situation.

  When  Nmap is unable to detect a perfect OS match, it sometimes
       offers up near-matches as possibilities.

If you know that host, then check which services are running on the targeted machine.

nmap -sV ...

If the result doesn't match with host that you are familiar with, then it's obvious that OS detection came from another host.


Vulnerabilities in Host Proof Hosting I've recently been doing some research on Host-Proof Hosting, specifically in a web app environment.  It seems like a pretty rock solid method of security, but I'm certainly not a security expert and would like to get some other opinions.

Aside from obvious client-side vulnerabilities (key loggers, physical observation, etc.), what are the vulnerabilities in Host-Proof Hosting?

As a note, the web app that I'm researching for uses SSL for all connections, so a basic man-in-the-middle attack wouldn't count here (although, I don't know that it would matter much).

If your goal is to mitigate the risks of compromise of the server's database or data store, then encrypting the data on the client side (before it ever reaches the server) can be useful.

If a copy of the server's database falls into enemy hands, probably the enemy won't be able to decrypt all of it (the best the enemy can do is password cracking, which may reveal some of the data but not all).
If an enemy compromises the server, the enemy won't learn too much about previously stored data (the enemy can get a copy of the server's database, but this won't reveal too much about previously stored data).  However the enemy can still spy on all subsequent data, by putting a backdoor in the Javascript that is sent to clients.

If your goal is to protect against a malicious server, or to ensure that if someone compromises the server they cannot do any harm, then "host-proof hosting" (encrypting the data on the client side) cannot live up to those goals.  It cannot prevent a compromised server from sending backdoored Javascript code to the client.  If the Javascript is backdoored, then you cannot rely upon it to encrypt your data properly.

See also Javascript Cryptography Considered Harmful and the questions that @Andrey Botalov linked to, for futher information.


Are there any mechanisms to verify the correctness of a burned disc? I was recently recommended a specific smartcard over on HardwareRecs.SE. As part of this, the answerer (our ursine overlord) stated that the cards in question don't offer a means to securely backup keys but however accept plaintext keys to be imported. It was suggested to run my own key ceremony to generate those keys.

Now for the preparation of this I had to ask myself:
Is there any way to ensure / verify that I actually burnt the correct and intended ISO onto the disc I'll use for the ceremony?

The threat model: I'd like to minimize trust in every single hardware and software component which came in-touch with this ISO and get an as strong as possible assertion that the ISO is indeed valid and the disc content equals the ISO.

Possible attack vectors include, but are not limited to:

A malicious browser (used to retrieve the ISO)
A malicious software on the OS (used  to store the ISO until download is completed and burn process is initiated)
A malicious burning software (which will report fake hashes to me or make malicious changes)
A malicious hardware drive (used to store the ISO until it's burnt)
A malicious DVD burner

I assume that your ISOs a provided with a hash in order to verify their integrity right?

Just grab the hash along with the ISO, write that sucker down on a piece of paper (yes it's long, just do it).  When you've burned your DVD, pop it into another system and generate an ISO based off the DVD using the dd command (unlikely anyone would compromise dd in this particular senario).  Then just run the hash against the generated ISO to compare.

If you can't trust the hash listed with the ISO when you're grabbing it, then I suggest contacting the originator of the ISO out of band (yes, we still have phones) to get the hash.


How to design an Access Control system that is quick to implement and understand, yet maintainable and flexible enough? We're currently redesigning our access control system for our SaaS startup (over the past two years it has grown alongside the business and decided to clean it up at this point). The access control system should serve customers with 500 - 10,000 users each.

It should support:

Read-only users (i.e. some users may only log in and view items)
Only a few users may change global settings (like managing integrations, billing information etc.)
Only a few users may change settings for one of our three product modules
For each created resource (e.g. a project, a team, ...), only the project members / team members may change the resource.
By default, all users may view all projects, but it should be possible to "hide" projects so that only the project members may view the hidden project.

The challenge now is that Role-Based Access Control only seems to satisfy 1-3, but not 4 or 5. Is ABAC now the way to go?

Overall, I think we have similar requirements to JIRA which seem to offer an extremely flexible but also very complex (unintuitive) permission system

Do you have any recommendations on how to best design an Access Control system, i.e. what questions we should ask ourselves and which trade-offs we'll probably have to make?

Background

The other comments and answers as well as your post point you in the right direction. You need a framework that is flexible enough to address your current authorization needs as well as future ones. That framework (or model) is indeed Attribute Based Access Control (abac). It's also known as dynamic authorization management and policy-based access control. Gartner, Kuppinger Cole, and Axiomatics (where I work) all have written extensively on the topic:

Why we need Dynamic Authorization Management (2013|Kuppinger Cole)
Technology Overview for Externalized Authorization Management (2013|Gartner)
Attribute-Based Access Control (2018|Axiomatics)
Attribute Based Access Control (2016|NIST)

That said, given your requirements, ABAC only solves half the equation: the authorization policies and logic. It does not solve the attribute management. You still need to think about metadata or attributes of your users or resources (the projects in your case) that will drive the authorization policies you have.

Your use cases

  Read-only users (i.e. some users may only log in and view items)

You would need to define a persona or role that you can assign to users to denote they are read-only. Maybe it's the baseline role in your system. Maybe it's the absence of the role but the fact you successfully authenticated.

  Only a few users may change global settings (like managing
  integrations, billing information etc.)

What makes these users special? A role e.g. "administrator" or "superuser"? You need to define that and you need a process to assign that role to users.

  Only a few users may change settings for one of our three product modules

Same story as above.

  For each created resource (e.g. a project, a team, ...), only the project members / team members may change the resource.

Like you said yourself, this is spot-on ABAC. You would need to write a simple policy (or rule - the words are interchangeable) that states (pseudocode - you could use ALFA too):

A user with role=="..." can do action=="edit" on object of type=="record" if record.assignedProject == user.assignedProject.

  By default, all users may view all projects, but it should be possible to "hide" projects so that only the project members may view the hidden project.

See below for an example in ALFA

Enforcing ABAC

Thinking policies and use cases is great but you also need to think about the enforcement of the decisions. ABAC has a notion of a Policy Enforcement Point (PEP) and Policy Decision Point (PDP). The PEP is where the rubber hits the road: what are you protecting? A web portal? A business process? An API? Either way you need to have a PEP or interceptor in place capable of applying the right authorization. Here's what the architecture looks like from a high-level:

Sample ALFA Code

ALFA, the abbreviated language for authorization is one of the two main standards for authorization along with XACML. ALFA is a simplified notation of the same model XACML follows (policy set, policy, rule). I wrote some samples based on your use case:

namespace com.axiomatics.examples{
    /**
     * Projects
     */
     policyset projects{
         target clause objectType == "project"
         apply firstApplicable
         /**
          * View Projects
          */
         policy viewProjects{
             target clause action == "view"
             apply firstApplicable
             /** Anyone can view a project */
             rule viewVisibleProjects{
                 target clause project.hidden == false
                 permit
             }
             /**
              * Only members can view hidden projects - it should be possible to "hide" projects so that only the project members may view the hidden project.
              */
              rule viewHiddenProjects{
                  target clause project.hidden == true
                  permit
                  condition stringAtLeastOneMemberOf(user.name, project.members)
              }
         }
     }

     /**
      * For each created resource (e.g. a project, a team, ...), only the project members / team members may change the resource.
      */
      policyset records{
         target clause objectType == "record"
         apply firstApplicable
         /**
          * Edit records
          */
         policy editRecord{
             target clause action == "edit"
             apply firstApplicable
             /** Project members can edit a record in their project */
             rule viewVisibleProjects{
                 permit
                 condition record.project == user.assignedProject
             }
         }
      }

     /**
      * Global settings - Only a few users may change global settings (like managing integrations, billing information etc.)
      */
     policy globalSettings{
         target clause objectType == "global settings"
         apply firstApplicable
         /**
          * Administrators can view and change global settings
          */
         rule administrators{
             target clause user.role=="administrator"
                     clause action=="view" or action=="edit"
             permit
         }
     }
}

Implementations

There are several good implementations of ABAC out there:

Open-source

AuthZForce provides you with a XACML-conformant authorization engine
Open Policy Agent (OPA) provides you with a REGO-conformant authorization engine. OPA focuses on infrastructure (Kubernetes, Istio...)

Commercial

Axiomatics (where I work) is possibly the oldest company in the list. We've been implementing ABAC since 2006. Everything's based on XACML and ALFA and we can apply authorization to portals, APIs, and databases.
Oracle, IBM, and other large vendors also have their own solutions.


Are there any chrome extension VPNs that use the chrome.vpnProvider API? Seems most extensions use the old proxy api which requires giving them full "read and change site data" access. A more recent API is available made for VPNs:

https://developer.chrome.com/extensions/vpnProvider

But I can't find any that use it.

Anyone know of any?

This API is for Chromebooks and not the Chrome browser in general: "Important: This API works only on Chrome OS."


What are the advantages/disadvantages of changing the SSH/SFTP port in Linux? I have setup a remote CentOS VM (through a host) for our websites. I read an online recommendation to change the default SFTP port from 22 to a higher port such as 22000. I understand it is security through obscurity for the most part but is that the only advantage?  Otherwise, it seems better to just leave it as port 22, setup DOS mitigation, and use a strong password.

Additional background:
I must have the Root account active on the server to manage multiple accounts and domains. SSH access is only allowed through specific IP/Mac combinations. Even if a user mimics the specific IP/Mac, they only have 5 chances to get the password before it blocks them with escalating penalties: with 5mins, 60min, 24hrs, and permanent block. Finally, I have multi factor authentication enabled for the Root account.

Related posts:
Joshua Thijssen. (2012). Why putting SSH on another port than 22 is bad idea

Should I change the default SSH port on linux servers?

https://www.reddit.com/r/synology/comments/31ov2g/root_ssh_from_china/

https://serverfault.com/questions/74176/what-port-does-sftp-use

Secure FTP access; best practices

What security measures should be taken when running a Linux web server out of our office?

Closed Port security

https://serverfault.com/questions/189282/why-change-default-ssh-port

https://unix.stackexchange.com/questions/2942/why-change-default-ssh-port

As you've speculated, changing the SSH port from 22 to another port is basically "security by obscurity" and only carries with it minimal advantages.

The main advantage is less botnet/automated traffic will come in on port 22 looking to run SSH attacks.  However, it is fairly trivial for a real attacker, or a botnet with a more astute programmer running it; to run a port scan against all the ports.  Port 20,000 (or whatever number) will clearly respond with an SSH handshake, and thus they'll try attacks on that port.  End of security advantages.

Generally, what these bots try to do is:

Brute force 'root' or 'admin' password by using common passwords and/or dictionaries/and or random characters.
Try SSH vulnerabilities or exploits to get to a shell, or use common users like nginx/nginx in order to get a beachhead shell into the system.

Of course, using fail2ban or similar software to blacklist IPs after so many failed attempts will mitigate the chances of a successful brute force attack.  You can also restrict your SSH daemon to only use SSH-key based authentication and disallow password authentication; thus making brute force attacks unfeasible.

To respond to some of the further information you provided, please note that it is a best practice to disable remote SSH logins from your root account.  Simply enabling multifactor authentication is sub optimal, you should have all sudoers users having to login with multifactor; and then needing to use sudo to issue commands from there.

So, in short, you might receive less scan activity on an odd port.  However, it's no replacement for using best practices for securing your SSH daemon, such as fail2ban, hardened sshd configuration (e.g. disallow SSH1, etc), two factor authentication, restricting SSH users/groups, not logging in as root directly, properly configured sudoers, and regular security patches/updates.


What are the privacy pros and cons of using a public DNS server vs. your own? Whether I'm using a normal internet connection setup, or tunnelling it through an anonymizing VPN or through TOR, what information of mine is revealed to whatever DNS server that I choose (e.g. Google Public DNS)?

Would I gain any privacy benefits if I created and used my own DNS server (either on my own dedicated linux server on the internet or on my own PC system locally)?

But on the other hand, might there be any privacy disadvantage to using my own DNS server that I'm not thinking of? (Like some form of leakage/attack whereby the DNS server you use is exposed to some website - and if you use something like TOR or a VPN, the IP address of your own DNS server has been leaked and so your anonymity is still compromised, in that way?)

I am not so concerned about security (for example someone hacking my (amateurly-protected) DNS server and redirecting domains to phishing IPs to steal my information or identity), but mainly privacy.

Thanks.

So, if your own DNS server is on your LAN, it'll still be forwarding requests to other DNS servers, revealing your request to them.  So the remote DNS server will see your IP rather than the public DNS service IP.

As far as TOR is concerned, you can route DNS over TOR which will make the TOR exit gateway the only one seen by the public DNS provider.

If you're curious about what Google Public DNS does with your information, I suggest reading the privacy policy.  You could, of course, assume that Google lies in their privacy policies, depending on your level of paranoia.


Kali Linux SHA1 checksum changed during and after download I was downloading Kali Linux (via direct download) and noticed that the SHA1 checksum during download was different to the official values provided. However, after the download was completed, the checksum changed to that of the official value. Can anyone please provide some information regarding why it may have changed on this one occasion?

SHA1 during download: da39a3ee5e6b4b0d3255bfef95601890afd80709

SHA1 after download: 25cc6d53a8bd8886fcb468eb4fbb4cdfac895c65

Ordinarily, I would have thought that this is simply due to the download not being complete, however, in the past I have performed this same check when downloading Kali Linux and the checksum has been the same on all occasions.

I have searched for an answer, but could not find anything conclusive. I am now going to re-download via a torrent to see if the same occurs.

The official hash sum is the one of the complete file. During the download the file is not complete, so the calculated hash sum, represents the current state of the file (e.g. 50%; 1GB/2GB).

It simply is not possible for a file to have the correct hash sum, whilst downloading.

For example:

If the complete file was a simple text file containing 10 as and it's hash sum is 2ee3ace5cfab0b5dee7ba84fc09dc3c459c34f0b.

An incomplete file, for example only containing 5 as, differs from the complete file and therefore the hash sum differs as well (5cafdebe4e78588628681c0fa5fda8a410ccd966).

If they were the same, that would mean that the complete file is available for you locally, to calculate the hash sum.


Controlling windows server on Amazon Web Services Our site is ISO-27001 compliant. As part of the compliance we were advised not to use RDP to connect to the server, but rather to choose a cloud server which provides a web-interface.

Our current cloud server uses NoVNC.

What is the ISO-27001 compliant recommended way of connecting to Windows Servers on Amazon?

As Amazon itself is ISO-27001 compliant since 2010, https://aws.amazon.com/about-aws/whats-new/2010/11/18/aws-achieves-iso-27001-certification/ then I imagine that either Amazon provides more secure RDP than regular cloud servers, or it could be that our advisor for ISO-27001 standards is too strict.

However an additional advantage of NoVNC (as opposed to RDP) is that we put Bitlocker on the hard-drives of the server, and so if the server restarts and is waiting for the Bitlocker password, then we can fix it via NoVNC. Furthermore, if remote desktop doesn't work for whatever reason then NoVNC can be useful. (Note, I appreciate that Bitlocker on Amazon Servers might not be so simple and Amazon have their own method of encrypting hard drives. https://serverfault.com/questions/569133/bitlocker-drive-encryption-on-aws-windows-instance?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa)

First of all: ISO/IEC 27001 is the norm that specifies the requirements for the establishing, implementation, maintenance and continuous improvement of an information security management system. Security controls are specified in the ISO/IEC 27002.
In general the ISO 27000 series (including ISO/IEC 27001 and 27002) does not recommend products or certain technologies to use for implementing a control. A typical control in the norm is described in a rather abstract way. Here's an example (freely translated from the German version):

13.2.1 Guidelines and procedures for the transmission of information
Formal transmission policies, procedures and measures should be in place to protect the transmission of information for all types of communication devices.
Instructions for implementation
In the context of the procedures and measures to be followed when using communication facilities for the transmission of information, the following points should be taken into account:
(a) developing procedures to prevent transmitted information from being intercepted, copied, altered, diverted or destroyed;
(b) methods of detection and protection against malware transmitted through the use of electronic communications equipment (see 12.2.1);
(c) procedures for the protection of transferred sensitive electronic information, which are in the form of an annex; [...]1

So to answer your question: there is no one true "ISO-27001 compliant recommended way of connecting to Windows Servers on Amazon", because there is no mention of which technology, protocol or product should be used. This is something you should decide, but what is important here is, that in the end, it should fit the descriptions of a control. So for instance RDP can be used securely but you have a lot of setting up to do which can be complicated.
To come back to your example: Using a cloud provider is fairly easy and using one that is ISO 27001 certified is also a plus in your own audit. To get certified yourself, you will have to read the norms, understand them and only then implement a control that fits the requirements within your scope.
1: Quote taken from DIN ISO/IEC 27002:2016-11


Where is the salt on the OpenSSL AES encryption? I'm interested in knowing how and where OpenSSL inserts the generated salt on an AES encrypted data. Why? Im encrypting data in Java classes and need to guarantee that I can use OpenSSL to decrypt them.

For instance, let's say I have this encrypted base64 string, generated with the passphrase "abc":

U2FsdGVkX1+tfvgUkjErP6j2kUAVwWZzNlaAmTqhzTk=

# generated with "openssl enc -aes-256-cbc -a"

To decrypt it we can use:

echo U2FsdGVkX1+tfvgUkjErP6j2kUAVwWZzNlaAmTqhzTk= | openssl enc -d -a -aes-256-cbc -p

# enc -d
#     decryption
# -a
#     input is base64
# -aes-256-cbc
#     the aes algorithm used in encryption
# -p
#     print salt, key and iv params

Running this using the "abc" passphrase will result in:

salt=AD7EF81492312B3F
key=DEC1F5A1E5EAAA7DD539BBCFCEB1BB18868B974186ED056C27046ADD3A752C8B
iv =95A770DE9E0130E77C8E5D796D1B4EF5
Polaco

Now, we know that for AES to decrypt the data it needs the key and the Initialization Vector.

In the case of OpenSSL, the manual says the key is generated from the passphrase and a salt, and the Initialization Vector is derived from the key itself (if not manually specified). That means that the generated data doesn't need to have the IV on it, but it does need to have the salt on it, or else the key for decryption will never be generated correctly.

So, the point is, where's the salt and how's it inserted in the resulting data? Doing some basic analysis on the generated data (decoding from base64 and outputting the hex values) we can see that the salt is not prepended or appended to the resulting data, but somehow it is there:

# salt: AD7EF81492312B3F
echo U2FsdGVkX1+tfvgUkjErP6j2kUAVwWZzNlaAmTqhzTk= | openssl enc -d -base64 | od -x
0000000 6153 746c 6465 5f5f 7ead 14f8 3192 3f2b
0000020 f6a8 4091 c115 7366 5636 9980 a13a 39cd
0000040

You can see that the salt "AD7E..." is not directly present in the encrypted data. Looks like some transformation occurred.

It looks like the salt is switched pair by pair and inserted in the data, starting on byte #9. Is this a common practice or something that only OpenSSL implements?

# salt:                     AD7E F814 9231 2B3F
# switch pair by pair:      7EAD 14F8 3192 3F2B
# data: 6153 746c 6465 5f5f 7ead 14f8 3192 3f2b f6a8 4091 c115 7366 5636 9980 a13a 39cd

Edit

As Thomas Pornin stated, the problem here is that od -x outputs the raw data. As my computer is x86_64, the data is in little endian and the salt looks "swapped". I had forgotten how endianness is tricky. Now I will always remember to use od -t x1

Anyway, I'm still interested in knowing if inserting the salt at the 9th byte is a common practice or an OpenSSL specific implementation. I also noticed that the first bytes are the characters Salted__

Yes, a transformation occurred: endianness...

Look at the bytes 8 to 15: 7ead 14f8 3192 3f2b. That's your salt. It is a known quirk of od: it decodes data by 16-bit units, little-endian, then shows them "numerically", so this incurs an apparent byte swap.

Use od -t x1 to get a nicer output.

Edit: to answer your other question, what OpenSSL does is neither standard nor common practice; it is just "what OpenSSL has always done". It is not well documented.


Is there any standard that encrypts domain name of the certificate? I guess widely used protocols today don't encrypt the domain names in TLS certificates. Does HTTP/3 and TLS 1.3 encrypt domain names of web sites?

I think you are confusing this with encrypting the domain name send in the TLS handshake by the client, which has nothing to do with encrypting parts of the certificate. In fact, with TLS 1.3 certificates are encrypted anyway inside the handshake.

What is left instead is that the client even with TLS 1.3 sends the expected target domain name inside the ClientHello (SNI - server domain indication). Up-front knowledge of this name is necessary for the server to pick the correct certificate in case when multiple certificates are configured on the same IP address.

There is already a draft to encrypt the SNI too and there are also implementations of this draft. Note that in order to work it must be supported by both client and server, i.e. there is no way to protect connections from the client side with this unless the server also supports this. See Encrypt it or lose it: how encrypted SNI works for more details.


Do I transmit a plaintext password to my PostgreSQL server? PostgreSQL supports multiple authentication methods, and I think it supports SSL and plaintext connections. How do I find out which authentication method a server uses? I do not have access to the server configuration. Can psql tell we which algorithm it uses to transmit the password, and whether the connection is encrypted? Is there a PostgreSQL security scanner for this purpose?

If you don't have access to read the server configuration, the easiest way to check is to require the use of TLS on your client and see if you're able to connect successfully.  This is done through the sslmode parameter key word.  For example:
$ psql "host=12.34.56.78 port=5432 dbname=mydb sslmode=require"

After you have verified that TLS is available, you can also check to see if plaintext mode has been disabled by setting sslmode to disable.
Sidenote: The $ is not part of the command; it's to show that the line should be ran from a terminal, and does not need to be a superuser account.


Neural networks & anomaly detection Neural networks, with their ability to learn behavioural patterns from arbitrary data, seem like a natural way to deal with intrusion detection. There are many academic papers on the topic which report good performance and an even better potential.

The question is, are there any real-life implementations? Is there a single intelligent firewall, or a firewall module, or some other sort of an intelligent intrusion detector that actually uses NNs?

There has been an enormous amount of research into using machine learning techniques for anomaly detection, i.e., to scan network traffic and detect intrusions.  However, this research has had very little practical impact.  These techniques have seen little deployment and are rarely used in practice.

Why not?  There are a number of reasons.

First, these systems tend to have a high false alarm rate.  They often raise multiple spurious alarms per day (sometimes even dozens per day), which takes up system administrators' time.  This is a fundamental challenge for anomaly detection systems, because they suffer from the "needle in a haystack" problem: billions of packets traverse your network every day, and almost all of them are benign.  If the algorithm has a false alarm rate as low as 0.1%, that's still thousands of packets being spuriously flagged.  To be practical, the anomaly detection algorithm needs to have an exceptionally low false alarm rate, which is very challenging to do well -- for the same reason that it is very difficult to detect terrorists in airport screening, without introducing a lot of false alarms that cause everyday folks to have to be searched.

Second, anomaly detection systems tend to be not very robust.  They focus on detect unusual or novel patterns in your network traffic: anything out of the ordinary.  The consequence is that, any time something changes about your network, no matter how benign, they tend to raise alarms.  Did your website just get slashdotted?  Blam, spurious alarms go crazy.  Did some user install a new application that plays novel NAT traversal games?  Blam, here come the spurious alarms.  Did someone just install IPv6 for the first time?  Blam.  Someone connect a new mobile phone with a wonky TCP/IP stack, that sends out broken packets?  Blam.  You get the idea.

If you want to read more about the challenges of innovation in this area, I would recommend the following research papers:

Outside the Closed World: On Using Machine Learning For Network Intrusion Detection. Robin Sommer and Vern Paxson.  IEEE Security & Privacy 2010.

Excerpt: "compared with other intrusion detection approaches, machine learning is rarely employed in operational “real world” settings. [...] It can be surprising at first to realize that despite extensive academic research efforts on anomaly detection, the success of such systems in operational environments has been very limited."

The Base-Rate Fallacy and its Implications for the Difficulty of Intrusion Detection. Stefan Axelsson. RAID 1999.

Excerpt: "the factor limiting the performance of an intrusion detection system is not the ability to correctly identify behaviour as intrusive, but rather its ability to suppress false alarms."


Is amazon.com allowing authentication based on browser cookies only? So I found out a couple of days ago that amazon.com has changed its behavior when trying to make a purchase. For years and up until recently, I could open a browser, log into amazon, close the browser. When I would open the browser again and direct it to amazon, the site would know my account but not allow me to check out without providing the password first. This allowed other people in the house to watch prime videos but not abuse my account and make unauthorized purchases. This apparently changed last week. Now, if I use amazon and close the browser without logging out or clearing cookies, then whoever uses the same browser after me can make purchases without being prompted for a password! I don't have 1-click enabled anywhere, my browser doesn't have the password stored, and auto sign-in is disabled. Tried this in Firefox and Chrome to the same effect.

Has anyone else experienced this, particularly on Windows? My main concern is that this is a security issue on shared computers. Is this supposed to be a new feature (I don't want it...)?

This allowed other people in the house to watch prime videos ...  My main concern is that this is a security issue on shared computers.

Let me rephrase this a bit differently:

You like the behavior that the authentication is kept over browser close, since it allows you to share your computer with others so that they can watch video with your account.
You don't like the behavior that the authentication is kept over browser close, since it makes it possible that your shared computer can be used by other to make purchases on your behave.

Isn't the real underlying problem that you share your computer and thus implicitly your account with others, while only marginally trusting these others? If you would not trust the others at all then you would not share the computer in the first place. If you would trust them fully then you would also trust them to not make purchases on your behave or you would trust them to actually make such purchases but only the ones you've agreed to.

So far you've relied on the way it was implemented (but not documented?) by Amazon to have such partial trust in exactly the way you need it possible. The changed behavior now makes it more inconvenient for you, while making it maybe more convenient for others.  Security and convenience are unfortunately usually a trade-off and there is often not the single one trade-off which fits all users best.

Apart from that: it might even be that the change in behavior you see is not actually due to changes at Amazon but due to changes in the browser or browser settings or changes in your behavior. The only way to detect if a browser was closed and restarted is to use cookies with no explicit lifetime  which have a lifetime until the browser closes. Only, modern browsers might actually preserve these cookies if you have session restore enabled - again, since this is more convenient and since most users actually expect to be able to continue with a restored session directly.


pki infrastructure for REST API My question is based on to secure REST API's. We have to publish a REST API and we want only certain consumers to consume the API. I was thinking of one way is to use asymmetric encryption.
The steps I was about to follow:

Generate a public/private key pair
Export the public key in the form of X.509 certificate
Share the public key with the client
Client to use public key to encrypt data and make a POST Request on the API to send the encrypted data
On the server, I'll decrypt the data using my private key and then store in the database

If an SSL certificate is already installed on the webserver and any API has to be called using HTTPS, is it not doing the same thing as per above?
That is where my confusion lies. Can someone help?

What you are proposing is not designed to solve the problem. What you have described is similar to what SSL/TLS, S/MIME do. It provides data privacy, but not client authentication.
For certificate-based authentication, you have to ask approved API consumers to generate CSR and sign them by your private and approved CA. Then configure web server to require client certificate and configure authentication/authorization middleware to check the certificate to be signed by approved issuer. You may need to store an identity database to map certificates to identities and audit purposes. For example, if you need to revoke access for specified user.
There are a lot of online articles on Client certificate authentication subject for very different platforms. You can just query your favorite search engine by specifying your web server product.


Can we mask encrypted traffic to look like real traffic Assumptions:
Some places ban or at least think about banning encryption.
Encrypted traffic can be easily spotted because it looks like nonsense (or something else?).
Question:
Suppose I put my encrypted traffic into a jpg and add a message "Hey John, look at my newest fractals." Would it still look like encrypted traffic?
Of course, that trick works only until someone knows it. But there are a lot more sophisticated methods thinkable (make numbers into words, let it look like (nonsense) text for example).
Is this realistic or am I missing something important?

You are talking about stenography. Yes this is possible however if you are looking about doing this in an automatic fashion this becomes difficult because of communication of keys. This communication would easily be flagged and then blacklisted. Then you are back at square one. stenography is a heavily manual process, but is worth looking into and researching.


SSL VPN placement strategies I wanted to know the advantages and disadvantages of placing an SSL VPN with respect to CIA in different locations:

with firewall
within the internal network
within the DMZ

Any reference also would be appreciated.

SSL-VPN shall have at least two interfaces, i.e. external (Internet facing) and internal (intranet facing). You should filter traffic both from Internet to external address (i.e. allow only https connections), as well as from internal to Intranet.

In your terms that would be DMZ1 (aka dirty dmz) and DMZ2 (aka clean dmz).


Effects of CVE-2017-9445? http://thehackernews.com/2017/06/linux-buffer-overflow-code.html
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9445

  "that could allow remote attackers to potentially trigger a buffer overflow"

Can someone define "remote attacker"? Are we talking about a local network man-in-the-middle attack? Malicious ISP? Global (nation state) advisory? All of the above?

And how might this CVE effect VPN connections?

As this particular CVE requires a malicious DNS server, all of the attack vectors you detailed (MITM, Malicious ISP, etc) are possible attack vectors. Any party that is able to redirect your DNS traffic to a malicious server (or compromise the server you're currently using) can craft the responses detailed in these articles.

This affects VPN's in the case where your connections are resolving to a specific (compromised / malicious) DNS server they are, in theory, vulnerable to this type of attack. The VPN configuration would largely dictate their vulnerability as some VPN connections may choose to override the DNS server and not "inherit" it from the DHCP when they log into the VPN. With that said, the effect on VPN Connections will depend on the configuration.


Is using the same RSA key pair for both (signing and encryption) & (signing and encryption) a bad idea? Possible Duplicate:
  Why should one not use the same asymmetric key for encryption as they do for signing?

I'm new to IT Security.  I still can't figure out why using the same RSA key pair for both (signing and encryption) & (signing and encryption) is a bad idea?

Most people talk about why we should not use same key pair for signing and encryption, but what about signing and decryption?

There's no technical or cryptography-based reason why you wouldn't want to use the same key for both. The only reasons why are:

it limits the exposure of your keys -- i.e. you don't have to have the same key available to the people who perform what may be separate tasks
ancillary legal reasons -- there might be legal requirements around electronic signatures in your country
damage control in the case of compromise -- i.e. if your private key gets out, then the less that key is useful for the fewer problems it will cause


PGP Encryption - Whats the need to encrypt using random one time key? I just read about PGP encryption scheme here, and started wondering what is the need to encrypt the file with a one time random key? In other words, how is this scheme more secure than simply sending the file which is directly encrypted using the public key? (Because the one time key is anyways sent along with the data)

There are two reasons:

RSA and other assymetric algorithms are very slow. It is faster to encrypt a small key using the assymetric algorithm, and encrypt the message using that key with a faster and symmetric cipher.
In its default setup, RSA is insecure. It needs a padding scheme to get full security. This "random key" method is part of such a padding scheme.


Disk write-protection at the hardware level A friend told me about a hardware piece which protects the hard drive from saving changes made to it, so that when the computer is rebooted it remains the same as it was the last time. Does such a thing exist?

Yes, it's called a write-blocker, or more officially a "forensic disk controller". The hardware doesn't cache any writes; it simply mounts the disk as completely read-only, with no physical way to write data to the disk.

If what you're looking for is a way to run an OS more traditionally with write capabilities, but restoring to a previous state after you reboot, then the best way to do that is with a live CD image. Alternatively you could set up a VM on read only storage, then boot into that. This could be done with read-only media like a CD or DVD, or with writeable storage through a write-blocker, or with a storage device which has a physical read-only switch.


Connect to HTTPS through untrusted proxy As far as I know, and please correct me if I'm wrong, I can connect to an https site (assuming the whole page is https) while using a free proxy server I find on the web (and entered into Firefox's proxy settings), completely securely. The only thing the proxy will know is the domain I'm connecting to. Nothing else. It won't know the passwords I'm typing, nor even the exact page or query string following the domain.

Is there ANYTHING that I need to do to ensure that is the case, or is that automatic by the nature of https?

Some thoughts...

Make sure that the site you got is the site you requested. (and
hope the characters in the url are the same, not just look the same.)
Keep an eye out for the site reverting to http at some point, leaking information.

These are just some ideas to help those who are not security oriented. I'm still interested in an expert's answer, of course.


How does Chat monitor work,if we use encrypted service like gtalk i have heard that there are software  like this http://formessengers.com/mdetect.htm that monitor Chats and can see the chat logs,but how do these kind of software work if we are using services like gtalk which i believe is using HTTPS.

Is it really possible to decrypt communication over SSL.

Is webchat in Gmail communicate over https?

SSL cannot decrypted if properly used. I tried reading about that software that claims to help in reading chat logs, but it is not clear how they work.

One possibility is to deploy some proxy server and then allow all connections though the proxy server.So your client would actually connect to the proxy and the proxy would connect to the public server.In such a scenario, anything originating from your machine can be read by a software deployed on the proxy server


Error Running command shell :TimeoutError Operation Time out I am Testing a Payload linux/x86/meterpreter/reverse_tcp in my Test Linux network to Exploit, I got a Meterpreter Session by Metasploit using it, I tried several commands like getuid, cat and all those are working fine, But the command shell is not working, it means i am Unable to create a shell session from that, I am getting an Error which says

[-] Error running command shell: Rex:: TimeoutError Operation Timed Out

My Server is Running Architecture is x86_64 Which means a 64 bit OS, And i am using a x86 payload . So does it caused problem in shell command? And i am unable to Find a Reverse_TCP 64 Bit payload in Linux Modules , Can anyone help me out, or give exact reasons why the error is outputting ?

Moreover while Pivoting the Reverse_tcp Should run command ifconfig but in x86 OS System, the shell gives Channel of
sh-4.2$ ifconfig command not found

You can try using the following to spawn a bash shell:

execute -i -f /bin/bash


Custom EC2-style user authentication system - how secure is it? At work I'm trying to design a user authentication system that is session-less (including session based tokens such as those used in OAuth2) due to client software requirements. The services are REST and we are trying to design an authentication system that can use HTTP headers to communicate authentication data to the server.

I've used Amazon EC2's request-signing auth [1] before and found it well suited to our requirements, except in our case we will be dealing with individual users (who will have a password) rather than scheduled scripts / automatic systems used to connect to EC2. The system I have come up with works exactly the same as EC2, with one difference: instead of the user's client storing a private API key (the AWS access key described in EC2's docs), they will store a password (per software run) that will then be hashed as it is on the server and used to sign the request.

To summarise how requests will work:

User enters password in client software
Software one-way hashes (whirlpool) password
Software creates a digest (HMAC) of the request using the hashed password
Software makes web service call to server, signing it with the digest
Repeat step 4 until software exit

On the server:

Server receives request, fetches hashed password from user table
Server creates digest of request with hashed password and verifies it matches
If verified, user is authenticated and request is performed

We will also consider lifetime restricting requests to prevent repeat attacks against the server and preserve idempotence of the service, and using HTTPS where possible to provide an additional security layer (this may not always be possible however, due to software restrictions).

Is this system secure?

[1] http://docs.amazonwebservices.com/AWSEC2/latest/UserGuide/using-query-api.html#query-authentication

First of all you should not use whirlpool,  instead you should use NIST Approved Hash function such as SHA-256 or another member of the SHA-2 family.  SHA-1,  MD4 and MD5 would be poor choices.

The password and the password hash must never be sent over the wire in plain text.

Your current protocol implementation is vulnerable to a Replay Attack.  Although an adversary sniffing the wire cannot modify the request unless he knows the password hash or the password,  he can still replay any request set.  There are number of countermeasures.  One is to send a timestamp with every HMAC'ed request.  You don't really need to know the client's exact time,  just enforce that a timestamp is never repeated or less than the request before it.


SSL server sends wrong certificate when accessed via Java In my project I have to integrate with another system which uses quite specific SSL (and also specific cipher suite).
Here's what I mean.

Whenever I try to access the server with Java (send a request), I get the wrong certificate from Server Hello. Subsequently, I get a handshake failure, even though I have installed root and lk.egrz.ru certificates in java's cacerts

However, if I try to access the same server but with a browser with installed server certificates on Windows machine (root and lk.egrz.ru), I get the right one and a handshake succeeds:

My question is whether it's possible to have such SSL which can deliberately send a wrong certificate if client is accessing the resource not with a browser, but with an agent.

I have no idea why in some case I'm presented with a wrong certificate and in another case with the right one.

Thanks in advance

Nothing really is known about your client and the screenshots don't provide enough information about the ClientHello send by the client.

But the typical cause of this problem is that your client does not use Server Name Indication. SNI includes the expected target domain in the ClientHello and is needed if multiple domains with different certificates are hosted on the same IP address. If the client does not use SNI the handshake will either fail on the server side or the server will return one of the several certificates it has for this IP address which might not be the one the client expects.


Interpolique: transparently preventing SQL Injection and XSS with base64 encoding, what happened? For the keynote at The Next HOPE a couple of years ago, Dan Kaminsky unveiled Interpolique (the talk is really fun btw).  The problem he raised was how to defend against injection attacks, including SQL injection, cross-site scripting (XSS), and other injection vulnerabilities.  For example, Unicode makes escaping characters useless and prepared statements are a PITA.

His fix was to convert strings to base64 during transit.  In SQL, for example, one can simply pad the SQL call with a decode64 eval().  It's much easier than prepared statements, little (if any) impact on DB performance, transparent to users of the DB, and the native language implementation could make usage transparent for the programmer and nearly as fast in terms of server performance. Similar techniques can be applied to defend against XSS.  But, outside of a couple of blog articles written at the time, I can't find mention of it anywhere.

What happened?

Summary. I'd speculate that Interpolique was not successful for several reasons.  One important reason is that Interpolique was, perhaps, not solving exactly the right problem, and there are a number of other similar approaches in the space with similar or better properties.  Another possible reason is that it may not have been marketed in the optimal way.  Also, I'd speculate that market demand and difficulties of monetization may have played a significant role.

Background.  Interpolique is a generic idea for defending against injection attacks.  Injection attacks are a broad class of vulnerabilities; the most familiar examples are SQL injection and XSS.

Kaminsky's slides do spend most of their time talking about SQL injection, but I think it would be a mistake to assume that Interpolique is solely or primarily about SQL injection.  Kaminsky does start out by explaining Interpolique in the context of SQL injection defense.  However, after introducing the basic idea (in the context of SQL injection), he then explains how it applies to XSS and other injection attacks.  I'd speculate that perhaps he framed the discussion in this way as a pedagogical device: because it is easier to explain the ideas in a simple setting, such as SQL injection, before discussing how they generalize.

It is also useful to know that Interpolique is one step in a line of work on defending against injection attacks.  It is preceded by BEEP (which was badly broken) and then Blueprint (which shares many similarities to Interpolique, and has many similar strengths and weaknesses).

Not solving exactly the right problem. At the most general level, Interpolique is trying to solve the secure string interpolation problem.  This is the right problem to solve.  Security issues with string interpolation are responsible for a broad variety of injection vulnerabilities.  However, Interpolique's novelty is in the part that is, arguably, not the most critical part.

To address the secure string interpolation problem, there are a bunch of issues that need to be addressed.  How do we escape or encode the untrusted data, so it cannot break out of the context it is supposed to be confined to?  How do we tell what context the untrusted data is being inserted into?  How do we know what is the right escaping/encoding function to use, for that context?  How do we integrate the solution into web application frameworks?  How do we educate developers about how to use it?

Interpolique's most novel aspect is the method it uses to encode untrusted data so it cannot break out of its context.  Interpolique's approach involves base64 encoding, which is indeed an elegant and robust solution to the problem of encoding data so it cannot escape from its context.  However, that problem is not the most critical one to solve.  The standard way to solve that problem is through escaping.  And escaping seems to work well enough, in practice, as long as you use the right escaping function for the context where the untrusted data is being inserted: e.g., encodeForHTML for text going into HTML, encodeForURL for data going into a URL context, etc.  The escaping functions are standardized and seem to be pretty reliable.

So it is not clear that Interpolique has a significant advantage over competing approaches.  Its novelty is, arguably, focused on one of the less important aspects of the problem.  It's not clear that Interpolique's special sauce (the base64 encoding part) offers that much advantage to users over other possible approaches.

The most important challenge to tackle, I'd argue, seems to be framework integration and outreach: integrating this stuff into the web application frameworks used by developers, and teaching developers how to use it.  The technology for context-sensitive auto-escaping is now pretty well understood, and the hardest challenge is to get it into widely used frameworks.

Unfortunately, that's not one where I saw a lot of effort from the Interpolique project.  This takes a lot of elbow grease: communicating with the folks who maintain each of the frameworks, articulating the benefits, writing code/patches to integrate the ideas into the frameworks, working with them to devise solutions that are acceptable to them, etc.  I don't know whether the Interpolique project really pushed on that very hard.

Marketing. I don't know whether Interpolique was marketed in a way that ordinary web application developers would understand its benefits.  Its benefits are apparent to security researchers, maybe, but the folks who build web applications, or the folks who maintain web frameworks?  Not so clear.

Kaminsky's slides focus a lot on SQL injection.  While this might make sense from a pedagogical perspective, in retrospect I wonder if it might have been a tactical error from a communication perspective.  There are already "good enough" solutions to SQL injection.  The focus on SQL injection might have triggered a knee-jerk reaction from some developers who were thinking "why do I need this stuff when I feel like I've already got SQL injection reasonably well under control?".  If the potential adopters don't perceive the benefits, they're probably not going to be very receptive to the technology.

Limited market demand. In addition, for most developers, security is a secondary consideration.  It is not so easy to sell a point scheme that addresses a small part of security, when security isn't their primary goal.  Perhaps if you could sell a comprehensive suite that solves all of their potential security problems, developers might become a lot more interested -- but that's not what Interpolique was.

Contributing to this perception that security is not a big deal is that many application developers don't think they have a problem and don't perceive a need for a solution (many of them may be probably fooling themselves, but so it goes).  And of the developers who are aware of XSS, many think they can avoid it by just being careful (that's a dubious proposition, but hey, if they don't perceive the need for a scheme, they ain't gonna buy it).

In any case, it's not clear how you'd make money off something like Interpolique.  It doesn't fall into any of the usual categories.  It's not a tool.  It's not a service.  It's not a comprehensive solution to security.  Rather, it is an idea for how to improve various web frameworks.  To get Interpolique into customers' hands, you'd have to integrate it into those frameworks.  However, those frameworks are usually free.  So I don't see how you'd make money off of it.  How do you monetize a library or an idea?  Where's the business model?  Perhaps the Interpolique folks had a way to make money, but I wonder if part of the lack of success of Interpolique is because there was no clear way to make money off the idea.

Interpolique's contribution: XSS. Let's come back to what Interpolique is good for.  Personally, I believe that its primary contribution is helping to defend against XSS (possibly other injection attacks as well, but most prominently XSS).  It is a pretty clever technique for that -- though it still requires developers to understand how to use it properly, and to remember to use Interpolique everywhere that they interpolate untrusted data into HTML.  Compare to context-sensitive auto-escaping, which happens automatically, doesn't require developer attention, and isn't susceptible to errors of omission where developers forgot to call the escaping function.

Kaminsky's talk does discuss how to use Interpolique to prevent SQL injection, but I suspect that is primarily a pedagogical device.  Interpolique is a general defense against injection attacks, of which SQL injection and XSS are two examples.  SQL injection is easier to understand and simpler to understand than XSS, so it was probably simpler to explain the ideas behind Interpolique in the context of SQL injection than XSS.

Interpolique and SQL injection. As others have said, prepared statements are a "good-enough" solution to SQL injection for practical purposes (there are indeed some cases that are not handled by prepared statements, but they can probably handled by escaping/validation plus careful code audits), so that's not where Interpolique is most useful.

I realize that prepared statements do have some limitations.  One limitation, which Dan Kaminsky explains well, is that the syntax is less than ideal if you are interpolating multiple dynamic values into a long template: it is hard to keep track of which parameter goes where.  However, in practice, this doesn't seem to be a showstopper: developers seem to cope.  Another limitation of prepared statements is that there are rare cases where they cannot be applied, such as dynamic ORDER BY or LIMIT statements.  However, neither of those limitations seems to be a serious problem with prepared statements in practice, so I just don't see Interpolique as being that much better than prepared statements.  And prepared statements have the benefit of being simple, already supported in almost every framework, and already evangelized well to developers.

Why was Kaminsky criticizing escaping?  Here's what's going on.  If you want to escape untrusted data before interpolating it into some string, you need to know how the recipient of the string will be interpreting it, to determine what characters need to be escaped.  If you think the recipient will interpret it as ASCII, but actually the recipient will be treating it as UTF-8, you've got a problem: you probably won't be escaping everything you need to.

This sort of thing has introduced vulnerabilities in PHP/MySQL web applications in the past (here's another example), when they tried to escape untrusted data before interpolating it into a SQL query but didn't realize that the database was using a different character encoding than expected.  This is especially relevant to PHP/MySQL web applications, because there is no integration between the PHP app and the MySQL database: there's no easy way for the PHP code to tell what character encoding the MySQL database will be using on this connection, so there's no easy way to tell what escaping function needs to be used.

So manual escaping is potentially error-prone, since developers sometimes use the wrong escaping function, introducing a security hole.

On the other hand, for XSS prevention, these issues can be addressed given sufficient integration into the web framework.  The framework can tell what character encoding the HTML document is in (because it sends the Content-Encoding: headers, and also because it can parse the HTML document itself), and given sufficient smarts, it can tell what HTML context the untrusted content is being interpolated into (inside a HTML tag?  inside an attribute?  a URL? etc.).  Consequently, given a sufficiently intelligent web framework, the framework can automatically determine what escaping function needs to be used and automatically apply it.  This is the premise behind context-sensitive auto-escaping, and that's how it addresses Kaminsky's criticisms.

The future of this area.  The security technology in this space that has seen the most take-up is context-aware auto-escaping, such as that implemented in Google's ctemplate.  I think this is the most exciting and promising direction for the future.  I don't see much of a business opportunity to make money -- but I do think it could make an appreciable difference towards making web applications more secure and helping developers avoid secure woes.

Context-sensitive auto-escaping involves framework support for defending against XSS automatically, without any extra steps or awareness from the developer.  That goes a step beyond what Interpolique provides.  Consequently, context-sensitive auto-escaping is even better for developers than Interpolique, because in most situations it requires no additional effort from developers: escaping is done automatically for them.  It is better for security, too: escaping is done by default, so you end up with a system that is secure by default.

You could of course combine Interpolique's ideas with context-sensitive auto-escaping (using Interpolique's base64 encoding stuff instead of standard escaping), though the benefits of doing so aren't entirely clear to me.

You can find Interpolique and similar technologies discussed in the following questions: Whitelisting DOM elements to defeat XSS, Escaping JavaScript constants.

Conclusion. I believe that Interpolique was a beautiful, elegant idea, and one that I suspect may have continuing influence on the future of web application development -- even if it is not adopted directly.  At a minimum, it can be understood within the broader context of the move towards context-sensitive auto-escaping and other techniques to help developers avoid common vulnerabilities.


Why file hosting sites never ban files using MD5 hash? We have beautiful technology called MD5 Hash for banning files, then why file hosting sites never implement this thing on DMCA files?

Because every version of a protected file would have to have their MD5 hash submitted, and a pirate can alter the file (add or remove something) and thereby modify the hash.

Hashes are the wrong technology to do what you are thinking. Hashes are good for claiming that 2 files are the same, not that all files must be the same file.


Public vulnerability feed with CVSS v3 NIST NVD publishes XML feeds of CVEs but, as far as I'm concerned, only with CVSS v2 vectors. CVSS v3 results are available on web portal.

Is there available any up to date, processing friendly, raw data of CVEs with CVSS v3 base metrics? (preferably enriched with CWEs and temporal metrics)

NIST follows trends and recently has added new (beta) JSON feeds with CVSSv3


Preventing Website Directory Listing When my CentOS 7 Apache web server was compromised recently, which hosts multiple sites, a script was uploaded to one of the sites and then used to add files to any other sites on the server that had writable directories. So, say the websites are stored in:

/home/sites

That directory is owned by root and has 755 permissions:

rwxr-xr-x

My question is, how can I configure the permissions, or otherwise configure the web server, so that scripts executed on a site cannot see a directory listing for /home/sites?

All sites are using the apache user and group.

It looks like all I need to do to acheive this is set the permissions to 711 on /home/sites:

rwx--x--x

Then a directory listing cannot be generated but files within it can still be accessed.


How secure is it to store passwords in a non-accessible file? So, I was thinking about workarounds for saving passwords in text files (just because I'm curious), and I thought, what if I saved my file somewhere that is non-accessible? My server has a public_html folder where all of the code lies, however, I created a password text file on the same level as that (and not in the actual folder).

Right now, I'm thinking this is safe because you can't access it via the actual website and yet my code can still get information from it. However, how secure is this really? Is it really a step-up from storing it in the public_html file? What are some ways (sadly, to hackers, where there is a will, there is a way) somebody could exploit a file that isn't publicly accessible?

Depends on what passwords you're talking. Using Wordpress as an example, wp-config.php contains the DB Username and Password.

It's generally accepted good practice to move the file to a non web-accessible folder (i.e. outside public_html). That way, a catastrophic php failure, won't lead to someone being able to view your password by just visiting yoursite.com/wp-config.php

However, those are DB usernames and passwords -- not Wordpress Username and passwords. The Wordpress user credentials are stored in the Database (and they're hashed). Wordpress needs to store these DB credentials somewhere, and by definition it can't be in the DB (you can't store something till you connect to it).

If a hacker managed to get Code-Execution on your Wordpress box (sadly this isn't as rare as you think). Then the hacker could simply browse to any viewable folder and view the files that has the passwords (whether that's in Public_HTML or anywhere else) -- log onto the DB, and get the hashes. Then she could either, find the plaintext password by brute-forcing it on her local machine, or just update the Hash in the DB to something she knows.

In short though, storing DB credentials in files on a server, in a non web-accessible folder (outside public_html) is OK. You shouldn't store application credentials (or any other credentials) on any folder on the server.


OCSP multi stapling : how to enable it? Simple stapling is OK I would like to set up OCSP multi stapling and I can not find a lot of documentation on it, or in any case, recent information.

I have a root certificate authority (CA) and a daughter CA below. Both work with Freeipa (and Freeipa uses Dogtag).
I have a https server too.

The root CA issues a certificate for the daughter CA.
The daughter CA issues a certificate for the https server.
The https server delivers the service for an external client.

OCSP simple stapling works : the client can check the certificate for the https server. Now, I would like to check the no-revocation of the daughter CA by stapling too.

My https server is Apache. On it, I have added the lines following in /etc/httpd/conf.d/ssl.conf :

SSLUseStapling on
SSLStaplingCache shmcb:/run/httpd/sslcache(512000)

And, always in ssl.conf on the https server, I used the SSLCertificateChainFile with a PEM file containing the daughter CA's certificate and the https server's certificate.

I assume it is not enough to add the root CA's certificate in the PEM file.
And the https server must present a certificate with the urls of both CAs written in the field Authority Information Access. It needs some configuration.

What should I add to simple stapling?
And how to check that it works?
Does Freeipa/Dogtag support OCSP multi stapling?

Subsidiary question: is multi stapling supported by browsers?
I guess so because it is common to have a hierarchy of CAs in the internet world but I would like to have more details and I understood that it's little used.

Thank you very much!

To be clear, the CA (or its delegate) must support (plain) OCSP, but the server must support stapling, either single or multi (aka v2).
From http://httpd.apache.org/docs/2.4/mod/mod_ssl.html at SSLUseStapling, with emphasis added:

This option enables OCSP stapling, as defined by the "Certificate Status Request" TLS extension specified in RFC 6066. If enabled (and requested by the client), mod_ssl will include an OCSP response for its own certificate in the TLS handshake. Configuring an SSLStaplingCache is a prerequisite for enabling OCSP stapling.
OCSP stapling relieves the client of querying the OCSP responder on its own, but it should be noted that with the RFC 6066 specification, the server's CertificateStatus reply may only include an OCSP response for a single cert. For server certificates with intermediate CA certificates in their chain (the typical case nowadays), stapling in its current implementation therefore only partially achieves the stated goal of "saving roundtrips and resources" - see also RFC 6961 (TLS Multiple Certificate Status Extension).

(Although this is ambiguously worded, 'may only include [one]' for 6066 means 'it is only able/allowed to include one' not 'it is possible it only includes one'.)
So, it looks like you can't. Although I'm pretty sure mod_ssl is open-source, so you could implement a change to it yourself if you really want.


What are the implications of making Djangos SECRET_KEY public? I know the SECRET_KEY for a website made in Django. The owner of the site has accidentally made the settings.py public.

What are the implications of making SECRET_KEY public? How can someone use this to attack the system?

From Django's official documentation, they have only mentioned what
 the SECRET_KEY is used for:

  The secret key is used for:

  All sessions if you are using any other session backend than django.contrib.sessions.backends.cache, or are using the default
  get_session_auth_hash().
  All messages if you are using CookieStorage
  or FallbackStorage.
  All PasswordResetView tokens.
  Any usage of    cryptographic signing, unless a different key is provided.

You can report it to the owner or the security team. Politely asking them to change the settings. You can provide them the correct documentation and also may suggest the proper settings.
You are doing them a favor but the response you get depends on the  person at the other end.
They are not going to file a case against you, if you have not done any harm to them.


What could an attacker do if they gained access to PBKDF2 hashes? This is regarding a web application where a user has to login with their personal email as the ID, and a password they have chosen personally.

If an attacker somehow gained access to a credential store with a list of all the PBKDF2 hashes with the email addresses, to what extent could this be used maliciously?

The attacker would have to crack the hashes in order to obtain the original passwords. Since PBKDF2 does multiple iterations of the same hash function, the act of cracking them would be significantly slower. The end result is that even weaker passwords are less likely be revealed, leading to a significantly lower percentage of successfully cracked passwords in the credential list.


Trying to verify my X509 certificate "could not verify this certificate for unknown reasons" I have created my own X509 certificate with my own CA. I am able to import the CA certificate into Firefox, but when I try to import the user's certificates I get the following:

  Could not verify this certificate for unknown reasons

I'm guessing I did something wrong while creating the certificates. Is there any way to get more information about why Firefox couldn't verify the certificates?

Make sure the certificate has "Digital Signature" enabled
Take a look at the key usage extensions on the certificate. They are labelled X509v3 Key Usage by OpenSSL.
$ openssl x509 -in mycert.pem -text -noout
...
X509v3 Key Usage: critical
    Digital Signature, Non Repudiation
X509v3 Extended Key Usage:
    TLS Web Client Authentication, E-mail Protection

If the certificate can't be used for Digital Signature (e.g., it is for E-mail Protection only), then Firefox may not be able to use it.
NSS, the SSL library that Firefox and Mozilla products use, is much stricter than OpenSSL about the key usage settings.


Is it safe to enable - Trust Access to the VBA object model - Microsoft Office I am trying to run a VBS script which calls a macro and won't run unless I click "Trust Access to the VBA object model" in Microsoft Office Trust Center. I forget where I read it but I thought I read this was extremely unsafe. This project is for work and to be distributed to possibly many terminals, but before I ask them to check this setting I wanted to know if this is something that is considered safe.

If you look at the docs at https://support.office.com/en-us/article/enable-or-disable-macros-in-office-files-12b036fd-d140-4e74-b45e-16fed1a7e5c6 macros are disabled by default and there are multiple options to enable them.

Users should be encouraged to use the ”principle of least privilege” which in this case means to only enable macros in documents where they trust the author, and were expecting the document, and for the most limited amount of time. So the option on that page ”Enable macros for one time when the Security Warning appears” is best.

Why? You don't want your users to open spam emails that looked important to trick victim into opening the document to have a macro script steal data or install back doors.

From the user perspective is it unsafe to ever enable macros? If write my own macro and run it on a clean laptop then obviously not. If my mom opens a document that runs a macro that was emailed to her by “amazing@online-deals.us” then obviously yes.

It is implicit in the fact it asks you to confirm whether you want to enable scripting that the system requires the user to confirm that they know it is safe to trust the origin and author of the VBA script.

One might be able to argue that the VBA engine makes it too easy to attack people in this way. Historically people have argued that Microsoft products are fundamentally unsafe simply because there were so many exploits and victims. Yet clearly they have invested a lot of effort into trying to make it safer for unknowledgable users by blocking scripting by default. Some users might simply always run all scripts without considering the consequences or checking the origin of the documents they are opening. Yet at least they were given a choice and the defaults were secure.

So why might Microsoft let you enable scripting across the board which is less safe than letting users have to confirm for each document? Why let someone disable security features? Probably for backwards compatibility when the security feature was first introduced. They used to not block macros, blocking them might have caused issues for some customers who know they are always secure (eg no external emails allowed to certain users), so there is a opt-out to disable that security feature, which makes sense for a very small number of customers. You should not encourage users to disable any security features.


Are privacy and security mutually exclusive? As the title suggests, can you name an example when your information would be private but insecure? Or does privacy imply security?

Privacy (in the form of confidentiality) is a subset of information security.

Information security is composed of three primary concepts, together called the CIA triad. It stands for Confidentiality, Integrity, and Availability. Privacy itself is the act of maintaining the confidentiality of sensitive information, allowing it to be only shared with authorized parties. The violation of privacy would be a violation of confidentiality, in effect breaking security. Now, security implies privacy, but not necessarily the other way around. For example, you may be able to control the flow of your information so it does not fall into the wrong hands, but if someone is able to destroy or otherwise deny legitimate access to the information, they have violated availability, even if they are not privy to the sensitive content itself. This would break one aspect of security without breaking the rest.

A simple real-world example would be TLS, used to encrypt browsing traffic. TLS provides confidentiality (the data being transmitted cannot be viewed by unauthorized parties) and integrity (the data cannot be tampered with en route to its destination), but it does not provide availability. It is trivial to deny access to a TLS connection simply by mounting a denial of service attack, or even unplugging the modem. This would be a case where privacy cannot be violated, but availability is not at all guaranteed. Without availability, you have just lost a major requirement for security.


FTP over local network If I am on a home network over a standard passphrase-protected router, is it safe* (definition below) to use FTP?

* safe as in attackers not being able to see the contents to the FTP connection, assuming they have not connected to the router

Here is what I am trying to do:

Transfer files from my Android device to my laptop over wifi using FTP, on a home network

I do not care if the people who are connected to the router (ie. my family, guests etc) are able to see what I am doing over FTP

I know I can use SFTP or FTP over SSH, but it isn't worth my time to rebuild the script if it is safe* (definition above) enough

If:

you accept that anybody that is allowed to use your network can see your FTP password
you assume that neither the router nor any machine connected to your network can be compromised
you are sure that the android device cannot be inadvertently connected to a rogue WiFi router

then FTP usage is safe.

But the rule in security is to put several defence lines so that if a single element was compromised it would be harder for the attacker to access all informations on the network. For that reason, it is generaly advised not to pass a password in clear text if it can be avoided. That being said, absolute security is a myth, and as long as you are aware of the weakness and assume the risk, it is fine to use FTP.


Virus on mainboard(?) how does it work? This post made me remember on a strange occurence I noticed somewhen back in 2008. At that time I had alot IT-problems I wasn't able to technically accurate fix, where I nowaday do, but that one still leaves me clueless.

It appeared to me I had a kind of virus on my pc, I couldn't get rid off.
So I decided to reinstall windows (That time it was still windows XP, what probably is important). But something prevented doing so. after rebooting to check the system it occured that a lot of folders contained (some places with even tens to hundreds) empty folders with rubbish names. Similiar to the temporary windows update folders, but obvisious diferent in something (can't remember anymore what it was).

So after configuring some settings, which I assumed to be the cause of failure to reinstall windows, I restarted again and it wasn't even possible anymore to boot from that HDD nor to reinstall windows on it. So I decided to mark that HDD with a big red cross and bought a new HDD.

I succesfully installed windows on it without any complications, begun to install1 some lcoal updates and drivers where I had to reboot in that process ofcourse. And after the second or third reboot that drive had the same strange folders all over its system- and data- folders. One more reboot and that factorynew HDD which was never in contact with my homenetwork, had the same failure as the old one.

Since I hadn't the knowledge/availability of tools to wipe the HDD's at that time, I wasn't able to pin the source of error down by doing try and error tests, but I remember it appeared to me like it might be caused by the mainboard.(What from today I still think would be the most plausible).

I decided to buy a new pc, since I had no idea how to fix this, and so I closed that mysterious case.

But today I'm curious about it again.

Was there a virus behaving like this around at about that time?
And if so, what exactly was its purpose and how did it work?

1Note: the old HDD was unpluged and allready archived in a cupboard. The internet wasn't even plugged at that time!

I would say it's more likely that this is hardware failure or software misconfiguration, than malware. Particularly given you said that you were messing around with settings (I'm assuming in the BIOS)?

Bad RAM is another possible option, as is a faulty power supply causing either unclean shutdowns or excessive noise causing data errors.


Run multiple AntiViruses with Dockers I need to run multiple Antiviruses in my system. Inevitably I cannot. So, I thought docker is a good option. But I think it is not possible. Because Antiviruses are kernel-mode and the kernel is shared between multiple dockers. Correct?

If so, what is your idea about another method? Use of Virtual Machines is not a good option. For example I need 10 virtual machines if I use 10 Antivruses.

Edited:

Another question: Is it possible to install multiple AV in one system and disable real-time scan in order to avoid any conflicts?

Disclosure: I work for AV vendor.

The answer depends on whether you are talking about:

Anti-malware engine which scans content without executing it. This is what people call "scanning a file", and what is used, for example, by VirusTotal;
Anti-malware engine which detects malware by monitoring running processes for malicious activity (this is often called "behavior analysis").

For the first one, with exception of Symantec, which reportedly runs parts of antivurus engine in kernel, I don't know of any other vendor whose anti-malware engine runs in kernel. Even for Symantec it was matter of choice and not the requirement, as the anti-malware engine has the same detection when running in userspace. Kernel module is required to intercept events (such as file access), but the accessed file name is typically passed to userspace and scanned there; there are no requirements to scan it in kernel.

For the second one, while this engine is usually also implemented mostly in userspace, it depends a lot on its  sensors implemented via kernel drivers. Without them the engine will not detect anything.

Thus the final answer is:

Yes, it is possible to install multiple anti-malware products on the same  system. Because this scenario is not supported by most security products, who would ask you to uninstall another product, this would require tweaks, such as deleting product installation information so the products would install together.
The detection rate in this scenario would only be limited to one of static/dynamic anti-malware engine, and runtime detection would not apply (it would have to be disabled).
As this configuration is unsupported and achievable only via tweaks, it is inherently unstable, and can collapse (crash/deadlock) easily. Especially once one of the security products receives a product update;
Running them in different virtual machines is a much better solution, as the resources used by the anti-malware product running scans would be quite significant;
Why not use VirusTotal instead?