Dencrypt containers on the fly without mounting into filesystem? Is there some way of having container files / LVM devices transparent dencrypted on the fly without mounting them into the filesystem?

All the encryption solutions I know like LUKS-LVM, gpg containers ect require me to decrypt the device, mount it into the filesystem to access data.
I was looking for something like Docker, which gives me an environment to store data in and giving users access to that. However I also want to reduce the risk of data being comprimized. When I have an encrypted image for Docker, I would have to mount it into the filesystem for Docker to access it. Anyone who somehow legally or illegaly gained access to the system at root level would be able to read this mount point and get the data from there. I want to minimize that risk, so that I can access the data on the image/container only through some kind of a server/client system that controlls user access using keys.

Is this somehow possible?

If you want to ensure that users only have access to their files by providing a key (possibly stored in memory so they don't have to provide it over and over again), then why don't you just use a plain, unencrypted filesystem and encrypt each file individually?

Maybe because this leaks information about number of files, creation and modification dates, file sizes and possibly file names if you don't encrypt them. So you start writing some code around that solution and finally you end up with a solution which stores individual files in a container so that you have control over the file metadata.

And now you've reinvented LUKS, TrueCrypt,VeraCrypt, ...

The one difference between your system and these solutions is that your system supports individual keys for each user while LUKS & Co just use a single key. But you can get almost the same behaviour from LUKS by creating a single container per user. You still have the problem that if someone gets root access to the machine, he can read all the open containers.

However, he can also do that when each file is individually encrypted. You need an interface to your system which takes a user and a filename, decrypts the file on the fly using the users key, which sits in memory, and returns the decrypted file contents. What's to stop root from using this same interface, masquerading as the user?

Basically, LUKS below a standard filesystem provides the interface you'd have to design yourself otherwise. There are only two solutions I can see that would give you more security (but not what you envision):

Use a TPM to protect the user keys. This way they won't be stolen from memory, but a user who has root can still masquerade as another user and decrypt every file by ordering the TPM to decrypt its contents.
Put the encrypted data and an access API on a dedicated machine which only serves your application and is only accessible using the access API. This makes for a much smaller attack surface on your encrypted data. But it also can't protect you from a compromised root account on your app server or the storage server.

So, to sum up: I think you already get what you want out of the box with LUKS. There is no secure line of defense against compromised root.


How can I prevent abuse of our public WiFi network? One of our customers runs a holiday park with <100 users on it.

We currently have a mikrotik in place that prevents torrenting etc, however their line has been cut off as someone there has been sending out spam emails and attempting to bruteforce online accounts.

What could we put in place to prevent malicious activity? Would using a service like DYN dns work? The ISP will not allow us back online until we have shown them we have took steps in preventing further abuse.

Thanks.

There is no simple solution to preventing abuse of shared Internet lines, especially if you want to make sure the line remains useful for the non-abusive users.

What I mean by that is: Many people using a Wifi will want to send emails from desktop email clients, use VPN connections, messengers or make calls using tools like Skype for example.

If you restrict ports to just the canonical http/https ports you will not prevent any brute force attack against GMail / Facebook / you name it but you will render the Wifi hotspot next to useless for many users. Internet isn't just the world wide web anymore for a long time.

Typical measures which are taken on public hotspots are limitations in terms of the amount of data allowed per unit of time. This usually means to implement some intelligent rate limiting algorythms which are once again far from trivial, because if a client sends 100 MB in a few seconds, this will be perfectly ok if it's a video chat, but you don't want to allow 100 MB of spam being sent out in a minute.

In case you don't have the expertise to deal with these issues on an ongoing basis and you don't think you want to built up that knowledge, one very wise decision might be to delegate this to a company which does that for a living.

I don't want to drop any names here but there are specialized companies in all parts of the world which operate a scheme by which you send all traffic from your customer's guests though a VPN connecton to them and they will sort of malicious traffic and delegate the legitimate traffic to the Internet using their publicly routed IP address and not that of your ISP.

Your ISP will only see the VPN traffic and never blame you (cut you line) for anything which got sent over that link unless the pure amount of traffic becomes an issue. But even that can usually be mitigated in the router firmware which that company you will be working with provides you.


Smashing stack in x86_64 Exploiting functions like strcpy() relies on the fact that the payload string must not contain zero bytes that would terminate the copy function. If the payload contains x86_64 addresses (e.g. in order to overwrite a return address on the stack), then there is a problem that x86_64 addresses contain zero bytes. Is there a workaround for it?

x86_64 is little endian so the mandatory zero bytes come at the end of the address/string and are already present in the existing return address.  That means you don't need to write those last few bytes.  You might still have problems if there were zero bytes less significant than the most significant non-zero byte.  These are best avoided by careful target selection.


Why is there a minimum username length? In some (web) applications there is a minimum length for usernames, usually there is a restriction for a minimum of 6 characters length.

For example, free gmail accounts and miiverse (Nintendo social network).

Why is there a minimum username length? And why a minimum of 6 characters?

Frankly, I find such limits quite silly; any claim that a minimum length on the username has any security merit is ridiculous. Usernames are supposed to be public, they're not secret information (in the vast majority of cases). This is even more silly in systems where the usernames are used as communication handles and you're encouraged to share yours.

Some service providers believe that longer usernames are better to combat spam targeting auto-generated email addresses. Here's Google's take on this one

  We've discovered that short usernames at popular domains receive
  significantly more spam since they're easy to automatically generate.
  Gmail's requirement that all usernames be at least six characters in
  length is meant to keep spam out of your inbox.


Reverse proxy isolation from insecure blog, are sessions vulnerable? Hi I have a WebApp where security is important. E.g.

www.somewebapp.com

The app has a wordpress blog  (hence not secure since wordpress). e.g.

www.somewebapp.com/blog

To protect the webapp from the insecure blog, the blog is hosted on a separate server.

We use nginx reverse proxy to redirect all /blog queries to the blog server.

My question does this mean the webapp is fully protected from the insecure blog?

My concern is especially re: Sessions. Since the domain for blog and webapp is the same they would share the same sessions?

If blog server is compromised would an attacker be able to obtain the session data that is valid for the webapp? Could he do something malicious with that?

For additional info, I use the below config nginx for redirecting blog queries.

location /blog {
        proxy_pass https://blog_ip:port;
        proxy_redirect off;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

Yes, your concern is justifiable.

From the Set-Cookie documentation at Mozilla:

Path=<path-value> Optional
    Indicates a URL path that must exist in the requested resource before sending
    the Cookie header. The %x2F ("/") character is interpreted as a directory
    separator and sub directories will be matched as well (e.g. path=/docs,
    "/docs", "/docs/Web/", or "/docs/Web/HTTP" will all be matched).

That means that all cookies you set for your main app with Path=/ will be sent with requests to /blog, too.


Is a HMAC-ed password is more secure than a bcrypt-ed or scrypt-ed password? Given an option , which one should I choose , a HMAC for storing a password securely or a bcrypt or scrypt library?

In order to give you a proper idea of the problems and subtleties of computing password hashes, as well as why HMAC isn't suitable for this problem, I'll provide a much broader answer than is really necessary to directly answer the question.

A HMAC hash algorithm is, essentially, just a keyed version of a normal hash algorithm. It is usually used to verify integrity and authenticity. The usual notation of this is H(m,k) = h, where H is the HMAC hash algorithm, m is the message, k is the key, and h is the resulting hash. The idea is that two parties that share a secret k can verify that the other person is the author of m. Furthermore, an attacker cannot forge a message hash without knowing k.

This is done as follows:

Alice and Bob both know a shared secret key k.
Alice writes a message m, and computes the HMAC hash of it using k, i.e. H(m,k) = h.
Alice sends the message m and hash h to Bob.
Bob computes H(m,k) and compares it to the hash h that Alice sent. If the hashes match, he knows that Alice sent the message, and that it was not altered after she hashed it.

Now that you understand what HMAC is, let's move onto what you really want to do - store passwords in a database.

Many years ago, it was standard practice to store passwords in plaintext in databases. This was a bad idea because, when the database was compromised, the attacker got all the passwords. To combat this, we started hashing passwords in the database using one-way cryptographic hash algorithms. MD5 became popular, but weaknesses (collisions, partial preimage, etc) discovered in it mean it's no longer recommended. A lot of people moved onto SHA1, which is more secure.

The problem with this approach is that it's possible to construct a huge table of hashes and their corresponding plaintexts. These are called rainbow tables. They work on the concept that it is more efficient to compute a huge list of hashes for all possible passwords (within a certain set) and then store it, so it can be quickly queried later on. So, instead of brute-forcing individual hashes, it became possible to just query the database for a hash and have its plaintext returned immediately.

In order to fix this, security nerds invented salts. Salts are large unique random values appended to passwords before they are hashed. This salt is stored with the hash, so that it can be computed again later. So, we compute H(m+s) = h, then store h and s in the database. This provides significant protection against rainbow tables because it essentially requires a separate rainbow table to be generated for each salt.

So, the bad guys switched back to dictionary attacks and brute-force cracking. With the advent of GPU computing, it became possible to compute billions of hashes per second on a moderately powerful graphics card. In fact, people have built computers that can compute nearly 50 billion MD5 hashes per second - pretty impressive / scary. The reason GPUs are capable of this is that they're designed to do huge numbers of parallel scalar operations. Scalar operations are math and logic operations that do not involve branches - i.e. they don't need to do much/any "if x then do y". Cryptographic hash algorithms tend to fit into this model.

In order to make this difficult, we have to make the hash operation slow enough to make brute forcing infeasible. Normal hash algorithms (e.g. SHA1) are designed to be fast, which makes them unsuitable for this purpose. HMAC adds very little overhead and no extra security margin, so it too isn't much use here.

Creating a slow cryptographic hash algorithm is easier said than done - it's very hard to come up with one that is slow, irreducible (i.e. cannot be optimised beyond its current state) and secure. There are three popular hash functions that can do this: PBKDF2, bcrypt, and scrypt. These are known as adaptive key derivation functions, because they accept a work factor value along with the plaintext and salt. The work factor alters the amount of time it takes to compute the hash, and is designed to safeguard against future hardware improvements.

So, for an adaptive key derivation algorithm H, we compute H(m,s,w) = h, where m is the message (password), s is the salt, and w is the work factor. The resulting h usually contains s and w, so that a verification function can later compute the same hash using the same parameters. The work factor generally controls the number of iterations performed of an internal cryptographic primitive. The goal is to make the computation take long enough to make cracking infeasible, but not to exceed the resources that we have.

In order to provide more security against dedicated hardware-based cracking, scrypt ensures that the hash computation is both CPU-hard and memory-hard, i.e. it requires significant CPU and memory resources in order to produce the hash value. This is important, because FPGAs usually have access to very little immediate memory.

Now, the obvious question arises: if I set up my site to use bcrypt, won't that mean my server has to compute CPU-intensive hashes all the time? Well, if you run them on your server, then yes, that's something to take into consideration. A better solution is to have the client compute the hash, then send it to the server over SSL. The server can then compare it to the value in the database. This ensures that the password hash cannot be easily cracked if it is stolen (e.g. through a database compromise), and that your server isn't overwhelmed by the overhead of password hash computation. For websites, you can use jsBcrypt. Update: This method has been pointed out as flawed by a commenter below. Don't use it.

Hopefully this gives you a good overview of the situation, and why HMAC isn't suitable for this kind of use.


Least riskiest option when it comes to reinstalling the OS I understand security is a continuum rather than a binary, which is why I'm asking this question.

I need to reinstall the OS on my Macbook. However, after a security mishap, I’m far more alert about safe online practises when it comes to malware/privacy. The main thing I’m concerned about is reinstalling the OS with the least risk possible when it comes to inadvertently installing a compromised version of the OS/inadvertently allowing unauthorised access to my machine after a fresh reinstall.

So my question is: what’s the safest way to reinstall the OS with the least risk of being hosed?

A couple of outstanding/relevant points:

I’d rather not use the recovery partition. I think it’s an issue to have a restore point in a potentially compromised HD. I’d use Internet Recovery (which downloads the same recovery functions from the machine's firmware rather than booting from a partition on the HD) as I could wipe the drive and repartition it to remove the pre-existing recovery partition, but then this poses another question about what wifi connection to use.

I currently do not have access to a VPN. I’m pretty sure there is one compromised machine that uses the same home wifi network I do but there’s nothing I can do about that (long story), and it’s exceptionally slow. I could use an Apple store’s unsecured wifi but we all know the risks when it comes to using public wifi - and more importantly, after a fresh reinstall, the firewall is disabled by default which I feel like is an exceptionally risky thing especially on public wifi (but remote login/screen sharing is disabled by default, and I guess I could just go out of range of the store’s wifi after the OS is downloaded and is being installed?).

My knowledge of the command line is basic at best (so creating a bootable drive is out of the question), and I’m not too comfortable plugging a bootable drive in my machine that I don’t know where it’s been previously (so using a Genius Bar drive with the OS I need on it seems risky).

My suggestion is to proceed with the recovery from the built-in recovery partition. This is because, recovery partitions are not mounted normally (if you were using the partition, you can skip this step).

You can follow the instructions given in the link on using recovery in Mac.
https://support.apple.com/en-in/HT201314

Kindly note that wifi AP has got nothing to do with hacking/compromising your computers. Hence after the computer has been recovered, you can connect to the same wifi AP.

You can have a look at the following website for tips and tricks on securing Mac.
http://www.hackmac.org/


Does anyone know how to "tcpdump" traffic decrypted by Mallory MITM? I'm looking for some help in capturing network traffic that I can analyze in Wireshare (or other tools).  The tool I'm using is mallory.

If anyone is familiar with mallory, I could use some help.  I've got it configured and running correctly, but I don't know how to get the output that I want.

The setup is on my private network.  I have a VM (running Ubuntu 12.04 - precise) with two NICs:

eth0 is on my "real" network
eth1 is only on my "fake" network, and is using dnsmasq (for DNS and DHCP for other devices on the "fake" network)

Effectively eth0 is the "WAN" on my VM, and eth1 is the "LAN" on my VM.

I've setup mallory and iptables to intercept, decrypt, encrypt and rewrite all traffic coming in on destination port 443 on eth1.  On the device I want intercepted, I have imported the ca.cer that mallory generated as a trusted root certificate.

I need to analyze some strange behavior in the HTTPS stream between the client and server, so that's why mallory is setup in between for this MITM.

I would like to take the decrypted HTTPS traffic and dump it to either a logfile or a socket in a format compatible with tcpdump/wireshark (so I can collect it later and analyze it).

Running tcpdump on eth1 is too soon (it's encrypted), and running tcpdump on eth2 is too late (it's been re-encrypted). Is there a way to make mallory "tcpdump" the decrypted traffic (in both directions)?

I ran into this same problem, although not with Mallory (I never had any luck getting Mallory working, although I only tried shortly after its release).  If you can configure the target IP in the client, you should be able to do use my solution too.  I used stunnel in combination with a ruby tcp relay proxy.  I blogged about what I did here:  http://www.fishnetsecurity.com/6labs/blog/ssl-relay-proxy-creative-solution-complex-issue

I have a friend that used these steps work to get mallory working, and it worked fine for him.  http://blog.opensecurityresearch.com/2012/05/mallory-mitm-fix-ssl-decryption.html


Is my information secure when using Private Tunnel? I am using Private Tunnel to do some tasks involving sensitive data like logging in to PayPal and online banking.

Is my data safe or can it be retrieved by other users of the Private Tunnel service?

I don't know the refered VPN, but, if it matches what the website says, i think you're good.
The only way i'm seeing you're not safe is that if you're using a wireless connection, the data can be intercepted, it would still be encrypted, but you never know... better safe than sorry.

And as @Johnny said, if you're using HTTPS, and SSL you're safe, don't be worried.


Is there any concern regarding a database primary key exposure? Is there any risk if for example I let to end users to know the primary key associated to users in the database?

It depends on what the primary key is. If the primary key is the user's email address or other personal information, then obviously you should never expose it to anyone other than the user. Even if the primary key were the username in the form of FirstName.LastName you should be weary of exposure. Typically though, the primary key will be either an integer or guid which has little meaning by itself, and so I will base the rest of this answer on the typical case.

In general, if the application is designed and secured properly, then revealing meaningless User IDs should not pose a security risk. However, this is not true for all primary key fields in the DB. For example, suppose there is an email validation table that has a guid that appears in a link that is emailed to the user. Those single-use IDs should not be made public because otherwise someone would be able to submit a fake email address and still validate it.

Their are other considerations too that are not necessarily related to security. For example, if you use integer IDs, and you have a public profile page like Matthew mentioned in his comment, then someone could iterate through all of your users and find out information that perhaps they should not know. Examples might be the demographics of your user base, or the exact number of users that your website has, etc. Note this would not be a problem if you use random guids for the primary key, or if you do not expose the public users by the primary key.


Does a log entry with "SPT=81" despite nothing listening on that port indicate my server is hacked? I manage a Debian GNU/Linux web server (Debian 10 Buster with its bundled 4.19 kernel). I put in place simple iptables logging rules a long time ago, among other things. Here they are:
# iptables -A OUTPUT -d [mySmtpSmarthost]/32 -p tcp -m tcp --dport 25 -j ACCEPT
# iptables -A OUTPUT -d [mySmtpSmarthost]/32 -p tcp -m tcp --dport 465 -j ACCEPT
# iptables -A OUTPUT -d [mySmtpSmarthost]/32 -p tcp -m tcp --dport 587 -j ACCEPT
# iptables -A OUTPUT -p tcp -m tcp --dport 25 -j LOG
# iptables -A OUTPUT -p tcp -m tcp --dport 465 -j LOG
# iptables -A OUTPUT -p tcp -m tcp --dport 587 -j LOG
# iptables -A OUTPUT -p tcp -m tcp --dport 25 -j DROP
# iptables -A OUTPUT -p tcp -m tcp --dport 465 -j DROP
# iptables -A OUTPUT -p tcp -m tcp --dport 587 -j DROP

The goal here is to catch anything suspect, mainly rogue PHP scripts that connect directly to some hacked (SMTP?) server out there. There is a Exim mail server on localhost which hands off messages to external smarthost, so that the WordPress wp_mail() function works, with the help of a SMTP plugin that configures it to use localhost as SMTP server.
In other words, I'm saying: "dear rogue script, either you use the configured smarthost (so that I can bust you there) or you are already busted here".
That obviously assumes the server hasn't been hacked to the root... and here comes my question.
Yesterday I found this in the logs:
Nov 21 12:23:55 web kernel: [35501.571711] IN= OUT=eth0 SRC=my.server.public.ip DST=109.89.132.126 \
  LEN=40 TOS=0x00 PREC=0x00 TTL=64 ID=0 DF PROTO=TCP SPT=81 DPT=587 WINDOW=0 RES=0x00 ACK RST URGP=0
                                                     ^^^^^^ This!

while
# netstat -nltp | grep :81
#

so I deduce that something managed to bind port 81 on the locally configured public IP address and tried to send a message to 109.89.132.126 on port 587.
Is that at all possible without having root privileges? Port 81 is lower than 1024, i.e. it's a privileged port on Linux, and I've never issued any custom setcap command on this server.

... SRC=my.server.public.ip DST=109.89.132.126 ...
... PROTO=TCP SPT=81 DPT=587 ... RST ...

This is a RST. It will be generated by your server if a remote system (in this case 109.89.132.126) tries to connect to a port on your system where no one is listening. Given that no one is listening on port 81 on your system it is sufficient that 109.89.132.126 has send a packet with source port 587 to your system port 81.
In other words: there is no need to hack your system in order to cause this log message.


Any safety with private IP addresses? Possible Duplicate:
  How can someone hack my PC if I am connecting to the internet through NAT?

Private IP addresses (172., 192. etc.) are not routable addresses, and not visible to the outside world due to NATing.
Even if some incoming traffic for these private IPs does hit a border router, I guess most commercial routers would be configured to not route the traffic.

So, does this, in any way, imply that my system, being on a private IP (172.) inside my University network, is safe from attacks from outside?

I agree that inside attacks can very well occur, but what about any adversary wanting to target me from outside?

No. Though reducing your direct exposure to the Internet with NAT does reduce some risks as long as you are on an Internet connected network there are many ways for attackers to reach you.

Examples of tactics that evade or ignore NAT (not complete):

application vulnerabilities in client/server (web browser) or peer to peer software (Skype) you run.
phishing emails or fake websites with malicious payload or links to attacker sites
"drive-by" malware embedded in ads on otherwise legitimate sites
IPv6 (if enabled) usually does not use NAT
attacks within VPN or GRE tunnels


Evil maids in the server room I am well aware of the fact that physical insecurity in principle means no security. But let´s say I own a root server with full disk encryption which is unlocked/booted via dropbear ssh. In which ways can an attacker with physical access (e.g. the hosting provider) gain access to my data and what countermeasures can I take to prevent the attacks or to slow him down? He could retrieve the encryption keys from the RAM. Tresor stores the key in CPU registers and this might mitigate the risk. But I guess the usage of tresor is also detectable. The attacker might modify the boot partition or kernel. Is it possible to perform a checksum over the network of /boot in order to determine someone has tampered with it? Maybe colocation in combination with TPM could help? Also Mandos and homomorphic encryption (though it might take some years to be practically usable) could be useful. Any more ideas for implementing attacks and protection against them?

The most common solution to this is to create physical security: you have a dedicated rack, and use a secure, lockable cabinet.

You can also create physical security for a single box by locking the case. There are some subtleties to getting this right: securing the BIOS, firewire ports, etc.

Disk encryption is an effective technique, although it is susceptible to advanced attacks. Remote boot techniques like dropbear are vulnerable to a remote variant of the evil maid attack. For example, someone with physical access could tamper with the dropbear partition, and have it leak the key on the next reboot.

TPM-based disk encryption could work well. It doesn't require a password on boot, but instead only reveals the encryption key to a trusted boot image. I've not seen this done on a server, but I think it would work. I expect an advanced attacker can get around this too.

An attacker with physical access can only read RAM if they are quite highly skilled - at least, assuming you secure the basics like firewire. Given advanced attackers have other routes in, I don't think Tresor buys you much. Mandos sounds like an automated way of supplying the boot password remotely; I expect it has the same risks as dropbear.

Ultimately, to make proper decisions you need to consider the threat profile of a specific system. In practice, if you don't trust your hosting provider, maybe the best option is to switch to one you do trust - even if this means bringing your data centre in-house.


How to protect server uploads I want to upload .jpg images to my Linux server so that clients can re-download the files when they want. Supposing unknowingly there is a trojan, worm or malware in my computer, will these be uploaded and infect the client's computer ? how can this be prevented. where in the server should i check for any malicious programs.

Reinstall your system (as you say you are unknowing, if you feel your system has a virus, reinstall your system from scratch)
Install an antivirus on your computer
Install an antivirus on your server (yes, for Linux there are solutions as well)
You know have a bit more assurance that there will be no problems

But you can't, unfortunately, be 100% sure.

Another option is that, before uploading your jpeg, you upload it to virustotal and see what that gives. If it says one of your files is infected please jump to step 1.


Could I be defrauded by a website who has my address, phone number, and credit card number? Exactly what kind of information does a scammer need to scam someone money?

For example, if there's a website which wants me to provide my details, Exactly what kind of information can I divulge and guarantee that the scammer does not have the ability to scam me?

Basically, could I be scammed by a website who has my country, physical address, email address, phone number, full name, and credit card number?

For example, when signing up for a free trial account (watch free movies) on https://www.vidcannon.com/,

Even though it says that for the trial no money would be charged, it asks for my:

First Name
Last Name
Card Number
Expiry Date
CVV2 Code
Zip Code
Country

Basically I was wondering if I do provide my real details there, could I have been defrauded?

To answer the precise question; No, YOU can not be defrauded if you acted in good faith.  You can be INCONVENIENCED while your credit card company works out what happened.  But at the end of the day, YOU will not be out of pocket with regard to the fraudulent transactions.  It is YOUR BANK bank that ends up being defrauded.  To re-iterate - this only applies if you act in good faith and not recklessly.

Disclaimer: This is the situation if your card is issued in Western Europe, US and Canada. Your liability in other jurisdictions may vary.


Using Cognito access token to pass claims I am working on migrating all our users from our DB to a managed service, and we're considering AWS Cognito.

We want to use Cognito for Authentication and Access Control.
For access control, we're thinking about putting the user claims in the access token which is possible using the pre-token generation lambda and using them in the resource servers

The thing is I am not sure that this is the "right way" to do it using OAuth 2.0 and OpenID Connect.

Are we doing it right? is there a better way?

Custom attributes are not available in Cognito access token. Currently it is not possible to inject additional claims in Access Token using Pre Token Generation Lambda Trigger as well. PreToken Generation Lambda Trigger allows you to customize identity token(Id Token) claims only.


How can I intercept video over a wireless network in real time? Can you sniff the packets or use a network analyzer or MITM or ARP spoofing to somehow be able to see the videos that someone else is watching on a network in real time?

Also: Can you somehow see when they stop and start the video?

If the connection is unencrypted then you can sniff the video and watch it, real time if you have the tools and have visibility of the connection (typically by being on the target's network, but not necessarily)

You won't necessarily know when they stop and start the video, as most video services buffer the stream (ie they download ahead of where you are watching)


Arduino-based attacks Besides BadUSB, are there any known or possible attacks involving Arduino devices?

Is it possible for Arduinos not using the ATMega 32u4 chip be used to infect PCs? Is it possible for an attacker who has been in possesion of an Arduino board to compromise it to infect a computer it is plugged into?

Basically, if a knowledgeable enough attacker somehow gets his hands on an Arduino which I at some point plug into my computer, BadUSB aside, should I have anything to worry about?

The problem you've identified is not specific to Arduino hardware.

It's a more fundamental issue: many reprogrammable USB devices can be programmed to identify as a USB HID keyboard/mouse, allowing them to control your computer when plugged in. Almost all Arduino boards fall into this category -- but many other devices do as well, including many that you wouldn't think of as reprogrammable.

(One exception is the Arduino Nano, which uses a FT232RL USB/serial chip which can only function as a serial interface. All other Arduino boards currently in production either use an ATmega32U4 directly, or use an ATmega8U2/16U2 as a serial interface.)

Don't plug USB devices into your computer which you don't trust.


"Please Enter Nth Character" without HSM This question has been asked a few times, but always in the format

  "How does examplewebsite.com implement their 'please enter xth yth and zth characters of your password' function?"

And the answer is typically assumed to be that they use an HSM capable of answering such a query with a pass/fail against the stored password.

It seems to me that there must be a sensible way of achieving this without using secure hardware. This might be an unlikely scenario, given that anyone who cares enough about security to implement such keylogger-mitigation will probably have the budget and expertise to use an HSM. But from an academic point of view, is there a good implementation?

A naive approach might be to store all 3 choose n combinations, where n is the password length, and choose is the mathematical combination function.

But storing these triplets is problematic;

No amount of salting is going to be able to defend the database given that the search space is so easily brute-forced.
A long password has a very large number of possible combinations leading to lookup and storage issues. We could limit the number to a fixed cap, but that starts to harm the password strength (in quite a complex way that depends on which triples you choose to store).
The indexes used to generate each triple also need to be stored, and both points above also apply.

This approach is poor, is there a better approach that would not require the use of an HSM?

Suppose that the question sent to the client can be about three characters: the server asks for (for instance) the 4th, 7th and 8th characters of the password.

Freeze time! At that exact point, the server has asked the question above, and will be able to verify an answer from the client. This means that in its complete state, there is enough information to tell whether a specific sequence of three character values is a correct answer or not. And it can tell that after investing a limited amount of CPU, say at most one second worth of computations on the server.

If that's software only, then the state can be recovered. We envision an attacker who hijacked the machine, so he can grab a full copy of the hard disk. At that point, the attacker has everything, so he can run an emulation of the server on his own machines. In particular, he can rewind the server to a known previous state.

Therefore, the attacker can now run an exhaustive search on the three character values, by trying and rewinding the emulated server.

This is unavoidable. Without dedicated uncloneable hardware (a HSM, namely), this kind of attack must work. This basically means that the password strength is that of a three-character password, i.e. nothing worth boasting about.


sqlmap: Test injection in Basic Authentication? I have been trying to make sqlmap test the username parameter in a fake login page that uses basic authentication. However I cannot make it test the Authentication header via the asterisk trick:

sqlmap --auth-type "BASIC" --auth-cred="*:pass" --level 5 --risk 3 --method POST -u http://fake_endpoint.local/ --proxy http://127.0.0.1:8080

I receive at the proxy only one login attempt with literally *:pass (b64: KjpwYXNz)

POST http://fake_endpoint.local/ HTTP/1.1
Content-Length: 0
Authorization: Basic KjpwYXNz
Cache-Control: no-cache
User-Agent: sqlmap/1.4.3#stable (http://sqlmap.org)
Referer: http://fake_endpoint.local/
Host: fake_endpoint.local
Accept: */*
Accept-Encoding: gzip, deflate
Content-Type: application/x-www-form-urlencoded; charset=utf-8
Connection: close

Any ideas if this is feasible through sqlmap?

Without looking at the code and just making assumptions based on your results, I think that the authorization features of sqlmap are just there to allow you to perform tests while authenticated. They are likely not intended for this type of use.

However, Authorization is just another HTTP header, and sqlmap does support testing arbitrary HTTP headers.

So you could do:

--headers="Authorization: <base64_encoded_credentials>"

Unfortunately, this does not solve the base64 encoding problem. I would likely solve this one of these ways:

Modify sqlmap to base64 encode the custom header field before making the request, or change it so your original method can be used as an injection point. The latter may be worth a pull request to the project, as others may use this feature.
Build a quick middleware proxy using something like Flask. You'd point sqlmap at the local HTTP server, which receives the request, modifies the headers as desired, and forwards it to the original destination. I've used this approach successfully before to use sqlmap against non-HTTP targets.


My IP address (with a NAS) is targeted by a hacker. What to do? Should I be worried? I've noticed, based on the logging of my NAS, that my IP address is targeted by a hacker. I already took action by automaticly ban the IP address permanently after five unsuccesful login attemps.

Unfortunately, the hack is being processed by using multiple different IP adresses, so to me this security attempt is not valid as it only works till the hacker runs out of IP addresses or when he gets the right username/password combination. Which sounds rather tricky to me, and I don't want to wait till one of these two events will happen.

I googled some of the IP adresses which are banned and they show up on several 'hacker' sites as hacker IP adresses. Should I do something and are my worries justified?

As for anything attached to public networks:

Reduce your attack surface - can you remove the NAS from the Internet? Can you limit the IPs that are allowed to connect?
Increase cost of attack - lockouts are great, but also make sure that you have a complex password and that you change it regularly
Monitor access - keep your eye on who successfully logs in
Treat the risks - have a plan for the event when someone actually breaks in. Can the NAS be used to access the rest of your network? Is there anything on it that would be a risk if it fell into the wrong hands? Do you have backups?


How can I protect a WordPress installation? How do you go about protecting a default WordPress installation?

What checklist do you use, best practices, tips and tricks, etc?

Any recommendations on plugins, third-party tools are welcome.

There is actually a really good guide to this on the wordpress website - Hardening WordPress.

However my personal short check list is

mod_security - @atdre already mentioned mod_security it is a very good step. However it does require a lot of tweaking of the core ruleset in order to allow wordpress to operate correctly. You will also most likely need to customise the ruleset depending on the plugins you use.
File Permissions - see here
Administration Over SSL - Use SSL for the Admin area see here.
Update - the most critical in my opinion keep wordpress up-to-date. By using the built tools, by patching manually or by using an update script (I wrote this one).


Is Orbot android TOR client compromised (permissions to device ID and caller information)? During today's apps update, ORBOT update asks for aditional permissions: a) photo/media/files, and b) Device ID and caller information.

(Android 5.0.1, current ORBOT (pre-update) 15.2.0-RC-8-multi)

Why would an app, with the main purpose of providing anonymity, actively request permission to access Device ID and caller information?

So far I did not allow it and wonder what is more dangerous, using an outdated version, or granting paradoxical permissions...?

Concrete questions:

Do others experience the same request (otherwise it would be a hint that my device is compromised)?
Does somebody have the chance to analyze file access and network traffic (if encryption allows - might never find out?) and test if and how ORBOT makes use of these permissions : (a) where it sends ID information, (b) what files it wants to read/write that have not been necessary for a long time?
Does somebody have an explanation why ORBOT would legitimately need these permissions? Or is there any information if ORBOT app is compromised, ...? Some other (general, not TOR-specific) causes are listed in Falco's answer here, but I cannot believe ORBOT's programmers (thanks!) would accept them (by mistake / lazy&incompetent coding / needed to get access to legitimate functions...)?

Thanks for helping!

Thanks for asking and caring. We understand users can be alarmed by new permissions request, and should have done a better job of explaining what they are for.

From here: https://twitter.com/guardianproject/status/873045668369055744

"Orbot asks for new permissions that are only used if you enable the Hidden Service features."

More details are coming. This only really effects you if you are on earlier versions of Android, that don't allow you to "deny" permissions when they are requested.


PDF file encrypted with my password, does that mean my password is stored in plaintext? Every month, I receive an encrypted Portable Document Format (PDF) file with my payslip.  I can open the file for reading with my password.  Without providing my password, I cannot open the file at all.

Does that mean whoever created the PDF file has access to my password in a recoverable format?  Or can they encrypt the PDF by using the hash or some other non-recoverable function or pair of my password, similar to how public/private key encryption works?

The format is PDF-1.4.

Note that, as I understand it, my question is different from this question.  The other question is about a PDF that can be opened with restrictions, such as restrictions to copy-paste or printing.  My question is about a PDF file that cannot be opened at all before decryption.  Secondly, the answers there do address that the security is weak, but do not answer my core question whether this encryption implies the creator of the PDF has access to a recoverable password (plaintext or encrypted).

Edit: I mean to ask whether it is stored on their system.  I do not mean to ask whether it is stored in the file.

Whether this encryption implies the creator of the PDF has access to the plaintext password?

In my opinion, the answer to your question is: They are storing your password in a recoverable format.

I'm assuming this is the scenario (because you were not clear about it): You have account on a website. You are generating a PDF document using the application. This document can be opened (Note: Password to open and not password to edit/copy/print) with the password of your account on the website. Is this correct?

Encrypting a PDF is done usually using RC4 or AES, a symmetric algorithm. Which means a key is generated which is used to encrypt and decrypt your PDF document.

Now this key has to be generated using your password and that key is used to encrypt the PDF. Only them would you be able to input your password and decrypt it.

Hope this answers your core question as to whether your application's password is being stored in a recoverable format.

Edit: Please refer the following additional documents:

PDF Reference for PDF-1.4 - Page 71 onwards
PDF Security
The undocumented algorithm

From these three links, this is what I've gathered:

PDF-1.4 uses RC4-128 bit keys for encryption.
Adobe's reference manual says that the algorithm used for generation of the key is undocumented.
The encryption key uses the user password (password to open), owner password (password to edit) and the permissions to generate the password.

Additionally from the information you have given, I do not think that the key is initially created and stored. Most applications use a plugin module to create PDFs which would generate the keys and encrypt on the go.

Thus, I think your password is stored in a recoverable format.


What's the purpose of a PGP transition statement? PGP key holders occasionally replace their old PGP master keys with newer PGP master keys (for example, to use securer algorithms).

When doing this, PGP key holders want their new key to be signed by the same people who signed the old key.

There's a few documents that describe how to do this:

Ubuntu Security Team's GPG Migration guide
RiseUp's OpenPGP Best Practice
dkg's PGP Migration guide

They each mention that, amongst other things:

(a) your old key should sign your new key
(b) write a transition statement, stating that you're moving from an old to a new key, and that you want your new key to be signed
(c) sign that transition statement

Isn't the act of signing another key that has the same UID/email address, sufficient to prove that all trust placed in the old key should be inherited by the new key? Therefore, shouldn't a PGP user who has signed my old key be willing to sign my new key?

That is: (a) is sufficient, (b) is perhaps useful (though could be replaced by other unauthenticated channels), and (c) is unnecessary.

(a) your old key should sign your new key

(b) write a transition statement, stating that you're moving from
    an old to a new key, and that you want your new key to be signed

(c) sign that transition statement

Isn't the act of signing another key that has the same UID/email
address, sufficient to prove that all trust placed in the old key
should be inherited by the new key?

No.  Signing the key only will only provide whatever trust metrics are determined by another user's trust policy once they import that key.

That is: (a) is sufficient, (b) is perhaps useful (though could be
replaced by other unauthenticated channels), and (c) is
unnecessary.

That won't achieve the aim once the information is received by other OpenPGP users and the effectiveness will vary entirely according to their own policies.  If you only sign your new key with your old key then the new key will only gain whatever trust values, usually at a somewhat reduced value flow on from that signing.  Those trust values, however, are not determined by you, they are determined by each user within their keyring.

An easy demonstration of this, of course, is to compare the trust value of your own secret key to anything else in the public keyring; yours should be "ultimate" and all the others will be less than that.  Chances are most of them will be "unknown" or otherwise not specified.

If you only sign your new key with the old one then there is essentially no difference between that and any other key you sign, such as following a key signing event.  The purpose of a transition statement is to explicitly confirm that the new key replaces the old key and that anyone who signed your old key should be able to use the statement to confirm the transition and sign the new key.  Which is not something they would do for any key you happened to sign that does not belong to you, regardless of UID conflicts (which may or may not always contain email addresses).

In order to provide the necessary assurance and relevant information to people to whom you are essentially sending a request to sign your new key, you really should provide all of the information.  I'd say "must" here, but I don't want to confuse people by using RFC-like terminology.

One thing that is normally recommended with transition statements which has not been included in your list above, however, is that (c) sign that transition statement ought to be dual-signing the transition statement.  That is, the transition statement document is signed by both the old key and the new key.

A few years ago I transitioned from my old key (0x371AC5BFA04AE313) to my current key (0x321E4E2373590E5D) and used this transition document) which you can see the whole process with.  If you import both my old and new keys and then verify the statement you'll see that the signature data contains two signatures rather than one, though with the same timestamp.  The transition statement contains all the necessary information to verify a key which would normally be verified in person or via some other trusted channel (i.e. usually at a key signing party or CryptoParty), the dual signature tells recipients that both keys remain under the same person's control and that they do not believe the old key has been compromised at the time the transition statement was made.

You'll also see that I nicked the majority of the wording of my transition document from DKG.  ;)


XSS and CSRF. One major difference So, there is "only" one difference between XSS and CSRF.

And that is that XSS forces a script to run (or forces an action to be taken by some means), while CSRF makes a HTTP request.

The script (action) in XSS can be blocked (by NoScript for example), but the HTTP request can't be blocked.

My question is, is this correct (Yes or No). If this is not correct, where is my mistake.

PS: is there any other option for XSS to trigger (what else could be the "action" to trigger an XSS), or is it specifically triggered by Javascript.

Thanks

Edit: This post can be deleted. Posed a more "correct" question on the below link where I got the answer I was looking for. Thanks for the help though :)

XSS and CSRF - basic difference

The main difference between XSS and CSRF is the perspective:

XSS: takes advantage of the trust the user has in a particular website
CSRF: takes advantage of the trust the website has for the user's browser

XSS has a dependency on javascript yes, but it is not limited to that scope. What I mean is that you need javascript for the payload, but payloads have been known be executed by not only JS itself, but also activeX, flash, VBScript and html to name a few. It all depends on what the site will allow users to change on the site itself. So noscript is a great way to stop higher level scripts from running  (think <script>attackmeplease()</script>) but depending on the site someone can get really clever inserting it into say flash media that the user allows to run because its a video sharing site (a crude example but you get the idea, social engineering plays a part).

CSRF has no such dependency on javascript and is designed to send a request to other websites without the users knowledge. It is highly dependent on the browsers ability to get and execute the attack package. Another difference is it can come in more forms such as HTML image tags, javascript image objects, word documents, movies, emails etc... The request itself cannot be blocked if the package is executed no, but the site can validate the request.

Some other differences are the requirements for instantiation, in one the user must visit a specific site, in the other they must use a tainted media that can come from a variety of sources, not just a site. The final point of failure is also different, in XSS the user is the last point of failure, while in CSRF the server is.

Another large difference is that a site that is vulnerable to XSS is almost certainly vulnerable to CSRF, while being protected from XSS even completely does not mean you are protected from CSRF.


Reflector - obfuscated code I run Reflector to de-compile some program and it seems to be obfuscated.

I got following output, it’s not very useful.

Any ideas how to decompile obfuscated code?

  [CompilerGenerated]
    get
    {
        // This item is obfuscated and can not be translated.
    }
    [CompilerGenerated]
    set
    {
        // This item is obfuscated and can not be translated.
        switch ((1 == 1))
        {
            case true:
                goto Label_0020;
        }
        goto Label_0018;
        if (((0 == 0) ? 0 : 1) != 0)
        {
        }
        this.eval_t = value;
    }

Technically speaking, decompiling obfuscated code is the same as decompiling non-obfuscated code. The way obfuscation in .NET works is by making it rediculously hard to follow the logic of the codepaths by routing the calls through randomly named types/methods/properties/etc in non-obvious ways. The whole point of obfuscation is to prevent people from decompiling code through the likes of Reflector and understanding how the internals of the code works.

There is no easy way to back out of the obfuscation. You are pretty much stuck with walking the code as-is.


Verifying client certificate by passing client cert in the header I'm implementing client certificate authentication. My server is behind a proxy to which I have no control of. And also I don't have any control over the client side communication. During every request, the client side sends an additional header containing the client cert.
From the client help doc,

If your server is behind an HTTPS proxy that does not convey client certificates, then the client identity could be placed in an additional HTTP header as BASE64-encoded CMS Detached Signature of the message.
Your server can validate the body with the detached signature with this header. If the validation is successful, your server can assume that the message came from the signer, whose certificate is stored in the signature.

I tried this and it worked fine.
I then set up burp proxy to the client, made the client to trust burp server certificate and captured one of client's request in burp. Then with repeater, I resend the request, and the request passed.
I'm a beginner, so I'm unsure whether this burp style capturing is an easy thing for any attacker. is it?
My doubt is "Is depending solely on this detached signature in the header a good idea to verify the authenticity of clients?" or should I go with the TLS handshake route by forwarding requests from the proxy to my server (but still I'm unsure if I could configure the proxy).

A client certificates at TLS level authenticates a TLS session while the CMS detached message signature you use only authenticates the specific message.
This means the signature is not a proof that the sender of the HTTP request owns the client certificate but only that the message inside the request was created by the client. It does not protect against somebody else taking this message and replaying it together with the signature.
HTTPS usually protects the transport against sniffing and modification, so normally a MITM can not grab the message and signature and replay it. Even with burp or similar the client would not to trust the certificate generated by the MITM, since the attacker cannot forward the original server certificate. With proper client configuration the client will not trust the MITM though.
But for example somebody at the server side could extract the message + signature and misuse it. So you should not trust a single signed message as proof that a connection was created by the client. You might probably do this though if you can make sure that the message was not replayed, for example because the content of the message contain some random data given by the server and reflected with signature by the client.


Theory X vs Theory Y in social engineering Theory X and Theory Y are two models of human motivation, often used when discussing people-management in business. In short, Theory X postulates people are lazy, will avoid work, and require incentives, whereas Theory Y postulates that people are ambitious, motivated and creative.

The consensus in general management is that Theory X is more counter-productive, and that Theory Y is a more accurate depiction of human behaviour. Do the same conclusions hold for social engineering?

I propose the following:

Theory X of social engineering is that people are likely to conform to your requests when presented with threats, scare tactics and authority. An example of this is the recent Microsoft call-centre scam.
Theory Y of social engineering is that people are likely to conform to your requests when presented with opportunities, positive reinforcement, and emotional appeals. An example of this is the Nigerian 419 scam.

Is there any evidence that one theory is more accurate than the other? Are there any papers that analyse the effectiveness of these tactics?

I'd say you're pushing Theory X and Theory Y too far away from their original position.  The original posit of the theories relates to a relationship between people and authority.  The people are in a system in which the manager has a significant degree of control over employment conditions and outcomes.

The social engineering concepts and strategies run counter to the idea that the social engineer has a position of direct authority over his victims.  Very much the opposite - the social engineer is getting something out of the victim that the social engineer has no right, authority or need to have.  Also, since the purpose is fraudulent, I'm not sure that you can make the same assumptions about self-motivation playing the same role in the relationship.  The comparison of Theory X vs. Y is typically selfishness vs. self-motivation.

In many cases, social engineering can probably work either way.  For example - I'd see Phishing working either way - in a Theory X situation, the victim might be motivated to respond to phishing queries because he wants to avoid punishment or reap monetary reward, in a Theory Y situation the victim might be working towards some shared goal that provides intrinsic motivation.  Either way, the social engineering side is that the victim doesn't know that the attacker's purposes run counter to the victim's best-interest so the nature of his motivation is not nearly so important.


What are some tips to defend against router exploits like the ones used from routersploit? I know there are ways to defend yourself against wireless attacks targeting routers such as changing default creds and implementing a firewall but are there any other techniques that'll increase your router's security?

Keep the firmware up-to-date, research the possible exploits before buying the router, do a port scan from inside and outside the LAN to see what is exposed on different interfaces, disable remote access to the admin pannel (or filter it by a static ip that you know only you or authorized people can send pakets through).
Lastly, do a security assesment on the software, most decent routers actually run a modified linux version, custom made for them, and you can get a root shell by soldering some pins on the serial console and connecting to them using a UART to usb adapter (finding the baud rate and the right pins might be tricky at first, but there are tools and tutorials out there), you can significantly increase the security of your router by disabling unwanted services, unwanted iptable rules and super admin accounts (funny story here, I have found such an account on a router deployed by the ISP, the super user account was so baked in that changing the password bricked the device and it was the only account that could login into SSH).
Keep in mind that most attacks will come from publicly available exploits, treat your router as if it were your PC or your production server.


Verify SAML Response is from a Trusted Source I'm in the process of making changes to my site so that we can be a SAML 2.0 Service Provider.  We will be doing IdP initiated SAML with Out-of-Band account federation.

My question is this:  Given a SAML response that is posted to the target page on my site, how do I verify that the response was generated by a trusted source?

I can validate the signature that is embedded in the response, but... couldn't anyone just sign an response and start posting it at my site, attempting to validate users?  I assume there is something in the signature that I can extract and match against a list of trusted Identity Providers?  But couldn't an attacker just spoof that?

The signature should validate against a key. You should have a corresponding key for any entity that you are exchanging data with. Unauthorized entities will not have keys, and the keyspace of any widely-accepted good cryptography protocol will make brute-forcing impossible.

From the wording of your question, I think you may wish to read up on the concept of digital signatures.


New files appearing on my web server (I did not create) I recently had a keylogger on my computer recording usernames and passwords including their respective web addresses. I have changed all my passwords however on my web hosting account, in the FTP, there are numerous copies of the same exact file. For example:

Original file: index.html

100+ new copies: index.html298fmla9g9dlandkf ... with random characters.

Should I be worried? They are clogging up space on my server and they're horribly tedious to delete. My server went from 3gbs taken to about 45gbs taken.

Yes, you should be worried.  Those are most likely chunks of a segmented file(s).  Your system appears to be being used by someone to distribute files.  Likely whoever had the keylogger got your server username and password from there.  You should definitely change all of your passwords and consider resinstalling the operating system on your local box from original media or at least restore a known uncompromised backup if you can tell when you got comproised.

You should also contact your hosting provider's security team and let them know what happened.  They may be able to assist you with clean up and ensure you get your account back under your control safely.

Good Luck.


Can you make a device certificate expire after the root certificate? I have created a CA root certificate and a device certificate to go on my device signed by the CA certificate.

My question is as follows:

Can you make the device certificate last for 30 years, and the root certificate only 20 years, but just create a new root certificate based on the same private key, which would last an additional 20 years?

Would this allow the same old device certificate to continue working with the new root certificate, or would it be rejected?

I appreciate this question might be a bit odd, and if its not clear let me know.

Thanks

Yes this is possible. The expiration of the issuer certificate is not part of the certificate itself. It is possible to renew the issuer CA and keep the issued certificate valid as long as the same key pair and subject and subject key identifier in the new issuer certificate gets used.

But note that creation or use of certificates with an expiration that much in the future is not recommended since this it is likely that the used keys sizes and/or algorithms are no longer safe enough after that long time.


Make signed file from content file and its detached signature? I have a text file which I will call filename.txt. Firstly I call

gpg --output filename.asc --clearsign filename.txt

Signed file filename.asc is created. Then I call

gpg --armor --output filename.sig --detach-sign filename.asc

Signature is extracted from signed file filename.asc and saved in filename.sig.

My question is if it is possible somehow to merge original unsigned file filename.txt and file with ASCII armored signature filename.sig to make signed file? I see no such functionality in GPG, but maybe I don't know something? Or maybe is it possible with others tools (Java processing or anything)?

Simply merging this files results with failed signature verification. In my use case I need to sign file, reply with signature file (without content), then I receive separate siganture and conent file. I need to merge it and encrypt. For now I am not using --detach switch and I just split signed file into two files and then I am simply merging them. But when I use --detach switch siganture changes and it doesn't work when I merge siganture file with content file. It could stay the way it is right now, but I want to extract siganture in standard way using --detach switch rather than just cutting signed file into pieces, but then I don't see an option to merge siganture exported with --detach switch

In general, you can not simply take a detached signature and combine it with the original data to create a clear-signed message, unless you normalize the input before creating the signature.

GnuPG will pack the original input text differently, depending on the type of operation (detached vs. clear-sign). RFC4880 section 7.1 makes note of this (http://tools.ietf.org/html/rfc4880#section-7.1).

  As with binary signatures on text documents, a cleartext signature is
    calculated on the text using canonical  line endings.  The
    line ending (i.e., the <CR><LF>) before the '-----BEGIN PGP
    SIGNATURE-----' line that terminates the signed text is not
    considered part of the signed text.

So, we must first normalize the line endings of the input text, then remove the final <CR><LF> from the end of the text.

Here is an example of how the original input data would need to be altered:

gpg --armor --output filename.txt.asc --detach-sign <(sed 's/$/\r/' filename.txt | head -c -2)

That will create the detached signature (filename.txt.asc) after first converting the line endings ('$') to a carriage-return ('\r'), and also remove the carriage-return + line-feed from the end of the text input.

Now you can build a clear-signed message from the signature (filename.txt.asc) and the original file (filename.txt), like so:

gpg --verify <(echo -e "-----BEGIN PGP SIGNED MESSAGE-----\nHash: SHA1\n\n$(cat filename.txt)\n$(cat filename.txt.asc)")

(you will have to replace the hash algorithm - SHA1 in my example - with whatever you are actually using)

Also, it should be noted -

  gpg --armor --output filename.sig --detach-sign filename.asc
  Signature is extracted from signed file filename.asc and saved in filename.sig.

This does not extract any signature -- it creates a new signature of the data within the file filename.asc (including the original signature), and saves it to filename.sig.  If you pass --clearsign instead of --detach-sign you will see what I mean.


In Hashcat, How to generate combinatior attacks consisting of more than two words (in lenght)? I am trying to make a combinator attack using just one dictionary:
word1
word2
word3
word4
word5
...

And would like to try all 4-words-length permutations separated by commas:
word1,word2,word3,word4
word1,word3,word4,word2
word2,word3,word6,word1
...

The 'princeprocessor' tool from hashcat-utils can get you most of the way there, but the separators make this a little tricky. You can also just do it with a shell script.
The best method I know of right now is 'combinatorX', which is matrix's enhancement of combinator from hashcat-utils that also understands custom separators. But it's only in source-code form right now - you'd need to download it and compile it yourself.
https://github.com/hashcat/hashcat-utils/pull/58
Usage: combinatorX [<options>]

Options:

  Argument   | Type        | Description                           | Option type | Example
  ----------------------------------------------------------------------------------------------
  --file1    | Path        | Set file1 path                        | required    | --file1 wordlist1.txt
  --file2    | Path        | Set file2 path                        | required    | --file2 wordlist2.txt
  --file3    | Path        | Set file3 path                        | optional    | --file3 wordlist3.txt
  --file4    | Path        | Set file4 path                        | optional    | --file4 wordlist4.txt

  --sepStart | Char/String | Set char/string at the beginning      | optional    | --sepStart '['
  --sep1     | Char/String | Set separator between file1 and file2 | optional    | --sep1 'a.'
  --sep2     | Char/String | Set separator between file2 and file3 | optional    | --sep2 'bc'
  --sep3     | Char/String | Set separator between file3 and file4 | optional    | --sep3 ',d'
  --sepEnd   | Char/String | Set char/string at the end            | optional    | --sepEnd ']'

  --skip     | Num         | Skip N segments                       | optional    | --skip 0
  --limit    | Num         | Exit after N segments                 | optional    | --limit 1

  --session  | String      | Set session name                      | optional    | --session testSession
  --restore  | String      | Restore by session name               | optional    | --restore testSession

Example:

input files: 1 2 3 4
$ cat 1 2 3 4 | xargs
one two three four
$ ./combinatorX.bin --file1 1 --file2 2 --file3 3 --file4 4 --sep1 ' . ' --sep2 ' + ' --sep3 ' @ ' --sepStart "['" --sepEnd ',*]'
['one . two + three @ four,*]

... and then just repeat your wordlist and separators for arguments:
$ combinatorX --file1 test.list --file2 test.list --file3 test.list --file4 test.list --sep1 ',' --sep2 ','  --sep3 ','
word1,word1,word1,word1
word1,word1,word1,word2
word1,word1,word1,word3
word1,word1,word1,word4
word1,word1,word1,word5
word1,word1,word2,word1
word1,word1,word2,word2
word1,word1,word2,word3
word1,word1,word2,word4
word1,word1,word2,word5
[...]

If you're working with a slow hash, just pipe the output to hashcat. If you're working with a fast hash, your GPUs might bottleneck unless you do something like create a rule to append all your fourth words (which should work fine unless your wordlist is more than a million elements long, etc).  Since the rules are applied on GPU, this can speed up performance considerably for fast hashes:
$ cat append-fourth-word.rule
$, $w $o $r $d $1
$, $w $o $r $d $2
$, $w $o $r $d $3
$, $w $o $r $d $4
$, $w $o $r $d $5
[...]


Is it possible to disable the fingerprint scanner but not the button it's on? I'm looking to get a new android phone, but many seem to have fingerprint scanners, often as part of the main button.

I don't want a fingerprint scanner, because I don't want to have to worry about the possible ("I hope they've done this right") security implications (where it's stored and if the memory is secured correctly, or whether it can read my fingerprint even when I've not set it up to...). Therefore I'm wondering if there's a way to prevent my fingerprint from being scanned even when I need to use that button (so the button still needs to work!). Would a piece of insulation tape that covers the button suffice? I've seen conflicting information about it, and none from any official source; I don't know where to start looking!

I don't know if how the scanner is implemented varies by phone, which might mean I need to make the question more specific.

I am surprised that this doesn't seem to have been asked already, but I couldn't find it ("fingerprint" is used in too many contexts!), so apologies if it is a duplicate or I'm in the wrong place!

First of all its a phone with a touchscreen. If you are worried about people stealing your fingerprint by far the easiest way to get it from a smartphone is to lift a print off of the physical device...

Insulation tape should be fine against capacitive sensors (most smartphone fingerprint sensors). If you want to be certain add a layer of copper (or strands of wiring) between the button and the tape (making sure not to leave a fingerprint on the underside of the copper). The sensor measures conductivity at various point. The tape should stop any signal from your finger passing through. Copper would give a differing conducting surface between the tape and reader to ensure all the sensor got was noise.


Can phishing site URL shorten into numbers? A suspected hacker was trying to get the user to input those numbers (2412958) in their address book. And user knows that the numbers are weird.

Can URLs be shortened in texts like that?

What you see is a SMS Short code.

Although IP address can be converted to decimal, the phone SMS application will not see it as an URL because "http" prefix is missing.

A smartphone SMS message box application usually does the following data highlights and link (parsing) for user conveniences.

URL with a http prefix. Let you click and open it from a browser
Phone number. Let you click and dial the number
Any number that looks like SMS short or long code. Let you click and open SMS compose box and use the code as the recipient.

Since every country SMS short code and long code length are vary, it is easier for developer simply parse a 5~8 digits number as short code. Although this is a bad idea when many services start sending Multi-factor authentication number to SMS.

A rogue SMS scammer can bait the user by asking them to reply to the short code with a blank response. When the gullible user response to it, the message will subscribe the user phone with a useless push message, which will charge the user $2~$10 from time to time (weekly/fortnight/month).  Such fraud/abuse is done using a method called Reverse SMS billing.


Is a VirtualBox Host-only Adapter safe? I have a VM in VirtualBox with two network adapters: a Host-only adapter and a NAT adapter; I was wondering if the VM gets compromised, is my Host-only adapter putting my host in danger?

--- reasoning:

Host-only to putty in
NAT for internet access

In general, yes this is a safe configuration.

The VirtualBox host only network appears as a network adapter on your host operating system. You should make sure the firewall rules are applied to that network. For example, on Windows you can do this from "Windows firewall with advanced security". The screenshot below shows that VirtualBox Host-Only Network, and confirms that it is firewalled.

There are still some risks. There may be vulnerabilities in VirtualBox that allow a malicious guest to compromise the host. If you have drive or clipboard sharing enabled, then these carry some risk too. But in general this configuration is fine.


Does biometric authentication in Android transfer any biometric data to the app? On my Android phone I use several apps that propose biometric authentication. If I enable it, can these applications read my fingerprint data and transfer it to the third party servers?

No. Biometrics never leave hardware-backed keystore (TEE). Apps use android Biometric API to authenticate the user. Biometric is verified by hardware-backed keystore which answers authentication result with success or failure to the API.
As it's a system API, apps implicitly trust the authentication result. To ensure that it's not a fraudulent TEE verifying the biometrics, you can verify the legitimacy of hardware-backed keystore using hardware-backed key attestation.
In app authentication usually protects apps' secrets that are stored inside TEE. Faking the API response by memory corruption will not expose the secrets as TEE doesn't release secrets until user authentication succeeds.


CNN Money Portfolio and Heartbleed Is/was CNN Money Portfolio ever vulnerable to heartbleed? It states 256 bit SSL bank level encryption on the website..

rule of thump:

if  open-source-server (e.g. apache, nginx, lighttpd et al)
AND if tls 1.2 is available
then the service was most probably affected by heartbleed


Best place to store authentication tokens client side When my users are authenticated they receive an authentication token, I need to use this authentication token to authorize some asp.net WebAPI calls. To do this I need to add the token to the head of that call, so I need the token accessible from the users browser. I think that storing the token in a cookie isn't the safest way, so what is the safest way to store that token and still accessible in my javascript to make API call's?

There are two ways you can save authentication information in the browser:

Cookies
HTML5 Web Storage

In each case, you have to trust that browsers are implemented correctly, and that Website A can't somehow access the authentication information for Website B. In that sense, both storage mechanisms are equally secure. Problems can arise in terms of how you use them though.
If you use cookies:

The browser will automatically send the authentication information with every request to the API. This can be convenient so long as you know it's happening.
You have to remember that CSRF is a thing, and deal with it.

If you use HTML5 Web Storage:

You have to write Javascript that manages exactly what authentication information is sent to the API.

A big practical difference people care about is that with cookies, you have to worry about CSRF. To handle CSRF properly, you need an additional "synchronizer token".
All-in-one web frameworks (like Grails, Rails, probably asp.net) usually provide an easy way to enable CSRF protection, and automatically add synchronizer token stuff in your UI. But if you're writing a UI using a client-side-only web framework (like AngularJS or BackboneJS), you're going to have to write some Javascript to manage the synchronizer token. So in that case you might as well just go with the HTML5 Web Storage approach and only worry about one token.


Does an url that redirecting infinitely have any impact to website? I am testing a bug bounty website, and found an endpoint like www.example.com/infinite. When open it, it keep doing 302 redirect to itself until browser stops it for redirecting too many times.

For example:
www.example.com/infinite ==> 302 - location: ?
www.example.com/infinite? ==> 302 - location: ?
www.example.com/infinite? ==> 302 - location: ?
15-20 times, browser stops it.

For example 2: with parameter
www.example.com/infinite?hello=all ==> 302 - location: ?hello=all
www.example.com/infinite?hello=all ==> 302 - location: ?hello=all
www.example.com/infinite?hello=all ==> 302 - location: ?hello=all
15-20 times, browser stops it.

Does this behavior have any impact to www.example.com, or is it just a friendly bug?

Not really.
The cost of a 302 Redirect should be negligible.
Moreover, most browsers detect an infinite loop at the second or third iteration (if no cookies are involved, then at the second). So you're getting double or triple load for that one endpoint; it's no great mischief.
If this is caused by a bug such as a wrong .htaccess rewrite rule, so that all your site behaves this way, then you do have a problem - your site is now unreachable - but usually, resource-wise, it means that a navigation made up of maybe five or more GETs will be broken into just two. SPAs and heavy-AJAX sites might be impacted more, but you'd need to get into edge cases for it to really be a significant problem.
Of course, this doesn't mean you don't have to fix it ;-) (not sure since I'm a complete and utter ignorant SEO-wise, but I don't think this can be good for your site ranking). By the same token, this situation might be indicative of below-average attention to the site's workings, and encourage some attacker - it's called the Broken Window effect.


Efficacy of Chrome incognito mode I am curious about the true efficacy of the browser private mode.

I did a bit of googling and stumbled upon the following page.

http://www.magnetforensics.com/how-does-chromes-incognito-mode-affect-digital-forensics/

Apparently someone with the Internet Evidence tool can scan my machine for traces of web browsing. It talks about something like ...fewer artifacts ever hitting the disk and ultimately going into unallocated space. and However, what Chrome’s incognito mode cannot control, just like Internet Explorer’s “InPrivate” mode, is what ends up in RAM and the pagefile.sys file (virtual RAM).

I don't know a lot about this security stuff. So I list my questions in below.

Does this mean that even in incognito mode Chrome will still have left traces like images, links of my browsing session on my machine?
If they talk about something about the RAM (in the link above) does that mean that the traces will be gone eventually, i.e. the traces are just transient?
I would also like to know if anyone with full access to my machine can obtain traces of my browsing history in the following situations.

Right after I have quitted the private session.
Right after (1) and rebooting my machine.
With (3) done and after using the machine for a certain period of time (like a few weeks).
With Chrome uninstalled.

Incognito mode temporarily stores the cache, once you close the window, everything's gone. According to that link, very fewer details go into the Virtual Memory. But you can clear up the pagefile.sys

To wipe the free space, use tools like Eraser or CCleaner.

If not using incognito, you can clean up browsing history and cookies, you can use programs like CCleaner.

To protect your identity, take a look at project Tor or you can set up a VPN or use proxy.


How am I able to use Input Director when one machine is VPN'd into work? So - I don't actually have a problem, but I'm really curious, because apparently VPN's don't work the way I thought they did.

It was my impression that when I VPN into my office, my computer is essentially isolated so that I can no longer connect to computers on my local physical network, and that instead, everything is tunneled to where I work, so that it's very similar to me just physically bringing my home computer to work and plugging it into the network there.

At home, I recently set up Input Director so when I bring my work laptop home, I can just place it next to my home PC, and I can use the same keyboard and mouse for both machines seamlessly.  I thought that when I enabled VPN on one of the two machines, ID would fail and would be unable to stay connected while the VPN session was active, but it works fine.  I even tried each computer separately, the slave and the master, and it still worked.

When I have my home desktop VPN'd in, I noticed I can still ping my laptop, but the laptop can no longer ping the home desktop once the VPN is turned on (using 192.168 addresses from ipconfig).  The laptop is normally on the work domain, the home desktop is not.

What is happening here?  Is this a configurable aspect of VPNs that varies from set up to set up?  Is this behavior a security problem?  What is it about VPNs that I don't understand that is making me confused?

A VPN doesn't necessarily make your machine isolated; you want a firewall for that.  A VPN just opens up a new way to access the Internet, either for some sites or for all sites.  It's up to the VPN software how it handles this.

If you want to ensure that your machine is not accessible to the outside world, then I suggest installing a firewall.


Does exposing a session ID create security risks? I'm looking to make a cross-domain + single app login, since you can't store cookies on other domains from one website, I'm using img tags with a href link to each website (eg: example.com/setsessionid?id=XXXX)

I have 2 security concerns:

When the img is created on the login, the link which includes the session id is revealed to the client. Is this a risk?
On the other domains the client can type the setsessionid link and enter their own session id (this seems like a huge risk, because they could randomly guess somebody elses session and hijack them)
IF either are a security risk, how could I solve it?

Notes:

I'm using this method
This is a single application which hosts for multiple domains.

Does exposing a session ID create a security risk?

Not necessarily. You're exposing session id's to the browser whenever you store a session id in a cookie. This is how sessions work - the browser needs to know the session id in order to send it back to the server. The question is how you're exposing your session id. If you're sending it in cookies, that's fine - everybody does that. It's a bigger risk if you're sending the session ID as an URL parameter in a GET request (like you do when you use your image solution), because the session ID can end up in various places which you didn't expect (proxy logs, server logs, browser history etc).

  I'm looking to make a cross-domain + single app login, since you can't store cookies on other domains from one website, I'm using img tags with a href link to each website (eg: example.com/setsessionid?id=XXXX)

There's another way to do it (look into how the OAuth protocol works) which involves some clever HTTP redirects and basically works like this:

Build your login page which does authentication. Have it accept a client identifier and a sufficiently long random nonce.
Each of your other domains redirect to that login page when a user wants to login, using their client id and a random nonce, which they must store.
The login service lets the user login, and when username and password are correct, it redirects back to a "successfully-logged-in"-url on the client domain. The login service knows where to redirect to because the client domain passed the client id, which you can use to look up where to redirect to. The login service sends a few parameters along, such as the user id of the user that logged in and the (unchanged) random nonce.
The "successfully logged in"-url back on the client domain must accept and check the random nonce that was originally sent. If the nonces don't match, it must not accept the request. Otherwise, it can assume the login service correctly authenticated the user and can create an authenticated session cookie for it's own domain.

Depending on whether or not you want to provide single sign on, the login service can set it's own authentication cookie so that when the second domain redirects to the login page, the cookie is sent along and the login service can redirect to the success url immediately without asking for username and password.

This is extensible - e.g. it also works when you decouple the login service from the rest of your system and move it to a cloud service in Honolulu. And once you've built it, you can use it to let any web application authenticate using your user database, no matter where it's hosted - just add a new client id and redirect url to your login service.

You can also make it more secure by having the login service talk with the client domain directly, for example to have the client domain authenticate itself to the login service (e.g. not through the user's browser, but server-to-server) in addition to passing the random nonce - in your case, this is really easy since the login service and all the other services are hosted on the same machine, so you can simply set some flags in the database backend or create a file in the filesystem.

Also note that the system I described is only secure if the login service is reachable over https, because otherwise a MITM can simply steal the random nonce and use it to authenticate himself. But obviously thats a smart thing to do anyway, because if you don't encrypt the login page, a MITM can also just read the username and password the user sends in the clear.


Is it feasible to leverage DOS by triggering large numbers of application exceptions? One key aspect of a DOS or DDOS seems to be to leverage the required computational power on the attackers side to maximize the impact on the target side. This wiki article lists many examples of such attacks.

So imagine a .Net website with a page that for whatever reason crashes on a standard GET-request. Resident .Net expert Jon Skeet went into the performance of .Net exceptions for a bit. His take away seems to be that during regular operation the performance impact is not worth bothering about, as the number of exceptions should be fairly small.

But what if this alway-crashing website was to be flooded with requests that would trigger exceptions on the server-side? Could that be a feasible attack that would need to be taken into account when testing a website for vulnerabilities?

Exceptions are very fast. Even if they do full traceback and making nice HTML out of it.

If you hit an exception because you supplied illegal argument, there may be not even single sql query made which would make it faster than regular request.

My websites always log exceptions into database, but that database is not part of live system, so slowing it down doesn't affect the performance of the whole system but only monitoring part of it.


Is it possible to guess cvv code from payment number and expiration dates? If I am not wrong, visa is easy to guess cvv right?

Let's say if I have 100,000 credit card numbers and expiration dates, it is possible to make daily 5 guesses.

All cards with 5 the same gateway/Api of payment and cards will not get blocked due to multiple attempts?

If yes, then it's possible to create like 10 APIs and check them with 50 cvv attempts daily.

So, in the end, we get all 100,000 cards' cvv codes in 20 days (50 guesses 000-001-002 daily)?

According to this article it is indeed somewhat possible.

Researchers at Newcastle University in the UK recently decided to see just how effectively the second caveat [that the payment processor mustn’t allow too many guesses at your CVV] was enforced, by trying to guess CVVs. [...]
If each website gives you five guesses, then with 200 simultaneous guesses on a range of different websites, you can get through 1000 guesses (200 × 5) in quick order without triggering a block on any of the sites.
And with 1000 guesses, you can cover all CCV possibilities from 000 to 999, stopping when you succeed.
Then you can go to a 201st site and order just about whatever you like, because you’ve “solved” the CVV without ever actually seeing the victim’s card.

The article goes on to mention that credit card fraud is far from uncommon and guessing the CVV isn't the easiest way of doing that, which I believe is likely to be true.
Worth noting is that some cards (like American Express) use a 4-digit code.


What information can my ISP see when I visit a website? For example, when I enter this URL: https://www.google.com/search?q=example or http://www.google.com/search?q=example I can see the word example that I was searching on Google.
Can the ISP see this URL and so maybe register it in their logs?

The ISP

can see GET and POST Parameters of websites that don't use SSL
can see DNS requests (-> which domains did you visit)

So in your example the ISP would not see the search request as GET Parameters are encrypted with SSL (ref).

Conclusion: the ISP would know THAT you searched on Google but it wouldn't know WHAT you searched for.


Does it matter which platform a file is scanned on for malware? Different operating systems use different file types and file systems. Does it make a difference to a virus scan which system it is being run on and what type of malware it's looking for? I ask because the way the files are archived may be different, for example Android's apk is in an archive so would a program like Windows Defender (running on Windows) know how to examine the contents?

In simple cases an AV wouldn't have a problem, for example an AV running on OS X and malware arriving as an .exe would raise a red flag but what about an infected RPM on Windows; Windows doesn't even know how to handle RPMs so would there be a point in scanning such files in hopes of not transferring it on to a Linux machine?

EDIT: I've seen some AVs with the option to scan inside archives, so this implies the AV would have to know how to correctly open the archive? Can viruses hide inside archives the AV doesn't know how to handle? If a archive is password protect (i.e. encrypted) than is there anything to AV can do?

Your question potentially applies to many different situations so it is difficult to answer it definitively. Ideally, you should make your question more specific.

As a general rule, file scan signatures target whatever the deployed package is. So, it does not matter whether it is an RPM or EXE or what. Whatever form the malware is deployed in, will be targeted for the scan.


Authy: Does multi-device mode imply that all keys are stored on their servers? My understanding is that if you use Authy, without backups/multi-device options, none of your account keys are stored on their servers. It all resides on your single device.

Ie,  even if Authy servers get hacked and all their data is compromised, and the attacker knows your gmail password, he will still not be able to access your gmail account because he doesn't know your "Google 2FA keys."

If you use the multi-device mode on Authy, is this still true?

Reading through their blog post (http://blog.authy.com/multi-device) and the functionality description, I suspect not. In order for your multiple devices to be synced with one another, their backend servers will need to know your gmail 2FA key, and redistribute it to all your devices as needed. This implies that if their servers get hacked and their data is compromised, your gmail account will be compromised as well.

Is my assumption accurate? If an attacker knows my gmail password, and is also able to hack into Authy's server/database, and I'm using the multi-device option, would the hacker then be able to access my gmail account?

At least in the latest versions of Authy's Android application authenticator tokens, such as your Gmail TOTP, are sent to api.authy.com only after being encrypted using an AES key derived from your backup password and a randomly generated salt using PBKDF2.

According to this source information sent from the API to your mobile phone has the following format:

 {
 "account_type": "gmail",
 "encrypted_seed": "UZNL+UPVK+5RYUoBlhkuQzCcOb3nMdYxKGFmHEZ4TMxTX7MOPJUayQAMDVJ",
 "name": "My Gmail Account",
 "original_name": "Google:someaccount@gmail.com",
 "salt": "N2QqyJrn7cOHBqTY32uY1cL4IHCANm",
 "unique_id": "0000000000"
 },

In other words, your Gmail TOTP secret seed should be safe with Authy even if they get compromised and the database is leaked.


Getting a PHISH/Zmate.omna detection by Avira when I refresh my page, but online website scanners are showing that the page is clean I'm getting a PHISH/Zmate.omna detection by Avira when I refresh my page, showing that it was put in the chrome cache. But I tried several online website/url scanners, and they are all showing that the page is clean.

Is it a false positive? Or do I need to use something else to detect it?

Checking the designate website will not help very much if it is a malvertisement(Malware advertisement) campaign coming from third party javascript inside the web page.

You should check the AV report to see whether it capture URL that download the phishing contents.  That will tell you which URL is really the culprits.


Strange attempts from Azure IP on our client data I had to put this case here as Microsoft's answer won't make sense.
What's been happening is that since early July this year, we've had this IP belonged to Microsoft's Azure infrastructure, 104.42.198.99, being flagged in Cloudflare firewall events due to its false user agents, IE6, used when trying to access our clients' sensitive data. I contacted Azure support and Microsoft Computer Emergency Response team relating to this IP and was told that the IP belongs to Azure infrastructure and it's a standard function of Windows Defender SmartScreen.

Found out this IP's in the blocked list in certain sites such as this one - https://www.abuseat.org/lookup.cgi

Although I blocked this IP address within the Cloudflare, an attempt to access our clients' data is still happening on a daily basis and I'm stuck on where to go from here to find out what's really going on. Some of the URL that this IP was trying to get to was restricted to our office network IP range adding more confusion.

Any help or point to a right direction would be very much appreciated.

Thanks.

Please contact this guy

If you need his name, register to https://censys.io/ and whois the ip.

This person is the one in charge (for abuse) of the following ASN: MICROSOFT-CORP-MSN-AS-BLOCK AS8068

The ip you stated seems to be pretty well known for misbehaving. Try to figure out if microsoft is not playing by the rules or if its an attack attempt performed by a tier.

And mention the fact that the IP have fallen into a sinkhole. Since recent botnet's CnC server(s) use Domain Generation Algorithm, mentioning CnC server past domain name wont be very relevant.