What is s3.amazonaws.com, and why is Chrome blocking it? Lately, whenever I click on a download link in Google Chrome, it redirects to another link starting with s3.amazonaws.com, which in turn gets blocked either by Chrome or by my Antivirus (Comodo Internet Security). Copying the same link into Firefox or(*) a download manager downloads the file normally.

I have tried resetting Chrome settings, disconnecting my Google account, removing all extensions, disabling all plugins, and performing a system scan, but the issue persists.

My question is: What exactly is s3.amazonaws.com? Is it malicious, or is Chrome mistrusting it? And how do I fix the issue?

Edit:

An example file that invokes such behavior is Pandoc msi setup from this page

(*) It no longer works with Firefox

s3.amazonaws.com is an endpoint for a cloud file storage product offered by Amazon Web Services (AWS) and is used by many websites and apps (albeit usually behind the scenes, but you can serve files from it directly too).

Seeing references to that domain is definitely not inherently malicious, however given that you can store just about any file in S3 there's no guarantee that it isn't being used to store some malicious files (among the overwhelmingly legitimate files). AWS credentials are a valuable target for hackers so it's possible the owner of the account has been compromised.

Chrome and Comodo may know that attributes such as the size, checksum, name, etc. of the file match that of known malware which is why they're blocking it (rather than necessarily because it's served from s3.amazonaws.com).

I'd recommend reporting it via the AWS abuse form or by emailing abuse@amazonaws.com. If it is malware then they'll most likely remove it and contact the account owner. AWS is usually extremely proactive about security issues.


Can a card issuing company store CVV number, expiry date and 16 digits card number? I have a limited amount plastic card issued by a certain company. When I log into my online account of the same company, I can see complete details - 16 digits card number, name, expiry date and CVV number visible there.

The login is protected via OTP as well.

My question is: can the card issuer store complete information about my card in their portal?

Yes.

A payment handler (e.g. Amazon, Netflix, Thames Water, Comcast) must not store CVV and must mask the PAN (card number), assuming that they are contractually bound to the Payment Card Industry Data Security Standard (PCI-DSS) by their bank.

The card issuer, however, has no such restrictions. They issued the card and they are ultimately responsible for storing its information safely. In all likelihood the card's funds will be protected by a mandatory insurance policy (either private or governmental), such as the Financial Services Compensation Scheme (FSCS) in the UK, and the bank will be liable for damages in the event of card fraud caused by their negligence.

Local law, however, may override this, though I am entirely unaware of any law governing the data security practices of financial institutes at this level of detail.


Force user to remove USB token I'm looking at setting up secure laptops using BitLocker with pre-boot PIN and startup key.

I'm wondering if there is a way to force the user, who is remote, to remove the USB with the startup key before they can log on or use Windows. Otherwise, what's to keep the user from just leaving the USB connected all the time, which would pretty much negate its value?

One way, of course, is to make it impractical for the user to leave the USB connected, like permanently attaching it to a large object. But that's also generally impractical and not a great solution.

Is there a solution or standard approach for this that can actually force the removal of the device?

You are trying to use a technical tool to solve a social problem. The answer is that cannot fit.

Techniques can provide great security when correctly used, but only user education can allow proper use. I often like the who is responsible for what question. That means that users should know that they will be accountable for anything that could be done with their credentials. It is not enough to prove that they did not do it, they shall prove that they correctly protected their credentials.

The physical analogy can also help. They would not let the key of a physical safe unattended. They should understand that when they are given reasonably secured credentials, they should see it as a physical key and use it the same. But as they are used to their own home computer with no security at all, education is hard and things are to be repeated. Unfortunately, I have never found a better way...


How is UAC a security improvement? What does User Account Control on Windows offer in terms of security? It's just an extra click to potentially run a virus.

Basically, there are two kinds of protection. First is user - such window prompt makes the user think about what he is doing and if this action was really intended. With UAC it is simpler to guide users in regards to what should be accepted and what must be restricted. Second protection is the system itself - even with administrator rights there are many limitations on running processes.

For those who want to delve into details, here is a link to the blog of renowned security expert Joanna Rutkowska: http://theinvisiblethings.blogspot.com/2007/02/running-vista-every-day.html. In this post she explains UAC and a vulnerability that was found back in 2007.


How to safely use a Key Derivation Function to secure private data - need guidance I have some secure data created in my client app which I wish to store on the server as backup for the user.

The user already has a password to authenticate with the server. The password is never sent to the server (I use SRP6 to authenticate the user).

So here is my thinking...

Use Fortuna PRNG with multiple event inputs (mouse, keyboard etc) to generate a salt.
Use salt and password as inputs to either Scrypt or PBKDF2+SHA512 with 40,000+ iterations to generate a 512-bit key.
Use the first 256 bits of the key to encrypt the private data using AES-256-CBC with random IV.
Send the ciphertext and salt to the server.
Show the user the KDF iteration count as a number they need to memorize. We will ask for it when we need to decrypt the data client-side later on.

So my question is...is this secure enough? Initially I was going to store the iteration count server-side too but felt that an attacker who gained access to the server might then be able to easily brute force the key. Then again, whether users will be able to remember a password and a number is another question.

"Is this secure enough?"  This depends on who you're defending against.

In theory, it looks like it'll stand up to non-TLA attackers reasonably well, although decrypting might be a bit tricky, as you don't seem to be storing the encryption IV anywhere.

In practice, it's got a major security hole.  No real-world user is going to memorize the KDF iteration count.  It'll get written down somewhere, and since the user is writing it down, they'll probably put their username and password right next to it.


Is it safe to rely on UUIDs for privacy? I'm uploading files on S3, where the filename is a UUID. All files uploaded are publicly read/write, however these files are considered private to users.

Is it possible for someone to guess a UUID, or randomly try a bunch of combinations to access some of these files?

Is there a better way to secure S3 files?

UUIDs generated following RFC 4122 come in several “versions”; in a UUID of the form xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx (in hexadecimal), then:

If 8 ≤ N ≤ b and M=1 or M=2 then the UUID identifies the machine that generated it and the time it was generated.
If 8 ≤ N ≤ b and M=3 or M=5 then the UUID is generated deterministically using a cryptographic hash function.
If 8 ≤ N ≤ b and M=4 then the UUID is random (with 6 fixed bits and 122 random bits).

If the UUID doesn't meet any of these constraints, it wasn't generated according to RFC 4122. But even if the constraints are met, this doesn't guarantee than the RFC was followed, or that the random generator was a good one.

I don't know what S3 does for UUIDs.

Even if the UUIDs are properly random, which would make the URL unguessable, protecting access to a resource with only a URL is a bad idea. URLs tend to leak in many ways: shared in emails or chat, lying around in browser histories and bookmark lists, accidentally copied around, or worse, left as a link in a page that the author meant to keep private but that had no authentication and got indexed by Google.

If you want to protect access to a resource on the web, do not rely on the URL being kept secret. Add an authentication mechanism. Even plain old password authentication is a huge improvement on an unguessable URL — browsers and even people know that they shouldn't be sharing passwords around, whereas URLs are normally public knowledge.


Is Heap Spraying only valid for browser applications? Since heap spraying takes advantage of javascript's predictability in allocating heap chunks, does this mean that heap spraying only works for browser applications and not other usual applications?

No, heap spray can be used for any exploit that needs heap data to be aligned a certain way. Example include the ExternalBlue exploit that targets SMB. It heaps sprays a bunch of SMB objects to align the memory, so that the right objects get corrupted.


Safely encrypting data received through HTTPS I am receiving sensitive data over an HTTPS connection and need to store this on disk, encrypted so no one can tamper with it, but for reading later on. Each user in the system has a password.

The application needs to store the information received through HTTPS in case that no internet connection is available. One-time sync and then reading a file that contains the most important information. Of course, an automatic sync will take place when a connection can be made. The information is needed to ensure the user has permission to do certain actions, and so the user shouldn't be able to tamper with the file himself.

What is the best way to go about this?

1) Topics like this, this and this suggest using a password and something like PBKDF2 to generate a key, which can be used to encrypt the key that encrypts the data. Am I right in understanding this?

2) If so, should the key that encrypts the data also be derived from the user password? To me this sounds shady, to say the least.

3) I don't know enough about disassembly, but I'm afraid of the possibility that an adversary can hijack the binary, and tamper with the HTTPS-received data, before it will be encrypted. Is this a substantial risk? Should encryption be done on the server and if so, how does this change the protocol?

The product runs on OSX, Windows and possibly Linux in the future.

Let me make sure I understand. Your user will run a local application that is capable of decrypting your encrypted file and of storing it (or parts of it) in memory in a readable format.

Your adversary is the user; the user is assumed to want to hijack those permissions stored in the encrypted file. I also assume the user is root on that machine so she can inspect your client process.

On Linux, your user can run the process in such a way that a debugger can be attached to it. The user can then run your app and add a breakpoint on e.g. the open() system call, and start inspecting instructions one by one when your encrypted file is opened by your app, all the way to the moment it is ready. Then simple prints can let the user read the content of the variable containing the information they want. No assembler programming skills needed.

The problem is that you are relying on code run by your adversary to enforce permissions, and to keep a secret. This problem is impossible to solve (in practice; in academia, you can trust certain simple programs to perform certain actions on a rogue OS provided you trust the hardware to not be tampered with, see the Haven paper in OSDI 14).

What are the consequences of an attack? What capabilities does the user obtain if granting herself all the permissions this file contains? Are these capabilities influencing (1) local data, (2) your own server?

the user can already do what she wants with her local data on her
local machine
do permission checks on the server side, and only grant new permissions on the server side


See communication in WiFi with known password I know the password to a certain router which uses WPA2-PSK-CCMP + WPS + ESS, is it possible to watch the communication between devices and the router unencrypted assuming I know the password to the router?

I tried to sniff traffic in monitor mode and for some reason I didn't see a key transferred (which means I cannot crack the communication). Is there something I'm missing?

If you can break it, how is it possible? If not, why?

You need the handshake packages captured. You can force a client to re-authenticate again with a lot of tools so you will instantly get this.

