Is using SHA-512 for storing passwords tolerable?

No, you're solving the wrong problem.

Moving from SHA-1 or SHA-256 to SHA-512 doesn't make cracking the hash significantly harder. Hashes generally aren't reversed by means of some mathematical property of the algorithm, so advancing the algorithm doesn't changing the security very much.

Instead, hashes are brute-forced using a "guess and check" technique. You guess a password, compute the hash, and then check to see if you guessed correctly. And repeat, and repeat, and repeat until you finally get it.

So the way to slow down the attacker is to slow down the hashing process. If it takes longer to check each single password, then the attacker can't guess as many of them. And in this case, SHA-512 isn't appreciably slower than SHA-256 or SHA-1 or MD5. So you're not really adding any security.

Instead, the common thread between techniques like bcrypt, PBKDF2, and scrypt, is that they all run the hashing function over and over and over, thousands of times for just one single password guess. So say a site uses PBKDF2 at 10,000 iterations: this means that the attacker has to expend as much time and resources on a single guess as he otherwise would have to on an entire dictionary of 10,000 passwords. By slowing the attacker, you limit the number of passwords he ultimately can guess, and therefore decrease the likelihood of him eventually guessing correctly.

Many installations tailor their configuration to fit existing hardware. So for example, LUKS uses a minimum of 1000 iterations, or however many it takes to consume 1/8th of a second, whichever is longer.


What are wildcard certificate limitations in SAN extension?

From RFC 6125:

  The client SHOULD NOT attempt to match a presented identifier in
         which the wildcard character comprises a label other than the
         left-most label (e.g., do not match bar.*.example.net).

Thus, wildcard is only allowed in the left-most label which automatically restricts it to at most one level of wildcard.

A similar restriction can also be found in the CA/Browser Forum
Baseline Requirements 1.4.2 which combined with other definitions in the document restricts the wildcard to only the left-most label:

  Wildcard Certificate:     A   Certificate containing  an  asterisk    (*) in  the left‐most   position    of  any of  the Subject
  Fully‐Qualified Domain  Names   contained   in  the Certificate.

Apart from that the CA/Browser Forum Baseline Requirements have more restrictions which result in *.dev not working since dev is in the public suffix list:

  CAs   SHALL   revoke  any certificate where   wildcard    character   occurs  in  the first   label   position    immediately to  the left    of  a   “registry‐controlled”   label   or  “public
  suffix”.

For more information see section "3.2.2.6 Wildcard Domain Validation" of the Baseline Requirements.


It depends on the type of drive.
Bitlocker FAQ for Windows 7

What credentials are required to use BitLocker?
To turn on, turn off, or change configurations of BitLocker on operating system and fixed data drives, membership in the local Administrators group is required. Standard users can turn on, turn off, or change configurations of BitLocker on removable data drives.
Disable the Control use of BitLocker on removable drives policy setting (located in Computer Configuration\Administrative Templates\Windows Components\BitLocker Drive Encryption\Removable Data Drives) to restrict standard users from turning on or turning off BitLocker on removable data drives.

Bitlocker FAQ for Windows 10

What credentials are required to use BitLocker?
To turn on, turn off, or change configurations of BitLocker on operating system and fixed data drives, membership in the local Administrators group is required. Standard users can turn on, turn off, or change configurations of BitLocker on removable data drives.


It shouldn't be, no. In theory, hashes are one way functions, which means that you cannot use the output to learn any information about the input.

Since the server_seed is only presented post-hash, without finding a vulnerability in SHA-256 there is no way to get the server_seed.


Concern about potential of VPN access being restricted in Italy

I don't know about the VPN service blocking the traffic, but some IT Security Defense measures entails only allowing IP's from certain geographic locations. Its possible that either the ISP the company is using or the company itself is using a GEO IP service to determine location and blocking traffic based on it. For Instance a Company based in the US that doesn't employ oversea workers would have no need for any foreign IP connection. Thus filtering traffic based on GEO IP and reducing risk.


Are input fields that don’t have name=“” sent via the browser

Yes. Any HTTP request that isn't protected by SSL/TLS/HTTPS is vulnerable to MitM attacks.  Without the integrity that is provided by HTTPS, any component of the HTML served over HTTP is vulnerable to attack or modification by a man-in-the-middle.   For instance, the form's action could be changed, so instead of the form being POSTed to your intended page, it could be POSTed to a page on a malicious site (as designated by the MitM) instead.

The bottom line is that anything you send to the client over HTTP could be changed before it actually gets to the client.  If you need security (and you certainly do for payment transactions) you need HTTPS to ensure that the client is receiving what you intended them to receive.


Current concern security wise is that there would be "data leaks" that would result from the sync tool being used; for example, the sync tool producing indexes that when be stored unencrypted on disk.

You are correct to believe there is a risk of data leaking as a result of indexes. How much of a risk that is depends on what exactly is indexed.

A while ago, I lead a project to build something a little like dropbox. To compare directories across runs, we used the path name, a sha256 hash of the contents if not already computed, various timestamp information etc.

Clearly, if a sync tool were to store this information about files stored in an encrypted container, the attacker would also have access to them. The exact risk of that really depends on your given scenario.

I suspect, however, there are bigger risks in play than you think. Let's assume, for example, that on opening a file, your innocent piece of software creates a copy so as to not corrupt the individual - however, you've mounted the file system read-only, so it handily creates a copy of the file in your temp folder. Great, except - it just copied your data from an encrypted partition to an unencrypted one, thereby leaking it.

The same could be true of sync tools. This would be a fairly bad way to build one - but it is conceivable the tool could copy files to a temporary location in progress. Again, you have a leak problem.

To be a bit more realistic - let's assume the sync tool copies the files in memory by mmaping them and copying between them. What if you experience a system crash during this update and your app happens to be core dumped? Heck, what happens if the truecrypt drivers' memory is core dumped too? It might well contain unencrypted file data.

The fact of the matter is you're unlikely to be able to deduce the contents of entire files from any of these scenarios - but like getting damp in your house, something will leak, somewhere. The only way to be totally sure you have everything wrapped up is to do the obvious: encrypt the whole lot. Swap, disk, everything.

So to answer the question you asked: an attacker can clean whatever the sync tool stores. Have a look. Grab Process Monitor, see where it is storing data and then look at what's in it. That'll tell you exactly what data is being leaked.

To answer the question you didn't ask: there's no way to be absolutely certain you are not going to leak something using a truecrypt container on an unencrypted system.


Is it possible for a virus to be downloaded unknowingly and run when a website is opened?

Yes, as @TheProWolfPcGames mentioned this is called a Drive-by download. All browser venders regard the ability for drive-by download as a critical security vulnerability, and when a drive-by download vulnerability is discovered the fix or mitigate quickly.

The Java and Flash browser plugins have historically been the source of the majority of drive-by download vulnerabilities and are being phased out by their vendors (Oracle and Adobe), browser vendors (Firefox and Chrome), and removed from some ad networks (Google AdSense).

My advice would be to remove flash and java plugins from your everyday browser and have a seperate browser that is used only on trusted ad free sites that need flash or java to operate.


Hydra not matching password provided in file

Hydra parameters are case-sensitive.

In your specific situation, -p is used as password input parameter, while -P is used as input for reading a file (Official syntax: [-p PASS|-P FILE] ).


What security measure one should implement before executing user uploaded files?

It is impossible to analyze a program to find out if it will do anything malicious. That is true regardless of whether you are attempting to analyze the source or compiled code.

The way to do what you are asking for is done by compiling and running the code in a sandbox. Once the program has terminated (or after a timeout you have decided upon) you destroy the sandbox.

The security of such a construction is as secure as the sandbox you are using. Depending on the requirements of the code you need to run the sandbox could be either something simple like Linux secure computing mode, or something complicated like a full blown virtual machine - ideally without network connectivity.

The more complicated the sandbox you need the larger risk of a security vulnerability in the sandbox undermining an otherwise good design.

Some languages can safely be compiled outside a sandbox. But there are languages where even compiling them can consume unpredictable amount of resources. This question on a sister site shows some examples of how a small source code can blow up to a large output.

If the compiler itself is free from vulnerabilities it may be sufficient to set limits on the amount of CPU, memory, and disk space it is allowed to consume. For better security you can run the compiler inside a virtual machine.

Obviously these methods can be combined for an additional layer of security. If I were to construct such a system I would probably start a virtual machine and inside the virtual machine use ulimit to limit the resource usage of the compiler. Then I would link the compiled code in a wrapper to run it in secure computing mode. Finally still inside the virtual machine I would run the linked executable.


Is this the correct flow of the KRACK attack?

Intro note to make general reader understanding easier: you do not need to actually connect to the respective network. You just wait for someone to connect with a password (that’s what the PSK stands for, pre-shared key). When he does, long before they access anything, a four-way handshake must happen. This checks that the password the user has provided is correct, and establishes the encrypted connection between the router and the user device. It is here the attacker interferes - in the initial handshake between your device and the router - in a way that allows the attacker to gain an ability to decrypt the traffic you exchange over WiFi. This means sufficient access without even being on the network. Listen to the data exchange between user and  access point is sufficient, while emitting attacker packets back to change things on user device and the router.

The key reinstallation attack works exactly because the retransmissions of message 3 is accepted, even when it is in the PTK-DONE state, which is a model flaw. That is why a  reinstallation of the PTK can be forced. More precisely, MitM is established between client and router. Then retransmissions of message 3 are triggered by preventing message 4 from arriving. As a result, retransmission of message 3 happens, which causes the router to reinstall an already-in-use PTK. In turn, this resets the nonce being used by the data-confidentiality protocol. Depending on which protocol is used, this allows an adversary to replay, decrypt, and/or forge packets.

