This is not something that's determined by the account number (BIN or otherwise).  Rather, it's determined by the bank that orders the cards and has the chip "personalized" with your account information.  They make the choice as to whether to simply put on a pre-computed signature (SDA), or pay the extra expense for a chip that is capable of calculating one on the fly (DDA).  I believe that all DDA-capable chips can do CDA if the terminal supports it, but I'm not certain on that front.

As for why any bank might issue a SDA card instead of a DDA card, this article from 2008 still rings true:

  The reason comes down to one of cost. A chip card that is capable of performing public key cryptographic processing, and therefore capable of supporting DDA, is relatively more expensive than a chip card that is not capable of performing public key cryptographic processing, and thus only capable of supporting SDA. The cost of issuing chip cards is a significant factor in the business case for a bank. Current indications from the Australian market is that the difference in price between an SDA card and a DDA card is in the range of $0.50 – $1.00.


How does a company check the password received from your phone keypad during a call?

One of the possible ways to do this without having do do the amount of hash calculations that you mention is, at the moment of creation of the password, to calculate the hash of your password as it would have been entered in a numeric keyboard, so the database would have both hashes stored, and would just need a simple comparison to the corresponding hash to authenticate.


How do I verify a user over the telephone?

Relying on publicly know information is problematic. Storing personal security questions+answers is unlikely to scale well if many others adopt the same approach.

If you want to authenticate someone who is using your service, ask them questions about their association with you. Examples include:

Give all users an account number, transaction number for the issue, etc.
Ask about past transactions / orders (and make sure this is something that they can access easily)

Calling them back on a given telephone number is also a useful approach, and adds defense-in-depth. However, you then need to think about mutual authentication-- how can you ensure that the user trusts the call. If done right, this can further boost the security of your system.

Make sure you use some form of rate limiting and track when authentication attempts are made. Make sure these attempts are communicated back to the user "out-of-band".


I checked out Fingerbank's fp file and the fingerprints are the same fingerprints from 3.09b distribution.  The number in the labels relates to the id of the device table in the downloadable fingerbank sqlite database, so these can be easily cross referenced but provide less detailed information than the labels in the 3.09b fp file.

Fingerbank maintain a database of DHCP fingerprints so it's unlikely their fp file will be maintained.


Why is it important to never use `eval` in conjunction with AJAX?

tl/dr: For a game you are working on for fun with no one else's
  information at risk then sure - do whatever makes your life easiest.  You're
  welcome to balance security and usability however you want as long as
  you aren't risking other people's information.  What you are doing
  certainly isn't uncommon.  However, this decision does in fact prevent
  you from following some best security practices, and so overall I
  think that advice from OWASP is perfectly applicable.

It's true that what you are doing isn't especially crazy, isn't necessarily uncommon, and isn't substantially different than a more typical use-case .  It's also true that statements like "X is evil don't ever do it" are a bit over the top, and rarely entirely true.  However, I think there are a number of points you are still missing (even after McMatty's mentioned an important detail in his answer), so I figure it's worth discussing more.  However there is one important caveat worth mentioning first:

Security is never "All or nothing"

Security is always a balancing act.  The fundamental question of security is basically "is this secure enough for my purposes?"  An anonymous-cat-picture-voting site hardly needs any security at all, unlike the nuclear-missile-launching site.  If you understand the implications of the decisions you make and are happy with the balance your application strikes between "this is easy for me to write/maintain" and "this is secure enough for my purposes"  then it doesn't really matter what OWASP says (assuming, of course, that you are actually making an informed decision and aren't just saying "I don't care if my customer's credit cards get stolen").  If you're just making a game for fun then it doesn't really matter.  Of course if it later has success and you start integrating a payment portal for in-app purchases, then you might find yourself having to go back and revamp your entire system for better security.

All that being said, what does OWASP's advice mean for your use case?  Here are some details I think you may be missing

You don't actually have to use eval here.  If you have a script tag then rather than evaling its contents you can just create a script tag and write it to the body (see this question).  Of course, there is little practical difference between using eval and writing a script tag to the body so this is somewhat pointless...
With javacript defined directly on the page you can't use a strict CSP to stop XSS attacks. With a sufficiently strict CSP you can tell the browser not to allow any inline javascript to execute on the page.  This is very effective at stopping an XSS attack if someone manages to find one in your system.  However, you can't do it if you have your own inline javascript.
External javascript files can have a hash attached that will prevent the browser from using the file if does not match (aka if the external file has been tampered with).  This doesn't matter as much in your case because you are loading your own internal resources, and if your internal resources are tampered with then you have a much bigger problem that a hash won't stop.  However, defense-in-depth suggests that such steps can be valuable anyway.  For instance, a larger app may have scripts delivered from different "services" in your system, and an attacker may gain access to only one area of your system.  By including sub-resource integrity checks even on internal systems, you can easily provide a barrier that might stop an attacker from compromising further parts of your system.  This is impossible with inline scripts.
Needing to use eval usually indicates a problem in your design. I'm highlighting this statement from OWASP, because I think it is applicable and you are overlooking it.  You said you are doing this because sometimes you find it easier to have the server send down chunks of HTML instead of having javascript build the page.  Apparently when this happens sometimes the server even sends down more javascript itself.  All this to say: yes, I think there is a problem with your design.  Don't get me wrong, that doesn't mean you need to go and overhaul everything.  However you have some pages where javascript builds the page, some places where the server builds the pages, and some pages where the server builds the page and also sends down more javascript to control the new page.  This might very well be easier for you right now, but from an outside perspective I think it's easy to say that you really do have some design "smell".  That doesn't have to be a big deal, and I don't mean that to be negative, because we all have to make design decisions that make the most sense to us.  Still, whether you realize it or not, I think you are in many ways proving the truth of what they are saying.


Why is Access-Control-Allow-Origin required for uncredentialed cross-domain requests?

You have stumbled on a bit of a of an irregularity caused by an attempt to make secure standards.  In short,  CSRF exploits can't use a CORS XHR because of the preflight requst,  attackers are forced to use other techniques.  In an XHR,  you can read the response. However in a CSRF attack,  the attacker doesn't care about reading the response.   A GET based CSRF exploit can just be a simple <img> tag.  A POST based CSRF exploit is as follows:

<form id="csrf_exploit" action="https://victim_site/passsword_change" method="POST">
  <input name="new_password" value="hacked">
  <input name="repeat_password" value="hacked">
  <input type=submit>
</form>
<script>
  document.getElementById("csrf_exploit").submit();
</script>

In the above exploit,  the entire browser is redirected when the POST request is sent.  Often an exploit like this is placed within an iframe to hide this redirection from the victim. The browser renders the response, and the attacker gains the benefits from the side-effect produced by the request.  In this case the side-effect is changing the users password.


Network Defense- White listing IPs/Ports

Assuming that your side initiates every communication, then yes, blocking every connection to your machine from IP addresses you didn't connect to is a good idea.

But note that this is firewall basics. Most client-side firewalls don't allow any incoming connections initiated from a remote machine unless you specificallly allow them. They do more than you imagine, too - they keep track of active tcp sessions and only allow packets from ips that are in an active session with you. Once the session ends, packets from that IP will be blocked again.

If you're talking about a home network, then the firewall should run either on or right behind your internet router, eg the box providing you with internet access. If you don't allow any connection initiated from the outside, the devices on your home network are much better isolated from the internet.

Usually broadband internet providers give you a box which has such firewalling capabilities. They might or might not be enabled, but it's usually trivial to configure.


Yes, it is identical.
You can verify this by looking at nmap.cc, which parses the arguments. The handler for -A sets delayed_options.advanced to true, which in turn sets o.script to true. This is identical to the -sC flag, which also sets o.script to true.
As for which scripts are run, this depends on the nmap version. By default, it runs scripts that nmap considers "safe"


Can a hypervisor rootkit enable hardware-assisted virtualization when it has been disabled by the BIOS?

To quote the Intel Software Manual, Volume 3c:

  VMXON is also controlled by the IA32_FEATURE_CONTROL MSR (MSR address 3AH).
  This MSR is cleared to zero when a logical processor is reset. The relevant bits of the
  MSR are:

  Bit 0 is the lock bit. If this bit is clear, VMXON causes a general-protection exception. If the lock bit is set, WRMSR to this MSR causes a general-protection exception; the MSR cannot be modified until a power-up reset condition. System BIOS can use this bit to provide a setup option for BIOS to disable support for VMX. To enable VMX support in a platform, BIOS must set bit 1, bit 2, or both(see below), as well as the lock bit.
  Bit 1 enables VMXON in SMX operation. If this bit is clear, execution of
  VMXON in SMX operation causes a general-protection exception. Attempts to set
  this bit on logical processors that do not support both VMX operation (see Section 23.6) and SMX operation (see Chapter 6, “Safer Mode Extensions Reference,” in Intel® 64 and IA-32 Architectures Software Developer’s Manual, Volume 2B) cause general-protection exceptions.
  Bit 2 enables VMXON outside SMX operation. If this bit is clear, execution of    VMXON outside SMX operation causes a general-protection exception. Attempts to set this bit on logical processors that do not support VMX operation (see Section 23.6) cause general-protection exceptions.

Interpretation, for those who aren't au fait with what's going on here:

MSR stands for machine specific register and refers to registers / configuration settings that alter between implementations of the x86 architecture.
Some of these are used to configure features for that family of processor.
VMXON is the (Intel) x86 instruction to enter hypervisor management mode - the point where you get access to hardware assisted virtualisation features including extended page tables, etc. Here, you create virtual machines and execute vmenter and vmexit and so on.
A general protection exception is an exception handler built into the processor that occurs when you do something you're not allowed to do. Examples would include executing privileged instructions outside of a privileged level, e.g. the sidt instruction as a user mode application (ring 3).