Then you just need a tool that can decrypt WPA and give the key to this tool.

Wireshark is an example for such a tool:


what make a TEE secure? A TEE implementation such developed in ARM trustzone OS is a carved out partition isolated from the main OS.

What makes such a TEE secure?
Is it the fact that the TEE is accessible only through a small controlled aperture to the processes running in main OS provides?

If somebody runs a full blown OS such as linux kernel as TEE OS, will it become insecure since that linux kernel has large codebase and hence more potential vulnerabilities?

TEE is secure mainly because of the key store is placed directly on the CPU and access to it is limited to security functions of the CPU (SoC). Also, the memory is spitted in between secure and non-secure world. Additionally, the trusted boot is ensured which makes impossible to run another than trusted code on the CPU (SoC). And as you correctly stated, there are various isolation zones making sure the running code can't be hacked somehow.

As far as I know the linux kernel does not support trust zone fully. Also, you would need some trust friendly kernel loader. It would be hard to get it work I would say.


How vulnerable is IPSec HMAC-SHA1 There are a few references out there that say HMAC-SHA2 must be used over HMAC-SHA1.

If I am using an IPsec link with HMAC-SHA1, how vulnerable is it to being intercepted and cracked?

For preventing interception and reading of the secret content, encryption algorithms like AES are used. HMACs do not matter at all for this part.

Assuming AES (CBC etc.) is secure, an attacker could still intercept what you're sending or receiving, but he can't read it. What he could do, however, is to change the data to something else. Again assuming AES is secure, there is no way for the attacker to give you some data that, when decrypted, is something meaningful, but it's still a problem, because automatically detecting that you got garbage is not always possible.

That's the purpose of HMAC (with either hash algorithm) in IpSec: It makes it possible to check if the content has been altered during transmission.

While raw SHA1 is not as secure as it was thought to be, the known problems don't apply to HMACs with SHA1. Essentially, the risk comes down to the possibility of an attacker guessing the right key or hash for a message, to make you believe a wrong message with garbage content is the real one (and nothing more):

For SHA1 in IpSec, it's either 2^160 possible values that the key can have (if the attacker has the key, he can generate HMACs for all received messages, ie. give you as much garbage as he wants), or 2^96 possible values for the hash itself (if the attacker manages to get that, just one block can be changed). While it could be better, it's not that bad, especially because it's very unlikely to find the right value before the transmission ends.
For SHA256, the corresponding values are 2^256 and 2^128.

(Also see RFCs 6071, 2404, 4868)


Secure sensitive data but still allow admin access I need to store some sensitive user data in an SQL database and am looking into how to best secure it. From what I've read here, the obvious way to do this would be to encrypt the data using the user's password. But I still need the Administrator to be able to access and potentially modify this data which would not be possible with this method. Is there anything else I can do or do I have to resort to storing everything in plain text?

What would be the best way to secure user data from attackers while still allowing the admin to access it?

i am not a pro but im working on a problem like this and i think you can use encryption with RSA and use a public key to encrypt data and then save it on database and when admin wants to read data , with a private key start to decrypt with a safe private key. and you may do this on top of hashing data with strong salts. obviousley you should keep private keys in a safe place.


"Unusual activity" on multiple Microsoft accounts As MSDN subscribers all members of our development team need to have a Microsoft account. Since September 2016 these Microsoft accounts get disabled, temporarily or permanently, with no explanation from Microsoft.
For some of us the accounts were enabled back after confirming our identity using our mobile phones.
For these accounts, the activity page shows multiple successful logins from a location in Amsterdam.
The first time it happened to me I've quickly generated a really long password using KeePass and, for a while, the "Amsterdam logins" went away.
Yesterday I've seen again one of these logins and one of my coworkers had again to prove his identity to get back access to his Microsoft account.
Are these "unusual activity" real logins or is there an error in the Microsoft systems?
Can somebody crack a KeePass generated password with 245 bits (64 chars long)?
Where should we start investigating this situation which is greatly affecting our productivity?
[EDIT] I've managed to match one of the IP addresses to the owner.
See WhoIs information below:
WhoIs IP 40.68.25.96

NetRange:       40.64.0.0 - 40.71.255.255
CIDR:           40.64.0.0/13
NetName:        MSFT
NetHandle:      NET-40-64-0-0-1
Parent:         NET40 (NET-40-0-0-0-0)
NetType:        Direct Assignment
OriginAS:
Organization:   Microsoft Corporation (MSFT)
RegDate:        2015-02-23
Updated:        2015-05-27
Ref:            https://whois.arin.net/rest/net/NET-40-64-0-0-1

OrgName:        Microsoft Corporation
OrgId:          MSFT
Address:        One Microsoft Way
City:           Redmond
StateProv:      WA
PostalCode:     98052
Country:        US
RegDate:        1998-07-09
Updated:        2017-01-28
Comment:        To report suspected security issues specific to traffic emanating from Microsoft online services, including the distribution of malicious content or other illicit or illegal material through a Microsoft online service, please submit reports to:
Comment:        * https://cert.microsoft.com.
Comment:
Comment:        For SPAM and other abuse issues, such as Microsoft Accounts, please contact:
Comment:        * email@microsoft.com.
Comment:
Comment:        To report security vulnerabilities in Microsoft products and services, please contact:
Comment:        * email@microsoft.com.
Comment:
Comment:        For legal and law enforcement-related requests, please contact:
Comment:        * email@microsoft.com
Comment:
Comment:        For routing, peering or DNS issues, please
Comment:        contact:
Comment:        * email@microsoft.com
Ref:            https://whois.arin.net/rest/org/MSFT

OrgAbuseHandle: MAC74-ARIN
OrgAbuseName:   Microsoft Abuse Contact
OrgAbusePhone:  +1-425-882-8080
OrgAbuseEmail:  email@microsoft.com
OrgAbuseRef:    https://whois.arin.net/rest/poc/MAC74-ARIN

OrgTechHandle: MRPD-ARIN
OrgTechName:   Microsoft Routing, Peering, and DNS
OrgTechPhone:  +1-425-882-8080
OrgTechEmail:  email@microsoft.com
OrgTechRef:    https://whois.arin.net/rest/poc/MRPD-ARIN

Now, what do I understand from that: is Microsoft having a communication issue between its departments or is Microsoft having a security issue and somebody is abusing their network or is somebody using Azure to crack Microsoft accounts?

[EDIT] I've changed again the password on my account and enabled two-factor authentication. I haven't seen unusual activity for the last 5 days. Maybe this will help other people as well.

Most likely the attacker is not cracking the password itself, but probably getting it through other vectors. Some recommendations:

Check if the "password recovery" email was not changed
Check if the "Security Questions" were not changed
Check your profile and security settings, see if you see something changed
Run a full anti-virus scan to ensure you don't have malware on your laptop
Perform network checks (such as running netstat on your laptop or check firewall logs) to see if someone is exfiltrating data from your laptop
Enable two-factor authentication on your Microsoft account, that will most likely stop the attack.


Is there such a thing as MySQL connection flooding? I'm a developer for a small website. There are 3 webservers (for load balancing) and a MySQL server.