The attacks do not practically breach the security properties, but highlight limitations of the models employed. The models do not specify when a key should be installed for usage by the data-confidentiality protocol. In there lies the problem and the fix. That is why specification of a protocol should be sufficiently precise and explicit. For example, the 802.11 standard is ambiguous
as to which replay values should be accepted.
Practically, it does not define when the negotiated session key should be installed. As a result, there was no guarantee that a session key is installed just once. A more precise model definition can prevent that.


Are there any passwords managers that use a second hidden encryption drive to hide passwords?

AFAIK there is no such functionality.

If you need such two level of password database, you should merely just use two databases. As mentioned by Neil Smithline in his comment, your second database may be on a separate partition protected by deniable encryption.

However, be conscious that deniable encryption proved to be often counter-productive. Initially designed to allow someone to give one key hoping that the "attacker" would not "question" him anymore, it turns out that due to this system the attacker as no way to know when the user as given all his keys so he will continue to "question" him no matter (and by "question", one must often understand "torture"..).


Spoofed DNS answers ignored by target machine applications

Could it be the target machine dropping these packets AFTER wireshark picks them?

Wireshark gets the packets before they enter the IP stack, i.e. before any checksum gets checked and packets with bad checksum are discarded.


Why was October 2016 Dyn attack limited to East Coast?

If we specifically talk about the case of twitter.com; As why site was not accessible from East coast and why it was accessible from rest of the world (roughly).

BGP routes announcement of same IP network from multiple locations and existence of infrastructure at various location is the answer of your query.

On doing the dig for twitter.com from multiple open-resolvers, i got multiple IP address for the said domain but they all belongs to same /24 IP network.

Kansals-MacBook:~ Kansal$ dig twitter.com A +short @4.2.2.4
104.244.42.193
104.244.42.65
Kansals-MacBook:~ Kansal$ dig twitter.com A +short @8.8.8.8
104.244.42.129
104.244.42.65
Kansals-MacBook:~ Kansal$ dig twitter.com A +short
104.244.42.65
104.244.42.193
Kansals-MacBook:~ Kansal$ dig twitter.com A +short @8.20.247.20
104.244.42.129
104.244.42.1
Kansals-MacBook:~ Kansal$

So, twitter site is hosted on 104.244.42.0/24 segment (getting an ip from this segment only from various locations; corner cases may exist).

On doing the WHOIS for this IP segment, i got to know that the following results -

Kansals-MacBook:~ Kansal$ whois 104.244.42.65
NetRange:       104.244.40.0 - 104.244.47.255
CIDR:           104.244.40.0/21
NetName:        TWITTER-NETWORK
NetHandle:      NET-104-244-40-0-1
Parent:         NET104 (NET-104-0-0-0-0)
NetType:        Direct Assignment
OriginAS:       AS13414
Organization:   Twitter Inc. (TWITT)
RegDate:        2014-12-08
Updated:        2014-12-08

This means that 104.244.40.0/21 IP segment belongs to twitter.

Twitter has announce this segment (/21 or /22 or /24) from its various Data Centres (or from co-locations facilities) across the world.
So, when i request for twitter.com, i go to Singapore (as i am getting best routes from Singapore for this particular segment) And when someone tries to access twitter.com from East coast, he may have the best path for the segment from the location which was under DDoS attack.

Because of this announcement possibility of the IP segment from multiple locations and existence of infrastructure across the globe, service was only affected for few (locations which was under attack).

Hope this answers your query.


Secure way to establish PHP database connections

If your attack model allows "attackers to upload their own scripts", then they have access to everything those same script can see or do, and "secure access to database", for this value of secure, is simply not possible.

(Short of redesigning the database so that it can run a check on all PHP files involved in a given connection - while theoretically possible, it would be exceedingly difficult - just think what it means to identify the PHP scripts, included by a Web process, that opened a connection, of which the DB server only knows the source address and port! - and very likely a performance killer)

But at this point you can move some logic away from the webserver, taken as unreliable, and see what security can be found elsewhere.

For example, you can make it so the different web application access levels use different credentials - you might have three database users "guest", "user" and "admin". You can organize things so that, for example, user administration by the user admin is not done on the same web server (you can separate it by process user, on a different webroot, another VM, or a physically separated web server).

Most functions and queries you can replicate using high-privileged procedures and functions that can access underlying data to which the web users have no access: for example you can do login checks with a function:

DELIMITER //
CREATE FUNCTION is_valid_user(user varchar(32), pass varchar(32))
returns BOOLEAN
DETERMINISTIC SQL SECURITY DEFINER
BEGIN
DECLARE ret BOOLEAN;
SELECT 1 = COUNT(*) INTO ret FROM users WHERE user = username AND MD5(pass) = password;
RETURN ret;
END//
DELIMITER ;

The Web application as user web has EXECUTE privilege, but has no SELECT/INSERT/DELETE privileges on the users table. So it can't enumerate users, or reset all the passwords in one fell swoop,

It is even possible (but not very useful, since ability to upload executable scripts makes an almost ideal man-in-the-middle scenario) to use the guest account to retrieve the web access credentials, stored in the users table, provided that the Web user has the correct password:

user John logs in with password 'Doe'. Web application is running as guest
the function get_credentials('John','Doe') returns 'web:myfirstpass'
Web application switches credentials to web, and has now access to more features

All data logging is INSERT only (only the admin can delete log records), and access to important/"financial" data (e.g. an invoice table) can be done by running all ops on a temporary table owned by web, while a privileged procedure can be used to finalize and validate the table, and copy it into invoices.

With a bit more work, the user can be associated with a highly random 'security identifier' string that is unique to him. Only by supplying that security identifier can he access procedures that retrieve invoices; and those procedures will only select invoices with that same identifier.

This way - a very labor-intensive way, admittedly - an attacker can only access the data of those users that log in, and are tricked out of their credentials, on the compromised web server.

You're left with the problem of quickly reacting to such a compromise.

On a Linux server with inotify, it would be possible to continuously monitor files and remove those that are not "approved" (i.e. their SHA1 hash is not in the "allowed" list). Any modification or addition to monitored files would trigger their removal as well as an alert being sent to the administrator:

inotify: '/srv/www/padma/htdocs/ CREATE dfqjkw.php'
inotify: '/srv/www/padma/htdocs/ MODIFY dfqjkw.php'
inotify: '/srv/www/padma/htdocs/ CLOSE_WRITE,CLOSE dfqjkw.php'
ANOMALY: '/srv/www/padma/htdocs/dfqjkw.php' (SHA: e0a6bf9020320dca178cf115da4fa26de0278a25cf41702d667988877cdbc2d1) is neither known nor in testing
inotify: '/srv/www/padma/htdocs/ DELETE dfqjkw.php'
ACTIONS: '/srv/www/padma/htdocs/dfqjkw.php' targzipped, sent to root, and removed

This would also require a pretty bit of tweaking for people uploading their web sites - you'd need a "test" FTP web site where the upload takes place, and an "approval" procedure by which each file's signature is extracted and the web site is copied onto the "production" filesystem, effectively doubling data usage.

On the other hand, stealing FTP credentials as many trojan malware does would be no longer useful: lacking the approval procedure, the compromised files would only be present on http://test.www.mysite.com, which would only be accessible from a few selected networks, not on http://www.mysite.com which is allowed to all.


Why is a 32 character hex string not a md5 hash?

It's not 32 digits. It's 45. That's 180 bits, not the 128 bits you expect from md5.

You can see this easily in a monospace font:

8019ed9fa0c5d1c36c7ef3a4e931205368da339079331
d41d8cd98f00b204e9800998ecf8427e

(The lower hash is the md5sum of an empty string)

Apart from that it's important to realise that a hex number is just another number. Most hashes doesn't carry any metadata in the hash identifying the algorithm or what kind of number it is.


Is the ISO/IEC 27001 standard incompatible with free/open source software?

"Access to program source code shall be restricted." does not mean that nobody should be able to access the source code but that it is defined who can access and change the code. The main point is not to have the source code secret but to prevent unauthorized and unaudited changes to the source code.

And this is true for using open source too: one should not simply import and use some code or patches from somewhere without somehow making sure that the code is actually having the expected behavior and only this, i.e.that it does not contain any backdoors and no critical bugs etc. This "somehow making sure" does not mean to audit everything yourself but might also mean to trust upstream distributions and maintainers to do the right thing. How much to trust upstream or how much to review code yourself of course depends on both who is the upstream and how critical the code is which uses third party code.

But blindly using npm, cpan, pip etc to install modules can be dangerous and is against the spirit of using and writing secure code, see Small World with High Risks:
A Study of Security Threats in the npm Ecosystem or Malicious Modules — what you need to know when installing npm packages.


Freezing creates unusual pattern in kern.log

Provided that you accessed the log file on a console, did you have anything running in the background on the same console? If so, it's vaguely possible that whatever you had running in the background printed the dots, and it got intermingled with your view of the log file.

Otherwise, I would take it as a pretty bad sign. Log files generally don't retroactively amend themselves...


How to Verify the identity of another computer