As you can see from the documentation, BIOSes have a choice to enable or disable VMX and also may use the lock bit; if the lock bit is set any attempt to write to alter the configuration will cause a GP exception.

So it really depends how those bits are set by your BIOS, in answer to your question. If the BIOS sets all of the bits to 000, then software ought to be able to enable the hypervisor via WRMSR - see the discussion here. I think WRMSR is a privileged instruction, meaning you'd need to do it from the kernel. However, once the lock bit is set, you're required to reboot - essentially the circuitry will check the state of the reset flag, then throw an exception at your operating system - which can either carry on as normal or crash, depending on whether it understands the exception (most likely not).


Exectuting sudo command in one line within a non-tty shell

There are probably a few different ways to approach this problem, but I believe I found a simple way around it that is no different from what you'd do normally to upgrade a shell to a full-fledged pty.

First, the reason you are encountering this error is due to the Defaults requiretty setting in /etc/sudoers. It seems this option is outdated, and is already likely removed/slated to be removed from the default configuration on most distros.

I created a test user "shudo" with password "shudo" who is allowed to sudo to root to run the command id, and enabled the requiretty option. Here's what happens when "shudo" tries to sudo from a netcat shell:

sudo id
sudo: sorry, you must have a tty to run sudo

To get around this, let's try a typical PTY upgrade using Python:

echo -e "sudo id\nshudo" | python -c 'import pty;pty.spawn("/bin/bash")'

There's probably a way to do it with the -S option, but it's not needed. This spawns a new PTY to run /bin/bash, which receives the sudo command and password as standard in.

Here's the output:

echo -e "sudo id\nshudo" | python -c 'import pty;pty.spawn("/bin/bash")'
shudo@mymachine:/tmp$ sudo id
[sudo] password for shudo:
uid=0(root) gid=0(root) groups=0(root)

You can see the new shell is spawned, sudo is executed, and the command is run as root! Note that this did leave my shell in a bad state since stdin is tied to the pipe, but it should be sufficient for a PoC.


Why do email that didn't pass SPF checks go to my mailbox?

When a message fails the SPF check, it doesn't necessarily mean that the message is spam.  For example, it's possible that the sender of a legitimate message sent the message from his gmail address, but using an SMTP server other than Gmail's (e.g. his ISP's SMTP server, or a hosted SMTP service).  In that case, the message would fail the SPF check, but the message is legitimate.  So, the SPF check is just one of many checks that spam filters use to determine if a message is spam.

For this reason, some mail providers now publish DMARC records, which are used to tell spam filters how to handle a message based on the result of the SPF check (and/or DKIM check).

For info on SPF and DKIM, see https://www.ultrasmtp.com/kb/messageauthentication.php

For more info on DMARC, see https://dmarc.org/


How can I identify the cipher mode which is used by TLS?

There are many ways to enumerate your cipher suites and protocols enabled on your sever. Here are solutions that are assessment or script based that have little overhead and are light on the technical requirements.

If it is externally available:

Try out SSL Labs' test here: https://www.ssllabs.com/ssltest/. They have all your needs for cipher suites, as well as guidance for any issues they may find in your configuration beyond just CBC findings.

If it is not available externally:

https://github.com/nabla-c0d3/sslyze provides a good command line script to enumerate, but does not provide guidance.

https://github.com/drwetter/testssl.sh is bash based, and does provide guidance similar to SSL Labs but on command line.


Virtual machine against screenshot / key-logging trojans?

This is not a good solution. Your question assumes a compromised host and a clean guest. So, the malware will have control over the host. Virtual machines' data is contained in files, stored by the virtualizer on the host. So any malware on the host machine could potentially send those files back to an adversary. The adversary could then simply run that same virtual machine on his/hers virtualizer, and get access to everything stored in the VM.

Now lets assume you encrypt all of the VMs files (and ignore the practicality discussion). This still leaves your VM exposed to screenshots, memory dump analysis (although I am not aware if this has ever been done), and more data exfiltration methods.

Furthermore, VM network activity runs through the host's network interface (NIC), thus exposing the traffic to the malware.

So both of the points you made are not secure:

You should not keep sensitive information in a VM on a compromised host.
The malware could potentially intercept the network traffic from the guest.

A better solution might be to do the exact opposite - run a clean host, and use a VM for every activity that may expose you to infection (web browsing, file sharing etc.). Consider reading about Qubes and maybe this will interest you for more than just PDF viewing.


Is a connection that uses 0.0.0.0 in Foreign Address, secured?

All this is indicating is that the process listening on that address and port has 'requested' the ability to receive connections from any IP address on any port. Until a connection is made the process appears as being connected to nothing in this way (asterisk).

From the netstat manpage:

  Foreign Address - The IP address and port number of the remote computer to which the socket is connected. The names that corresponds to the IP address and the port are shown unless the -n parameter is specified. If the port is not yet established, the port number is shown as an asterisk (*).

Because this process is listening on 127.0.0.1, it is secured in that only addresses in the 127.0.0.0/8 range can make a connection, which is a range exclusively reserved for connections only possible by other processes running on that system.


Search for existence of sensitive substring without revealing substring in cleartext

If your sensitive information is formatted in a particular way (e.g. credit cards being 13-19 digits) you can search for candidates which MAY be your sensitive string, then apply your hashing idea to the candidates.

If you're searching for a specific phrase, like "UFO's are real", you could use regex to search for any string matching "[A-Z]{3}'\w\s\w{3}\s\w{4}", provided it's acceptable to leak information about the length and structure of the phrase. You can then compare the hash of each result with the hash of the original to see if it's present.


Where to start filtering POST input with MVC? [PHP]

I think this design is not bad, but usually the sanitization is done in controller in a MVC architecture design. I think the reason is it should be done as soon as possible, so maybe you can do the filtering before calling your class:

function register2(){

    $objClean = new clean;

    $username = $objClean->process($_POST['username']);
    $password = $objClean->process($_POST['password']);
    $email = $objClean->process($_POST['email']);

    $objReg = new registration($username,$password,$email);
    $objReg->register();
    unset($objReg);
}

In this way you pass the parameters to the class already filtered. The functionallity is going to be the same, but this is how it's done usually.

Regarding the way of filtering... If your php version is >= 5.2.0 , you can use function filter_var which is very nice for this. It has a lot of filter types depending of the use of the var. You can see them here.


Does it matter if an average person has email encryption or not?

Encryption is one thing, authentication is the other thing. Encryption prevents somebody else except the intended receiver to read the e-mail. Authentication prevents somebody else from impersonating you.

In regular e-mails you use neither encryption nor authentication. This means that anybody can send you an e-mail claiming to be anybody they want. This introduces two problems:

A.) Somebody can see what you write
B.) Somebody else can claim to be somebody they are not

Now, you can argue that A.) isn't really that much of a big deal for your average person. So somebody else on the internet can read your e-mails. Not a big deal. However, B.) is much a bigger deal even for an average person.

Somebody can send a nasty e-mail to your boss claiming to be you potentially resulting in you being fired. Somebody can write threats to somebody claiming to be you potentially having legal consequences for you. Basically, anybody can write any e-mail as you.

However, this issue is partially mitigated by servers checking whether the e-mail comes at least from the domain as mentioned in the From:. Such as, if you send an e-mail to a google mailserver using From: hi@me.com google will perform a reverse lookup on the IP (of the sender) and check whether this matches me.com and it will also check if you have MX records for your domain (DNS). This prevents somebody at least from impersonating someone from another domain but google can't really verify whether it was truly hi who sent that e-mail. So, this is not a complete solution to the problem, it just mitigates it somewhat.

Generating keypairs isn't actually that hard it's just that a lot of e-mail clients don't have built-in supports for doing that but you need plugins and let's be honest - plugins are usually a usability issue. If you'd tightly integrate it properly into an e-mail client it would already be somewhat easier. However, you'd still have to solve the problem of who validates/verifies you. Theoretically, you could start employing a system similar to PKI for web but for e-mails using CAs etc. but that's probably not going to happen any time soon.


How to prevent Directory Enumeration Attacks (DirB or Directory Buster)

What does such an attack look like? Consider what you are able to see as the server administrator. A DirB/DirBuster attack makes requests for numerous webpages, many of which won't exist. The observable result: lots of 404 HTTP responses for the pages that don't exist. These errors will typically appear in the webserver's access logs.

There are a number of tools out there that can take actions based on log activity. A common one is Fail2Ban, which can be configured to temporarily ban a remote IP address with firewall rules if it generates too many 404s within a time period. But this may not be necessary; see the next paragraph.

What is the risk? If your site and server are configured properly and secured with proper access controls, there should be nothing to worry about. Typically, an attacker scans for directories/files for information gathering/enumeration purposes. Perhaps there are paths that are unpublished, relying on "security through obscurity", i.e. simply hoping the adversary will not find these "hidden' web paths, in this case. Or, there may be files unintentionally left/visible in the webroot, such as text/config files with sensitive information.

So, if you have nothing to hide, and aren't running vulnerable/misconfigured software (those are some big IFs), brute forcing files and directories isn't a huge risk.


What is the safest way to store a password in a single file?

First point, never use SHA256 for hashing your passwords. Use bcrypt or pbkdf2. Here is a link to a Java library for bcrypt.

The library will take care of most of the details, including the generation of salts. Use it, don't roll your own.

What is the purpose of the password? Is it for authentication? If so, just store the hash somewhere you can retrieve later for comparison, be it a text file or a database.

If you want to use the password for encryption, well that's a whole different set of issues you have to consider. Details like key management, the modes of operation you should use will vary depending on your exact scenario. Don't do this unless you are a trained cryptographer, which you clearly are not, as there is a whole lot of stuff that can and will go wrong if you try to  roll your own crypto.