Today the webservers seem to be down, and, unfortunately, I cannot get hold of the admin (he's in a different timezone, probably asleep). But I do have some elevated priviledges, so I can connect as a full-permission administrator to the MySQL server via PHPMyAdmin (which is running locally on the MySQL server).

Over there I see something odd in the SHOW PROCESSLIST results. There are over 500 connections from "unauthenticated user" with the command "Connect". These connections are coming from two of the three webservers that we have (I think). Basically they're trying to connect, but not really connecting.

It's been like this for about 5 hours now. The MySQL server is happy with this and isn't even slowing down, which makes me wonder if this is an attack at all. Besides - if the attacker had control of the server, he could just find the relevant passwords in the PHP source code files.

So - is this an attack and is there something I can do about it until the admin arrives? (I do not have server root, just MySQL admin priviledges)

Update: I had written the username incorrectly. It's not "anonymous user", it's "unauthenticated user".

Update 2: OK, the admin just awoke. Thank you for your help!

MySQL includes an anonymous user account that allows anyone to connect into the MySQL server without having a user account. This is meant only for testing, and should be removed before the database server is put into a production environment.

If configured correctly, the MySQL server shouldn't even be reachable by IP's other than the web front-ends (aside: if it's a small site, why do you need so many servers?).

This is more likely to be a configuration/code issue than a security issue. In any case, my advice would be to try to gather and document as much information (

What makes you think the connections are from the web front ends?
Which databases is the user accessing?
What queries are running?
Which IP are the connections coming from?

) as you can about what's going on with the system, and continue trying to wake your admin.


Can I use more than one encryption program to encrypt my computer files or will it cause conflicts? I encrypted my Ubuntu Linux Operating System in the installation process using the default encryption in Ubuntu if my computer is encrypted with one program can it be encryption with another at the same time or will that cost errors?

If you mean the filesystem is encrypted, this provides protection when your computer is off or logged out, as an attacker would need to decrypt to gain access to files.

It does not provide protection once the machine is logged in to your account - as the decryption happens as part of normal usage, so if you have files you wish to protect from attack on the system when it is logged in, encrypting them is a good idea. This type of attack could be shoulder surfing, where someone gets your password by watching you type it.

Every layer of encryption will add to the time it takes to access the files, so you need to look at your threat model and requirements.


What expectation of privacy is there with US-based vendors with the LavaBit and SilentCircle shutdown? Lavabit hosts a secure messaging service that was recently shut down.  Likewise SilentCircle has preemptively done the same thing with their email-based service.

It seems that the justification for these actions is to prevent the US government from sending  subpoenas, warrants, security letters regarding this service.

Why is email the only aspect most vendors are concerned about?  Other equal methods of communication exist (Encrypted phone, sms, ftp etc) but SilentCircle doesn't appear to be concerned with shutting them down under the same premise.
Is any certificate vendor, like Verisign, that issues S/MIME certificates susceptible to government subpoena?  What about non US companies or private issuances of S/MIME?
What expectation of privacy should I have when doing business with any US vendor? Is there any expectation of privacy?  Does my citizen status matter, or does it matter if I'm in the US or not?
Are there any known aspects of this that overlap (or explicitly don't overlap) with the PRISM NSA surveillance program?

From what information is out there, it seems like the most likely scenario was that the US Government wanted these companies to install back-door technology into their systems and give the government agencies access to all the information that flows through them; these companies would be ordered to not disclose the backdoor nor the government's involvement.

This appears to have happened back in 2007 with Hushmail. Faced with such an order, the company's only option is to either quietly comply or cease to exist. Note that Hushmail is a Canadian company, but it was nonetheless forced to comply with the US order.

Why is email the only aspect most vendors are concerned about?

Here's what Silent Circle said:

  There are far too many leaks of information and metadata intrinsically in the email protocols themselves. Email as we know it with SMTP, POP3, and IMAP cannot be secure.... And yet, many people wanted it.... However, we have reconsidered this position. We've been thinking about this for some time, whether it was a good idea at all. Yesterday, another secure email provider, Lavabit, shut down their system less they "be complicit in crimes against the American people." We see the writing on the wall, and we have decided that it is best for us to shut down Silent Mail. We have not received subpoenas, warrants, security letters, or anything else by any government, and this is why we are acting now.

In other words, they didn't think offering the illusion of secure email was particularly useful in the first place because significant data leakage is inevitable in the associated protocols.

But more importantly, once you receive a government order, you no longer have any choice. At that point it becomes too late to stop offering your email service as the order will prohibit you from doing so. At that point, you you must continue to offer your service and pretend that it hasn't been compromised. Otherwise you have to cease all operations altogether.

Silent Circle is hoping that by closing down their email service, they'll be less of a target for spying agencies and will avoid being ordered to compromise their services.

Is any certificate vendor, like Verisign, that issues S/MIME certificates susceptible to government subpoena?

Yes.

What about non US companies?

In many cases, yes. There are a few nations where a US order can't be enforced, though these probably will have their own governmental interference to contend with.

What expectation of privacy should I have when doing business with any US vendor?

Not much. Though to be fair, other governments do similar things as well.  Which means realistically, you have no expectation of privacy that you cannot actually prove yourself.

Does my citizen status matter, or does it matter if I'm in the US or not?

The NSA explicitly asserts that all communication anywhere in the world that involves at least one non-US citizen is theirs to collect without cause. They also state that information that they can't prove involves only US citizens will also be collected just in case. The NSA and FBI also have largely unlimited power to force US residents to comply with nearly any surveillance order if they can get a sign-off from a court. That power largely extends to any other nation with which they have a legal assistance treaty, which covers a lot of ground.


Implement RBAC for my application I'm beginning to work on a new web app for which I require implementing Role-Based Access Control.

I've identified three Roles for my application which will be Role 1, Role 2 and an Role 3. Each user will be in one of these groups or can be in multiple groups as well.

Going down further, each role has 2 functionalities associated with them, say (D1, D2), (T1, T2) and (A1, A2) respectively.

Implementing access control up to this point seems fairly straightforward to me.

However, there are further drill downs for each role based on say geographical locations and another category called Accounts(S1, S2 and S3). For example, a Role 1 user will be having access to D1 and D2 but he should have access to only North America data and Accounts S1 and S2 but not S3.

This is the place where I'm at an impasse. I'm not able to put these sub-categories in my access control permissions because the permutations would be huge.

Any suggestions to implement this would be of great help.

I can suggest the following options based on provided information:

Define data domain (North America, Europe, etc.) according to your criteria and grant roles within that domain only.
E.g., grant Role 1 within data domain A or account S1.
Simple enough, but depends on your data structure.
Add additional conditions in ABAC style, i.e. grant or deny access to specific role if case some conditions are true (e.g., if user allowed Regions = current resource Region)
This approach adds complexity to the solution and its security matrix, but ABAC policies are very powerful and can cover variety of cases.


Someone else on my computer at the sametime? What should I do if I feel that someone else is accessing my computer at the sametime I am using it?  I think about this almost always no matter which carrier I use, or even try a different computer. The computer seems so slow in processing any request whether already downloaded or a new search, accessing my email account or accessing an email sent.  Last night while researching on Google, suddenly the usually slow computer search began going to all these different sites without use of the keyboard.  I just sat back and waited.  I am sick of this.  What can I do?  I am not computer literate at all. Thank-you.

Actually there are a lot of way for secure your computer.
First of all install antivirus and firewall programs to your computer.
Learn TCP/IP protocol.When you learn this protocol you can control your network easily.If you feel that someone else is accessing your computer , you can control connections

When you type

netstat -n or netstat -ano

on the cmd.exe .You can see all active connections.If there is suspicious connection you can block this port on firewall.
Also you can type

netstat -b

on the cmd.exe .You can see active ports that used by programs.If there is suspicious program you can block this program on firewall.

When you use your computer for online banking or other important functions, you can use on-screen keyboard.

On the other hand, learn physical security.There are some hardware keyloggers for record keystroke.Check cables on your computer , if you are using desktop computer.


Weird issue with Firewall blocking NATed packets From my SIEM I am seeing that a (we don't own the FW) Cisco ASA is blocking packets destined for the internal network (post NAT), here's what I'm seeing (IP addresses are faked due to security)

170.100.1.1 External Host (A)

Firewall

192.168.1.1 Internal Host (A) | |
192.168.1.2 Internal Host (B) | |
192.168.1.3 Internal Host (C)

Example of the SIEM report/Firewall deny

"Deny udp src outside:170.100.1.1/3478 dst inside:(any of the internal hosts)/5219 by access-group "outside_access_in""

We're in a bit of a pickle due to us not owning the FW, nor are we able to see the logs, so I can't see the specific rule nor can I see the specific packets

How can the external source know the private address of the internal hosts if it hasn't already been in contact with the hosts i.e. why would the Firewall randomly block the packets?

The ports are completely random, all empheral and none within the assigned port ranges.

I need some help please!!!

The firewall isn't randomly denying the packets, and it is very unlikely that they are being dropped because of a bug. In all likelihood the packets are being dropped because that is what the policy says for the firewall to do. Port 3478 is STUN, a protocol used by UDP for NAT traversal. There are some possibilities:

The traffic is authentic, and the traffic back is being incorrectly blocked by firewall rules. In this case the FW admin would need to fix the rules blocking the traffic
The traffic is authentic, and being blocked for good reasons, in which case you need to do nothing
The traffic is an attack. It could be an external party attempting to access your internal network by using crafted STUN packets. In this case the firewall is working perfectly by blocking it and the SIEM working perfectly by notifying you of the attack, in which case be happy - that's why you buy an SIEM

Which of these it is depends on whether any of your systems has attempted to connect to external host A using STUN. It so happens that you, or someone you work with, has access to internal hosts A, B, and C. Ask them to check whether those systems are attempting to connect to external host A. It also is probable that your organization pays for an outsourcer to manage your firewalls, and if so call them up and discuss the entries with them.


Can I use an old version of IIS and still be secure? I've a site and it's using IIS 8.5

Can I be secure?

IIS 8.5 is secure or it can be hacked easily?

When should I update IIS and when shouldn't I?

According to wikipedia IIS 8.5 is included in Windows 8.1 and Windows Server 2012 R2 and both systems are still supported for some time. This way IIS 8.5 also receives updates and if you always update the server by itself will probably be secure enough until the end of support.

But, the main attack vector is usually not the web server itself (i.e. IIS) but the web application served by the web server or the database used by this web application. Thus if you run some insecure CMS (i.e. Wordpress without latest updates) or other insecure web application on your system it does not matter if IIS by itself is secure since it will not protect the insecure web application.


How much programming knowledge do I need to enter the security field? I'm still young (16 years old) and I haven't entered the security field yet. I'm curious how much programming I need to enter the security field.

I can write real-life programs in Python. I can also understand programs written in different languages (Java, C/C++ C# every language that is C based). I can also write programs in C, but I still I haven't written a real-life program.

I have watched videos posted by Open Security Training about assembly to intermediate level, so I understand assembly also.

Would I be able to join the security industry or I should continue learning how to program?

It largely depends what you want to do in the field  of information security. We can devide infosec into two parts:

soft security
technical security

Soft security is less technical and requires you to understand the concepts of information systems but does not require you to be an ace in them. It's mostly compliance, IT Security strategy, management and policy making.

With technical security you dive a little bit deeper into the rabbit hole. There are two different parts, the defensive part which is firewalling, IPS, IDS, incident response, forensics,... and an offensive part which is more related to Attack & Penetration testing (for which you do require some programming skills).

My 2c To be honest,  if you are already writing basic code at 16 years old, especially in different languages, then that is very good. You will progress quite well. Do note that for most parts you will need to have knowledge about other parts of computer science. Most of this is covered by either College or University Computer Science programs. They cover introduction to operating systems, networks, cryptography, programming,... So I would say, keep at it, broaden your knowledge and learn. You're on the right track :)

If you haven't written a decent program, write one. Start with something simple like a game of hangman and progress further to some more complex things. Don't be afraid of making mistakes, because you learn the most from them.


Apple vs DOJ - how strong is the 10-try wipe brute force barrier? Out of curiosity and with the hope of helping other beginners and journalists.

The current Apple vs DOJ standoff in a nutshell - Apple is resisting DOJ with statements like what they're asking is "something too dangerous to create". A summary with a quote from The Washington Post:

  The order does not ask Apple to break the phone’s encryption, but rather to disable the feature that wipes the data on the phone after 10 incorrect tries at entering a password. That way, the government can try to crack the password using “brute-force”.

Binaries of such iphone os with the brute-force features disabled would enable anyone in possession of said binaries to just flash any iphone in their possession which opens it to brute-force attacks.

Now assuming this brute-force protection acts as a compensation for weak passwords (if the game really is over after 10 tries, the bar is set pretty low)

How feasible would be the following crude attempt:

Cloning the phone data
Running the cloned image(s) in an emulator / Virtual Machine
Cluster runs online attacks on a bunch of VMs.

The issue preventing virtualization, as stated in the apple iphone security whitepaper I assume is all the ties to hardwareIDs, the extraction of which is "complicated and expensive"?

Am I correct in assuming successful extraction of hardware IDs would at the same time open new avenues of (offline) attacks?

How solid (read: future-proof) is security of this design, will the extraction of hardwareIDs always be deemed "too complicated and expensive"?

Edit 2: See this question for discussions based on more accurate and up-to-date info.

Edit: See also this question which has loads of discussion on this already with quotes from the actual request.

I think the problem might be more complicated than what can be solved by a simple clone. Recent iDevices comes with a security enclave which is an isolated security processor.

Typically, such processor have its own on-board non-volatile memory which is used to store key material. All encryption/security related operations only happen inside this processor and the encryption key never leaves the chip.

The main disk/flash memory can now be completely encrypted and the "wipe" only need to happen in the enclave as opposed to having to overwrite the entire flash chip.

In this kind of scheme, simply copying the flash is obviously completely useless so an attacker/FBI/DOJ must find a way to compromise the security enclave as well.

That is why Apple's cooperation is needed. The security enclave processor does have to run firmware, which are often field-updatable. Security is typically ensured by checking vendor's signature of the firmware. The court order is probably trying to force Apple to sign an insecure version of the firmware that would allow brute-forcing.

The side-effects of this is also obvious. Anyone who gets hold of the firmware can completely bypass the most secure part of the system and steal very sensible data like TouchID fingerprints and Apple Pay card details also stored in the security enclave.


A (spoofed?) trusted device has logged in from an unrecognized location Recently my google account was hacked. I have 2-factor authentication turned on. 2-factor authentication was not required for the hacker to gain access to my account, nor did the hacker trigger Google's suspicious activity monitor. This is because the log in was enacted from a "trusted device" or so it seems.

However, the log-in was from a location I never visited with a device name I do not know.

See attached image:

The hacker managed to gain access to my bank account and other various accounts without triggering any of their 2-factor authentication blocks.

One more note: When the attack occurred, the device that I brought with me to Israel and then back to New York, as far as I can tell, was turned off; so it is unlikely that the hacker gained remote access to that device... but then again... maybe they did?

Any idea what happened to me and how I can make sure it doesn't happen again?

(They also managed to get access to my bank account, add a wire recipient (a process I usually have to verify over the phone with a human), and make a successful wire transfer... but let's stick to the Google question)

For the record, I have changed all of my passwords and ran a virus scan that came out without results. But since the 2-factor authentication was enabled on literally all of my services, there wasn't much more I could do.

Help!

Sounds like it's plausible that it could be a session hijack? If they were able to get past that many security barriers without triggering anything besides the geo-location, but there's a lot you'd need to question in order to narrow it down. Do you have any add-ons? Do you use google-chrome? Have you checked your login information against haveibeenpwned.com ?


Infection through Virtual machine in NAT mode I have a VM box configured using NAT to my host OS. It seems I can ping to the machines in my LAN. If my VM box got infected somehow my malware while surfing, would the malware be able to infect machines in my LAN? thanks.

VM box --(virtualnetwork)--> Linux VM with iptables (NAT and restrict only port 80/443, etc) --(nat/bridge)--> Host PC

This will ensure infections in your VM box cannot spread laterally.

And also make sure your user accounts in the VM box are not the same as the ones on your network.


Different IPv4 numbers from different browsers, same computer If I search on Google the words "my ip" using Firefox, Google returns a IP that belongs to my ISP:

About 447,000,000 results (0.46 seconds)

200.x.x.x
Your public IP address

But, if I made the same search ("my ip"), on the same computer at the same time using Chrome, Google returns an IP from a totally different company:

About 447,000,000 results (0.46 seconds)

181.x.x.x
Your public IP address

What could be the explanation? Are my ISP or my computer being hacked?

Update: If I open http://whatismyipaddress.com/ on Firefox and Chrome, I get the IP number from my ISP, 200.x.x.x. For some reason, Google is giving me a different address on Chrome.

Update 2: I was configuring a Security Group for an AWS EC2 server using Firefox. When I clicked on "My IP", most of the times it shows me 200.x.x.x, but sometimes, it shows me 181.x.x.x

I am going to assume from the comment

  Update 2: I was configuring a Security Group for an AWS EC2 server using Firefox. When I clicked on "My IP", most of the times it shows me 200.x.x.x, but sometimes, it shows me 181.x.x.x

that this is at your place of work. in many cases businesses have 2 or more ISPs in case one fails. You might have your gateway routers setup to do some sort of load balancing so that sometimes your connection will use the 200.x.x.x and other times it could use the 181.x.x.x.


Is there a service that checks PYPI packages? Knowing that some pypi packages have a history of being malicious, like libpeshnx, libpesh, and libari.

Is there some website/service that labels packages as secure or not? for example: node's npm advisores https://www.npmjs.com/advisories

if not, why such service does not exist at this point?

If a package has been discovered to be malicious, it will be taken down. The npm advisories link for malicious npm packages is mostly a history if you're looking at packages to download. There isn't a need for a service to tell you whether a package you're about to download is malicious (because it would not exist).

On the other hand, when looking at currently installed packages, in npm, there's a built in feature, npm audit, which will tell you if the packages you're using have vulnerabilities (including known malicious packages). This is actually a newish feature, only released in the past year.

It appears this isn't built in to PIP, but there's a well known package called safety: https://pypi.org/project/safety/ that achieves the same functionality. It looks like this achieves your goals?


what is the best way to know if the entered decryption key is correct? I was searching for a way to store the encryption key of AES_ENCRYPT and found a good answer here: Where to store a key for encryption?

However, now I am trying to use "Type in the encryption key when you start up" and to save it in a session cookie (encrypted) but I do not know how to tell the user if his key is correct or not.

How I can test the key provided by the user? In another word, what is the best way to know if the encryption/decryption key is correct?

However, now I am trying to use "Type in the encryption key when you
  start up" and to save it in a session cookie (encrypted) but I do not
  know how to tell the user if his key is correct or not.

Is there any reason why you are storing this client-side? The cookie will be sent with every request, and encryption here seems wrong because you will need the store the key for this additional encryption somewhere. Anyone grabbing this cookie would effectively have the decryption password indefinitely (the encrypted original password effectively becomes the password). Could it be stored against the session server-side, the password would be less exposed?

Anyway, that was an aside, now moving onto your main question... If you can store passwords server-side, you could use bcrypt and then compare the entered password with the hashed version on password entry.

As another aside, make sure you are using a key stretching algorithm to convert user entered weaker passwords into strong keys via iterative slow hashing. The bit strength of user passwords is usually not sufficient to protect against a brute force attack of encrypted data. Use PBKDF2.


Storing Password Hash plaintext I've been doing some research on password hashing/salting. It is my understanding that the salt doesn't need to be secret. But I haven't read anything about the hash itself needing to be secret.

How obscured does the actual hash need to be?

Say I have this simple database table:

User
- username
- salt
- hash

Scenario
I have an online database, well secured/hidden. I can store the salt and hash without any additional encryption, etc... But what if certain users of this database are stored in a local Android SQLite database for offline access. The table looks the same, but now the salt and hash are only protected by a non rooted device (https://stackoverflow.com/questions/3140230/sqlite-database-security). The actual SQLite database can be read easily if someone made a copy of the hidden file. Is it still safe to store the user's salt/hash in this SQLite database as is (each user has a different salt)?

George has a good answer with some great information regarding this, however one thing you need to think about with all of this is your user experience, and attack theater. If it's on someone's phone, who would be the one to get that data?

Local:  A person with physical access to that device. With physical access to the device they can wait to watch the memory for any sort of encryption to be loaded into memory and pull the hash that way. In that case they have the hash. That's one of the issues with physical device access.
Remote data exploit: If all they have is a copy of the file that contains the hash(possibly through a DB dump), as long as it's encrypted well on top of hashed it will be a long time before they can decrypt the hash and start trying to get the password out of that hash.

There should be several ways to do this. Choose the one that best fits whatever attack scenarios you're worried about and good luck keeping it(the encryption secret(s) and the hash) safe.


Guidelines on out-of-band server management via integrated Lights-out services (iLO, iDRAC etc.) Several CVEs (CVE-2012-3271, CVE-2011-4158, and earlier) point out vulnerabilities in remote server administration firmware; what are the guidelines on hardening this extremely useful component of modern data centers, beyond the obvious regular (and urgent) firmware updates, firewalling and setting up audit trails?

Most important thing: don't put them on the internet :). Make a seperate network or vlan for them.


Why is it a good idea that X.509 digital certificates have an expiry date? What is the benefit of having certificates expire at some fixed date?

The official reason why certificates expire is because of revocation. A certificate is "revoked" when its issuer asserts that the certificate contents are no longer to be trusted, for some reason which needs not me specified. It is like a "cancel" from the CA: the CA signed the certificate, but now regrets it.

A common reason for revocation is when the private key is suspected to have been stolen (e.g. a smart card was lost, so it might be in the wrong hands).

Revocation works by adding the certificate serial number in the Certificate Revocation Lists that the CA publishes regularly. These CRL are signed (usually by the CA) and people who use certificates (e.g. Web browsers, for SSL server certificates) are supposed to automatically download the newest CRL to see whether the certificate they are about to use has been revoked or not.

Without expiration dates, CRL would grow indefinitely, and become too bulky for usage. With expiration, certificates which are expired are removed from the CRL; in that sense, certificate revocation behaves like an hastened expiry. So there you have it: certificates expire to keep CRL small.

(If certificates were very short-lived, and renewed every week or even every day, then we could get away with no revocation support at all, which would be cool, but this would require some sort of automatic renewal, which has its own set of potential issues.)

CRL size is the theoretical reason. The practical reason is that commercial CA really love it when customers have to buy a renewal every year.

An argument can also be made about key sizes and algorithms. Certificate renewal is a good opportunity for enforcing a new algorithm, or a larger key than previously. This is a smoother mechanism than having to revoke old certificates when their key size becomes "too small for comfort" with regards to cryptanalysis advances.


How does HDMI splitter bypass HDCP? I just read this article. It's about HDCP and how some old HDMI monitors would not work with your newer devices (such as game consoles, etc) because newer devices protect video stream content in a way that blocks old monitors from displaying it.

I'm perplexed at this excerpt:

  Short of buying a new television or giving up on your video game
  project the only way to deal with your HDCP compliance problem is to
  buy a cheap HDMI splitter that ignores HDCP requests.

This does not sound right. Surely an old TV that is mentioned in the same article earlier that has no slightest idea about HDCP would also ignore HDCP requests simply by merit of not being aware of them?

Still the old TV won't work, and the splitter will. I think this article oversimplifies things to make them more accessible.

Can we dig a little bit deeper and explore, what exactly the splitter does to circumvent HDCP? The article says:

  The outputting device says “Hey display! Are you HDCP compliant? Here
  is my license, show me your license!” and in turn the display (or
  other HDCP compliant device) returns with “I am! Here is my license!”

Does this mean that the splitter itself has the license in order to make the video exchange work? If not, why the outputting device does not refuse to proceed when no license is found on the splitter?

Meta: need help tagging this question.

HDCP has a built-in failure mode when it communicates with a device which doesn't support it: it downgrades the video content to standard definition (or sometimes 720p). The video splitter "trick" allows you to strip HDCP simply by the fact that it is a device which doesn't understand HDCP, and therefore never replies to the packets. The downside is that you can't watch the content in high definition, which is exactly what HDCP's threat model is built around.

You can get HDCP strippers which do contain the HDCP master key, but they're usually found in the shady corners of Chinese marketplaces like alibaba, rather than mainstream western sales channels. These are HDCP-enabled devices which contain the necessary keys, either compromised or as part of an IC taken out of a legitimate device (e.g. a TV).


DVWA - Converting Local File Inclusion to Remote Code Exploitation I'm reading this blog and it says:

If the /proc/self/environ file can be accessed through LFI, then in this case “RCE” can be achieved by requesting the file in combination with the payload written into the HTTP User-Agent field.

Then, it goes on to say:

GET lfi.php?file=../../../proc/self/environ HTTP/1.1
User-Agent: <?php phpinfo();?>

Now if an attacker sends the above http request to the web server then
:

First the data on User-Agent field will written on the /proc/self/environ file.
Then the page request "lfi.php?file=../../../proc/self/environ" will include the content of /proc/self/environ file into the output
page and our payload is get executed.

Now, I understand the first part of it that when we include /proc/self/environ, a Linux based operating system fills the file with information related to the environment it was called from. In our case, it gets populated with the HTTP request as our environment happens to be a browser.
What I do not understand is why is the content of the HTTP request getting executed? Looking at it from a developer's standpoint, lfi.php gets executed and there's a function in the file that reads the content of the file passed to it as a parameter. So, the content of the file /proc/self/environ and by extension, the content of the HTTP request should be read and not executed. Can someone please explain what am I missing?

I think when it works like that (if it works like that?) it's because in old versions of php, PHP code was executed as it was output by the server. In a normal .php file that is part html and part php, maybe the webserver would spit out all html until it hits a <?php statement and then starts executing the php code. I'm not quite sure because I can't replicate it with a modern copy of php.
For what it's worth I just tried it on a webhosting account that uses PHP 7.2.30 and it really doesn't seem to work that way (anymore?). I'm really not an expert. Obviously, if you include, include_once, require, etc a file from a variable it'll become RCE.
first test (wont work):
<?php
  readfile($_GET['lfi']);
?>

third test (will work):
<?php
      $str = $_GET['lfi'];
      include $str;
?>`

The wikipedia page just says that it needs to be a function that executes files, and then gives a good example of why someone might code an application that way. https://en.wikipedia.org/wiki/File_inclusion_vulnerability#PHP


Does padding an AES key hurt security (besides lowering the strength of the key)? I've been reading about solitare and its weaknesses, and thinking about clever ways of hiding keys. It seems like you could encode an 52-bit AES key in the vertical orientation of cards in a deck (or 104-bit if it wouldn't be suspicious that you have cards flipped back-to-front).

What I'm wondering is, would it be safe to just zero-pad the rest of the key, or are there problems if part of the key is known? A more practical comparison seems to be AES-128 and AES-256: If I padded a 128-bit AES key for AES-256, would it be weaker than the original key with AES-128?

There is no known weakness in having a "padded key" for AES, besides the obvious weakness of the key space size being reduced (a 52-bit key space can be explored exhaustively with some PC and some patience). However, AES security was not studied thoroughly for that kind of property, so anything goes; for instance, AES is known to be relatively flaky with regards to related key attacks, which operate in a similar area. To be safer, consider hashing your key elements with SHA-256, and using the hash output as key for AES.


How does SFTP function without a manually generated public/private key pair I am learning about SSH and how to use it to secure file transfers and commands between a windows machine and a Linux server.  Everything that I have read so far indicates that I need to use an SFTP client (like WinSCP) to connect to my server and transfer files.  Gettin  gin a little deeper, the docs for WinSCP never tell me to set up a public or private key pair on my client and server.  I thought that the public and private keys were a fundamental element of how SSH worked.  How is SFTP (which I have read is based on SSH) able to function without a public and private key pair (or is it defaulting to an insecure mode like FTP in the situation?)

Originally, I thought that I needed to create these pairs for each individual that wanted to connect to the server and manually copy the public key file to the clients machine.

EDIT =============================

I did not understand that there are two sets of public/private keys in use, one that is created by the server and one that could possibly be created by the client.  Initially, I though that they were the same public/private key pair.

Short answer: there is necessarily a public/private key pair on the server. There may be a public/private key pair on the client, but the server may elect to authenticate clients with passwords instead,

SSH is a generic tunnel mechanism, in which some "application data" is transferred. One such application is the "remote shell" which is used to obtain an open "terminal" on a server, in which terminal applications can be run. Another, distinct application is the file transfer protocol known as SFTP. From the SSH point of view, which application is used is irrelevant. This means that any authentication concept applies equally to SSH (the "remote shell" part) and SFTP.

The server MUST have a public/private key pair. That key is used for the tunnel part, so a server will use the same key pair for all applicative protocols. Most Unix-like operating systems (e.g. Linux) create a SSH key pair when first installed, and will use it thereafter. This means that you don't have to "create a key" when you configure your SSH server to also be used as SFTP: the server already has a key.

A client may have a public/private key pair if it wishes to be authenticated based on that key; this is all about client authentication, i.e. about how the server will make sure that it is talking to the right client. Password-based authentication and key-based authentication are the two most common methods (some servers are configured to require both). By definition, only the key-based authentication requires that the client stores and uses a key pair of its own.


Is it safe to use preyproject? prey project tracks mobile devices and helps to find stolen devices.

Is it safe from privacy perspective? How can I know that it doesn't spy on me?

Prey is free, but for the app to work they have to have access to a lot of your information (TANSTAAFL)

Generally if an app is "free" its like any other "free" product on the internet in that they use your actions and track you to sell data about you. Prey may or may not be doing this but at the very least you should assume they track your actions as much as possible to improve their product (especially the paid version).

Looking at the app permissions page on in the google play listing reveals:

Version 1.1.3 can access:
Identity

find accounts on the device

Contacts/Calendar

read your contacts

Location

approximate location (network-based)
precise location (GPS and network-based)

SMS

receive text messages (SMS)
send SMS messages
read your text messages (SMS or MMS)
edit your text messages (SMS or MMS)
receive text messages (MMS)

Photos/Media/Files

modify or delete the contents of your USB storage
test access to protected storage

Camera/Microphone

take pictures and videos

Wi-Fi connection information

view Wi-Fi connections

Device ID & call information

read phone status and identity

Other

interact with a device admin
receive data from Internet
change your audio settings
full network access
run at startup
view network connections
modify system settings
connect and disconnect from Wi-Fi
change network connectivity
prevent device from sleeping


Can you create an OpenSSL certificate with non-English field values? My requirement is statename, countryname, CommonName should be in language other than English. e.g. Chinese . Is it possible to create such certificate?

It is possible to create OpenSSL certificate with non-ASCII characters by using the -utf8 option.

In order to get a certificate for a public key, you create a Certificate Signing Request (CSR) that contains the information to be certified, such as the Distinguished Name and Common Name, Organization, City, State, Country and Contact information.

When creating a CSR, OpenSSL interprets any text you enter as ASCII. If you try to enter non-ASCII characters (such as Chinese), the certificate will contain 'random' characters rather than the text you tried to enter.

However, it is possible to change this behaviour using the -utf8 option (see OpenSSL Wiki):

openssl req -new -utf8 -newkey rsa:2048 -sha256 -out csr.pem

In this case, the information entered is interpreted as UTF8, allowing you to enter Chinese characters in the interactive dialog asking for the Common Name, State, City, etc.


Is it safe to provide others with a VPN server at home? I'm trying to set up a VPN server on a Raspberry Pi at home to help some friends who live in a country where internet is severely filtered. So far I have found OpenVPN and PiVPN for this pourpose. However, I'm worried because I do not know these friends very well:

What are the risks? For example can they access my home network (e.g. shared files)?
What if they use my home network for illegal activities which are illegal in my country?
Is there any way to do this without these concerns?

The goal is to provide some people with secure unfiltered internet connection. So out of the box solutions which do not hinder my own safety are also appreciated.

You can do it mostly safely with combination of technologies. You will be able to mitigate most of the issues except the illegal activities one.  Their outbound traffic will be originating from your home IP address and therefore any illegal actions will point back to you.
For the rest of the issues:

Protecting your home network. You will want to put them on separate VLAN/subnet which has no access to your home network. You can easily do that with many routers, especially if you have OpenWRT, DDWRT installed on your router. Usually how this works is, you connect the PI to one specific port on your router(or you can make guest WLAN if your router supports it) and then in the software you specify that this port is separate LAN which has no connection to the rest of the ports/WIFI, only to the internet. If the router supports guest/multi WLAN you can create one and connect the PI to that WLAN and it will be separated from the rest of the network. If you simply connect the RaspberryPI to your network they will have access to all your internal LAN devices and computers.
Bandwidth limiting. You might want to limit the bandwidth they can use, so that they wont slowdown/saturate your network. This can also be done on your home router but again it depends on the OS/firmware you have there.
Setup a firewall on the RaspberryPI or your router which will allow them to only use services you think are safe, for example 80(HTTP) 443(HTTPS). Blocking outgoing connections to port 25 for example will prevent them to send spam directly. It is safe to block everything and only open ports they specifically ask for. This will prevent them do ports scans, bruteforceing services and etc.
You will need to setup some port forwarding so that the Raspberry can be accessed from outside your home lan.
Do more deep check on these friends. Trying to help is a noble endeavor but in this day and age the amount of scam/spam/fishing/malware is troublesome and has become profitable business. Even if they don't have bad intentions, their devices might be infected with virus/rat/malware which can spread to your network if you don't take the necessary precautions.

Unfortunately this is not a short topic and I'm not gonna be able to cover all the aspects in detail. You'll have to do some reading and research by yourself. Good luck :)


Reflective XSS in script codes with Content Type "text/javascript" I have a webpage that returns raw script code with the headerContent-Type: text/javascript. However I found that there is a reflective xss in one of the parameters passed to the url which is copied into the returned javascript.
This is the setup.

URL:
www.mysite.com/js?p1=data&p2=NodeFrame.jsResponse

Javascript:
/**/NodeFrame.jsResponse({"success":true,"data":{"id":0,"jdata":[]}});

Now the XSS I've come up with goes like this

URL:
www.mysite.com/js?p1=data&p2=NodeFrame.jsResponse({"success":true,"data":{"id":0,"jdata":[]}});alert(1);//

Javascript:
/**/NodeFrame.jsResponse({"success":true,"data":{"id":0,"jdata":[]}});alert(1);//({"success":true,"data":{"id":0,"jdata":[]}});

To make it clear, the values of parameter p2, is used unsanitized in the returned script, as the function name.
The HTTP response does have Content-Type: text/javascript, in it. And the script is not embedded within an html document.
Is there any chance that the code can be executed in a browser? I'm worried about old browsers and such basically.
Assume that X-Content-Type-Options: nosniff is not set, is there any browser which will actually render it? If so can I get a PoC or a browser version to test?
Edit:
The question is, will any version of any browser, sniff a raw script code with Content-Type: text/javascript header set, given that X-Content-Type-Options: nosniff is not set.

The question is, will any version of any browser, sniff a raw script code with Content-Type: text/javascript header set, given that X-Content-Type-Options: nosniff is not set.

For executing the script inside the browser it will not matter if the type is sniffed or not. If only the script itself is given to the browser, that is it is not embedded somehow into HTML, then the browser does not have a document where the script can run. That means the script will be displayed or downloaded but not executed within the context of an HTML document. If you use Internet Explorer it might also offer the script for execution, similar to other executable content. Some tests with IE11 show that it does not matter what the Content-Type is in this case, because either the data will be shown inline (text/plain, images) or it will be offered for download and maybe execute. If execution is offered seems to depend solely on the file extension and X-Content-Type-Options: nosniff seems to have no effect on this decision.

If the script is embedded or referenced from inside a HTML document the content-type mostly does not matter at all because the browser "knows" what the content must be (i.e. Javascript) and will usually ignore the Content-type set by the server anyway. Thus you can successfully deliver a Javascript file with a content-type of text/plain, application/octet-stream and even image/gif to most browsers. From the browsers I've checked a while ago only newer versions of Chrome will exclude some content-types, i.e. it is no longer possible to include script with a content-type of image/whatever into Chrome. It still works with other browsers.


How does CleanBrowsing DNS servers make 'Youtube, Google and Bing forced to SafeMode'? Quote from Activating CleanBrowsing

  Activating CleanBrowsing is pretty simple and only takes 5 minutes. We
  do our work via DNS, so you have to switch your DNS servers to go
  through our Network instead of the one provided by your ISP.

  Safe browsing experience - across all devices.
  No porn and no surprises for your kids and you.
  Youtube, Google and Bing forced to SafeMode.

How do they force Google and Co with only DNS into Strict Mode?

How do they force Google and Co with only DNS into Strict Mode?

Google and Co have special IP addresses responsible for the safe search. Safe search can be enforced by modifying the DNS so that it returns the safe search IP addresses instead of the default ones when accessing the common domains names.

This is in detail described in How to: Enforcing Google SafeSearch, YouTube, and Bing at the OpenDNS support site. A short summary from this article:

Google: make the name server return the IP address of forcesafesearch.google.com when resolving www.google.*
Bing: make DNS lookup for www.bing.com return the IP of  strict.bing.com
Youtube: make lookups for various Youtube related domains resolve to IP address of restrict.youtube.com or restrictmoderate.youtube.com depending on how safe it should be


Why does pwdump7 retrieve LM hashes even though they're disabled? I'm currently undergoing a penetration testing certification, where I'm asked to :

Set up a fully-patched Windows 10 Pro VM (done)
Retrieve local password hashes from the SAM database using pwdump7
Crack these passwords using rainbow tables and OphCrack

But I encounter a strange behavior of pwdump7 that I don't understand.

From online research, I gathered that LM hashes are disabled by default on Windows 10 systems. I also have the Network security: Do not store LAN Manager hash value on next password change Group Policy enabled by default on my VM.

However, when I run PwDump7.exe in an Administrator command prompt, I get the following hashdump :

Administrateur:500:1572D4F95361A8BB91A573D91D0FECD3:F198938E100D4E18CEEC6FF1B77AF209:::
Invité:501:C3909CE10A2E26E43E14033ED7C252D3:8FCB137FA6D5907BEC96D82D5631CF14:::
DefaultAccount:503:F12B8A9E3FA47FDC9C5098B04BB15FE2:FA1440E32F8F6B4B5F276A723209E0AE:::
WDAGUtilityAccount:504:F1601AD372DB88DAADE8A5B92B097581:D23055FD3030A0C8A1B56A3689AAB745:::
Admin:1000:1AF4EF0E6E14CE97C8D1CCAD392C46D7:16FCC3441F3005923F649E8F9D1684F5:::
Martin:1001:3A4C1FB7E7FF9EE2972AEC3F193D7552:3AF5C318F2268DD802E79D8A24E89959:::
Jason:1002:D7366D17F427BDD3A29E4A589002ACD7:2FD2BF7C980AD86E4D8A0527A3E136DE:::
Shiela:1003:D2E2DE9405BC29AA60B0BF02E8E48819:1EC1DFA1A4CB0B642100697C419EBBB5:::

It seems weird that there is something in the LM field of the dump, since it's supposed to be disabled. Moreover, OphCrack (cracking tool using rainbow tables) doesn't find a single password (it's supposed to find at least these 3 : "test", "apple" and "qwerty").

All this points to the fact that there is something wrong (or something I don't understand) about the way pwdump7 retrieves hashdump, and I'm curious about what it is. From the official website, I know that pwdump7 uses the binary SAM and SYSTEM files to retrieve the hashdump.

Using another tool (fgdump) I get the following hashdump :

Admin:1000:NO PASSWORD*********************:92937945B518814341DE3F726500D4FF:::
Administrateur:500:NO PASSWORD*********************:NO PASSWORD*********************:::
DefaultAccount:503:NO PASSWORD*********************:NO PASSWORD*********************:::
Invité:501:NO PASSWORD*********************:NO PASSWORD*********************:::
Jason:1002:NO PASSWORD*********************:2D20D252A479F485CDF5E171D93985BF:::
Martin:1001:NO PASSWORD*********************:5EBE7DFA074DA8EE8AEF1FAA2BBDE876:::
Shiela:1003:NO PASSWORD*********************:0CB6948805F797BF2A82807973B89537:::
WDAGUtilityAccount:504:NO PASSWORD*********************:019178C0B9CFCCE1F235A1153545B83F:::

This one is correct, and can be used with OphCrack to find the desired passwords.

Does someone know why the dump from pwdump7 is in such a weird format ?

In Windows 10 Anniversary update, Microsoft changed the encryption algorithm used for password hashes in SAM, the main difference being they switched the cipher used from RC4 to AES.

As pwdump7 is closed source and I wasn't able to find the date of its release, we can't tell for sure, but most probably it was never updated to be able to decrypt this newer encryption scheme, therefore the decrypted data is nonsense. Not only do you get fake LM hashes, but the NTLM hashes also differ from fgdump's output, so they are most probably also the result of wrong decryption and nonsensical.

You can find more information about the new encryption here: https://www.insecurity.be/blog/2018/01/21/retrieving-ntlm-hashes-and-what-changed-technical-writeup/


What does Obama's phone say about Android and phone hardware? The recent article Goodbye Obamaberry, hello Obamadroid  describes the decision to move Obama's phone from the Blackberry to the Samsung Galaxy S4.

The Galaxy 4S is of course an old, foreign phone.  As a security practitioner, I would never recommend such a beast, especially with Google's tendency away from privacy.

Apple is a domestic hardware designer... and maybe the whole point of this question.   iOS is built on FOSS underpinnings (although less-so than Android).  The NSA and FBI issues with the iPhone make it likely to me that it offers some level of security.   The iPhone is also a more stable platform, i.e., they're very numerous and very uniform in their design, manufacture and parts.   This would seem to me to be desirable for a security audit.

So... why did the U.S. government go with a "foreign" phone?

The only reason I can think of it is that the iPhone is manufactured in China, and the U.S. has expressed concern about them.

The fear of hardware tampering was made clear with the Huwai story a few years back makes it clear thath the U.S. government is concerned about government backed corporate espionage  Huawei, ZTE Provide Opening for China Spying, Report Says
Android is open and South Korea is an ally, the Galaxy 4S might not be manufactured in China  (can somebody confirm this?)

Also of note is that according to the article, Obama's using the phone as an OWA portal for his email, and the DISA site indicates that "there is no data at rest"  DOD Mobility Classified Capability - Secret (DMCC-S), which means... the OWA angle is probably true.

This is of particular interest to me because in the past I've been asked about how to secure phones for small business owners.  I would normally recommend Apple over Android and Google, the reasoning being the privacy controls and security features of the phones.   A true security nut, I might suggest they go with a stripped down phone with Cyanogenmod or similar Google-free Android variant, but setting that up would be a nightmare.

Can anyone with experience in this area comment?   Is this a matter of convenience of ripping apart Android vs IOS?   Did the hardware platform's origin (China vs. possibly Korea) factor in?

The phone you are talking about is not the stock Samsung S4. As you can read in the article the cameras are removed, there is a special app store only and there are special apps on it. It also states that this phone was explicitly chosen because of the KNOX technology which includes secure boot and separation of work and private activities.

The reason this is done on a comparably old phone hardware is because the process to develop and especially audit such special solutions for a small market takes a long time.

And why did they not go with Apple? It is hard to tell, but if you develop such a system you don't want to develop it again after a year for new hardware and don't want to audit it again with each software patch. So it is important that you have hardware which is available for a long time and that you have access to the OS software to make adaptions independent from the original manufacture. And Samsung might have been just more open in this regard. And at the end the chips will be manufactured outside of the US in both cases and Samsung even makes at least part of the chips for Apple anyway.

By the way, in Germany they also use old Samsung hardware (S3) as the base for their secure phones (SiMKo3). But in this case they've made more adaptions to the OS, i.e. added separation with the use of the micro kernel L4.


Are there reasons to match the target port/service protocol when doing a scan? I am pushing my way through some beginner level security readings and exercises (ECSA 1 & 2) without much of a networking background. I happened upon an interesting suggestion or command: to use nmap -sU -p 23 target to find out if a target is running a telnet service. I hopped over to the telnet Wikipedia page and found that telnet is a TCP based protocol (it likely doesn't use UDP). Even RFC 854 states that "A TELNET connection is a Transmission Control Protocol (TCP) connection".
I've not dove very deep into the related protocol specifications (and perhaps I should), but I've caught myself in my own confusion or mistaken assumption. How does nmap -sU (a UDP scan) detect if a TCP port is open or closed? Are there ever reasons to match the target port/service protocol or is detecting the state of a port somehow completely independent of the target port (and its bindings?)? How so?
If your answer(s) is to simply point me to some reference material that's fine. I realize I might be trying to take some shortcuts here.

Update:
The book gives a little background about the telnet service but does not specify whether or not it is TCP or UDP based. It then says "You must scan the telnet ports using Nmap with the following command: nmap -sU -p 23 x.x.x.x". I can't quite tell if that's bad advice or not? Informative either way I think.

Technically port 23 is registered for telnet for both tcp and udp - see IANA port registry. And this is what nmap is showing: something is on udp port 23 (for example nc -u -p23) and based on the port mapping it writes "telnet" as service. This does not mean that there is an actual telnet service running on this port though.
This assignment of both tcp and udp for typically TCP-only services is fairly common for  services, i.e. SMTP, FTP, HTTP, POP3, IMAP ... all have the port for both tcp and udp reserved even though all of these are tcp-only services.


Yubico 4 or Nitrokey as an HSM Would it be possible to use Yubico or Nitrokey as a HSM that is used infrequently?

Both devices seem to prevent users from accessing the private key. Does this seem to be correct?

How about if the target PC (where you insert the key) gets hacked (let's assume they capture the PIN)? Yubico has a button on it which I guess is used during signing (so you have to explicitly allow a signing request)?

In general you could use Yubikey or Nitrokey but it depends on what you expect a HSM to do. Products of both vendors prevent users from accessing the private key being stored in the device. Only Nitrokey HSM has advanced key management features such as m-of-n access protection, key policies etc. which is usually expected of a professional HSM. See the Nitrokey HSM factsheet for more details. There is also a Yubikey HSM and its name implicates similar features but AFAIK it does not and instead contains features very specific for OTP usage.

Yubikey's button can be used to allow signing operations. Depending on your use case this might be an advantage. Professional HSMs may be used remotely or on dedicated trusted computers and in such cases a button may not be desired.


Should UAC be turned on or off on servers? So there a number of sources (e.g. this) that recommend leaving UAC (User Account Control) turned on on PCs, however there isn't much talk about UAC on servers.

In fact the only thing I could find was this old discussion from 2009.

I guess some would say that programs running in the background of servers would be obstructed by this (as such pop-ups wouldn't be seen by a computer user). But wouldn't they have to be allowed even before they directly attempt to make relevant changes?

How useful would it be to turn UAC on on servers?

Whatever reasons UAC should be kept enabled, it aims (at least theoretically) to mitigate the impact of a potentially malicious program. According to Microsoft:

  Under certain constrained circumstances, disabling User Account
  Control (UAC) on Windows Server can be an acceptable and recommended
  practice.These circumstances occur only when all the following
  conditions are true:

  Only administrators are allowed to log on to the Windows-based server interactively at the console or by using Remote Desktop
  Services.
  Administrators log on to the Windows-based server only to perform legitimate system administrative functions on the server.

  If either of these conditions is not true, UAC should remain enabled.
  For example, if the server enables the Remote Desktop Services role so
  that nonadministrative users can log on to the server to run
  applications, UAC should remain enabled. Similarly, UAC should remain
  enabled if administrators run risky applications on the server such as
  web browsers, email clients, or instant messaging clients, or if
  administrators perform other operations that should be performed from
  a client operating system such as Windows 7.

(Source)


Why arpspoof if you have monitor mode? I know that you can sniff packets from other computer in network by mitm attack using arpspoof, but why to bother if you can turn on monitor mode and sniff all trafic(if I understand correctly monitor mode lets you sniff all packets). Of course I have key to the network so I can decipher it.

You're correct, but only for wireless clients. If you want to trick wired clients into routing their packets to you instead of the real router, you'd want to arpspoof. This way allows you to capture both wired and wireless client's data.


Tablet / phone app security in unsecured networks Although reluctant to use my laptop on unsecured networks, I at least know that without me launching any processes or logging into certain web pages, that I will not be sending any credentials over the unsecured network.

For phones and tablets processes can run in the background without users knowledge (unless they kill them knowingly). Additionally there is no way to know how whether these applications have any extra security when sending their credentials over the network.

As an example, on my ipad, is there any way of knowing what applications are sending information using credentials, and whether they are sending this information unsecured? Or would the best way to find out be to use something like wireshark to investigate this manually?

Well, this is obviously a trust issue. You believe (rightfully) that your devices establish connections you didn't ask for. You suspect (again, rightfully) that those connections aren't always encrypted and that your information may be eavesdropped on when using insecure networks.

Even if there was a way to ask the device what data is sent out, would you believe it?

Your best bet is, like you said, to set up your own wireless network and dump all the traffic. In my opinion, there are so many parts of the device that can communicate with the outside world (the OS, the installed applications, the baseband, ...) that you're really better off trying to enumerate the outbound traffic from a "black box" perspective.


PayPal phishing attempt? [This is a "soft" question and as such I'm not sure it's appropriate for this site.  However, it does involve information security.]

I have an email address, me@gmail.com that is not associated with a PayPal account, but which is associated with my real name.  I.e., if you google my name you will find mailing list posts and so on from this address.

On 6/16 I received a pair of strange emails sent to this me@gmail.com address, which were then auto-forwarded to my main non-gmail address:

21:10 - "joe schmoe sent you $8.00 USD"
21:11 - "joe schmoe canceled this PayPal payment"

A couple of relevant facts/observations:

I don't know this person joe schmoe (name changed).
From header is "joe schmoe via PayPal "
I run my own restrictive Postfix server, and the message seems to have passed dkim:

Authentication-Results: mail.mydomain.com; dkim=pass reason="2048-bit key"
header.d=paypal.com header.i=@paypal.com header.b=nxnKW97L;
dkim-adsp=pass
Authentication-Results: mx.google.com;
spf=pass (google.com: domain of member@paypal.com designates 173.0.84.226 as permitted sender) smtp.mail=member@paypal.com;
dkim=pass header.i=@paypal.com;
dmarc=pass (p=REJECT dis=NONE) header.from=paypal.com

This passed spf/dkim at both the Gmail level and my local mail server.

Therefore, it seems like the messages were legitimately from PayPal.

Which in my mind leads to 2 general possibilities

This was a mere accident, and the person figured it out and caught it.
This is some kind of sophisticated attempt to hack/steal identity/???

Thanks in advance for any light your expertise can shed on this.

As things stand, there's not yet anything that makes me think of an attack.

It could conceivably be a really, really convoluted and unlikely confidence scam:

step 1: I make a payment to you (but I'd do that with a larger sum)
step 2: I withdraw the payment

Most confidence scams are based on the victim's dishonesty; their willingness to do something fishy for gain, and their belief in being smarter than the attacker, who they're led to see as their victim.

So, while farfetched, I could then proceed with:

step 3: send an email to you asking whether you've received my payment.

This step has the purpose of separating honest people (who will answer "I got this payment and saw it rejected, but who are you? You owe me nothing! What payment is this? You probably got the wrong person...") from gullible marks, who will try and see if they can milk me and, for example, entice me into repeating the payment (you'd be surprised...).

So if I get a "honest reply" I don't even bother answering and proceed to the next mark.

If I get an evasive or shady answer though, I can proceed with

step 4 (repeatedly): I start fretting for some "merchandise" to be sent, and send over emails and error messages to show that I'm a complete idiot that can't complete a Web payment. Again, a honest person will come clean; a "mark" will be brought to a frenzy, sure that a lump of money is going to head his way Very Soon Now.
step 5: at last I "surrender" and tell that, let's see, my bank manager has agreed to do everything himself and get the matter off my chest if only I can supply him with your bank account details and access codes.

Of course, it will only work in a very small minority of cases - it's a variation on the basic 419 Nigerian scam - but give a look at 419's victims' statistics. They're still falling for it. And this time there was, albeit fleetingly and soon taken back, some Paypal money coming.

The cost for the scammer is still negligible.

So if things stay as they are, compatible with a Stage 2 but no more, I wouldn't worry overmuch. A genuine, if unlikely, typing mistake. Or maybe a Freudian slip - your username is destrier and the intended recipient was called courser, for example.

Should they proceed with Stage 3, though, improbable as it is, I'd send the whole conversation to the nearest appropriate authority, as well as Paypal. Let them sort it out.


Openssl ciphers SHA384 and AEAD When running the command: openssl ciphers -v I get a long list of cipher combinations. I'm having issues interpreting some of them. An example is:

DHE-RSA-AES256-GCM-SHA384 TLSv1.2 Kx=DH       Au=RSA  Enc=AESGCM(256) Mac=AEAD

I thought the last part of the combination, in this case SHA384 would be the HMAC function. It seems it's been replaced by AEAD instead. Reading up on Authenticated Encryption with Associated Data (AEAD) it seems to be a class of block cipher modes, not a specific HMAC function.

Could someone explain this further? Is SHA384 one of these modes? Is SHA384 used in the AES encryption somehow and then that algorithm re-used for the MAC?

Mostly(?) duplicate of What's the hash for in ECDHE-RSA-AES-GCM-SHA?

TLSv1.2 adds a new class of ciphers using AEAD modes such as GCM, which is a single crypto operation that does both encryption and integrity protection, instead of having separate encryption and HMAC e.g. AES128-CBC plus HMAC-SHA1. Mac=AEAD means really no HMAC is needed because of AEAD. However, TLSv1.2 also changes the PRF (key derivation) to use varying SHA-2 hashes (instead of always SHA-1 and MD5) so the hash is still specified in the ciphersuite.


Remediating base image vulnerabilities I'm trying to build a base image that pulls from php:7.3-fpm, which is built on debian:buster-slim. The php:7.3-fpm base image has vulnerabilities out of the box, like https://security-tracker.debian.org/tracker/CVE-2019-3844 and https://security-tracker.debian.org/tracker/CVE-2019-19603. From the look of it, there are no fixes for them other than changing the base OS. Is my understanding correct? I assumed that any high severity vulnerabilities would have fixes available on buster but that doesn't seem to be the case. How do I go about fixing these things? I thought adding an apt-get upgrade to the Dockerfile may do the trick, but no upgrades are performed. Maybe there's a repository out there I can add to /etc/apt/sources.list? Any insight would be greatly appreciated!

From those links you posted, it is clear that Debian is not patching them because they consider them too minor and or unrealistic to exploit:

CVE-2019-19603 [buster] - sqlite3  (Minor issue, too intrusive to backport)

CVE-2019-3844 [buster] - systemd  (Minor issue; exploit vector needs control both of the service and a helper

The high severity could be overstated, but only you can determine if the above notes are good enough for your threat model.
If not, you could download the newer, patched versions of these programs and build them from source. It also looks like the issues may be fixed in Debian sid (unstable). You could try to configure apt to install these newer versions, but it may cause dependency issues.


Is a safelinks.protection.outlook.com link phishing? Received an email which contain the below hyperlink

https://nam02.safelinks.protection.outlook.com/?url=http*3A*2F*2Factuallysale.com*2F&data=02*7C01*7C*7C548d20ace3ec4747fe1008d7d7d8b597*7C84df9e7fe9f640afb435aaaaaaaaaaaa*7C1*7C0*7C637215198062448150&sdata=nk69pKQ7jIMsMVSfWVFG*2B38GuiK08jysbwN114W*2BMpM*3D&reserved=0__;JSUlJSUlJSUlJSUlJSU!!FZtbJVnXfw!gfgjegEG3qJawMzvsQm9QRhNrDiubzuVygOX_4wENNasy-WnA7vie2xl_WVQEUA0rg$

I checked the URL with urlscan.io and virustotal.com, but I could not find anything.

How can I know if this is phishing/malware or not? What do I look for?

Depending whether this is an organizational email or Outlook.com, it's one of the following:

Office 365 Advanced Threat Protection ATP Safe Links.
Advanced Outlook.com security for Office 365 subscribers

This replaces suspicious links in emails with  https://*.safelinks.protection.outlook.com/* links. If a user clicks the link, it first goes to Microsoft's site that then evaluates whether it thinks the link is safe or not, and then passes the user to the original site or gives a warning. (How ATP Safe Links works.)

What "Safe Links" does is a totally bad practice for several reasons:

It destroys URL visibility. Typically the user decides whether a link is safe or not by examining the URL as schroeder described in his answer. Following this method the user may believe that this is a URL from a trustworthy site outlook.com/ over a secure TLS connection https://. It's even expilicitly mentioned in the URL that it's a safe link and you are under a protection. But the link may be nothing but safe, and the protection may get its detection wrong, redirecting the user to a malicious site. This nullifies all the hard work put for educating the users on how they should handle suspicious URLs.
It's easy to bypass. E.g. Cryptron Security's Security analysis of O365 ATP reveals that it's possible to bypass the ATP Safe Links by

Slightly modified <a x=">" href=" tags the ATP Safe Links isn't recognizing as links
Using <form action= " instead of links (or some other more clever HTML trick)
Showing different, harmless content to ATP servers (list of them is publicly available)
Using redirection services / URL shortener sites

https://www.google.com/url?sa=D&q=https://evil.example.com.

Provides a false sense of security, making people click all links recklessly again.
5 Reasons Microsoft Safe Links Make Office 365 Less Safe adds that the protection is mainly blacklist based and can't handle 0-days / unknown URLs (although it's advertising Avanan's own products, it's a good article on this matter).
Owen Nelson's The Problem With Microsoft's Safelinks adds the privacy problems: both Microsoft and the administrators of an Office 365 tenant can see the original URLs that may contain sensitive information.
As these are not the direct URLs, urlscan.io & virustotal.com won't work for them.


How to determine if a browser is using an SSL or TLS connection? I want to know whether my browser is using SSL or TLS connection if I see HTTPS.

I want to know for IE, Firefox, Chrome and Safari. I want to know the protocol version.

There are several protocol versions : SSL 2.0, SSL 3.0, TLS 1.0, TLS 1.1 and TLS 1.2. Internally, TLS 1.0/1.1/1.2 are SSL 3.1/3.2/3.3 respectively (the protocol name was changed when SSL became a standard). I assume that you want to know the exact protocol version that your browser is using.
Internet Explorer
According to what is described on this blog post, Internet Explorer can display the protocol version information. Just hit File->Properties or Right-click -> Properties, and a window would open, under Connection, you'd see something like:

TLS 1.2, RC4 with 128 bit encryption (High); RSA with 2048 bit
exchange

Firefox
As of today, Firefox supports TLS 1.0, TLS 1.1 and TLS 1.2. You can see the negotiated protocol version if you click the padlock icon (on the left of the URL), then More Information and then under the Technical Details.
Chrome
Chrome can display the version.
On earlier versions of Chrome, click on the padlock icon; a popup appears, which contains some details, including the protocol version. example: (verified on version 21.0.1180.82)

The connection uses TLS 1.0

On later versions of Chrome, this information in the security tab of the developer tools. (Credit to nickd)
Opera
Opera shows the protocol version in a way similar to Chrome: click on the padlock icon, then click on the "Details" button. e.g. (verified on version 12.01):

TLS v1.0 256 bit AES (1024 bit DHE_RSA/SHA)

Others
For browsers which do not show the information, you can always obtain it running a network analyzer like Wireshark or Network Monitor: they will happily parse the public headers of the SSL/TLS packets, and show you the version (indeed, all of the data transfers in SSL/TLS are done in individual "records" and the 5-byte header of each record begins with the protocol version over two bytes).
And, of course, the actual protocol version is a choice of the server, based on what the server is configured to accept and the maximum version announced by the client. If the server is configured to do TLS 1.0 only then any connection which actually happens will use TLS 1.0, necessarily.
(Edit: I have incorporated some information from the comments; done a few tests myself. Feel free to enhance this answer as needed.)


What is the purpose of associated authenticated data in AEAD? Authenticated encryption (AE) and authenticated encryption with
  associated data (AEAD, variant of AE) is a form of encryption which
  simultaneously provides confidentiality, integrity, and authenticity
  assurances on the data.

Source: Wikipedia

I recently noticed that several SSL checkers started to point out AEAD. But, what is the difference between AE and AEAD and what is the purpose of “associated authenticated data” to an encrypted connection? Why not encrypt it all, instead of “authenticate” it only?

As a very general rule, the purpose of associated data (hereafter "AD") is to bind a ciphertext to the context where it's supposed to appear, so that attempts to "cut-and-paste" a valid ciphertext into a different context can be detected and rejected.

For example, suppose I'm encrypting the values that I insert into a key/value database, and I use the record key as AD.  What does that do?  Well, first of all, mechanically it means now that whenever I decrypt the value, I must present the same key as AD or otherwise the decryption will fail with an authenticity error.  So my application will have to perform that step in order to decrypt any of the data correctly.

Second, and more deep, is that by using the key as AD, I've thwarted one sort of attack an insider—say, the database administrator—could conceivably carry out against my application: take two records in the database and swap their values.  Without the AD, the application would happily decrypt these, and blindly assume that it read the correct value for those keys.  With the key as AD, instead the application would immediately notice that the values are not authentic—even though the attacker never actually modified them—because they're occurring in the wrong context.  That's just one example out of many possible, but applications of associated data tend to have that flavor.

One important detail that people often miss from examples is that the associated data doesn't necessarily have to be stored or transmitted with the ciphertext.  Any context-dependent non-secret values that the honest parties are both able to correctly infer can be useful as associated data.  For example, if the parties are executing a complex protocol that's been formulated in terms of a state machine, such that every correct party can always tell their own state and that which an honest counterparty should be in, then those states—even though they're implicit to the protocol—can be used as AD.  This is the sort of thing that makes AEAD suites so attractive to designers of protocols like TLS—it's a tool that can be used to cut down on the complexity of a secure protocol.