While your question is very broad and thus it is not clear if the answer really fits your problem a way to achieve what you describe is to use TLS with client certificates. This is an established technology (i.e. what you use with https:// links) and widely implemented in a variety of libraries and tools on server and client side. Client certificates don't actually allow you to identify the system by itself but only the user of the certificate, i.e. in theory they could be shared between multiple systems. But by generating a new client certificate for each new installation you can essentially identify the system where the software is used.


Is there a pre-existing taxonomy of attackers?

Check out Intel's Threat Agent Chart:

Page 8 -> https://communities.intel.com/servlet/JiveServlet/downloadBody/1151-102-1-1111/Threat%20Agent%20Library_07-2202w.pdf


You're in a difficult position, because China has a program of "Internet content review" which causes many sites to be inaccessible for periods of time. And most of the information (outside mainland China) which would tell you how to access these sites is also unavailable.

One of the most effective ways of bypassing this is to use SSH's SOCKS proxy feature. This is because SSH is almost never affected by the Internet content review.

This requires you to have access to a Linux (or UNIX) server outside China. For instance you could lease a virtual server from Amazon EC2 or many other low-end VPS providers. It also requires you to have SSH installed on your local PC, so you would need to run Linux, or Cygwin for Windows for instance. Once set up on both ends, you make a SSH connection from your PC to the Linux server:

ssh -D1080 my.server.outside.china.com.au

Then you configure your local Web browser to use a SOCKS proxy on localhost port 1080, and all of your Web browsing will be tunnelled through the SSH connection, and the rest of the world will see the connection originating from your leased Linux server in the other country.

It's also possible to use VPN services, though these often get blocked.

A post at our sister site Super User has some more ideas on ways to access blocked sites.


Best way to encrypt ~1GB of data programatically?

PGP (Pretty Good Privacy) is the closest alternative to your proposal. This mechanism generates a strong random symmetric key for encrypting the data and cyphers that key asymmetrically.

So you have the symmetric key encrypted ONLY with the public key and then the data is ONLY encrypted with the symmetrical key.

My suggestion is: If you can reach both PC’s but in different instances of time, just cypher the block of data symmetrically (this is because you know the key and you won’t transfer it to nobody, so it’s safe). Elsewhere, PGP is a good option.


Time to crack passphrase of 4 English word combinations at 7 terahashes/sec

If you are choosing four items from a set of 171,476, you have a keyspace of 171,4764. 7 TH/s is 7×1012 per second, so 171,4764 / 7×1012 ≈ 1.24×108 seconds to search the entire keyspace. The average time will be half that. So at a
"measly" 7 TH/s, this would take an average of 715 days.

Note that this only provides approximately log2(171,4764) ≈ 69.6 bits, which is worryingly small. A dedicated attacker can exceed 7 TH/s. Google publicly broke SHA-1, requiring only 263 operations. Doing 269.6 operations is a lot more, but certainly within reach of a powerful adversary.

So what if you are choosing from only 5000 words? 50004 / 7×1012 ≈ 89 seconds maximum, and an average of half of that. After all, it only provides 49 bits of security. Not good!


Meterpreter shell and system shell define?

In the context of your question, a system shell is something like cmd.exe powershell.exe bash ash sh running on the target machine and which you have access to via some network connection.

A meterpreter shell on the other hand is an application that wraps a system shell to make certain tasks easier. Such as transferring file, migrating between processes, dumping memory etc. You can access the system shell from meterpreter by typing 'shell'

Learn more about meterpreter here https://www.offensive-security.com/metasploit-unleashed/meterpreter-basics/


I suggest reaching back out to the vendor for clarification. If they are adhering to the standard, than ATA secure erase will empty all its cells to zero. If your vendor is a reputable one, then you can be fairly confident this is a proper and secure process. For less reputable vendors, sometimes... liberties are taken.


So is the phone without BLE vulnerable before BlueBorne or not?

Not sure why you are confused.

It only attacks via Bluetooth, not Bluetooth Low Energy, but that info doesn't matter to you as your phone does not have BLE.

What matters is if the Bluetooth firmware and config are vulnerable.

The scanner says you aren't vulnerable, so you are probably not vulnerable.


The security of IP whitelisting large ranges

Can someone help enlighten me why whitelisting a large range or even just a range of IP's is bad and what the technical rationale is.

Whitelisting 250 IP's is a work so light the firewall will barely notice. Blacklisting or whitelisting is something firewalls do all the time. I have a 256MB VPS with around 50,000 rules (blocking entire countries, and blocking any attacker for a day via fail2ban and portsentry) and the load on it is almost the same when the firewall is up or down.

Whitelisting those addresses will not shred the firewall, not incur any extra load, except maintenance load: someone have to add the rules, document them, and maintain them. Besides that, isn't making any difference.

Just make sure to get the rules correct. Specify on the whitelist the origin IP (or network) and respective destination IP and port. Don't just add a rule allowing the customer to connect to every IP and port, that would be a lazy and dangerous rule.

  The DNS explanation seems irrelevant to what's actually occurring and IP whitelisting is a valid defence. What's the real issue or threat?

DNS has not anything to do with it at all. You are whitelisting an IP address, not a domain. So no matter what the domain responds for that IP, your firewall doesn't care. DNS rebinding, DNS takeover, no matter the DNS attack, it will occur on a layer above the firewall, so it does not matter.

  Is it just that we need to couple additional defences on a ngfw to offset this?

No, your firewall will do it just fine. It's the job of the most rudimentary of the firewalls, you don't need an extra more modern firewall.


Is it safe to download BIOS firmware from any place online?

Let's admit that everything is possible. It's called zero-day attack. The serious matter to discuss about is if this possibility is high or low. It's very very low. Every motherboard company has a regular penetration testing procedures for its products. Although, for older -not currently supported- motherboards for sure there will be exploits (bios rootkit attack most common) and you should think that these exploits will be probably detected by the antivirus, so the risk is if your computer is really old, with old and not supported operating system. In general, it's really unlikely that you find a malicious bios firmware for motherboards especially for 2013-2020 ones, and more unlikely this malicious firmware will be undetectable. A real danger tho will be if someone purchase an exploit from the dark web and target the victim.
Check that out about bios rootkit attacks: https://searchcloudsecurity.techtarget.com/definition/BIOS-rootkit-attack

Methods of preventing BIOS rootkit attacks include:
Implementing digital signature technology to prevent unauthorized
access. Making the BIOS non-writeable. Burning a hardware
cryptographic key into the BIOS at manufacture that can be used to
verify that the code has not been altered. If an unauthorized
BIOS-level rootkit is detected, the only way to get rid of it is to
physically remove and replace the memory where the BIOS resides.


Why is hotmail mail server providing an invalid certificate?

It's currently fixed (2020-01-11), Certificate chain is valid:

  mail.protection.outlook.com 128 days remaining / 2048 bit
   / sha256WithRSAEncryption

  GlobalSign Organization Validation CA - SHA256 - G3 2062 days
  remaining / 2048 bit / sha256WithRSAEncryption

  GlobalSign Root CA (Certificate is self-signed.) 2939 days
  remaining / 2048 bit / sha1WithRSAEncryption

Report:

https://ssl-tools.net/mailservers/hotmail-com.olc.protection.outlook.com


Any way to use Java (sun micro) without any concern of infection

Your question doesn't make it clear, but are you sure you need Java enabled in your browser. Keep in mind that Java and JavaScript are two entirely separate technologies. Java is a cross-platform application framework and JavaScript is a scripting language designed for the web. Your mention of Sun Micro also confuses me, because Java has been an Oracle product for a long time now. If you're still running a Sun release of Java, you've got serious problems.

A lot of websites (StackExchange included) make heavy use of JavaScript, but very few these days actually require a Java applet.

In order to protect yourself from problems with JavaScript, addons like NoScript and AdBlock Plus can be extremely useful. NoScript essentially disables JavaScript on all sites until you specifically allow it, which saves you from getting hit by unexpected browser exploits. AdBlock Plus is useful since it allows pattern-based content blocking, so you can block certain scripts or even entire domains.

Java, on the other hand, is a completely different scenario. Most browsers don't come with a Java plugin by default, as the plugin usually comes when you install a Java Runtime Environment (JRE) on your system. Even then, the browser plugins are optional parts of the installation. NoScript's JavaScript blocking won't affect Java applets at all; they're completely separate things. The biggest problem with Java from a security perspective is that any sandbox escape vulnerability automatically allows the applet to modify your system with the same privilege level as your browser. If you're running as an administrator, that means it can control your whole system. Unfortunately, Java has a history of vulnerabilities that allow sandbox escape, and Oracle's patching schedule isn't particularly agile - there have been cases where Java 0days being used in the wild weren't patched for months.

If you're trying to protect yourself from malicious Java applets, I'd run through this checklist:

Disable the Java plugin on all of your browsers. If you're not using Java at all, uninstall the JRE completely.
If you need Java on a browser, get a portable copy of Firefox or Chrome and only install the plugin on that. Then use a tool such as Sandboxie to completely isolate the process from the rest of the system.
Keep up to date with all Java patches, as well as patches for your OS and browser.
Make sure your firewall is properly configured and up to date. Some of the better firewalls often have signatures that catch known malware applets, which can be a nice barrier.
Use an AV, even if it's Microsoft Security Essentials.
If you're really paranoid, only install and use Java in a dedicated virtual machine. This is pretty much the only way to make sure you have a good chance of not getting owned by Java malware.


How to verify 2 hashed values with different salts originating from the same clear-text password?

You can't. That's kinda the point of a salt.

If you could tell two passwords with different salts were the same, then attacks using pre-computed hashes would still be possible, and salts would be pretty useless.

You would need the original password to verify both salted hashes are derived from the same password.


What do the Keybase pgp import instructions actually do?

It sounds like you're looking for any one of these three:

keybase pgp import -i pubkey.txt
cat pubkey.txt | keybase pgp import
keybase pgp select --no-import

That will import the public half of your key, advertise it on keybase, but prevent them from having access to the private key.

On the other hand,

cat privkey.asc | keybase pgp import

will send a copy of your private key to the keybase servers, which will make it available for use with keybase pgp commands.  And,

keybase pgp select

will look at your GnuPG keyring and allow you to select an existing private key to import to keybase.

When in doubt

keybase pgp <option> help

Update:

The option to upload a public key and withhold the private half from keybase doesn't seem to be working. The first set of options listed above now all return

  ERROR No secret key available


Receiving validation mails with wrong address

I'm assuming these are unsolicited "confirm your email" or "thanks for creating your account" emails, indicating that someone has used the email address in the body to open an account or place an order.

In order to avoid confusion between john.smith@gmail.com and johnsmith@gmail.com, GMail explicitly ignores any dots in an email address.  In this case, they are just using a different way of spelling the same account.  If you have an even slightly common name, this occurs quite frequently because somehow some people do not know how to spell their email address.

You can confirm that the address it was really sent to matches the one in the body if you click the drop down menu on the right hand side of the GMail message and click "show original".  This includes all the routing headers for the email, which would show what email address GMail is attempting to use for delivery.


MITM during legitimate key/fingerprint change

Let's call your friend Bob.

Bob has updated his certificate, but since you've never seen it before, you're rightly concerned Eve may be in the middle. You've done the right thing by contacting him to verify your observation, but there is still no automated way of confirming the new key. I'm presuming you aren't using any signing authority and explicitly trusting the specific certificate on Bob's end?

You already trust him to confirm the key changes over text, so simply sending the fingerprint over another text would do the trick.

Essentially, you need to use some out-of-band method to confirm the new key (e.g. meet him in person), or find a way for him to deliver the key over another, established trusted channel e.g. signed e-mail, signed PGP, Text/WhatsApp, putting it on a website you know only he controls etc.

This is why a Certificate Authority is so useful - it's the root of your trust in the remote system. If you trust Let's Encrypt (which you should by default, as it's certificate is issued by another trusted root CA in most browsers/OSes) then this problem goes away.


Chicken-and-egg-problem: What's the intended secure way of installing anti-virus software with online installers?

Disclosure: I work for an anti-virus vendor.

First, the answer. Most vendors which I'm familiar with usually offer "full" or "offline" installers of their products. Typically they are usually more difficult to find (i.e. no link on homepage - in some cases you might need to ask support), but they do have them. In my experience it is usually easier to find those files by Googling av-vendor-name offline install - the web sites it finds are usually not the vendor site (so make sure to do this on a machine with AV installed), but they usually provide direct links to the vendor's own website, and those you can download from.

Note that the main purpose for providing them is not a "chicken-and-egg problem", but to install on disconnected or very slow speed environments and to save traffic when you need to install the product on several machines - since the online installer would download it again and again.

Second, I would not agree with a premise that "Windows machine should not get connected to the internet without any anti-virus software installed". This is only true if your connection to Internet is direct - meaning you plug your DSL/cable modem, set in bridged mode, directly into your laptop Ethernet port, and it gives you the public IP address (and gets you blasted right away via EthernalBlue or something similar). This configuration is quite rare though.

If you are behind a NAT router, which does not forward any ports - which is more of a typical default configuration - your Windows machine is relatively safe as long as you are not doing anything dangerous on it, such as:

Browsing random web sites;
Setting up and opening emails;
Inserting various storage media (such as USB sticks or CD/DVD);

and so on (using Calculator or playing Solitary is unlikely to get you infected)

So after installing Windows, you do have the opportunity to open a website of the anti-malware vendor of your choice, and install the anti-virus without compromising security of your PC.


You'll need authentication if you want to ensure the caller of your REST API is the same as the websocket client, as they're under separate TLS connections.

You don't need to do authentication for the communication of a single websocket connection, as it is under a single TLS connection so the data integrity is ensured by TLS.


Do you require a special type of certificate for using Diffie Hellman as the key exchange protocol in SSL?

You don't need a special certificate for Ephemeral Diffie-Hellman key exchange, but you need the Server Key Exchange message. You need a special certificate for fixed DH. As the TLS specification says:

In Section 7.4.3:

  The server key exchange message is sent by the server only when
  the server certificate message (if sent) does not contain enough
  data to allow the client to exchange a premaster secret.  This is
  true for the following key exchange methods:

       DHE_DSS
       DHE_RSA
       DH_anon

  It is not legal to send the server key exchange message for the
  following key exchange methods:

       RSA
       DH_DSS
       DH_RSA

  Meaning of this message:

  This message conveys cryptographic information to allow the client
  to communicate the premaster secret: either an RSA public key with
  which to encrypt the premaster secret, or a Diffie-Hellman public
  key with which the client can complete a key exchange (with the
  result being the premaster secret).

In Appendix A.5 (about non-ephemeral DH cipher suites):

  The following CipherSuite definitions are used for server-
  authenticated (and optionally client-authenticated) Diffie-Hellman. DH
  denotes cipher suites in which the server's certificate contains the
  Diffie-Hellman parameters signed by the certificate authority (CA).
  [...]

In Appendix F.1.1.3:

  When Diffie-Hellman key exchange is used, the server can either supply
  a certificate containing fixed Diffie-Hellman parameters or use the
  server key exchange message to send a set of temporary Diffie-Hellman
  parameters signed with a DSS or RSA certificate. Temporary parameters
  are hashed with the hello.random values before signing to ensure that
  attackers do not replay old parameters.  In either case, the client
  can verify the certificate or signature to ensure that the parameters
  belong to the server.

Note that certificates with DH parameters are rather rare anyway.

Stephen Henson (from OpenSSL) said the following (admittedly a long time ago):

  I've asked all over the place and I've yet to see a single example of
  a DH certificate. From this I can conclude they aren't very common.

Nelson Bolyard (from Mozilla NSS) said the following more recently:

  [...] I ask because I don't know of ANY public CA that issues such
  certs today.  The last CA I knew of that did was the US DoD's CA that
  issued certificates for Fortezza cards.

I suspect there is little demand for these certificates. It would require more work from the CAs, it's just as easy to use EDH nowadays, and the cipher suites that can use them are not widely supported. The latest Java 7 list of supported cipher suites doesn't list any DH_RSA or DH_DSS cipher suites (only DH_anon and EDH).


How to spoof a cell phone tower (cell site, base station) -- homemade IMSI-Catcher

Defcon has had a few presentations on this subject.  An active attacker can turn off encryption altogether, never mind just changing it.

Also there is an open source program available just for this.  I will edit this with the link when I find it.

Software: http://openbts.org/
Antennas https://www.ettus.com/product/category/Antennas
RF Daughterboards https://www.ettus.com/product/category/Daughterboards
Video: https://www.youtube.com/watch?v=wjYAAmHvt-g


Why do websites still suffer from OS injections if by default web-servers are not assigned a shell?

Using shell_exec() and its multiple variants is perfectly fine so long as the web server's user account is limited to its directory structure.

The real risk is to use unsafe scripts that run commands with user input.  escapeshellcmd() and escapeshellarg() can be used to make that safer.

Note that having no login shell does not prevent from running commands through a shell.

As for PHP safe mode, it is long outdated (as shown on http://php.net/manual/en/features.safe-mode.php):

  This feature has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 5.4.0.


It depends on how much you want to separate roles.

Basic system: your "signature" is a MAC. The "API key" is a secret value with is shared between the server and the user. Normal MAC algorithms like HMAC can use arbitrary sequences of bits as key, so a key is easily generated by using /dev/urandom (Linux, *BSD, MacOS X), calling CryptGenRandom() (Win32) or using java.security.SecureRandom (Java).

Enhanced system: your signature is a true digital signature. This makes sense if you want to separate the key generator (who can produce keys which will be accepted by the server) from the server itself (who validates the incoming signatures). Keys for signature algorithms are mathematical objects with a lot of internal structure, and each algorithm implies a specific key generation algorithm. Use a library which already implements the needed bits (e.g. OpenSSL).

Either way, there is more to it than just key generation and signatures. For instance, you probably want to avoid replay attacks: an ill-intentioned third party spies on the network, and records a valid request signed by a regular user. Later on, the attacker sends the request again, complete with its signature, so as to replicate the effect. To avoid replay attacks, you must add some sort of external protocols, and these things are hard to do (it is not hard to define a protocol; it is very hard to define a secure protocol). Therefore, the smart thing to do is reusing an existing, well-vetted protocol, which, in practice, means SSL/TLS.

With SSL, the "basic system" is reduced to sending the API key in a header at the beginning of the conversation (that's exactly what happens with password authentication on HTTPS Web sites). The "enhanced system" is then "SSL with a client certificate".


How to secure JSON data that is shown on web service page?

It simply sounds like you need to add authentication to the web service.

From your description it appears that the request goes like follows:

App --> Web site --> Web service

If users have to register for your service, then when they log into the app it should authenticate with the web service and retrieve an authentication token. Ensure that the web service authenticates and authorises the user before any date is returned.

App [Auth Token] --> Web site [Auth Token] --> Web service [Auth token]

Then if anyone goes to the web service endpoint directly, they won't retrieve any data as they won't have a valid auth token.


Accidentally opened a .htm email attachment - Help!

This is not malware , this is a credential phish. If you enter your password and submit the stolen password is sent to this url

hxxp://www.kamesinvestmentint[.]com/wp/xplore/kato/mail.php

If you did not enter a password you are safe.
If the page didn't load it probably means your browser failed to render the JavaScript ... either way sounds like you are safe.

Worst case rest your password and enable 2FA/MFA


No SMS Spoofing attack vector in Kali Linux!

They took it out. You will need to find an old version of the SET kit or an older version of KALI. However the SMS spoofing will fail unless you can find a SMS gateway to use and most will cost money.


Is using a web service in a browser safer than running it natively installed?

The answer is - it depends on the application, and also depends on the threats you want to address.

In most cases, if you are running application in web your attack surface may be a smaller then in case of natively installed - easily because you run a process in a sandboxed environment (for example chrome sandboxes each tab), and you run less code in your web browser. This makes you more protected through the vendor because he would need to exploit the whole browser. That said you have different new vectors attacks like XSS or CSRF.


Does this mean that the "year" included in the CVE ID can frequently be years older relative to the year of the first public report of the vulnerability (and therefore to when the CVE ID becomes available for CVE search at MITRE)?

You can search for CVEs as soon as they are assigned. If no details have been published yet, the entry will reflect that:

  ** RESERVED ** This candidate has been reserved by an organization or individual that will use it when announcing a new security problem. When the candidate has been publicized, the details for this candidate will be provided.

  I am refering to a big hypothetical currently unknown bug that will be filling the headlines throughout 2017 but be labelled CVE-2010-something due to a vendor secretly and knowingly sitting on it for 7 years.

Yes, this can happen. The entry to a reserved CVE states:

  Disclaimer: The entry creation date may reflect when the CVE-ID was allocated or reserved, and does not necessarily indicate when this vulnerability was discovered, shared with the affected vendor, publicly disclosed, or updated in CVE.

The entry date is what a CVE ID is based on. The same issue will not receive multiple CVEs (unless an error was made) as it would cause confusion.

Although in practice, if a vendor wants to sit on it, they will not request a CVE. If a researcher requested a CVE, they will likely publish some details if the vendor does not show effort to fix the issue.


Is it safe for users of my API to 'Sign In With GitHub' using passport-github?

I don't believe that the GitHub OAuth2 implementation supports your use case to authenticate users, so from both a security and maintainability perspective I don't think it is a great idea. From the first paragraph of the documentation:

  OAuth2 is a protocol that lets external applications request authorization to private details in a user's GitHub account without getting their password.

My assumption in the discussion below is that the authorization code and access token in the GitHub OAuth2 implementation are opaque to your client.

In the GitHub scenario, we have the following OAuth roles:

Resource Server - GitHub server that provides profile information about users
Client - Your HelloAPI
Authorization Server - GitHub auth server
Resource Owner - Your application end user

The passport-github implementation authenticates a user by using the access token gained by your client as part of the OAuth2 flow and then requesting the user profile information from the GitHub resource server at https://api.github.com/user.

For example:

Joe Bloggs logs in to GitHub via the redirect from your client.
The access token that your client receives is opaque containing no information about the identity of Joe.
You make a request to the GitHub resource server from your client to retrieve the profile associated with the access token
Joe's profile is returned by the resource server and you assume that Joe is the entity that has presented the access token to your client.

The issue for me is that there is no direct 'evidence' as part of this process to ensure that the identity that authenticated to GitHub as part of the OAuth flow is the same identity that is returned in the profile information used to make your authentication decision in the app. For me this is a fail from an information integrity perspective, and so I would not consider this 'secure'.

Given that the passport-github implementation doesn't appear to be a supported authentication scenario by GitHub it also creates risk in the event that GitHub changes their implementation in any way. It is best to use supported protocols and use APIs for their intended purposes to ensure security and maintainability.


How to list all files with only arbitrary file path read, but no directory listing nor sudo?

You can try other locate implementations that index world-accessible files in a world-readable index, typically located at /var/lib/locate/locatedb or /var/cache/locate/locatedb or some such.

I don't see a lot of need for file listing to escalate your access on a typical server. Usually you'd know what application you're attacking and retrieve its configuration files and its database and obtain credentials this way. You might try files such as .netrc, .ssh/id_rsa and .ssh/config to see if the account can be a gateway into other accounts. If you aren't sure what may be running on the box, try lots and lots of plausible file names.

The one thing that's a bit long to exhaust is the PID values, to explore what's running. It takes 32k requests to exhaust pid_t under Linux by default, and you can check the maximum value in /proc/sys/kernel/pid_max. The command line is in /proc/PID/cmdline; you don't get to see the list of open files (you need readlink for that) but you can see their content (cat /proc/PID/fd/0 …).

For the specific case of a build service, do check the configuration files of that service. That should help you locate the git repository. If you've been able to locate a git checkout, look in .git/index and .git/logs/HEADS and perhaps other files in .git/logs (experiment with that service to see which branches are used and what operations it uses). This should let you retrieve object IDs which you can then read from .git/objects.

Other than finding a locate database, I can't think of a way to elevate read-files access into list-files with a typical configuration.


What is the bit at the end of a PGP signature file

Is it a checksum of some kind?

Exactly. From RFC 4880 (OpenPGP) Section 6:

  Radix-64 Conversions
  ... OpenPGP's Radix-64 encoding is composed of two parts: a base64
  encoding of the binary data and a checksum.  The base64 encoding is
  identical to the MIME base64 content-transfer-encoding [RFC2045].
  The checksum is a 24-bit Cyclic Redundancy Check (CRC) converted to
  four characters of radix-64 encoding by the same MIME base64
  transformation, preceded by an equal sign (=) ...
  The checksum with its leading equal sign MAY appear on the first line
  after the base64 encoded data.

If you want to know how exactly the checksum is computed so you can recreate or verify it just read on in this section.


prevent virus code modifying commonly run executable files?

The question is pretty descriptive: on a secure system, you make sure regular users cannot write to the folder containing your executables. On most OS, that is already done by default.

On some OS, this can be strengthened through several techniques, including requiring the executables to be signed or limiting the locations where executable code can be located.

It's not 100%, mind you: there are several techniques that can be used to work around the limitations but it's a good and (usually) easy to implement step for hardening a system.


If I seperate VPS into WebApp/MySQL VPS & separating WebApp projects into Admin/User projects. Is It more secure?

In general, for the first part, separating systems could improve security since a compromise of one doesn't immediately result in the other being compromised. That said, if your web application server is compromised and has readable database credentials sitting around, an attacker could pivot to the database anyway.

For the second part, I see no issue with using the same database server for both as long as each project users its own set of unprivileged credentials for the database. This way, even if one of the web applications is compromised, the other project's data won't be accessible.

There is one downside to splitting up into multiple VPSes: complexity. If you were running all services on the same host, you could just have the database listen on localhost only and not worry about securing it from the network. However, if the database runs on a separate server, you will need to expose it to the network, ensuring it is properly restricted with access controls, firewall rules, and possibly encryption.


From man ssh

     -J [user@]host[:port]
         Connect to the target host by first making a ssh connection to
         the jump host and then establishing a TCP forwarding to the ulti-
         mate destination from there.  Multiple jump hops may be specified
         separated by comma characters.  This is a shortcut to specify a
         ProxyJump configuration directive.

As it is creating a TCP tunnel from your computer, through the jump host, to the target, two ssh connections will be established, one to the jumphost, and another one inside the tunnel. The one inside the tunnel will be encrypted.

The jumphost could hijack the connection target, but then the key will not match.


Drupal Disputed CVE Five Year Tempest – Open Source Security Shortfall?

As far as I can tell, this is a bogus bug report.  I think the Drupal team is 100% in the right to dismiss and contest this "bug report".  None of the alleged "vulnerabilities" seem like vulnerabilities to me.  Just claiming that something is a vulnerabilities doesn't necessarily make it so.

The reporter alleges a number of problems:

Allegation: if the attacker learns the CSRF token, he can defeat the CSRF defense.  Well, duh.  That's how CSRF tokens work.  It's not a vulnerability.  When we use CSRF tokens, we design the system to avoid revealing the token to attacker.  If the reporter found some way that an attacker could learn the CSRF token, we could discuss it, but as it is, the reporter has nothing.
Allegation: the logout method is not protected by a CSRF token, so an attacker could log an administrator out.  This claim does not appear to be contested on the facts, so I will assume it is correct.  However, there is no obvious security consequence or danger from being able to forcibly log out an administrator.  There are also other ways to forcibly log out a user, in every web application ever built, e.g., by exceeding capacity limits on the browser cookie jar.
Allegation: Drupal doesn't consistently check the referer header on all requests.  That's not a security flaw.  The Referer header should not be used for security purposes, as attackers can spoof it or force it to be omitted.  The reporter does not allege any harm that is caused by this property of Drupal.
Allegation: Drupal does not distinguish POST vs GET methods. This is probably a case of poor implementation practice, but there is no security consequence identified by the reporter, and no obvious harm.

See also the Drupal group's official response.

Basically, I think the original report should be ignored and treated as invalid, for failure to allege a valid security vulnerability.  I don't see any shortfall, fundamental or otherwise, in the security of open source.  Actually, I think it is to the Drupal team's credit how carefully they responded to the allegations.


Wireshark Trace containing SSL RSA with RC4 128 md5

Ooops !!! You cannot do that .

Why ?

You cannot Decrypt the wireshark dump without having the Private key corresponding to the server's ssl certificate.

If you do have the SSL certificate's corresponding private key , then with the latest wireshark .

Goto Edit-> Preferences -> Protocol -> SSL --> RSA KeysList -> Edit , provide the server IP , Protocol as HTTP and the SSL PFX and its password and click APPLY and OK .


Does it strengthen or weaken security if one can't change the password he or she used before?

The impact is undefined.   Choosing passwords that have a discernible sequence is an issue for sure in systems that require periodic password changes and disallow password re-use, however I'm unaware of any evidence that it is also an issue is system that merely allow password changes and disallow password re-use.

As with any system, the benefits and drawbacks offer trade-offs.  There are certainly drawbacks, such as having to store old password hashes that could potentially be stolen and brute-forced along with current hashes.  There are also theoretically potential benefits in that if previously used passwords that have been comprised can't be re-used, they can't give a malicious user additional attack windows.

Ultimately, the impact of this single control is minimal. It's unlikely to either help or harm security in any significant and meaningful way. It's far more important that users generate strong, unique password, don't re-use them across systems, and change them when compromise is suspected.


Attribute certificate to model subject-object-action for access control

From what you describe, it sounds like you are looking for Role Based Access Control (RBAC).

The certificate can be used to identify (authenticate) the subject, while the RBAC model would handle the authorization. This would mean that you would have to enforce the RBAC rules within your software (which is not an uncommon thing).

Note that the rules for the RBAC models can, if so desired, be managed outside of your software. Only the hasAccess($subject, $action, $object); call needs to be implemented in your software.
The certificate provides the subject, the software should know which action on which object is requested.


What's the point of Empire if all payloads get flagged?

Powershell Empire passed out of active development in April 2019, in part due to the problem of defenses catching up with it:

"The original objective of the Empire project was to demonstrate the
post-exploitation capabilities of PowerShell and bring awareness to
PowerShell attacks used by (at the time) more advanced adversaries,"
said Chris Ross, one of Empire's lead developers.
"We feel that we've accomplished that objective and are proud to see
the security optics and improvements that have been provided by
Microsoft in the past few years; in addition to the increased focus
the EDR [Endpoint Detection and Response] community has placed on
PowerShell based attacks.
"With that in mind, the project's time has passed and newer frameworks
with better capabilities have been released," Ross added. "So it's
time to say farewell to Empire. We will not be updating or maintaining
the project any further."

As a high-profile attack tool, it received significant attention from defenders.  Likewise, Metasploit is tracked by many tools and is prone to detection as a result.  For these reasons, writing custom code is popular with attackers and Red Teams alike.
You will need to find more obscure C2 code, or write your own, if you want to evade detection.


Personally, I'd never reply to SPAM / Phishing campaigns. Especially not from a domain you care about -for a few reasons:

Responding lets the attacker know your email address is live
He/She could respond by increasing the amount of SPAM sent your way.. or worse
SPAMmers have little respect for law and "please stop" messages.

Basically, your email will either fall on deaf ears and nothing will happen, OR, they'll respond in a way you won't like.

Recommendation

I'd just add them to the SPAM filtering and move on. You can also report them to your ISP and let them handle it. This takes the burden/risk off of you acting by yourself.


How to verify certificate with very little information

A theoretical solution is to do a first connection with TLS-SRP. This is SSL, but with a special cipher suite which does not use any certificate; instead, the client and server are authenticated to each other with regards to the knowledge of a common "password"; this even tolerates low-entropy passwords because it is inherently immune to offline dictionary attacks. Within this initial connection, the server should transmit a copy of its "normal" certificate, to be used for further connections. This strategy is used in some cases for pairing Bluetooth devices.

Unfortunately, not all SSL/TLS libraries know SRP. GnuTLS does.

If you can get the first 8 true bytes of the fingerprint (not 8 hexadecimal characters), then this can be enough. Generating a fake certificate which matches the first 8 bytes (i.e. 64 bits) of the fingerprint is technologically doable, but expensive (think a few hundreds of PC running for some months).


Why do broken symlinks pose a security threat?

The risk really depends on where the symlink is and where it points to. In most cases these are harmless - especially in a docker style setup. An example risk -

In many cases webservers are set only to serve files from a given directory but are allowed to follow symlinks. That directory may have locked down permissions - so its safe to assume the content has not been modified by a compromised process (unless privilege escalation has occurred - and in that case its end game anyway).

Now imagine instead you have a symlink pointing to another file in another location. That file has also been set to the same permission setup - but its parent directory hasn't.

If the file is been deleted and the symlink remains there is a risk. A malicious party may hold permissions to create a file at that location. If they can then now your webserver will happily serve the file completely oblivious to the fact it is malicious.


I don't know what OS it is he used, it sound more like windows as NTFS filesystem supports alternate data streams which could be used to make the file look empty even though it contains data.

Also a delete on most filesystems only deletes an index entry or marks it as deleted for overwrite in the future, could this be what he was incorrectly referring to?


Can my University see what Stack exchange account I am logged into?

If you use http to access stackexchange, the university can access which account you are logged in with, as there is a link to your own account in the top bar. Note that it is a theoretical "can".

If you use https and there is no university certificate or compromising software on the device you use, the university can't know that without using some very hard and unlikely timing attacks (check when you sent something that looks like a post request, when the same time appeared a new question on the network). If you use https, the only history that's sent is which server you communicate with, how much you speak with it, and when. The "history" is in the GET headers and already encrypted. You can read more about HTTPS in the link suggested by DisplayName.


Can I identify a hash function with neural network?

No. The output of a cryptographic hash function (like SHA256) is indistinguishable from random data. The only feature that'd be useful to a neural network would be the length of the hash -- and you don't need a neural network to tell you that a 256-bit value could be SHA256.


As @Arminius has pointed out, This is being injected by your ISP to generate revenue.
So many similar cases are found as @user52472 explained.

But the solution to this issue is not a VPN (as it is just a workaround), I would suggest picking a better ISP and explaining your current ISP that this is a shady practice.


Is it bad to have cameras using a static IP address?

Static or dynamic IP is a non-issue.

But since you brought up cameras, you should know that many IP cameras have VERY poor security.  Many of these cameras have a known bad firmware in them that allows unauthenticated download of the entire memory of the device via simply going to /proc/kcore, without the need to authenticate.  This allows anyone to obtain the password for your camera.

http://www.tripwire.com/state-of-security/vulnerability-management/vulnerability-who-is-watching-your-ip-camera/


How secure is a BIOS/UEFI hard drive password?

That password is enforced by the storage drive itself, so it can't be overridden by the system firmware; that doesn't mean it should be trusted though.

How the drive enforces that password varies and there is no clear standard (and if there is, there would be no easy way of verifying if the drive is actually compliant); so it is most likely either just a password enforced by the drive's firmware (with no encryption behind, so replacing the firmware is enough to disclose the data), or poor security-by-obscurity powered encryption that would get broken in a matter of days.

In short, consider those self-encrypting drives as if there was no encryption involved. You can use them on top of data already encrypted with something strong (LUKS, TrueCrypt/VeraCrypt or BitLocker if you don't mind Microsoft and the NSA peeking), but don't use them as your only protection.


How to subscribe to information about new vulnerabilities in selected products?

Go to CVE Details' Product or Vendor pages. There is "Vulnerability Feeds & Widgets" link there.

It allows you to subscribe to CVEs about selected vendor/product.


In most cases if your VPN server drops a connection, your operating system will just start routing traffic using it's standard networking mechanisms.

If you'd rather it dropped all traffic when the VPN was down, you could looking at setting up your firewall to only allow traffic to go out over the VPN interface and not the standard network interface cards (with the obvious exception of access to the VPN server itself)


ARP-spoofing: why does the attacker constantly send ARP replys?

When a host sends an ARP reply without ARP request, this is a Gratuitous ARP

In your scenario, this is useful for two reasons:

If a new host connects to the network it will receive the Gratuitous ARP and it will be automatically victim of the attack
If a host doesn't send traffic, the entries in the ARP cache will be cleared. So with the Gratuitous ARP, the timeout is always reset.

And every client which receives the Gratuitous ARP will update their ARP cache.


Preventing malicious usage from users with access tokens

I.e.  what’s to stop a malicious user from simply inspecting outgoing traffic in their browser, copying the service url and their access token, and using it to spam calls against the service?

Nothing. A user has full control over the client application. You can't stop them from extracting the token, modifying the JS code or just building their own custom client. Even if you heavily obfuscate the code, they can eventually capture the requests to the API and replay them later.

  Is there a standard way of preventing this sort of misuse?

The common way to protect APIs from abuse is rate limiting. E.g., you can limit the allowed number of requests per user for a certain time frame or establish limits based on IP addresses. However, you can't prevent them from using the API from outside your app.

Also see:

How do I secure REST API calls?


How can I verify the trustworthiness of GPGTools?

The ways for you to trust software is limited. Essentially, your options boil down to this:

Audit it yourself.

This is time-consuming, requires quite some skill and ultimately requires you to build the software yourself, as you cannot be guaranteed that the compiled binary you download matches the source code you have been provided. But all in all, this is the "most secure" way of doing it.
Trust someone who audited it.

With larger projects, such as GnuPG, you can be reasonably sure that trustworthy people have audited the source code. While this approach has it's limits, it's generally what most people do. I didn't check the source code of the Linux kernel before downloading a Linux distribution, nor did I check the source code of every single package. I assume others did it, and if there was something wrong, I assume they'd tell someone.
Just wing it.

Arguably the least secure approach, but the approach most people go down when they just want to download and run some utility. You have backups, right?


How does Facebook really identify requests?

Actually I started to comment until I guessed my comment is too long ... anyway:

Whatever the settings methods you used to deploy SOCKS5 that you mentioned in your comments to hide your IP, surely Facebook does not rely on IP addresses to identify its users  because IP addresses could be the same if the users are, for instance, behind a corporate firewall, as are the users' reported locations, and users can modify their IP address at will.

There are many elements to consider. For example, in the case your VM operating system is the same as your host's one then this could be used in junction with your typing fingerprint -as for Google, banks ...etc-(there are  algorithms designed to capture and analyze the keystroke dynamics), plus, when you install a virtual machine you are, by design, sharing lot of information, (including your host IP address and hostname), between it and the host machine leading not only to detect they are the same machines but even to viral infection (which can work in both sides). Those shared information could be used to detect your  device and your some other data using browser (interesting to read) and Etag fingerprinting that can be used to check if two resources (host/VM in our case) if they are identical (in case of bridge-mode networking ?)

What I want to say that Facebook does not rely on IP addresses to identifiy uniquely its users, so whether you hide it or not, that is not that important.

Your experience with Facebook remembers me of my own experience with few  StackExchange websites. When I started to use this website in the first days, and after reading an answer on this website where it is stated that:

  Assuming that you can use TOR or a VPN or an openshell anywhere to
  tunnel away your IP address, the "safest" practice in my opinion would
  be to fire up a virtual machine, install a stock Windows Seven on it,
  and use that for any privacy-sensitive operation. Do not install
  anything unusual on the machine, and it will truthfully report to be a
  stock Windows Seven machine, one between a horde of similar machines.

So I created around 20 VMs with different OS versions where the host machine uses a private IP address. I have been detected and suspended; I was not even able to create a new profile on new VMs even after changing the host machines (I even used one server to by pass the suspension).

Why do I mention finally my own experience on here ? To tell you that maybe the moderators of this website are the ones who could answer you but don't hope because they won't. But why ?

The why is the final answer: as on here, Facebook and other similar systems use security through obscurity (among other things) so you can not know how exactly they are doing.

Further (interesting) reading.


A potentially dangerous Request.Path value was detected from the client (&)

You tried to visit a website with a malformed URL in it. A web application firewall (WAF) or similar thought it looked a little bit suspicious, and blocked your request. Apparently, the WAF is not configured veyr well, so it displays error messages to the user, instead of just a 404 page.

Regarding & in URL:s, they would normally be seen in the query string (the part after the ?). There, they are used as separator between different parameters, as in ?color=green&size=medium. I don't think putting them in a different part of the URL is a sign of any specific attack. But it's not a bad idea to block odd input even if it is not obviously an attack, just to be on the safe side.

So to summarize: Nobody tried to attack you. The webserver mistook a misspelled URL you visited for a potential attack, and blocked it. That's completely normal. You don't need to be worried about anything here.


First, some background information about how email works.  The basic issue is that server-to-server contacts using SMTP are unauthenticated: all a server knows about the computer contacting it is

The IP address
Who the computer wants to send the email to
Who the computer claims they are
Who the computer claims the email is from

Note that the last two items are not authenticated: the sending computer can lie freely about them.

Ordinary email works as follows (simplified somewhat):

Email client makes a connection to the sending server using authenticated SMTP or IMAP.
Sending server makes an unauthenticated SMTP connection to the receiving server and hands off the email.
Recipient makes an authenticated POP3 or IMAP connection to the receiving server and requests the email.

A spammer's botnet instead does the following:

Spammer contacts botnet, tells it to send spam
Botnet computer acts as SMTP server, makes unauthenticated SMTP connection to receiving server and hands off the email.
Recipient makes an authenticated POP3 or IMAP connection to the receiving server and requests the email.

To answer your questions:

Generally, no.
By lying.  The "from" address on an email is trivial to forge (as easy as forging it on a piece of physical mail).  There are various techniques to combat this: DomainKeys Identified Mail and Sender Policy Framework are ways to limit which IP addresses are permitted to send email for a given domain name; an older technique was a simple reverse address lookup to see if the IP address resolved to the domain, but this has reliability issues.
By being careful about their lies.  If a spammer is careful about who they claim the email is from (eg. using a "from" domain that doesn't provide DKIM or SPF information), they can lie without being caught.
An SMTP server can accept email for local delivery, or for sending on to another server.  An SMTP server that doesn't require authentication when accepting email to send onwards is an open relay.  By this definition, bots aren't open relays -- they act more like traditional email servers, with the spammer as the only authorized user.
It's unclear what you're asking here.  Botnets mostly don't need known accounts to send spam.
This is irrelevant to spamming.  It's a technique for hiding botnet infrastructure that lets multiple domain names resolve to a single IP address.


Where can I find a list of un-patched CVEs for a specific piece of software?

one good starting point for this would be www.secunia.com.  You can get a list by product there, of known security issues, and the note on the page unpatched issues.  For windows 7 for example, there's this list


XSS through modifying a UI element value?

Short answer: Yes.

Longer answer: Yes, if the <select> already contains an <option> with an XSS payload in (somehow - see below), and also it kind of depends on what the slider() function does. If you take your other example (a select input) then using val() without sanitising the content will cause this issue. Unless slider() sanitises HTML content in some way, it may do the same.

This is a form of DOM-based cross-site scripting.

Working example (with a <select>): https://jsfiddle.net/54bv5t3j/

Tested in Chrome for Mac OS X.

addString();
$("select").change(addString);

function addString() {
    var displ=$("select").val()+"<br/>";
    $("div").append(displ);
}

Where there is one <select> and one <div> on the page.

Practical Exploitation

The other question is when can this practically be exploited by an attacker? To make this practical for an attacker, the value of a select <option> would have to come from an untrusted source, either directly from a user controllable request parameter (including HTTP headers, cookies etc) for reflected XSS, or where the payload is loaded from storage (database etc) for stored XSS.

The example above already has the XSS payload in the page, so it is basically assuming that the untrusted input has already occurred.

Example #1

Here's an example that is entirely DOM-based. JavaScript sets the value of an option to the URL location hash. So if the victim is lured onto a page with an XSS payload after a # in the URL, the XSS can be triggered.

https://jsfiddle.net/tkgos3n0/1/

Example #2

I use a server-side technology (PHP in this case) to create a page with a dynamically generated <option> element from a user-controllable URL parameter. Because I'm a super-clever developer, I know that if the double-quotes can be escaped, the page will be vulnerable to reflected XSS on the <option> element itself, so I make sure I remove double-quotes from the string, thinking that I will be safe.

// User controlled parameter
$value = $_GET("value");
// "Sanitise" the value by removing double-quotes
$sanitised = str_replace('"', '', $value);
// Output to the page
echo "<option value=\"" . $sanitised . "\">Choose Me!</option>";

Because the developer has sanitised double-quotes, this issue cannot be directly exploited. I.e. the attacker can put all kinds of characters inside the option value, but he can't inject things like "> to end the option element and start a new one.

However, due to the DOM-based XSS, the Javascript will still take this string, potentially containing HTML elements, and output it directly onto the page. Of course, the developer should have:

Performed HTML entity encoding on PHP (ref)
Performed HTML and Javascript escaping in the Javascript code (ref)

References are OWASP cheatsheets.


Utilizing OCLHashcat to crack WPA/WPA2 passwords obtained via airodump-ng

When it comes to cracking WPA/WPA2 with Hashcat or Aircrack-ng, I recommend using Hashcat.  It provides a number of builtin features that can prove to be very effective.

Hashcat has builtin rule sets and easy to use GPU support.  For example, the rule sets provide a simple way to create new passwords out of you existing password dictionary.  This is builtin to Hashcat and doesn't require using another tool (such as John The Ripper) to apply the rule sets to your password dictionary.

Hashcat has most of the functionality you'll want for cracking WPA/WPA2 baked right in. Also, if you are serious about cracking passwords, you'll likely always want to use GPUs for this type of task.


War-dialing is to telephone networks what network-scanning is to computer networks. A computer dials every number in a given number set to map out what's there. In olden days it was looking for unannounced modem gateways into interesting systems, and sometimes fax machines for fax-spam. The robust systems could tell the difference between fax machines, modems, voice-prompt systems, answering machines, voice mail, and actual people, much the same way that nmap can do service and OS identification of network-attached machines.


False positive security alert from Google?

What did the security alert say? For example, did it say there was some suspicious account activity for this account?

Sometimes, Google sends these security alert messages so that you, the account owner, can help to verify if it was legitimate activity (in this case, you made some security related modifications, so it sounds like it was all legitimate?) or not. If it was legitimate, there is no need to worry.

If it was not legitimate, you can then take action like changing like your password for that account.

Updated based on the additional information provided

I think Google doesn't know that your two Google accounts are both belonging to you. So if you set up Google account A to access the email of Google account B, then I guess the first times it tries to retrieve the email, Google would alert the account holder of account B, in they were not aware of it. (maybe their password was stolen and now the attacker is trying to access their email without their knowledge)


IDS can cover deep packet inspection, or a simple look at connection types, or anything in between. You can have Network IDS or Host IDS, depending on what you want to focus your attention on.

DPI is a very specific type of analysis of packet contents in order to understand what the purpose of the communication is.
Signature Based Detection does not require any deep packet analysis - it is simpler and faster than DPI (which can also be known as Stateful Protocol Analysis)

There is no one-to-one relationship between IDS or DPI, or in fact any other acronyms touted by companies. They are simply ways to describe a service or product, and different vendors use different terms.


MITM is impossibile when the gateway's arp entry is set to static?

No. It is still possible at least so:

if the MAC of the gateway is also spoofed and the attacker finds a way to somehow destroy the original communication channel to the gateway
if the attacker finds a way to corrupt the gateway (f.e. somehow stoling the admin password of a cheap, embedded router)
if the attacker sits behind your gateway (f.e. by doing a little rewiring)

But the most trivial MITM solution (localnet gw spoof from a cracked client machine) made really impossible.


How do I protect my info from apps like CallApp?

If there was a breach then your information are likely no longer only at their server anymore and it is impossible to delete all copies. If you want to stop using these apps and want to make sure that your data are removed now (before a possible breach) you need to check this with the companies responsible for the apps since only these can remove the data. There is no universal way to remove private data from the web, no undo sharing data or similar.


What was the first version of Android to use OpenSSL (and what version was it)? What was used prior?

To the best of my knowledge, OpenSSL libs were part of "external" from day one. At least, I remember it in the not-yet-opensource 0.9 tree circa 2008. I am sorry to confess, I don't remember which version of OpenSSL was included there. All I know, it was not upgraded for a long time.


Is there any purpose for providing checksums on a non-HTTPS location?

These checksums are there to defend against accidental corruption, not against a malicious attacker.

I've had instances where the download was corrupted or stopped midway through but the browser didn't error out and still considered the file complete - using the checksum we can easily detect such occurrences.

The checksum can also be used to tell whether a file you already own is the same as the file you're about to download without downloading is, thus saving bandwidth which can be precious on low-speed or metered connections.


Is it possible to develop memory corruption exploits without access to the executable?

Yes it's possible against services that restart after a crash as shown in the BROP attack described by Bittau et al (http://www.scs.stanford.edu/brop/). In this attack technique a special ROP Chain is used to write the binary from memory to the socket to simplify the construction of the shellcode.

But if this attack type is possible depends on the type of the vulnerability, the availability of gadgets and if they will be re-randomize after a crash (http://calhoun.nps.edu/bitstream/handle/10945/47979/15Dec_Keener_Lawrence.pdf?sequence=1, Chapter 6).

All together with known techniques it is sometimes possible.


Microsoft Windows RPC (135/tcp) security risks

How can someone connect and bind to each service? What is the command/tool to use, and does it require authentication?

The net use command, browsing network shares, or any other SMB-related command will make use of these services.

What are the security risks of having this service running, if any?

It's often a necessary service to have running as it provides the backbone of a great deal of Windows network sharing services. I wouldn't be concerned so much on it running as I would be concerned if it were exposed outside your network. I believe service enumeration and possible undocumented exploits are the two current risks. Because this is a remote procedure call service, it does have some of the same excitement as any application service -- think of requests passed there in terms of a web query. They ask for a service (page) and pass certain relevant parameters (GET or POST options). Something on the service's back-end runs and returns a result.

See also http://isc.sans.edu/port.html?port=135


What is implication of ICMP timestamp responses?

When ICMP timestamps are allowed an attacker can probe the network to find live hosts and potentially suggest trust between hosts (for example by constantly submitting traffic it would seem as the attacking node is in fact a regular in the network and trick pattern based IDS)


How can I preserve the uniqueness of a document without a database?

The problem is actually not to make sure that Alice cannot copy the document (i.e. preserve uniqueness as you asked) but to make sure that it is clear who owns this document currently.

A solution to this problem might be if not only the documents are signed but the transactions (transfer of ownership) are signed too. In this case Alice might claim that she still owns the document but Bob can refute this claim by showing the signed transaction that Alice has transferred the ownership to Bob. These transaction might also be made public so that is is not necessary that Bob explicitly refutes Alice claims but that everybody can see independently who the current owner is.

If the ownership of documents changes multiple times it need to be clear what the latest transaction on the document was in order to determine the current owner. This can be achieved by having a clear order of transactions, for example by using trusted timestamps or by putting all transactions on a common blockchain. A search for blockchain document ownership provides lots of discussions, PoC and even products about this topic for further reading.


How to identify and patch a hardware vulnerability?

I'll be using modern Intel CPUs as an example of hardware. For most other hardware, you can identify bugs, but often you cannot patch it, but only work around it by trying to avoid the buggy behavior.

Hardware bugs are identified similarly to the ways bugs are identified in closed source software. Internal audits and reports in the wild are mostly responsible. Unfortunately, there are a lot of bugs which we will never discover both due to the closed source and highly secret nature of these devices, and the incredible complexity of how they operate.

Due to the fact that CPUs are incredibly complex, CPUs are released with the expectation that they will have bugs. As a result, Intel has designed them to be updated. Only in absolutely disastrous cases does Intel have to recall the actual hardware. But even though they are hardware, but they can also load firmware which overrides some of the hardware circuits with firmware code, called microcode. This microcode is stored inside the CPU and must be loaded at each boot. It contains fixes for known errata. Typically, the microcode is stored in the BIOS, which applies it while the CPU loads. The operating system also contains a more up to date version which is applied as well.

In the specific case you mention, they are releasing mitigations in the form of microcode updates. These updates will be present in new BIOSes (theoretically, at least. I'm sure many BIOS vendors will be far too incompetent... but that's another discussion), and in updates to operating systems, which apply the microcode updates to the CPU during boot.


Looks like i was almost at it and briefly misunderstood the concept used. The concept i assumed was the database version of timestamping, mainly because of the list on the website (yes, there are different methods of timestamping - see here), while actually the PKI one is being used according to RFC 3161.

The concept can be more easily explained by this image (only linked due to its license). Instead of verifying the timestamp by asking the TSA, all the data is indeed (as i doubted in the starter post) included in the new file - the hash of the file at that time and the timestamp are signed by the TSA and appended to the file. Therefore in court i would only need to provide the file and it could be viewable that the file had this specific hash at that time, and that can be tested. As long as the TSA isnt compromised the signatured time and hash are valid and no one is able to modify them.

This way i also found out why the limitation to 5 signatures per IP/day are bullocks (for database ones that wouldve been understandeable) and it makes more sense using other free services.


If someone outwith your company has modified the content of your site, it seems likely that it has been compromised.

If that's the case then you really cant trust anything on that server any more as it may have had malicious software (e.g. a rootkit or similar) loaded on to it.

I'd recommend that you get a backup from before the site was compromised and then wipe the server and start again with fully patched software.  Also depending on what sort of content your site has it could be that the attacker compromised the application itself so I'd review the site for things like SQL injection.

If you search this set for other questions about servers being hacked and how to respond that should provide you with more info.


A well known trick will be to disguise a PE or Executable program into an another file, a PDF or an archive for example.

Since most of people rely on the file's icon or extention, it works pretty well on common users.

For instance we (the sec folks) disguised a PE file as a pdf (which was actually a vbs file) named  im_now_a_daddy_guyz!.pdf.vbs and send it via email to all the company employees, explaining in the mail body how our complice is happy and wanted to share the news.

87% of the company's employees opened it, the following popup showed up on their screen What if i told you, i could be a real Malware. It was in the scope of a security awareness program.

So yes be careful when running files.

If you want to learn how to prevent this, and by the same, how to trust a file before running it, please read this page, start at the Is it fake or real? part.

Feel free to read the whole article (the 5 parts) It's well written and accessible to anyone who knows how to type things with a keyboard. This article should teach some basic knowledge about the Malware reverse engineering field.

Have fun.


Veracrypt: Possible to add encryption-algorithms and/or hash-algorithms?

It is not possible without modifying the source code of VeraCrypt. The algorithms and the cascade order requires explicit support in the program. Even if you could add new ciphers, you couldn't make them arbitrary. This is due to the fact that VeraCrypt, when given a password, will test it against every cipher combination it knows of to see which one is correct. The more combinations of ciphers, the longer this takes. It would be impossible to support arbitrary ciphers or cascades because it would require trying each and every possible combination of ciphers to unlock a volume.


Is buying a Windows Phone a bad idea if Micosoft is scaling down its Windows Phone division?

The Windows Phone 10 platform is the most secure of all of the current mobile platforms and the only one (last time I checked) that has no known external vulnerabilities (e.g. no way to break into a phone without the passcode).

I've been speaking to Microsoft regularly about the platform as we have over 4,000 WP10 devices deployed. The software continues to be actively updated but they seem to have had some issues with hardware channels. It is widely anticipated that there will be some announcements at Ignite at the end of the month and HP already announced a flagship device.

Windows Phone is actually pretty popular with enterprise and public sector customers, particularly in the EU. Helped by aggressive pricing and integration into the Windows platform.

It may be that part of the reason for scaling back on the division is that the platform is more unified than it has even previously been, hard to say for sure.

In terms of security, I have no current specific concerns beyond the usual mobile platform issues of rogue apps in the appstore. We are seeing very few security issues on the platform though that may be somewhat due to the limited market penetration.

As far as I am aware, there is no known malware currently for the platform and it has multi-layered security features described here including a hardware TPM chip. In addition, several WP devices have achieved FIPS140 and/or Common Criteria certification.

Microsoft's primary market right now for Windows Phone is government and large enterprises. What ever else you may think about them, they are very good at ensuring they protect these markets and so security features and certifications (for proof) are very much central to both their device and service strategies.

So I am not worried especially about the current state, the OS is clearly still under active development and is a key part of their Windows everywhere strategy so whatever other troubles it may have, I don't see it going away in a hurry and Microsoft are not going to compromise their key markets with poor security (well not deliberately anyway!) so that, at least, should be no barrier for continued adoption.

And no, I don't work for them!


SQL injection with filtered column names

You don't need to inject into the $password variable. Just comment out the rest of the query with the $login variable. Setting $login to bobby' -- will give you this query:

SELECT * FROM users WHERE login='bobby' -- ' and password='foobar'


Security category of command injection attacks?

Command injection attacks don't fit nicely in the STRIDE framework or in the CIA/AAA paradigm, and there's a reason for that.

The CIA/AAA paradigm provides a set of goals of information security, and it's not meant to characterize attacks.

As for the STRIDE model, it provides a classification of threats for threat modeling purposes. However, that is just the beginning of threat modeling.

In fact, threat modeling often uses threat graphs, or other representations, to identify all the possible threats to a system starting from the broad STRIDE category.

Example. For the Information disclosure category, what kind of information can an attacker disclose? For each kind of information, what different cases should be distinguished? For each such case, what kind of attacks could be successful?

In this way, threat modeling is not tied to specific vulnerabilities and also allows to understand how many threats could a given patch fix. It's very useful.

So, the STRIDE model is just the beginning of threat modeling, which explains why specific attacks (like command injection) don't fit nicely into it. But, in the particular case of command injection attacks, there is another reason.

The point of command injection is that an attacker can send commands to a system. Therefore, a command injection attack could be used to do anything, from erasing logs (Tampering), to carry out a DDoS (Denial of service), to privilege escalation, to information disclosure (see SQLi,...), and much more. Basically, the whole STRIDE model, and the whole CIA/AAA paradigm.

One may argue that command injection is the most general attack ever, since it simply means that the attacker has the capability to send commands to a system. The purpose of these commands is the real threat.