My IP address (with a NAS) is targeted by a hacker. What to do? Should I be worried?

As for anything attached to public networks:

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


A brute-force can implement pauses to match the short lockout gap you are presenting, so this would slow down a brute-force script.  However, locking the account permanently (or forcing CAPTCHA & security question in addition to future login attempts) after x-number of consecutive failed attempts is a better way to accomplish that goal.  Your approach does have a little merit, but you would certainly want to couple it with the traditional anti-brute methods.


Is breaking a looping one-time pad practical? If so, how?

The one-time pad is trivially breakable if the key is reused in any way.

C1 xor C2 results in P1 xor P2 where C1 and C2 are the two pieces of  ciphertext encrypted with the same key and P1 and P2 are the corresponding plaintext.

You can then recover the plaintext with the following method. You take a common word or phrase that may appear in the plaintext (such as " the ") and xor that against the result of P1 xor P2. If one of the plaintexts had the text of the crib (" the " in our example), then the result of the xor is what the other plaintext had in that position. If neither plaintext contains the text of the crib, it is very likely that the result of the xor is just gibberish.

You simply continue this technique until you recover enough of the plaintext to guess the rest from the context. This attack is known as crib dragging.


Using a manual cipher to secure Two Factor Authentication (2FA) backup codes

I did my own research on this and encrypting the 2FA codes with the One-Time Pad method and a non-obvious phrase is unbreakable due to the uniformity of the 2FA codes.

When using One-Time Pads (OTP) to encrypt a sentence, the key must be uniform to guard against frequency analysis. But in general, either the plaintext or the key need to be uniform. Google Authenticator and other 2fa providers use a hash generated by SHA-1 to generate the 2fa codes which is the standard for HOTP (RFC4226) and TOTP (RFC6238). While SHA-1 may not be perfectly uniform, SHA-1 is nearly-uniform and close enough to uniform that frequency analysis is not a feasible attack. Therefore, any non-obvious key such as an easy-to-remember phrase or sentence can be used to encrypt the 2fa codes.

One weakness of this is if you use the same key to use a One-Time Pad to encrypt all your 2fa backup codes and one of your codes gets brute-forced, the attacker can derive the key and then decrypt all your codes. While it is standard practice for account providers to rate-limit logins to help prevent brute-force attacks, some account providers may have worse protection than others and it should not be assumed that all account providers have adequate protection. Your 2fa backup code security is then only as good as the weakest account provider. Therefore, you should use a different key for each account which negates one of the major benefits of this method: that you only have to memorize one key.


Is stand-alone one-time password less secure than OTP + traditional password auth?

Not necessarily. This is a scheme where you don't want to store a password for the user.
Sometimes, this is done so that the user doesn't need to remember yet another password (in fact, there are users heavily relying on resetting the password every time, which produces a similar email-only "passsord").

There are also other parts surrounding this system that need to be taken into account:

Suppose we authenticate Alice by sending a SMS code to her phone. Eve is hanging out with her and, while Alice is away leaving her locked phone unattended, Eve logs in as Alice, reads the provided OTP code in the lock screen and performs malicious action. In this case OTP-only would be weaker, as an additional password would have prevented this attack.
SMS-only or email-only login mean that compromising such external service will immediately compromise your site account. See eg. Hackers Are Hijacking Phone Numbers And Breaking Into Email, Bank Accounts
Consider on the other hand that we require both a password from the user and that they have access to the email. We may consider that more secure than just requiring an email token. But then, how are you providing account recovery when the user forgets its password? Just by sending an email? Then the password doesn't provide additional security from an attacker that compromised your email.
Local token generation (like TOTP), are more robust against a third party compromising the service used as login. But phones (where people install them) break / are robbed and get changed much more often that you expect. So you still need to be able to allow some way of recovery for that.

The part I like most about not requiring a password is that it can sustain phishing easily:

Alice goes into the company.com and enters its username. The website sends her an email with a link to log in. At that point the opened page is no longer used. She goes to her email and browses from the safe link provided to her. Thus, a fake website can't lure her to provide an email code, to a phishing page, since navigation continues from the emailed link.
An attacker could send a fake email with a phishing link, but there arwould be no credentials to harvest there (hopefully, it won't make her enter their credit card details on the "just logged in page").

(Note that albeit less 'natural', you could do the same by requiring the password after following the link, or forcing to close the page after successfully providing the password, and continue on the link.)


How risky is having sensitive files on webroot?

An attacker is going to use forced browsing to try and find sensitive files.  DirBuster is very useful in performing forced browsing attacks, and it commonly finds sensitive files on my penetration testing engagements.  DirBuster comes with a very large list of common file and directory names.  If it's not a common file-name,  DirBuster probably won't find it.

Having sensitive files accessible anywhere on your web-server is dangerous, there needs to be some form of access control in place.


Are Android Snapdragon Vulnerabilities a Real-World threat already?

@Wish_Wu recently did a demonstration of these exact security vulnerabilities to full exploitation at the HITBSecConf in Amsterdam.

Here is the slide deck.

The bugs involve the perf_event_open capabilities shipped in many Android OSes including the recent Nexus line of phones as well as many Samsung Galaxy and LG Android phones of recent note. Wish_Wu goes over which ones are likely in the prezo above.

CyanogenMod also reviewed these vulnerabilities.

There is also additional detail on CVE-2016-0819 including Qualcomm patch (information here).

By searching for the Android IDs in Wish Wu's presentation, you can also see the Android OS and other CyanogenMod patches. The presentation also goes over some additional fuzzing suites that will aid in exploit development.


gpg - Cannot import public key from asc file

The .asc file contains the signature. To verify it, you need three things:

The signed file (your tor browser download)
The public key it was signed with
The .asc file itself

You do already have the signed .exe file and the signature. Next you must fetch the public key. You can do this automatically with the following command:

gpg --auto-key-locate nodefault,wkd --locate-keys torbrowser@torproject.org

This is the output of the command on my machine:

gpg: key 4E2C6E8793298290: public key "Tor Browser Developers (signing key) <torbrowser@torproject.org>" imported
gpg: Total number processed: 1
gpg:              imported: 1
pub  rsa4096 2014-12-15 [C] [expires: 2020-08-24]
     EF6E286DDA85EA2A4BA7DE684E2C6E8793298290 uid
          [ unknown] Tor Browser Developers (signing key) <torbrowser@torproject.org
sub  rsa4096 2018-05-26 [S] [expires: 2020-09-12]

Comparing the fingerprint with the fingerprint posted on the tor website is a good idea at that point.

Next you export the public key to a keyring:

gpg --output tor.kr --export 0xEF6E286DDA85EA2A4BA7DE684E2C6E8793298290

This command uses the currently valid fingerprint to identify the key, which it needs to export. A future reader might have to use another one, if the key has changed in the meantime.

Finally you can verify the signature with the following command:

gpgv --keyring tor.kr torbrowser-install-win64-9.0.7_en-US.exe.asc torbrowser-install-win64-9.0.7_en-US.exe

The output will tell you, if the signature verification worked. Hopefully you see something like this:

gpgv: Signature made So 22 Mar 2020 10:37:51 EDT
gpgv:                using RSA key EB774491D9FF06E2
gpgv: Good signature from "Tor Browser Developers (signing key) <torbrowser@torproject.org>"

In case it failed, it will look something like this instead:

gpgv: Signature made So 22 Mar 2020 10:37:51 EDT
gpgv:                using RSA key EB774491D9FF06E2
gpgv: BAD signature from "Tor Browser Developers (signing key) <torbrowser@torproject.org>"


Reliable Sources for Software Vulnerability Patch Release dates

After some research, I realised that the NVD does not publish all data about disclosed vulnerabilities since they opine that specific software vendors should have the most reliable information. Hence, patch release dates are available in the bug tracking repository of the vendors for example for OpenStack, such information is available in their Launchpad repositories.


I think i might have accidentally clicked a phishing link, how can i be sure?

There are a few standard tests / questions to detect phishing:

Most serious companies will never ask you for login data by email.
Check if the URL is looking strange. (very long / with typo in main domain?)
Check for HTTPS connection and look for certificate information and check this (click on the lock in the adress bar). Check if you can find a certificate. Check if the certificate contains data like company's name. If so you're pretty safe.
Visit the site normally in another tab, check for green bar in adress bar if so, check if the potential phishing link provides this.
Call the company / write an e-mail to confirm this e-mail. (using the adress on default homepage)


Germany: Privacy Protection Regulations and Response

I would reach out to a lawyer in Germany who is very familiar with local law and the EU Data Privacy Directive. No one here is qualified to give a legal opinion and as @Gilles mentions in his comment, there are probably other details. I am also not sure if there are implications with European citizenship (which if you just moved into the EU/Germany you likely do not yet have) and the scope of the protections offered in Europe.

From my personal experience, this sounds little out of character, as many European companies will not perform background checks for fear of being sued on privacy invasion grounds.

I would start with the The Federal Commissioner for Data Protection and Freedom of Information with the Data Protection Acts node here. There seems to be a lot more information available in German than in English, so this site may be more helpful if you are fluent in German. I'm pretty sure there is an lawyer or legal office you can contact for more information on this issue.


You may be interested in seccomp. This is a feature with which Linux runs a process with only a very limited set of available system calls; the kernel kills the process at any attempt to execute any other call. This is, conceptually, the Right Way to do this kind of isolation: use a (small) whitelist of allowed system calls, instead of a blacklist of disallowed calls. Seccomp can be used by chromium (the opensource side of Google Chrome) so there's good chance that it will remain supported for the time being.

The Wikipedia page has a few links, including seccomp-nurse, which might be the software you are looking for.

For CPU time and memory consumption, the Linux kernel can enforce hard limits on a per-process basis; see setrlimit.


What security issues are there with remote access for firewalls, routers, etc.?

Basically every "remote access" feature is a potential attack vector, allowing a malicious actor to perform attacks on your device.

For example, if you have a outdated cisco firewall, even if you have the most complex password, an malicious attacker could perform a buffer overflow on the authentication step and maybe get access to your server.

Few recommendations would be:

Disable any insecure protocol on your device (Telnet, FTP, etc..), keep only SSH or encrypted protocols.
Implement whitelists to allow only very specific IPs to connect to the SSH. Never leave remote-access ports open to the internet or to non-trusted networks;
If it's possible, implement a secure jump server, to ensure only authorized people will have access to the SSH interface of the device. If you have a jumpserver, the only IP that should have access to the SSH interface of the firewall should be the jump server IP.
Keep a good access management practice, ensure password complexity and enforce password expiration for user-accounts.


Why do some sites not configure their servers to get a SSLabs A rating?

Some of it is definitely backward compatibility. While IE11 on Win10 is capable of TLS 1.2 by default, some older versions of IE had TLS 1.2 disabled by default or were outright incapable of it, and some sites target older versions. There's also things like old versions of Android or other mobile browsers, embedded systems with older firmware, and so on.
Some of it is hardware cost. TLS-terminating load balancers used to be (maybe still are?) a common hardware purchase for somebody building a data center or similar large Internet-connected network, and many of those had limited configurability / upgradability and hence might not fully support modern protocols or be unable to turn old ones off. They could be replaced, but are a substantial monetary investment.
Some of it is lack of concern. Lots of sites use TLS less because the security properties are relevant, and more because of the various initiatives to get everybody using it (e.g. Google has talked about prioritizing sites that use it in search results, though I don't know if that ever went ahead). Sites that just host static content, or otherwise have no need for communication security, are unlikely to bother configuring for maximum security. They'll probably just use the defaults, which - on many, many platforms / frameworks - will still not get an A rating, especially using older versions.
Some of it is ignorance. While a combination of general efforts of security experts and some highly-publicized exploits in older versions have generally made people aware of the need to configure for higher security (and of scanners like SSLlabs SSLtest), this industry is enormous and most companies (much less individuals) don't have any security engineering talent on staff. They quite possibly have never even considered the question of what protocols, ciphers, and options to configure on their server.
Some of it is sites' hosting not being under the control of the site's owner. Lots of individuals and small companies use hosting providers rather than maintain their own servers. These hosting providers do not always keep up with the times, in terms of secure TLS configurations. This is deeply unfortunate, since they're in an excellent position to improve lots of sites at once (and since there's a sense in which their entire reason for existing is "we manage your servers" and thus they're arguably not doing their jobs), but it happens.
Some of it is standards marching on and leaving people behind. Lots of configurations that would previously get "A" ratings, and maybe even "A+" ratings, no longer do. Sites that don't keep up may have historically been considered fully secure and then fallen behind when, e.g., TLS 1.1 was deprecated.
Some of it is people having other priorities. Reconfiguring one TLS server isn't that big of an effort once you know how, but a company might not have anybody who really knows how, or might have a huge fleet of servers that would need this done and don't want to take the risk of breaking something, or might have a task to get around to it but it's de-prioritized below 14 months of work. They're not necessarily wrong, either; while there are known exploits for some old configurations, some were deprecated more out of an abundance of caution than due to any known practical attack. Even things thought of as definitely insecure in general, like RC4 or SSL3.0 with CBC, aren't even necessarily vulnerabilities if the only clients intended to communicate with the servers are ones that interact in ways that RC4 biases or POODLE can't be exploited.
Some of it is just not caring. People make bad security decisions all the times, from the individuals who re-use passwords across sites to the enterprise companies who take months to install patches against vulnerabilities being exploited in the wild. The costs of not having an "A" rating are pretty low - most people will never know, and TLS attacks appear to be (so far, and leaving aside things like Heartbleed) super-rare. In a world where phishing is rampant and shockingly successful, why would anybody bother with attacks that require a MitM position, script injection on another site, and then submitting huge numbers of requests just to get one victim's session token? Personally I think that's a bad mindset to have, but again, we're talking about the kind of people who know using a password of their company name in mixed upper and lower case isn't actually that secure but just don't care because who is going to bother trying to brute-force it? and that's way lower-hanging fruit than disabling RSA key exchange.


How to detect Selenium/webdriver browsing on my site

You may not want to hear it, but you're asking the wrong question.

  Specific parts (clicks, links etc) of our site make our backend work hard and accessing them for scrapping disrupt our regular clients work

You're being inadvertently DoSed. If something as trivial as public website scraping is enough to impact production/revenue, your architecture is flawed. Chasing after bots and trying to identify every last one of them is not the answer-- there will always be new bots and new methods of scraping.

I'm constantly amazed at the number of questions involving web scraping that appear to be school assignments that pop up on SO. You have no end of up-and-coming adversaries.

Furthermore, an unscrupulous competitor could just suppress your traffic altogether by running a bot swarm of their own against you. I've had to work for places that asked me to do similar, so they definitely exist.

You need to take steps to achieve the results of these requests without letting any number of arbitrary visitors kick off these resource-intensive tasks. Caching is going to be your answer, or restricting these particular operations to authenticated users.


Building a Security Training Simulation environment

Start with a network diagram based on how a corporate network would look like. For example the DMZ is going to contain the webservers and mailservers. Then there will be firewalls to protect the userland from the DMZ, also you are going to have domian controllers, database servers which are going to be part of a secure network. Hope you get an idea on what am trying to descibe. You can find a sample network diagram here on a for a pentest lab. You need not follow the same thing, but use it to design your own.

As for actually building the lab I would suggest using vSphere server which allows you to virtualize the operating systems and build a network. Check this blog on setting up a virtual environment.

Check out the following resources to help you in setting up a lab

http://ist.bk.psu.edu/cvclab/wp-content/uploads/2011/12/BuildingLab1.pdf

http://www.irongeek.com/i.php?page=videos/pen-testing-practice-in-a-box-how-to-assemble-a-virtual-network

http://www.jasonjfrank.com/wp-content/uploads/2012/10/Building-your-Own-Penetration-Testing-Lab-on-the.pptm


What unique device fingerprinting information can an iOS 12 or iOS 13 app collect?

What uses exist of persistent data stores by apps, or by apps across an app group, that survive app (or app group) deletion

If I understood the question correctly, looks like all app-specific keychain items still survive app uninstall (as confirmed by Apple Staff back in Dec 2017). It changed for a while in iOS 10.3 beta, but reverted back by GM and never disappeared since that time (I could not find any evidence of the otherwise; Apple's article on using keychain for developers still says "you'll want to remove password item from the keychain"; it doesn't says a developer should remove everything nor allow for automatic removal of it by iOS).

Moreover, there don't seem to exist any way for end user to remove such app-specific pieces from iOS local keychain.

On the above link, there's email of Apple Developer Relations to further inquire on this as of iOS 12/13.


From a technical standpoint, how does the zero-day Internet Explorer vulnerability discovered in September 2012 work?

CVE-2012-4969, aka the latest IE 0-day, is a based on a use-after-free bug in IE's rendering engine. A use-after-free occurs when a dynamically allocated block of memory is used after it has been disposed of (i.e. freed). Such a bug can be exploited by creating a situation where an internal structure contains pointers to sensitive memory locations (e.g. the stack or executable heap blocks) in a way that causes the program to copy shellcode into an executable area.

In this case, the problem is with the CMshtmlEd::Exec function in mshtml.dll. The CMshtmlEd object is freed unexpectedly, then the Exec method is called on it after the free operation.

First, I'd like to cover some theory. If you already know how use-after-free works, then feel free to skip ahead.

At a low level, a class can be equated to a memory region that contains its state (e.g. fields, properties, internal variables, etc) and a set of functions that operate on it. The functions actually take a "hidden" parameter, which points to the memory region that contains the instance state.

For example (excuse my terrible pseudo-C++):

class Account
{
    int balance = 0;
    int transactionCount = 0;

    void Account::AddBalance(int amount)
    {
        balance += amount;
        transactionCount++;
    }

    void Account::SubtractBalance(int amount)
    {
        balance -= amount;
        transactionCount++;
    }
}

The above can actually be represented as the following:

private struct Account
{
    int balance = 0;
    int transactionCount = 0;
}

public void* Account_Create()
{
    Account* account = (Account*)malloc(sizeof(Account));
    account->balance = 0;
    account->transactionCount = 0;
    return (void*)account;
}

public void Account_Destroy(void* instance)
{
    free(instance);
}

public void Account_AddBalance(void* instance, int amount)
{
    ((Account*)instance)->balance += amount;
    ((Account*)Account)->transactionCount++;
}

public void Account_SubtractBalance(void* instance, int amount)
{
    ((Account*)instance)->balance -= amount;
    ((Account*)instance)->transactionCount++;
}

public int Account_GetBalance(void* instance)
{
    return ((Account*)instance)->balance;
}

public int Account_GetTransactionCount(void* instance)
{
    return ((Account*)instance)->transactionCount;
}

I'm using void* to demonstrate the opaque nature of the reference, but that's not really important. The point is that we don't want anyone to be able to alter the Account struct manually, otherwise they could add money arbitrarily, or modify the balance without increasing the transaction counter.

Now, imagine we do something like this:

void* myAccount = Account_Create();
Account_AddBalance(myAccount, 100);
Account_SubtractBalance(myAccount, 75);
// ...
Account_Destroy(myAccount);
// ...
if(Account_GetBalance(myAccount) > 1000) // <-- !!! use after free !!!
    ApproveLoan();

Now, by the time we reach Account_GetBalance, the pointer value in myAccount actually points to memory that is in an indeterminate state. Now, imagine we can do the following:

Trigger the call to Account_Destroy reliably.
Execute any operation after Account_Destroy but before Account_GetBalance that allows us to allocate a reasonable amount of memory, with contents of our choosing.

Usually, these calls are triggered in different places, so it's not too difficult to achieve this. Now, here's what happens:

Account_Create allocates an 8-byte block of memory (4 bytes for each field) and returns a pointer to it. This pointer is now stored in the myAccount variable.
Account_Destroy frees the memory. The myAccount variable still points to the same memory address.
We trigger our memory allocation, containing repeating blocks of 39 05 00 00 01 00 00 00. This pattern correlates to balance = 1337 and transactionCount = 1. Since the old memory block is now marked as free, it is very likely that the memory manager will write our new memory over the old memory block.
Account_GetBalance is called, expecting to point to an Account struct. In actuality, it points to our overwritten memory block, resulting in our balance actually being 1337, so the loan is approved!

This is all a simplification, of course, and real classes create rather more obtuse and complex code. The point is that a class instance is really just a pointer to a block of data, and class methods are just the same as any other function, but they "silently" accept a pointer to the instance as a parameter.

This principle can be extended to control values on the stack, which in turn causes program execution to be modified. Usually, the goal is to drop shellcode on the stack, then overwrite a return address such that it now points to a jmp esp instruction, which then runs the shellcode.

This trick works on non-DEP machines, but when DEP is enabled it prevents execution of the stack. Instead, the shellcode must be designed using Return-Oriented Programming (ROP), which uses small blocks of legitimate code from the application and its modules to perform an API call, in order to bypass DEP.

Anyway, I'm going off-topic a bit, so let's get into the juicy details of CVE-2012-4969!

In the wild, the payload was dropped via a packed Flash file, designed to exploit the Java vulnerability and the new IE bug in one go. There's also been some interesting analysis of it by AlienVault.

The metasploit module says the following:

  This module exploits a vulnerability found in Microsoft Internet Explorer (MSIE). When rendering an HTML page, the CMshtmlEd object gets deleted in an unexpected manner, but the same memory is reused again later in the CMshtmlEd::Exec() function, leading to a use-after-free condition.

There's also an interesting blog post about the bug, albeit in rather poor English - I believe the author is Chinese. Anyway, the blog post goes into some detail:

  When the execCommand function of IE execute a command event, will allocated the corresponding CMshtmlEd object by AddCommandTarget function, and then call mshtml@CMshtmlEd::Exec() function execution. But, after the execCommand function to add the corresponding event, will immediately trigger and call the corresponding event function. Through the document.write("L") function to rewrite html in the corresponding event function be called. Thereby lead IE call CHTMLEditor::DeleteCommandTarget to release the original applied object of CMshtmlEd, and then cause triggered the used-after-free vulnerability when behind execute the msheml!CMshtmlEd::Exec() function.

Let's see if we can parse that into something a little more readable:

An event is applied to an element in the document.
The event executes, via execCommand, which allocates a CMshtmlEd object via the AddCommandTarget function.
The target event uses document.write to modify the page.
The event is no longer needed, so the CMshtmlEd object is freed via CHTMLEditor::DeleteCommandTarget.
execCommand later calls CMshtmlEd::Exec() on that object, after it has been freed.

Part of the code at the crash site looks like this:

637d464e 8b07            mov     eax,dword ptr [edi]
637d4650 57              push    edi
637d4651 ff5008          call    dword ptr [eax+8]

The use-after-free allows the attacker to control the value of edi, which can be modified to point at memory that the attacker controls. Let's say that we can insert arbitrary code into memory at 01234f00, via a memory allocation. We populate the data as follows:

01234f00:    01234f08
01234f04:    41414141
01234f08:    01234f0a
01234f0a:    cccccccc // int3 breakpoint

We set edi to 01234f00, via the use-after-free bug.
mov eax,dword ptr [edi] results in eax being populated with the memory at the address in edi, i.e. 01234f00.
push edi pushes 01234f00 to the stack.
call dword ptr [eax+8] takes eax (which is 01234f00) and adds 8 to it, giving us 01234f08. It then dereferences that memory address, giving us 01234f0a. Finally, it calls 01234f0a.
The data at 01234f0a is treated as an instruction. cc translates to an int3, which causes the debugger to raise a breakpoint. We've executed code!

This allows us to control eip, so we can modify program flow to our own shellcode, or to a ROP chain.

Please keep in mind that the above is just an example, and in reality there are many other challenges in exploiting this bug. It's a pretty standard use-after-free, but the nature of JavaScript makes for some interesting timing and heap-spraying tricks, and DEP forces us to use ROP to gain an executable memory block.

Anyway, this was fun to research, and I hope it helps.


Why is openssl key length different from specified bytes

You are generating an RSA private key with a 512 modulus. However, RSA needs quite some more elements to work (the wikipedia article is quite good here). Since this is not a question regarding RSA, I will not go into details and instead give you the command you are looking for.

In order to process the RSA private key and see what all is contained in this data, run the following command:

openssl rsa -noout -text -in testKey

The first block is your 512 bit private modulus.


Looking for a way to encrypt/decrypt data using a generated key that works in Windows and Linux

Different programs can encrypt data without storing a key somewhere, but rather a password. Zip/rar files can be encrypted, or instance, and programs like TrueCrypt or VeraCrypt can do the same. The file gets encrypted and protected with a password. You need the program on the destination location in order to decrypt.

If you want to create your own program, then according to your question, the "key" is stored in your code. You have the same key storage issues in code as you do in any other key storage scenario.


How do I find all domains hosted on a single host?

There is absolutely no way to list all domains "hosted" on a machine as you state it.

First of all, what you wanted to do will only give you the name(s) attached to a PTR record (reverse DNS to an IP). It will not give you a list of A records pointing to it.

What you must understand about DNS, is that they act as a database of associated IP addresses and hostnames.
There may be several DNS servers with records pointing (with A records) to a single host. But there is no way to know which servers are effectively hosting those records, as well, as there is no type of DNS query that asks a DNS server for A records pointing to a specific IP.

You stated about websites proposing to "query" about an IP to know which sites are hosted on it. All those sites do, is storing in a database association between public websites (and hostnames) and their attached IP address(es), indexing on the IP.
This only works if they can guarantee you that they crowled the entire www, world-wide, and that their informations are accurate, which they can't, as they are thousands of "websites" hosted privately (without search engines indexation and no cross-links), others moving around and changing IP, etc ...

I hope this explaination was clear enough and helped.


In any kind of encrypted communication, both endpoints must support the encryption.

So, to answer your question, all the devices must support the encryption.

Normal bluetooth cannot be passively sniffed, so I recommend using normal bluetooth.


How to protect files from someone who has access to the computer that contains those files?

If your Raspberry Pi doesn't need to decrypt the data use asymmetric encryption (public/private key) instead. Then the public (encrypting) key can be used on the Raspberry Pi and only when it arrives at your client (via HTTPS) can it be decrypted with the private key.

I haven't used Python in this manner but the following URL seems like a good start:

Laurent Luce's Blog - Python and cryptography with pycrypto

EDIT: Since your Raspberry Pi needs both encrypt and decrypt capabilities, the most secure method is to still incorporate asymmetric encryption. Just like your current method of using symmetric encryption (shared key), one has to be careful with where to store the keys. By incorporating smart cards, the private (decrypting) key would be stored on the card itself. Just like having a key to start your car, a smart card could be required to use your Raspberry Pi. While this would increase your costs (purchase of smart card, card reader, etc), it is the most secure option.

If this solution is not viable, then full disk encryption is your best bet as mentioned by pjc50.


Why is SQL considered to be a session layer "protocol"?

SQL includes many things (I'm skipping a few):

the SQL syntax itself (there is a standard, just more or less applied by various databases). I believe this is what you are referring to.
the wire protocol format (there are a few of those). This is mostly about how to represent data.
the interaction between clients and servers. This is closely integrated with the first two.

The third one concerns session establishment, use, and close. This fits fairly well within OSI level 5.

In SQL, you can create and reuse a session. The actual statements (specific keywords and sql syntax) are using that session. So you could say that the SQL language itself is closer to layer 6, although that's debatable as well.

You could also view transactions as "sessions", but not in the networking sense.

This may sound like a vague answer, but that's because SQL covers so much that it doesn't fit neatly into one box.


Is it better to have a secure channel or secure PIN entry for Smartcards?

The attack surface is smaller with the hardware PIN pad. The secure channel between the smart card driver and the card can't protect against snooping over USB between the keyboard and the computer, nor can it protect the key presses from being read when they reach the OS before going to the smart card driver and then the secure channel. Both of these threats fall under the key logger attacks you mentioned, and both are mitigated strongly by hardware PIN entry because there's no pluggable USB path to monitor, nor is there a complex kernel and driver infrastructure handling each key press. Some hardware PIN devices even have tamper-evident housing to reveal if someone tried to implant monitoring in the pad itself.

Regardless of how the PIN reaches the card, there is still the threat of malicious challenges being signed by the card after the PIN has unlocked the signing function. Aside from using air-gap security, one way to detect malicious behavior is knowing how many things you're intending to sign (possibly with an audit log) and matching the expected signatures against the counter on the card, which is like an odometer for signing operations.

A hardware PIN pad can also make malicious signing requests obvious because an attacker would have to make your card sign their data instead of yours, which would then require another signature to happen for your data. Hardware PIN pads help here by always requiring PIN entry for each signature. If you enter your PIN, something gets signed, and it's not the thing you needed signed, something fishy may be going on. While you can configure something like GnuPG to require a PIN for each signature or challenge, you're at risk of an attacker re-enabling PIN caching to sign both the malicious data and your own with one PIN entry.

Devices like the YubiKey 4 have a lighter version of this protection where you have to tap the card for each signature. This still provides a good way to detect someone maliciously having their data signed instead of yours (because you'd tap, and something would get signed, but your data would not yet be signed).

I don't think the secure channel is enough to prevent malicious signatures from being created because it only closes the attack between the driver and the card, while something outside that system has to initiate the signature process. Malware on the same OS would still be able to request signatures.

On the other hand, without the secure channel, an attacker might be able to monitor signatures over the USB interface to the reader, but that's the same attack that could capture a PIN entry from a standard keyboard and then directly request signatures from the card. The PIN capture attack is the easier one, too. I can buy a key logger off Amazon.com, but I doubt I'd be easily able to get my hands on a pre-made tool to intercept smart card signing traffic. Once I have the PIN, I could run a USB host connected to the card reader via something like a Raspberry Pi, and I'd be able to sign away the next time the card gets inserted.

In summary, a hardware PIN pad provides effective protection against malicious PIN capture as well as easy detection of malicious signing requests (via one PIN entry = one signature). Barring air-gap security and heavy audit procedures, that's the best you can do.


What compliance framework is appropriate for firewalls

DISA STIGs are always good:

http://iase.disa.mil/stigs/net_perimeter/network_infra/firewall.html


Demo of web site that is vulnerable to command injection

The WebGoat Project has a lesson specifically on command injection ;)


Why do bots visit my website even though it hasn't been shared with anyone yet?

Various reasons, mainly to scan and index the internet (companies like google, bing, yahoo, etc) and to find vulnerabilities to hack your website and use your servers for their own purposes.

Is this usual?

Yes.

How do they even know about my website?

There are many ways they can learn about your website, one of the more common is they watch new domains as they are registered and scan each as they come online.

What is the purpose of this, are they trying to scrape info off of my page or something?

Information and hacking mostly as described earlier.

Is this a privacy issue?

That depends on what you have on your website.  Anything you put on the internet shouldn't be considered private anymore.  Most websites that curate private information (social media, banks, email) create logins to keep the scanners from gaining access to items that would create a privacy issue for your users.


What can my ISP see in their log files if I use Google DNS?

Short answer: they are only able to log the hosts you visit (e.g. security.stackexchange.com, google.com, etc) and not the full address (e.g. https://stackexchange.com/login). If you access unencrypted webpages (http instead of https), they are able to see everything. ISP are not known to log unencrypted webpages en masse, but I wouldn't not be surprised if the NSA or china logs this kind of meta information.

Long answer:
Since DNS traffic is not encrypted, your ISP could see every host you visit (it does not matter if you use Google's DNS or theirs). If you visit https://security.stackexchange.com/questions/ask (note the s after http), your ISP will see that you visited security.stackexchange.com and that you used HTTPS. If you use HTTP, the will see everything (the content of the webpage, url, and sometimes even cookies. Note that security.stackexchange.com will always redirect you to their HTTPS version. This means your ISP will only see that you were redirected to the encrypted version. If you are not on the https version, you're being MITM'd. You should then use a VPN).

If you request http://security.stackexchange.com/questions/ask (as you have originally asked), your ISP will also be able to tell that you requested the very page since it is not encrypted. It does not matter that Stack Exchange is redirecting you to the encrypted version because the you have already access the unencrypted version once. Make sure you always use https when possible.

If you access google via 216.58.192.110 (one of their IPs), your ISP will still be able to see that you visited 216.58.192.110. Since your ISP is also probably running a DNS server, they could also check where 216.58.192.110 resolved to (which will probably return google). They could also check that by hand, but this would take more time.

The only way to protect you from these attacks is if you use a VPN. Note that by using a VPN you simply shift the trust to someone else. If you use a public VPN, there are many more parties who can monitor your traffic: the VPN provider (their server might log everything you do), the server host, and the government the server is located in.


Hashcat supports rules for modifying word lists on the fly.

You can prepend the username and append the salt in a rule file (save as something.rule):

^username $salt

and use -r in Hashcat to call the rule file.


There is nothing built into the SD card - its basically dumb storage.

What you can do is encrypt files on the device - either individually or the entire filesystem. Modern android supports this natively - under "Security" or "Lock screen & security" etc (depending on manufacturer) look for the encryption section. This works well when the SD card is used as an extension of the built in storage. If you wish to use the card to transfer data you will likely struggle - this answer suggests it isn't possible with standard tools.

As far as I am aware Windows phone does not offer a similar feature. I'm sure there would be some applications which supported encrypting files on the filesystem - but this wouldn't play well with other apps accessing them.


Aireplay-ng broadcast doesn't work on a client

Why does deauthentication not work?:

  Some clients ignore broadcast deauthentications. If this is the case,
  you will need to send a deauthentication directed at the particular
  client.

I see nothing else to be added to this.


Any security vulnerability in PHP fsocketopen

Since you have full control over both variables and the ports being opened, your best bet for doing more with this vulnerability is to keep in mind that many internet protocols are just plain text commands sent over an open socket.  The significance of this fact is that sending an HTTP request to an open SMTP server can actually trick the SMTP server into sending an email.  Chrome actually blocks any attempts to access port 25 via your browser as a result.  Here is a good run-down:

https://jazzy.id.au/2012/08/23/why_does_chrome_consider_some_ports_unsafe.html

The importance here is that you can use the vulnerable server not just to call arbitrary HTTP sites, but you can potentially also use it to spam SMTP servers (resulting in actual emails being sent) and potentially other internet-connected services.

Granted, this isn't a huge leap from where you already are, but you never know what more fun this might give you.  If for instance this server is trusted for email sending, you may be able to send emails as the company without having it filtered out as spam.  That's not a small thing.

It's possible the hard-coded http in the fsocketopen call may be enough to kill the email-sending idea, but it is definitely worth trying.  Again, there isn't really anything "special" to differentiate http requests from SMTP requests, so if you can find and connect to a server over the proper port, the fact that PHP considers it an http request doesn't really matter if the remote server accepts your connection.


How is malware distributed within zip files?

Do you remember "I love you" ?

Human curiosity often does the trick, unarchiving the zip and then executing the JS (via the windows scripting host that does not follow the same restrictions as a browsers JS engine)

There are more than enough people that do want to be sure they didn't miss a payment and will be cut off their mobile phone soon.

A fundamental unawareness of how email works is another great factor here:

  The email comes from Tom! And he says I should have a look. Tom always shares funny images on facebook, let's see!

Completely unaware of email-sender spoofing (which shouldn't be a problem with DKIM, SPF, S/MIME and PGP around, but that's another story), those users just trust the sender and open the files.

INORITE? But that's just human curiosity bundled with fatal lack of knowledge.


Does it make sense to split two factor authentication between identity providers

Authentication with SAML uses password in the corporate directory. This password is one authentication factor. The TOTP uses key (password) that has nothing to do with password in the corporate directory. Thus these are two independent factors. For authentication an attacker will need to know both.
Both factors are based on the knowledge of some secret. Normally it is better to use factors of different types, e.g. one is based on knowing of something and one based on possessing of something (like token, card, smartphone) or being something (like fingerprint).
But in the reality TOTP does not require user to enter the key each time. Usually the key is generated randomly and stored in the device, e.g. in the token. This token generates codes based on the key and current time. To compromise this factor often it is easier to compromise the token (e.g. steal it) than to extract the key from it or to retrieve the key from the security system. Thus the security of TOTP is based effectively not on the knowledge of the key, but on the possession of the token.
Thus 2FA in your case is based on knowledge (of the password in corporate directory) and possession (of the TOTP hardware token).
This approach is reasonable and is more or less common. Of course the real strength of the security depends on many things:

The entropy of the passwords in the corporate directory (if it is low, such passwords can be easier brute-forced)
How is password management implemented in your company (e.g. how is allowed to reset passwords for users, in what cases)
How is TOTP organized (e.g. who can get access to the TOTP key on the server side)
How disciplined are users (if they keep their passwords secret or write them down and make then accessible to the others)
How well user care of TOTP tokens (e.g. to they inform your company immediately as they notice that token is lost/stolen)
Etc.

But the approach itself is reasonable.


No cryptography using client-side JavaScript can be secure without HTTPS. Any MITM attacker can send JavaScript that can do anything with the secrets the browser has access to, then there will be no secret.

If you absolutely cannot use HTTPS, the user must have to a tool to compute the response outside the browser and paste the result into the browser. Even so, any data transmitted after the authentication is still subject to interception and modification, which makes the authentication pretty useless from a user-protection perspective.

Please read:

What's wrong with in-browser cryptography? - Tony Arcieri
or Javascript Cryptography Considered Harmful - NCC Group
or the 1,030,000 results returned for searching "wrong with javascript cryptography" on Google

Edit:

BTW, even if you use an external program to handle the authentication and maybe even encryption of data that goes over HTTP, you may still have a lowered security compared to just using HTTPS. Best example is the Korean SEED cipher which exposes users by locking users down to and training them to trust ActiveX controls and IE. See this blog article).


Can a Wordpress be hacked by accessing a PHP script on the same server?

the entry points for attacker can include: outdated - PHP, themes, plugins, weak passwords, misconfigured php.ini file that can lead to issues.
Please check if any of these have been overlooked.


Company claims hardwire connections are a security issue

Warning: Conjecture, because none of us know their actual setup.

It is very likely that the organization has their own network, which is hard-wired, as well as a guest network, which is wireless-only.  The two are separate networks.  This is a common layout because laying wire to desks is expensive, but worth it, for your own employees; broadcasting wireless is cheap, and worth every penny of it, for your guests.

When you asked about a hard-wired connection, they are answering the question of which network you'd be on rather than how you connect to the network.  And as the two are intertwined in their minds ("hard-wire is our network, wireless is guest network") they are answering very simply.

From their point of view, they don't want non-organization machines on their network, only on the guest network - because of viruses and stuff.  We can all understand that we wouldn't want random visitors on our internal networks, right?  So that would be a context in which their answer makes sense.

I would suggest explaining your concern to them and seeing if they can come up with a solution, instead of asking them about the solution you would expect to work.  It may be that they only expect guests to need enough connectivity for email and light web browsing.  If you explain that Jane needs more bandwidth for her study needs, and can convince them that it's a reasonable request, they're likely to find some way to help - even if it's just moving Jane to a room closer to the Wireless AP.


Defeating Browser Fingerprinting by spoofing the browser user agent and VPN

Tor could be a solution for you, if you could compromise some of the browsing speed.

Tor tries to implement many countermeasures for your anonymity theft.
I would recommend that just using Tor is not enough please read the Tor FAQ for further details.

Update:
Apart from that I would say you have to change your browsing habits too in order to stay anonymous! This is what Tor also says.

Tor normally discourages visiting websites that has lot of active contents. For eg: Video streaming websites like youtube. The reason for this can be understood by reading the FAQ of Tor stated as below:

  active content, such as Java, Javascript, Adobe Flash, Adobe
  Shockwave, QuickTime, RealAudio, ActiveX controls, and VBScript, are
  binary applications. These binary applications run as your user
  account with your permissions in your operating system. This means
  these applications can access anything that your user account can
  access. Some of these technologies, such as Java and Adobe Flash for
  instance, run in what is known as a virtual machine. This virtual
  machine may have the ability to ignore your configured proxy settings,
  and therefore bypass Tor and share information directly to other sites
  on the Internet. The virtual machine may be able to store data, such
  as cookies, completely separate from your browser or operating system
  data stores. Therefore, these technologies must be disabled in your
  browser to use Tor safely.


In many cases the merchant can check the amount before shipping the item. However many payment gateways implement a checksum value that is hashed with a secret key and if the hash don't match the value the transaction is aborted. There are several flaws with this approach, I gave a presentation at blackhat asia last year that illustrate some of them. You can find the slides + code on my github: https://github.com/wireghoul/presentations/tree/master/BHAsia2014 and the talk is on YouTube, just search for solutum cumulus mediocris.


ARP poisoning between a wired and wireless network

ARP is local to a network "wire". In traditional Ethernet, there was a single cable going through all machines in a LAN; the full network is then a collection of LAN, linked together through special machines (routers) who have several ethernet cards, one on each LAN to which the router is connected. When an IP packet must travel from machine A to machine B, it must hop from router to router, and each hop is an emission on a LAN: when the packet jumps from router R to router S, then it means that routers R and S are part of the same LAN. R got the packet from another LAN (to which R is connected as well), and S will send the packet to yet another LAN, which S is part of, as well as the next router.

Nowadays, the "wires" are more virtual. We use twisted pair cables and switches, but they collectively maintain the shared medium model which is what the shared wire embodied in older times.

ARP is the protocol which allows machines from the same LAN to talk to each other. In our example above, router R wants to send a packet to router S, which R knows by IP address. But, on the LAN, R must tag the packet with the MAC address of S, so that S sees it. ARP is the way by which R obtains the MAC address of S: R emits a broadcast packet (the packet is tagged as "for everybody" and every machine on the LAN will see it and consider it), and that packet asks for the MAC address of S. One machine (usually S itself) responds with an ARP response which contains the needed information.

ARP poisoning is the method by which an attacker, who controls another machine on the LAN with R and S (let's call it T), tries to redirect traffic from R, thus posing as a fake S. The attackers tries to do two distinct things:

The attacker wants to see the packet from R to S.
The attacker wants to prevent the genuine S from seeing the packet from R.

In the "shared wire" model, point 1 was automatically achieved, because, by definition, every packet on the wire was electronically visible by all machines connected to that wire (it is just that machines are trained to disregard packets which do not bear their MAC address as destination, unless the packet is tagged "broadcast"). However, with switches, this is not so easy: switches try to keep track on where is each machine, and avoid sending packets on irrelevant cables.

In any case, to achieve point 2, the attacker must do something else, namely convince router R that S's MAC address really is the MAC address of machine T. This "convincing" is what the ARP poisoning is about. Router R, and also the switches, remember the mapping of S's IP address to S's MAC address; the part in which they remember that is called the ARP cache. The ARP poisoning is thus, mostly, a big spamming of everybody on the LAN with fake ARP responses which will convince both R and the intervening switches that the MAC address corresponding to the IP address of S is the MAC address that the attacker has chosen, namely that of the T machine (that the attacker controls).

In any case, ARP poisoning works or even makes sense only within a given LAN. It operates at ethernet level, not IP ("level 2" is in the terrible layered OSI model). An attacker can pull it off only if he gets his foot in one of the LAN through which travel the packets he is interested in.

This long preamble then reveals the answer to your question, i.e.: it depends. Namely, it depends on how the wireless access point is configured. The access point may be a router, connected to two distinct LAN, one for the WiFi machines (their shared medium is then the radio waves), and one for the wired (Ethernet) machines. In such a setup, the WiFi machines know the AP as a router with its own address, and when they want to talk to a wired machine, they talk to the AP. Each LAN has its own ARP traffic. ARP poisoning does not, in that case, work over a communication from a WiFi machine (A) to a wired machine (B): by construction, machine A never learns the MAC address of machine B, since it is not on the same LAN. If A never knows that MAC address, it cannot be convinced to use a fake address: it uses no MAC address at all for B, only an IP address. B is non-local to A.

At best, an attacker on the WiFi LAN may try to convince other machines that the router's MAC address (the access point) is something else, but the router itself will probably remain unmoved: the knowledge of a machine of its very own MAC address is normally impervious to cache poisoning.

However, if the AP is a bridge, then there is only one LAN, which spans over both the wired and the WiFi machines. ARP requests and responses flow throughout. The access point is then not a router at all, or at least not a router which links the two LAN together, since there is only one LAN. The AP might not even have a MAC address or an IP address at all. In that case, ARP poisoning works well: the WiFi access point is just a "kind of switch" which happens to use radio waves as physical medium.

Most "home wireless routers" are both a bridge and a router. They do a bridge between the WiFi machines, and the wired machines connected to its "internal" plugs. They also pose as routers, linking to another LAN embodied by the single "uplink" plug, which is supposed to go to the cable/ADSL modem. ARP poisoning will work well from the WiFi to the wired machines and back, but not towards the cable/ADSL modem.


Be very, very careful. It's not KRACK that is the problem, it is a lax attitude to security and privacy in general. So called "smart" consumer products can often be hijacked, accessed from the internet, or monitored. As a customer, it is hard to know if any specific product is safe or not.
The Norwegian Consumer Council has been on the case for a while, and produced a few horror stories. From a report, aptly titled #ToyFail, on three "smart" dolls:

When scrutinizing the terms of use and privacy policies of the connected toys, the NCC found a general disconcerting lack of regard to basic consumer and privacy rights. [...]
Furthermore, the terms are generally vague about data retention, and reserve the right to terminate the service at any time without sufficient reason. Additionally, two of the toys transfer personal information to a commercial third party, who reserves the right to use this information for practically any purpose, unrelated to the functionality of toys themselves.

[I]t was discovered that two of the toys have practically no embedded
security. This means that anyone may gain access to the microphone and speakers
within the toys, without requiring physical access to the products. This is a
serious security flaw, which should never have been present in the toys in the
first place.

And from an other of their reports, again aptly named #WatchOut, on "smart" watches for kids:

[T]wo of the devices have flaws which could allow a potential attacker to take control of the apps, thus gaining access to children’s real-time and historical location and personal details, as well as even enabling them to contact the children directly, all without the parents’ knowledge.
Additionally, several of the devices transmit personal data to servers located in North America and East Asia, in some cases without any encryption in place. One of the watches also functions as a listening device, allowing the parent or a stranger with some technical knowledge to audio monitor the surroundings of the child without any clear indication on the physical watch that this is taking place.

And the FBI agrees:

Smart toys and entertainment devices for children are increasingly incorporating technologies that learn and tailor their behaviours based on user interactions. These features could put the privacy and safety of children at risk due to the large amount of personal information that may be unwittingly disclosed.

So unless you have a real need (other than "this is cool") for these kinds of products, I would say that your best approach is to simply stay away from them.


Decrypt SSL Connections established by a Host I have adminsitrative privileges on

You might try the methodology listed in this article:
http://blog.erratasec.com/2015/02/extracting-superfish-certificate.html

The author dumps the memory of the running process, and then finds the key in that dump. He uses a list of strings from the memory dump as inputs to a dictionary attack to crack the password for the key.

If, as you suspect, the binary has its own certs, then this might be a general plan of attack for you.


Would turning a Diceware phrase into a sentence decrease its security?

It does not decrease the security.  What is actually happening is that your "entropy calculator" is giving you a false measure of entropy.  It can only give an approximate estimate, after all.  There's actually interesting proofs that show that one can never actually know the amount of entropy in a particular string of text unless you know something about how it was constructed.  A pass string 1000 words long created by a "physical random number generator" like a resistor noise network will appear to have the same amount of entropy as a pass string 1000 words long generated using a Mersene Twister, until you realize that the Mersene twister actually leaks all of its seed information in any contiguous block of 624 values.  Entropy calculators can only make heuristic assumptions about how random the data actually is.

This, of course, is why we have Diceware.  It can prove [an underestimate on] entropy because randomness is built into the process.  To prove the security of a pass-sentence like you are looking at, consider an oracle test.  I select a bunch of words using Diceware, and then I build a sentence out of them.  I then provide you with an oracle which constructs sentences out of them.  It is guaranteed that, if you provide the oracle with the correct set of selected words from Diceware, it will provide exactly the sentence I used.  For all other sets of words, it will produce an arbitrary sentence using them.  It is trivial to see that the entropy of my password cannot possibly be lower than the entropy built into the Diceware words I selected.  Even with this immensely powerful oracle to reduce the very human process of sentence formation to nothingness, the randomness from diceware will remain.  You cannot guess my password any faster than you could guess the original set of Diceware words I selected.

Now there are a few caveats.  If you use fewer diceware words, like your later example, you get fewer bits of entropy from the diceware layer.  This means that oracle I mentioned above becomes more and more helpful for breaking the sentence based password.  Also, some of the sets of words you get from diceware can be particularly difficult to turn into sentences.  If you ever reject a set of diceware words as part of your pass-sentence building process, you are calling into question the perfect randomness that diceware relies on.

Now, why the oracle attack?  Oracles are very powerful tools for testing cryptographic theory.  In reality, tracy is optically renowned worldwide is actually probably quite a lot stronger than the 38.7 bits from the diceware words tracy optic renown.  Breaking that sentence will take more work than the words, though probably not the full 100.504 bits the entropy calculator heuristically estimates.  So how much stronger? We don't know.  That's the point of oracle attacks.  In an oracle attack we say "let's just assume this hard to calculate part of the process offers zero increased security.  None at all.  Is the process still secure?"  If it is secure under this extreme assumption, then it is clearly secure against real life attacks where the attacker doesn't necessarily have such a magically powerful oracle at their disposal.


Can USB drive infect my PC with malware if I don't allow any autorun.inf to run?

Short answer: YES

You can be infected even with a full patched Windows system and an updated antivirus. This happened before and can happen again.

A few years ago, the Stuxnet worm was specially engineered to attack the Iranian nuclear facilities. They got hit by using infected USB drives, without autorun.inf or executing anything by hand.

Those vulnerabilities are called zero day. The attacker knows it, but the vendor and antivirus companies does not. But those vulnerabilities are very prized, and will not be used on a low-value target, because as soon as the attack is detected, it's not a zero-day anymore.

If you are not a high-value target, you usually don't have to worry about being hit by a zero-day. Usually you will get hit by an social engineering attack, and probably will step onto the trap by yourself, like opening an executable file with the icon of a pdf or a picture...


Tracing stolen android tablet via MAC address

Depending on your OS, you could use NetStumbler (Windows) or iStumbler (Mac OS X).
Those tools allow you to track devices WiFi signals.
Using them on a portable device, you can move around and find in which direction the signal gets stronger, until you find where your tablet is.


How does malware evade initial discovery?

Today’s sandboxes are becoming the fastest and easiest way to have an overview of the threat. Ergo, Anti sandbox detection is often used to circumvent detection.  Advanced malware is engineered specifically to detect when it is running in a sandbox. When that happens, the malware will avoid taking any malicious actions and evade detection. Subsequently, when the malware has been allowed to enter the network and finds itself in a real machine, it will begin its malicious behavior.
In order to avoid detection, advanced malware can alter its signature. Signatures are created by examining the internal components of an object. Skilled malware authors modify these components while preserving the object’s functionality. There are multiple transformation techniques used by malware authors and applying any of the following procedures can alter a signature:
• Code permutation
• Register renaming
• Expanding and shrinking code
• Insertion of garbage code or other constructs


How were attackers able to login to the Apache Foundation's infrastructure over ssh with passwords? (2010)

My best guess is that they made a mistake/typo, with this in mind I won't touch on your specific questions.

To help my case here is a comment I ripped out from the article you linked

"You should learn more about OpenSSH sshd configuration and do not put wrong statements like "having UsePAM yes set meant that password-based logins were still possible". There is nothing wrong with UsePAM yes, but you probably did not set both PasswordAuthentication and ChallengeResponseAuthentication to no."


GRC Shields Up test - are stealth ports good?

That is explained on his Internet Port Status Definitions page:

A "Stealth" port is one that completely ignores and simply "drops" any incoming packets without telling the sender whether the port is "Open" or "Closed" for business. When all of your system's ports are stealth (and assuming that your personal firewall security system doesn't make the mistake of "counter-probing" the prober), your system will be completely opaque and invisible to the random scans which continually sweep through the Internet.
Even if this machine had previously been scanned and logged by a would-be intruder, a methodical return to this IP address will lead any attacker to believe that your machine is turned off, disconnected, or no longer exists. You couldn't ask for anything better. Your personal firewall or NAT router protected system is acting like a black hole for TCP/IP packets. That's very cool.

So yes, stealth is good. It's better then closed becaused closed ports tell an attacker There's something here. Especially with well-known ports they know what software is running behind those ports and could try attacking that (e.g. trying if port knocking is supported).
Port 135 being closed is good; all ports stealth would be better (that 'says': There's nothing here).
As for the question about other ports not being stealth, we cannot say much more since you do not mention which ports they are, and what is keeping them open. That would be for you to investigate and is a different question.
There are plenty of questions on this site about open ports (read those first)


It’s really difficult when someone says “is it secure?”. Because the answer will almost certainly be “from what?”.

You need to benchmark your security risk appetite, and from there look at what threats and vulnerabilities exist. Work out what you’re willing to accept, then mitigate the rest through different controls.

I know it’s not what you are looking for, but it’s really the only way to answer “is it secure?”

Note: I see the questions been reformatted since I posted this. Leaving it here for fullness


What percent of publicly posted databases implemented password security?

As a start, try this paper, which assesses 34 password database breaches. It states the following on page 2:

  While absolutely no information on how the passwords were stored could be found in 26.5% of the cases, we found 11.8% reported passwords were “Hashed and Salted”, 5.9% used salted MD5, 14.7% used unsalted MD5, 11.8% used salted SHA1, while unsalted SHA1, SHA256 salted, crypt(3) salted, and bcrypt each accounted for 2.9%. Plaintext use was noted in 17.6% of the site breaches.

I'm not aware of a larger scale resource that tracks these figures.


principle of splitting sensitive data across multiple machines running different operating systems

You can use the Shamir's Secret Sharing with the threshold scheme which specifies how many key fragments you need to reconstruct the key. So if you have 20 key fragments total and you require at least 10 fragments to reconstruct the key this means that 10 of your servers can go down and you still will be able to get the key.
You will also need to set the replication factor so you don't lose the data if one node goes down.

Alternatively, instead of splitting your key into fragments you could split the encrypted data and specify the threshold to allow some of the servers to fail without any data loss.


Is it possible to sync up LMKs in two Thales PayShield 9000 instances>

Yes, Will need to load same LMK in both HSMs in same LMK ID (Default is 00). Normally Thales payShield HSMs doesn't stores keys, if it has same LMK, it will create temporary keys when required and verified.


How do the Stack Exchange sites protect themselves from XSS?

For general comments, the script tags are properly escaped, so that it's just interpreted as text instead of as actual code. In this case, that sort of thing is handled via something known as HTML encoding, where your <script> tag would get turned into &lt;script&gt; and rendered as a text string instead of interpreted as code.
That said, StackOverflow has worked on a new feature that allows executable javascript in peoples' answers: http://blog.stackoverflow.com/2014/09/introducing-runnable-javascript-css-and-html-code-snippets/
Some of the security points from the article I want to highlight:

Are Stack Snippets Safe?
Yes, as much as the web in general is safe. You are not in any more danger than you are when browsing any
site with JavaScript enabled. With that said, the snippets are running
client code in your browser, and you should always exercise caution
when running code contributed by another user.   We isolate snippets
from our sites to block access to your private Stack Exchange data:
•We use HTML5 sandboxed iframes in order to prevent many forms of
malicious attack.
•We render the Snippets on an external domain
(stacksnippets.net) in order to ensure that the same-origin policy is
not in effect and to keep the snippets from accessing your logged-in
session or cookies.
Like all other aspects of our site, Stack
Snippets are ultimately governed by the community. Because users can
still write code that creates annoying behaviors like infinite loops
or pop-ups, we disable snippets on any post that is heavily downvoted
(scoring less than -3 on Stack Overflow, -8 on Meta). If you see bad
code that you think should be disabled, downvote the post. If you see
code that is intended to be harmful (such as an attempt at phishing),
you should flag it for moderator attention.


All hash algos shatter... so why not switch from golden bullet to scatter shot?

128-bits should be enough entropy - see this answer. Quantum computers may change this, but that's still theoretical.

It appears to be (relatively) easy enough to design a symmetric cipher where the only effective attack is brute force. AES has withstood some years of cryptanalysis and there are many other ciphers.

Asymmetric crypto generally needs much larger keys for equivalent security.

For hashes, and specifically for collision resistance, we need to worry about the birthday attack. In rough terms, than means a hash needs to be twice as long as the equivalent symmetric cipher. So SHA-256 is a good match for AES-128.

I should point out that both MD5 and SHA-1 had cryptographic breaks - the attacks are better than brute force. SHA-1 is a 160-bit hash, so brute force (with birthday attack) would require 2^80 operations, but the published attack used more like 2^64. It may turn out that SHA-256 has cryptographic weaknesses, but they would have to be significantly better than brute force to make an attack practical.


how to reset router without reset button?

Does your router have a power button? In some cases, holding down the power button functions as a reset.

It might help if you told us what kind of router it is.