If:

all ports are closed except the one leading to your server software;
your server software is exploit-free;
the implementation, by the OS, of the TCP/IP mechanics is exploit-free;
the implementation, by the OS, of non-TCP network services (e.g. ICMP) is exploit-free;
there is no alternative network-controllable access to the machine (like IPMI or a network-based KVM), or, if there is, that access is devoid of any exploitable hole;
the cryptography is done properly, as per the standards, using standards for which no security issue is known or suspected, and without leaking information through side-channels;
whatever lies at the other end of the communication is similarly protected and exploit-free;
attackers are assumed to be able to eavesdrop on the network, and alter bytes at will, but not to achieve physical access to the involved machines or local networks, or to bypass the firewalls which enforce port-blocking;

then, indeed, attackers will not be able to obtain information on the exchanged data, save its existence, approximate size, and exact times at which the data chunks are sent back and forth (which can already be quite revealing; historically, it allowed the US military to predict the Japanese attack on Midway in June 1942). Attackers may still block data, duplicate messages or reroute them, and might possibly learn information through the reactions of the sender and receiver in such cases.

That's an awful lot of "if", though.


When form submission fails, password field gets blanked, why is that the case?

Good question. Having the benefit of looking at some of the answers, and pondering over this myself, I actually don't see any major security benefits from clearing the password from the partial form returned to the user, but there definitely are some risks worth considering.

From a security architecture point of view (as @Roryalsop already touched on), you usually want passwords flowing only in one direction. From the user to the application, never back. This applies on all layers, and this one-way-system gives benefits from a security point of view. Having an exception to this rule might or might not be a good idea. But that's why your question is interesting. Does this scenario deserve an exception?

Lets look at some attack vectors and see if nulling the password protects against any of those:

sniffing the traffic - if an attacker is able to intercept communication between the user and server, it can sniff the password sent in the first place by the user. I see no benefit in emptying it on the response
malware on the server or client side - the same. It can intercept the initial password.
cached data - this was already mentioned briefly by @SachinKumar but is worth expanding. There's an increased chance that if the server returns the password with the response, it might end up cached somewhere (the server memcached, a proxy server along the path, the client's browser history etc). Client requests are never cached. Server responses are! This is probably the biggest risk I see. Proxies can be probably be eliminated from the equation by using SSL, and if the server uses correct cache-headers and sets the input field correctly, this can also mitigate browser-caching. That said, it's still possible that the value gets cached somewhere, even accidentally and that's probably not desirable.

But then, nulling the password is easy enough, shouldn't damage user-experience too much and keep things cleaner from a security standpoint. I would still suggest you keep doing so.

If you're worried about user-experience, try to follow the advice you were already given on UX - perform extra validation on the client side, just so the user gets early feedback. Don't replace the validation on the server. This is the most important validation ultimately. But for user-feedback, client-side validation can work wonders to improve user experience and you don't have to take even a slight risk of the password being cached (or change your security architecture by making an exception).


If you have the firewall enabled, you're going to see ports when scanning from localhost which can't be accessed externally.

The question of "how much of a risk is it" can only be answered if you know what (specific)service is backing the port, and whether that service has vulnerabilities. As a general rule in security, don't assume risk without evidence.

It's pretty common for applications to open high-number ports to perform various functions(update checks, usage telemetry reporting, etc), and most of the time they're not listening for any kind of inbound communication.


What are the minimum parameters for Argon2?

The Argon2 spec gives very detailed information.

How does one "figure out" how many threads should be used? If only one thread is used, is it unsafe?

The  maximum number of threads you want is the number of hardware threads on your system. A 4 physical core Intel CPU Hyper-Threading to give it 8 logical cores should be be running Argon2 with 8 threads. If you use only one thread, then you will not be making optimal use of your hardware. This isn't inherently unsafe, but it does mean that the KDF will take longer to get the same amount of work done. If you have a system with a lot of hardware threads, you might just want to benchmark it.

This does not answer however, what if there would be 10 times as many users? What if 1 MB was the maximum? What if 16 KB was maximum? Which point is "too little" memory?

There's no effective lower limit beyond the limits imposed by the specification. You can bring it as low as you want, but remember that a smaller amount of memory means an attacker will be able to more easily utilize high-speed specialized processors like ASICs. The more memory you use, the more expensive it is to attack. You want to use the maximum possible. If you are forced to use very little memory due to resource constraints, there's nothing you can do about it.

This step is by far the most confusing. The idea is obviously to benchmark the system, to find "good" values for m, h and t, but it does not provide any priority to those parameters. Is low memory, but high parallelism and many iterations good? What about high memory and parallelism, but few iterations?

Parallelism is actually used to fill memory more quickly. The more hardware threads you use, the faster the memory can be filled and operated on. As for memory and iteration usage, that represents a tradeoff. With all memory-hard algorithms, an attacker can utilize a time-memory tradeoff (TMTO) attack where they can get away with using less memory than you used, but at the expense of greatly increased computation requirements. The more iterations you use, the more computations an attacker will need to perform to reduce the amount of memory they need to use. The exact optimal values depend entirely on the economics of the attack itself (e.g. it's possible to get around 16 GiB of ultra-high speed and low-latency memory using TSVs on sapphire substrate, but is that more or less expensive for a given attacker than adding more computation units to perform a TMTO attack?).
Related answers on our sister site, Cryptography (and the argon2 tag), which help explain more:

Questions about the argon2 options

What is the recommended number of iterations for Argon2?

Is it better to maximize memory usage or number of passes with Argon2i 1.3?


Certificate for Email Encryption and signing

PKI-based signature and encryption works this way (in email and any other application):

When signing data, you need access to the private key
When validating signed data, you need access to the public key
When encrypting data, you need the public key
When decrypting data, you need access to the private key.

Now, a (X509) certificate is a set of data that contains (mostly):

Identity information
Usage limitation information
Public key data
Digital signature of all of the above by a certification authority (for allowing 3rd parties to decide whether or not trust this information).

So:

For encrypting data all you need is the public key that matches the private key that will be used for decryption. In the case of email, that means access to the certificate of the recipient (an not the private key itself).
In order to decrypt data you always need access to the private half of the key used to encrypt it. In the case of email, it means that you need access to the private key linked to the public key contained in the recipient's certificate.

In the case of encryption, you do not and never need access to any part of keys belonging to the sending party. In fact, you do not actually need to have your own certificate or key pair to perform email encryption.

A personal certificate is only required when you intend to sign data or allow others to send you encrypted data.


Preventing Active System Compromise in Iran

No, there is not that kind of hardware, at least not common available.

Another option is to continue with the virtual machine idea as suggested by another. However, skip the part of snapshots. Instead, use truecrypt to create an encrypted file container. Inside that encrypted file container create an encrypted virtual machine with VMware player - inside that encrypted virtual machine in the encrypted file container create an encrypted linux installation. When done, copy this original VM to another VM inside the same encrypted file container. Use the copy of the VM for her internet activities and when done secure shred the entire VM. Next time she needs to go on the internet, make a copy of the original VM and use that for her stuff and after use secure shred it again etc. Use strong passwords and three different ones for each encryption.

The above is worthless if her computer is not clean for spyware, or other malicious software. Also, there are other means to obtain surveillance of her activities, especially if she uses the same ISP/connection/router/wall-plug etc every time. Also, truecrypt apparently suffer from a flaw - she may not sleep, suspend, hibernate etc her computer without dismounting the TC file container. Values are in memory and will be saved to hard drive in case of only suspending her machine. The safety of TC is under debate after the original developers closed the project due to flaws in the security, but a lot of ppl do not believe the official reason.

Nothing in this world are truely secure, giving time and if the stake is high enough.

BTW: Use SSD drives only. :)


You are trying to compare apples with pears. There is a difference between an HTTP proxy and site that serves http over ssl.

The former is a server that is used as an intermediary to do requests, depending on the type it will either conceal the clients or servers identity.

The latter is a protocol that is used to serve pages over a secured connection, so no eavesdroppers can see what's being requested. The server knows the identity of the client.


Impact of Mathew Garrett's Secure GRUB Bootloader on UEFI Secure Boot

This depends what you mean by “the overall concept of secure boot”.

Pretty much all secure boot systems have several components, starting with one in ROM and ending with an operating system or even programs within that operating system. A typical boot chain is ROM → OEM bootloader → OS bootloader → OS kernel → OS startup programs. A typical secure boot chain has each element of the chain verify the signature of the next element. Each link may involve a different authority to decide which signatures are allowed (the chipset maker, the OEM, the OS vendor, …).

In the case of Matthew Garrett's shim, the path is: … → UEFI → shim → OS bootloader. The shim is signed with a signature that the UEFI BIOS accepts. The code of the shim decides what is allowed at the next stage. The shim is designed so that it allows anyone in physical possession of the device to provide their own signing key for the next stage.

If you think that secure boot is about the owner of the device controlling what the device can run, this is perfectly normal: the end user is in ultimate control of the software that is executed on the device. If you think that secure boot is about the device manufacturer locking the software against modifications by the end user, then allowing someone like Matthew Garrett to participate in the secure boot chain breaks secure boot.

The background is that Microsoft, in part via the UEFI specification, has been pushing for OEMs to activate secure boot on all platforms running Windows 8, allowing only OEM-approved operating systems (with Microsoft having a signing key). On PC-style platforms, Microsoft has signed a shim which allows other operating systems to be loaded, allowing other operating system vendors to provide a secure boot. On ARM platforms shipping with Windows 8, Microsoft has retained the only signing key, locking the user into Microsoft's operating system.


WhatsApp uses Signal protocol which is by design offers plausible deniability in pairwise encrypted messaging. In pairwise messaging, every message is sent with HMAC-SHA256 to verify the integrity of the cipher text. HMAC uses a shared secret known to both sender and receiver.

Quoting from an answer on Difference between non-repudiation and plausible deniability

  A recepient can prove the authenticity of the message that it is indeed sent by you. If it's not him who wrote the message then it must be you who wrote it. In either manner, both the sender and the recipient can verify who sent the message. But neither of them can prove authorship of the message to others. A recepient can easily forge HMAC with a valid key to make it look like sender has sent this. He can also give away the shared secret to a 3rd party to forge HMACs in future messages.

Also, once a message is delivered, the key is deleted so there is no way to prove authorship.

In WhatsApp, you don't even have to forge HMACs. All sent & received messages are stored in Sqlite database file msgstore.db in unencrypted form in the internal storage (/data/data/com.whatsapp/files). A recepient can edit this file and modify any message that are sent by you to frame you for anything.

Even if Alice claims that Bob has sent her a message , she can't prove this to anyone. Bob can deny sending of any message sent by him.

Plausible deniability doesn't hold up in WhatsApp group messaging. In group messaging, a sender signs the message with its private Signature key so they cannot be denied and that can be used by the law.

In a legal context, plaintext messages are almost always considered proof anyways regardless of whether the underlying protocol is deniable or not. So it also depends how judicial system in your country treats plaintext messages.


Because it's easy.
And accessible.

Firesheep didn't create any new technology, and noone claims it did. But the point is, it has now become extremely easy to view and spoof others identities, and it is very accessible to almost any user (well, any user that can download and install Firefox and Firesheep plugin...)

It's really just a question of visibility.


How to determine when iPhone photograph was taken?

No, you can't. If an image file has a timestamp in its metadata, that data can be edited even after the image was taken. It is called "Exif data", and there are editors available to do that. So you don't even need to think of this when taking the photo.

Changing Exif data leaves no traces in the file. So there is no way to prove that this kind of tampering took place.

The only way to prove that a photo was taken at a specific time is by looking at what's actually depicted in the image and see if there are any clues which hint at the date and time when the photo was taken. But as you know, thanks to the power of modern image manipulation software, there are also ways to tamper with the content of images.


What is the Akamai Name Server I see for some big companies?

Akamai is one of the largest CDN companies in the world. CDN networks make web sites perform faster by bringing content closer to web sites visitors, through different technologies.
CDN can shield web sites from surges in traffic whether it was benign traffic (a site hosting a hot video), or malicious when the site is under DDoS attacks. This protection comes from the size/scalability of CDN vs a regular web site's (10000s of servers vs 10s).
For the content web sites want to be served via CDN they will create a CNAME that points to an A record that belongs to the CDN (as the output of nslookup above).


Why did the government made Project TOR public?

There are certainly a lot of reasons which we could speculate about, but one is fact and inherent in the way Tor works to provide anonymity to its users:

If the "government" (or rather, the united states naval research lab) was the only one to use Tor, then obviously they wouldn't gain any anonymity. Someone who noticed traffic from a Tor exit node would immediately know that someone from that research lab was behind the requests.

So by making it public and encouraging a wide variety of people from all walks of life to set up exit nodes and use Tor as a client, it becomes possible to hide in the mass of people who use Tor. So if you use Tor, it might be because you want to buy illegal drugs, but it might also be because you're a whistleblower or a human rights activist, or simply worried about your privacy on the internet.

Since the US law enforcement, government and intelligence agencies and armed forces sometimes require anonymity for their communication, too (that's why Tor was birthed, after all), diversification of the Tor user base would be something they'd be interested in, and that can't be achieved by keeping Tor use limited to US government agencies.


Are SAN SSL certificates a possible avenue for security compromise?

Also, does it not complicate any possible revocation scenarios in that if one host is compromised then they'll all need to be changed?

When the private key (for which the certificate is associated) is compromised, then the certificate(s) for that key are revoked.

Whether or not the certificate applies to a single domain, many Subject Alternative Names (SAN), or is a Wildcard certificate; it is still a single certificate and does not complicate the revocation process.

And supposing there are other certificates for the same domain(s), if they are from different uncomprimised private keys, then those will not be affected by revocation of the aforementioned certificate. Domain name overlap notwithstanding.

  Surely this is information leakage allowing a would-be hacker to glean more information about your organisation than you intend?

It is quite possible that a SAN will list a subdomain that could not be found otherwise except by Brute Force, I think in this particular case, these subdomains are probably easily found by other means.

Even if they were intended to be secret, software designers should not rely on the secrecy of their hostname. This is stored in browser history, synced to the cloud, and likely emailed to co-workers.

So the fact that SAN lists these domains might save an attacker some time in finding subdomains, publication of this information is not considered a vulnerability.

The real risk for vulnerability would be in the application, and that is where the security focus should be.


How does multi factor authentication modify the AD authentication process?

It really depends on the technology you use to implement multifactor auth. If you use smartcards with Active Directory then you need to modify all client devices to support smart cards and configure each user account in AD for certificates. You don't have to modify IIS if you are planning on doing just Windows auth, but if you want mutual auth in IIS with client certificates then you'd have to set it up. If the app running in IIS doesn't support Windows Auth then the app needs to be modified to support multifactor auth. If you use a 3rd party solution then it all depends on how they implement it. The company I work for has a credential provider for Windows as well as an API for custom applications and an ISAPI module for IIS, etc. RSA's solution is similar, as are 99% of all other solutions.

Like I said, it depends on the technology you use, but basically it all boils down to: you have to modify all points of authentication where you require multifactor auth and if it can't support it, disable it.


In the spirit of keeping it simple:

  Just as an example, if I have a computer that has outbound port 80
  blocked, but inbound port 80 opened, does that mean this computer can
  serve web pages, but cannot request any?

Yes

  Or does it mean that whenever a client connects, establishes a TCP
  session, and sends the HTTP request, the server is not allowed to send
  anything back?

No

Think of it this way. The source determines who is allowed to initiate the request. Once the connection has been established (assuming it's a stateful connection, ie: TCP) the communication is free to flow both ways until the session is over.


How does firewall differentiate between browsing and downloading?

The firewall installed at my college's router allows me to surf the internet but never allows me to download any package that has a size more than 100mb. I wonder how exactly does it differentiate between the two. According to my concept, they're both a flow of http packets so they should not be differentiable.

I presume they are intercepting your traffic and basing this filtering off the HTTP header Content-Length or dropping the connection after so many bytes.

  Furthermore, If I start downloading from proxysite.com (it encrypts all the traffic), the firewall couldn't differentiate and allows me to download even tens of GBs of data. Can you explain what exactly is going on here?

This would seem to reinforce my very-likely theory. If a site were using HTTPS, they would not be able to intercept the header or otherwise see what you are doing with a server without first installing a root certificate on your machine to MITM the HTTPS traffic.


If the cypher-text, plain-text and nonce is known, can the secret key be determined?

If a user has cypher text, nonce and decrypted plain text, can they determine the key that was used to encrypt the information?

Depending on the encryption algorithm used, knowledge of the plaintext and ciphertext does not reveal the key. Otherwise, a single block of known plaintext (a common header or an attacker-controlled value, for example) would break the cipher! Such a key-recovery attack is very rare for any modern, well-designed cipher. The library you are using supports several secure ciphers based on DJB's Salsa20 algorithm. All the ciphers used are secure from key-recovery attacks.

  For simplicity, it would be useful to use the same key for other encryption functions in the software

It is generally a very bad idea to re-use a key for any other purposes. Each distinct use of encryption should use a new key. For example, your CSRF token encryption key should not be the same as a link encryption key. If you really do have one key-sized value, you can expand it safely into multiple keys. A safe way to do this is with the popular HKDF function. You give the function one master key, and it spits out any number of cryptographically secure keys fit for use.


Is it desirable to obtain a brand ssl certificate for a password generator?

A certificate does not mean trust of a product - malware and phishing sites now use legitimate SSL certificates from Let-Encrypt.

Also as mentioned by AndrolGenhald no one should trust a password generated from an online service for a large number of reasons - First being they don't control the source and cannot guarantee uniqueness or that it hasn't been recorded or served up from a list.


What kind of information is exposed during a Firefox private browsing session?

Private Browsing and you

  I had a GMail tab open in private browsing mode, and then opened a new tab in that same window to go to YouTube. YouTube recognized who I was and asked which account I wanted to use to browse YouTube with.

Private browsing in Firefox is instance-based. This essentially means if you log into any google services, you will be detected during that session. If you have a single private browsing session, and you log into a website, close the tab and then go back later, you will still be logged in because you haven't terminated that private browsing session.

By default in Firefox, private browsing is not per-tab. It's per instance. For that particular session/instance, you should expect everything to operate like a normal browser, unless you disable cookies/etc.

YouTube belongs to Google. You'd use your Google account for YouTube, etc. In that particular private-browsing session, it is detecting your Google account since, as I've said before, private browsing does not create a new instance of itself every time you open a new tab.

Browser Fingerprinting

Keep in mind that changing your IP and going incognito will not protect your identity from browser-fingerprinting, among other things.


I would interpret "we first do a salt of your LastPass password with your username on the client side" as: we do a PBKDF2 function on the client side that includes your password and username (email) as salt:

client_encryption_key = PBKDF2(HMAC-SHA256, password, salt_email, 5000, 256) // 5000 rounds, 256 bits
auth_key = sha256(client_encryption_key) // this is what is sent to the server for authentication
server_key = PBKDF2(HMAC-SHA256, auth_key, salt_random, 100000, 256) // this is what is stored in the auth db

Note that client key is also used to encrypt/decrypt your data.

Also to answer NH's comment about email as salt possibly not being suitable: salts are typically not considered secret. Their purpose is to ensure the resulting key is different for two identical passwords.


How do I exploit with vunerability in special format with sqlmap?

This URL is https://example.com/login" AND "1"="1. You can not use like that for this parameter.
SqlMap has an option that you can use * char:

URI injection point
There are special cases when injection point is within the URI itself. sqlmap does not perform any automatic test against URI paths, unless manually pointed to. You have to specify these injection points in the command line by appending an asterisk (*) after each URI point that you want sqlmap to test for and exploit a SQL injection.
This is particularly useful when, for instance, Apache web server's mod_rewrite module is in use or other similar technologies.
An example of valid command line would be:
$ python sqlmap.py "http://targeturl/param1/varlue1*/param2/value2"


Security criteria for selecting a network switch?

Your list is a good start, but I would like to add a few technical requirements that I find important when you are building a secure infrastructure.

Central authentication / Radius support. I like to integrate the authentication to a central authentication server. This eases management of administrators of the switch, and protects it from bruteforce attempts (account lockdown).
Port Security / IEEE 802.1X: In some locations, the ethernet plugs are exposed, and I do not want other people to connect unauthorized devices to the network.
Management VLAN. Support to select which VLAN the device will use for administrative services (ssh/https/snmp etc).
Access Control Lists / ACL. Some switches allow ACLs to be configured pr port. This is useful in strict environments where you want redundant barriers to mitigate configuration errors (misconfigured firewalls etc), or as an option if traffic do not pass a true firewall.
Bonding / LACP. Allow bonding network interfaces (across multiple switches). This is if you have some high-availability requirements, you want the infrastructure to be redundant.
MAC lockdown. A poor man's Port Security where you disable the switchport if you connect equipment with a new MAC address to a port. Nice to have if the equipment you connect to the switch do not support IEEE 802.1X.

Hope these possible requirements are helpful for you.


How to bypass Certificate Authority for Local site?

You have to import the Root-CA which was used to sign the self signed Certificate into your trusted certificate store.
It depends on your OS how to do this


YES -- there is no necessary connection between the types of keys and certs used by TLS server and client for authentication (nor between the Certificate Authorities and trust decisions).

For TLS versions through 1.2 (and SSLv3, which no one should be using now), the server key-and-cert must match the key exchange portion of the ciphersuite used, which the server selects from among those offered by the client. See the table beginning about a page into rfc5246 section 7.4.2 and similar in earlier versions. In practice this is implemented the other direction: when choosing the ciphersuite the server will only consider those offered by the client and for which it has a suitable key-and-cert. (In cases where the server is mistakenly configured with no key-and-cert(s), which is fairly easy in Java where usually you configure only a keystore file and people who don't follow correct instructions can easily create a keystore file that doesn't actually contain a key-and-cert, this causes the server to reject all connections with an exception or error saying 'no cipher overlap', which some people find confusing and ask about on Stack.)

For ECDSA cert, the client may (and most do) specify the curves it implements using extension 10 defined in rfc4492 section 5.1.1 and modified by 7027 for Brainpool as linked by the ietf website at the top, in which case the server is only permitted to use a cert (and if applicable chain) using the specified curve(s), and thus in practice will select a ciphersuite requiring an ECDSA cert only if its ECDSA cert (chain) uses such (a) curve(s). The client similarly can constrain point formats used in the server cert(s) using extension 11, but in practice this is usually not an issue.

In TLS1.2 only, for both RSA and ECDSA (and DSA as well) the client can specify signature_algorithms extension 13 defined in rfc5246 section 7.4.1.4.1 which constrains both the public-key algorithm(s) RSA,ECDSA,DSA and the hash(es) used by the server cert chain; see the text at the end of 7.4.2 in rfc5246 only (not earlier versions). Before 1.2 there was no explicit constraint on CA/chain certs above the server cert (except for the rarely used static DH_{RSA,DSS} and ECDH_{RSA,ECDSA} keyexchanges), but it was a fairly common convention to be homogenous, i.e. a server RSA cert would be issued by an RSA CA and a server ECDSA cert would be issued by an ECDSA CA (either the same curve or a stronger one, in practice almost always the two curves then in NSA's Suite B, P-256 and P-384).

For TLS 1.3, keyexchange and server cert is no longer tied to ciphersuite. Instead client always specifies signature_algorithms extension 13 (but using mostly different values than 1.0-1.2) and may also specify signature_algorithms_cert extension 50 as described in rfc8446 section 4.2.3. The supported curves are now limited to the three FIPS-186 prime curves (P-256, P-384, P-521) and the two Bernstein curves (ed25519, ed448) -- which were pretty much the only ones anybody used anyway -- and there is no option for point format; the originally-X9 curves must use uncompressed and the Bernstein curves use the only format defined for them.

Lastly, for some application protocols using TLS notably including HTTPS and thus web browsers, the server cert must match the hostname expected by the client. This is usually a fully-qualified domain name (FQDN), and since the TLS connection is made at the IP-address level, the ClientHello may contain a server_name extension (defined in rfc3546 for 1.0, rfc4366 for 1.1, rfc6066 for 1.2 and 1.3) to guide the server in choosing the key-and-cert to use.

The client cert on the other hand is controlled mostly by the CertificateRequest message sent by the server. In all protocols if the server doesn't send CertificateRequest the client does not authenticate at all. In 1.0 and 1.1 (and SSLv3) CertificateRequest specifies only the supported (acceptable) public-key algorithms, which need not be the same as the one(s) for the server's own key-and-cert (chain), and possibly a list of Certificate Authorities (CAs) that the server prefers the client use, which again need not be the same as used by the server's cert chain. In 1.2, the server also specifies a signature_algorithms field which constrains the client cert chain in the same way the extension in ClientHello constrains the server cert chain. For ECDSA in 1.0 through 1.2, there is no constraint on curve, apparently on the theory that servers are never constrained e.g. embedded/IoT(!), but the server may constrain point formats using extension 11 in ServerHello (before CertificateRequest) which AFAICS provides no benefit. In 1.3, the server must specify signature_algorithms and may specify signature_algorithms_cert, as well as certificate_authorities (now an optional extension instead of a possibly empty field); see rfc8446 section 4.3.2 including the text about 'prior versions'.


Infosec consultant here. In theory the cybersecurity programs being offered at colleges will prepare you for a career in information security. In practice I've not found that to be true.

My recommended knowledge to have under your belt before starting in infosec:

Have a hardcore grounding in computer science. This means algorithms
and data structures, OS architecture and design, and even electrical
engineering of the underlying systems if possible.
Be able to program in one language really well. This well help you
acclimate to other languages, to perform code review and to write
tools needed for engagements.
Understand the core fundamentals of computer security. By this I
mean having a grasp on access control models, basic cryptography,
basic networking and security practices involved in web
applications. Also crucial is understanding how to break them.
Historical research in this area is very helpful as new technologies
tend to resurrect old vulnerability paradigms.

(Note that this is not an exhaustive list, leaving out things like the Security Development Lifecycle and Threat Modeling, but I feel those are intuitive things that can be learned on the job.)

With all this said, I would be very skeptical of a cybersecurity program which does not include programming. Many I am familiar with focus on the business side of computer security. If your interest is in making and breaking security mechanisms I would stay away from those. If no viable cybersecurity program is available to you, I would advise investigating a compsci degree and to experiment with writing your own code, participating in crackmes, utilizing vulnerable VMs to test exploitation and participating in bug bounties or CTFs. Honestly, while it is in many ways more work, you're much more likely to gain a heavy duty understanding of real world computer security this way.


Asymmetric Encryption for Multiple Recipients?

In that case you generate a random symmetric key for each message and use that symmetric key to encrypt the message. Then you encrypt one copy of that symmetric key per recipient with the key of that recipient and attach these to the message. So the message will contain of:

symmetric key S encrypted with public key A
symmetric key S encrypted with public key B
symmetric key S encrypted with public key C
plaintext encrypted with symmetric key S

This method is usually referred to as "hybrid encryption" and it is very common because most symmetric encryption and decryption systems are far faster than most asymmetric ones. So encrypting just a symmetric key with the expensive asymmetric algorithm and then using that symmetric key for the bulk of the message has far better performance, even when there is only one recipient.

Another useful side-effect is that it also prevents replay attacks and known-plaintext attacks. When you send the same message to the same recipient multiple times, the cyphertext will always be completely different because the symmetric key will be different. So an eavesdropper can't tell if a message is identical to a previous one. A man-in-the-middle can also not replay a previous message because the recipient could become suspicious if the sender uses the same symmetric key twice.


How to generate random but unique tokens for authentication?

Using os.urandom() is perfectly alright. It generates a cryptographically secure random stream of bytes. This would be impossible to guess for anyone.

Using guid() is also pretty secure, although not totally random.

Using XOR to encode parameters into your token is a bad idea. For one, it is vulnerable to bit flipping attacks. Even if the user can not decode the token, he may alter the contents encoded in it. A better solution is to send a HMAC along with the data, so that the user can not tamper with it.


How is the timer implemented in mutual distance-bounding protocols?

It is more important for the terminal to know whether a relay device is being used than it is for the card to know whether a terminal is being relayed. Most of the threats that use relays targets terminal's point of view to trick it into accepting fraudulent transaction.
In NFC payments, transaction always goes online verification by the issuer and regardless of mode, transactions can be always traced back to the merchant who was targeted by payment fraud. Securing terminals from fraudulent cards gives more payment protection than securing cards from fake terminals.
To counter relay attack, fixing either side can prevent relays. Distance Bounding Protocol requires to be installed in both terminal and card but the role of verifier can only be performed by the terninal as smart card does not have its own internal clock.
There is a patent available for Chip card device with real time clock for credit card. To count time, a clock doesn't have to be synchronised with real time. It only has to increment a counter for every second passed when provided power and then reset it for every transaction. But this requires changes to EMV architecture which can take years to standardize. Whereas Distance Bounding Protocol only requires changes to the software.
This company is offering next generation smart cards with built-in display, touch sensitive buttons and a real time clock with its ultra low powered battery which can last for more than 5 years. Theoretically, you can use any NFC hardware where ICC can be mounted. As Mutual Distance Bounding Protocols require clock for both parties, I don't think there is any way to verify relays from the NFC card itself without the clock.


I found emails and passwords on github, what should I do?

This is an everyday event not worthy of a CVE.

It sounds like in this case it could be a simple mistake however the following are useful steps you can take or at least consider for any situation where credentials have been discovered.

Contact the affected users if appropriate: The best way to help if this were a case of a public dump of passwords would be sending a single BCC e-mail to each of the people affected letting them know their credentials have been disclosed and that they should quickly change all of their passwords and potentially look for evidence of abuse of these credentials. Don't copy the information or redistribute it, simply send a link to where it was publicly exposed at or tell them the site name.

Contact the owner and service provider abuse accounts: Likewise if you know how the information came to be disclosed/lost it would definitely be helpful to contact the organization(s) involved that lost the information so they can handle it appropriately. To do this simply send an e-mail to abuse@company.com and optionally a sales@company.com or other publicized contact address.

Do not sign any NDA's in this process. Some companies use NDA's to prevent disclosure it's an ugly issue just don't do it. State that you are only notifying them of the problem and do not want to be involved.

Contacting the affected users is very helpful simply because some organizations when contacted about the loss of such data literally do nothing and never tell the affected users (depending on what country it's hosted in this may not be breaking any local laws either). At least this gives the users a chance to protect themselves from further harm.

Be aware some password dumps are fake: The following doesn't apply to your specific situation but be aware that sometimes people post fake "password dumps" to sites like pastebin.com. So use appropriate language when writing your e-mails "It appears that something may have happened ...". etc...

Assuming this wasn't accidental you can politely request the information be removed but in the case of a password dump if it was made public elsewhere the user may have no obligation to remove it (not your situation I just mention this for others). Again passwords being dumped on-line is a common occurrence and there are many sites hosting millions of exposed passwords from compromised sites.


CSRF protection needed for clients that don't accept cookies?

Django refuses all POST requests

Only with the csrf mechanism enabled. Django issues csrf cookies in two cases:

If you're using the csrf middleware in settings.py. Middleware applies to all requests as per the WSGI spec.
If you decorate individual views with @csrf_protect, without the middleware

In the case of 1, all views are protected via this mechanism and a comparison of {% csrf_token %} (an input field in the form containing the csrf token) is compared against the cookie sent.

You have two options to disable this, therefore:

Site wide - remove the middleware and your POST requests will start working again.
Through careful use of @csrf_exempt you can opt certain views (POST urls) out of the csrf protection mechanism.

So is not using csrf protection a risk? It depends on what your POST request is. Have a read of the description of csrf from OWASP - basically the idea is that you construct a request and convince a user to execute it; when they do, their data is modified in ways they didn't mean to happen. The idea behind the token comparison is that only the issuing web page will have the valid token, meaning a malicious constructed request should be rejected.

As such, the answer to this is yes, it most likely is a risk. For most web based applications and sites, you do want this kind of protection.

  my plan is to modify Django's behavior (through extension of the CSRF middleware) in such a way, that it lets through POST requests that do not have any cookies at all.

For the above reasons I would advise against that. I think you mean to extend from the existing framework (which you don't need to do), but I just want to cover the other case other users might consider, i.e. patching the django framework itself to do this. In which case... don't, because unless each site sits in its own virtualenv you'll be extending this vulnerability to all sites using that code, now and until you update your django install.


Should we use API keys for authorization on a public API (instead of JWT)?

I believe API keys are actually an older convention for auth than JWTs (which were only standardized in 2010); you certainly aren't re-inventing any wheels to use them. This scenario definitely seems ripe for using them, whereas I think JWTs would actually add quite a bit of needless complexity.

JWTs are especially valuable for certain authentication and/or authorization scenarios, but I don't think any of them apply here. You're presumably not separating authentication from authorization (JWTs allow one party to authenticate a user and then another party to provide - or deny - service based on that). You're keeping a small pool or users and presumably will have few active connections and request rates, so cutting one database (or, realistically, data cache) lookup per request isn't likely to be urgent. It doesn't sound like your partners will likely expect multiple tokens each with a minimal set of permissions - it's more secure in some scenarios, but definitely more complicated to implement - and you could do that with API keys anyhow.

On the other hand, JWTs introduce significant risks. JWT-parsing libraries need to be secure against a number of attacks that just don't come up with API keys (those have their own risks, but they're mostly well-known things like SQL Injection, brute-forcing, or timing attacks). JWTs require generating, storing, using, and hopefully rotating cryptographic keys; they may also require distributing them if you're separating the authentication provider from the service provider. JWTs are hard to revoke, so they're usually made short-lived, meaning you need to support some other authentication token (like a DB-stored refresh token) or low-friction auth method, at which point you might as well use the API key anyhow.

Another option (which may or may not be suitable for your customers or API) would be to use TLS client certificates. These can be more secure than either of the approaches discussed (the control and simple processing of individually issued and revoked keys, the built-in expiry and impossibility to brute-force of JWTs, and unlike either you avoid ever transmitting the actual secret over the wire even within a TLS tunnel and "accidentally send the token via plain text" isn't even a meaningful risk). They also have drawbacks, though (requires handling key material, makes enrollment more complicated, makes it harder for an individual user to enable access for multiple devices, rotation can be more complicated in the event of a compromise, users are likely just less familiar with them). I wouldn't even mention it except that you're expecting a very small number of users and a working relationship with them.


The system will use PayPal Express Checkout. This means that it should
  be eligible for SAQ A

I don't believe* PayPal Express Checkout is an iframe implementation, so it would not be eligible for SAQ A, but rather SAQ A-EP, which has a more significant number of questions.

*I'm open to be corrected on this point.  But the merchant is the one who needs to be crystal clear on it as per DSS §12.8.5, which is part of SAQ A.

  It's a self-assessment questionnaire so I can fill it out myself, right?

Correct.

  Does this mean I complete the document and store it away until it's needed again?

You will need to update it and re-attest it annually, so you have - and may need to submit to your processor - a new document every year.  And the signature on it comes from "Merchant Executive Officer," so unless you're the Big Boss, you're filling out something the Big Boss has to put their name to.

Granted that most of the answers are likely to stay the same, you are still expected to research them.  Some of them deal with annual practices you're expected to do, such as monitoring your service providers' PCI DSS compliance.  You should expect to review the document each year and verify it is still true, rather than simply dusting it off and altering the dates.

  I can't see where any cost of incurred. Am I being naive - can anyone
  shed any light, please?

The work involved to do it right is more extensive then the tone of
your question suggests you appreciate**.
The crux of the SAQ is responsibility; the signer is responsible for representing the truth of the questionnaire, and in the event of a breach the penalties are likely to be worse if the SAQ is found to be slipshod or misleading.

**tone is difficult (reading and writing) in text, and no slight is intended.


Personally, I would start with a low-cost or free SSL certificate signed by a known and trusted CA for one domain.

Then at that https site that their browsers trust (and that they can recognize as one particular subdomain of your organization), give them an https link to download your CAs certificate with instructions on how to load your CA's certificates in all of the various browsers/OSes that they likely will use.

E.g., firefox: http://www.cyberciti.biz/faq/firefox-adding-trusted-ca/ or in google-chrome: navigate to chrome://chrome/settings/certificates


Using an active or passive scan, can I detect all devices connected to or transmitting via a Wifi network?

Yes, tools like tshark will show you all the packets on the channel by default. In fact, when doing some analysis, you must apply filters to restrict your search to the useful packets you are interested in (like beacons).


Alright, this answer is by no means exhaustive as this is a large question, but just off the top of my head here are some thoughts:

GIT:
That's good that you're doing the merges yourself, does that mean you're going to handle all the diffs?  If you're not going to, the trust of the coder could be a POF, but if you are going to depending on the amount of merges expect to spend a lot of time doing all the diffs yourself.

Programming/Framework:
Might want to be careful disabling CSRF, whenever you do that and have flash there can be some nasty exploits.  Best bet to prevent those is to make sure you have really solid session handling, and verify verify verify any time a user is accessing a resource.  You can find some more info on common CSRF stuff here: CSRF FAQs.  Also, watch out for this vulnerability.  I don't have a ton of familiarity with CakePHP, but best rec is to make sure to sanitize, whitelist if possible, use ACLs, etc.  Here is a very basic way to add a bit of additional security to your CakePHP instance.

Server Security:
I don't have a ton of experience with Capistrano, but from what I've heard it's  a pretty solid tool, as long as you've grabbed a reliable fork.  I would be more cognizant of vulnerabilities in the SSH handling itself, as it seems to me that is where capistrano could most likely be exploited.  As for web server security, I think Amazon is one of the best choices out there.

SSL:
I would be very wary of a wildcard cert.  If one of your subdomains is compromised, so will your entire network.  All it takes is one certificate authority having a vulnerability and all of your customers and their data will be compromised.  Since you're doing e-commerce, it's really important to have the highest levels of security for customer data.

Summary:
All in all, I would really recommend hiring a web app security professional who is credible in the field and has experience to take a look at your application.  Since you will be dealing with financial data, which is one of the most sensitive types, a solid exhaustive look at your software is very important.  I know it's hard when you're just starting out, but if you don't take the time to secure your app thoroughly one exploit could bring down your entire business.

Hope that helps :)


Disregarding collisions, two users having the same hash value means that both of them have the same password, salt, and pepper. Consequently, this usually means one of two things

The site uses a fixed salt for all users: This renders the scheme to a pepper-only password hashing scheme (the "salt" is in the code). By means of brute force, and by employing knowledge of a plaintext password, you can find out the value of said "salt".

This, of course, can be done by registering another account of your choice and attempting to brute-froce something like hash(password + X), with X being the value you want to find out, and then comparing the output to the hash you extracted after creating your new account.

A site doing something as stupid as using a hardcoded salt (pepper-only) will probably be using something like MD5 or SHA-1, which will make your brute-force attack much faster.
The site uses non-unique salts derived from certain information from the user: (username, email, etc.) which you can find out by means of brute-force.

Since the database you extracted didn't contain any salts, it is most likely the case #1.

Note: Just because a duplicate hash wasn't found in rainbow tables, that doesn't mean it's an easy password. It might be the same user with two accounts using the same strong password.


Why does Windows 10 not have the secure attention key as default?

The SAS is typically disabled by default on client editions of windows, it is assumed it is too much effort for the normal user. Almost every enterprise enables it via group policy.

The SAS is designed to guard against applications that look like the standard windows login screen, since the signal cannot be intercepted by any normal application, pressing it would cause the secure desktop to appear, revealing the ruse.


Why should I run OWASP Broken Web Applications Project as host only or NAT?

The name 'Broken Web Applications' infer that they are a collection of applications which has insecure code deliberately put together for educational or practice purposes.

Using Bridged mode means, other users in your network can connect to this host.
So technically if you are running 'OWASP BWA' using bridged mode, others in your network or LAN can exploit this insecure code and get access to your machine or the machine hosting this 'BWA'. We wouldn't want that and so using NAT ( if you need this host only for outgoing connections such as to the Internet, not allowing incoming connections ). Host only network gives access only to other VM's running under the same hypervisor, with no external access.
Therefore NAT, Host-Only networking provide limited access to this VM running insecure code.
It is strongly suggested NOT* to run 'OWASP BWA' or any other such intended insecure application in Bridge-mode.


Is android pentesting partially similar to web pentesting?

It will depend on the application(s) that you end up reviewing, but typically in terms of skillset, for Android mobile applications there's a couple of areas to cover in addition to web API knowledge.

Knowledge of the Android ecosystem. How the operating system works, and what good practice and common issues look like. So things like how should secrets be stored on the client device, permissions that applications can/should request.

Often pentesting an Android application would be best done in a white-box fashion, so being able to read and understand the language(s) commonly used to create android applications and common application frameworks is likely to be helpful.

Server-side (where the application is communicating with a remote server) then yes these are often (but not always) REST APIs, so knowing that + common supporting technologies (e.g. OAuth) is likely to be valuable.


Why don't call center scammers accept bitcoins?

Most people simply don't know how to buy bitcoin, and would probably require being walked through the process (expensive). Those few who do know how to buy bitcoin tend to be more tech-savvy, and perhaps less-easily fooled by call center scammers. A lot of people also associate bitcoin with criminal activity, which could also make it more-difficult to trick their marks into believing their call is legitimate.

From a scammer's point of view, it's best to use a few non-reversible payment methods which the most people are familiar with, and which the low-level call center scammers can verify easily. Compared to Western Union, Green Dot MoneyPak, and gift cards, bitcoin is just not that good an option.

You will find bitcoin and other cryptocurrency is often accepted by ransomware though.


Designing CP and CPS for multiple hierarchical CAs

Well, your design makes some sense for me and may be valid. If each policy has its own unique procedures (defined in CPS), then you may need to create as much policies as many different policies are defined. Even if they operate under the same PKI Management Authority.

Your question requires some research to examine the procedures for each certificate type. For example, are there any difference between issuing VPN certificates and issuing certificates for authentication with custom extension? What kind of difference? Usually, most important difference includes (but not limited to):

The way how certificate applicant is authenticated (say, can request the certificate by email, or through face-to-face meetings and handsigning the document, requirements the applicant must meet, etc.)
The way how certificate is delivered and stored (say, the policy requires to store certificates on smart cards only)
Does the policy allow key recovery?
...

In other words, sections §4.3 and §4.4 can be different for a single PMA (the rest paragraphs are usually the same across all policies) and each set will require separate CP. Then, if two or more CAs operate under the same CPS (has no significant differences that may be critical to software where multiple certificates may be presented, but only specific are accepted based on a policy), then you can merge and assign the same CP/CPS to these CAs.

For example, it doesn't seem to have notable difference between CP1 and CP4. You may consider to merge them in one CP. CP3 makes very little sense in terms of CP. The fact that certificate includes some extra extension means literally nothing, because it (most likely) doesn't employ distinct practices and procedures. You may consider to get rid of this CP at all. CP2 may be merged with CP1 and/or with CP4. CP5 is the only policy that seems to require a separate CP, because these certificates falls (most likely) under highest insurance level and the most strict requirements.

When you examine all policies, you may end up with only two policies: CP1 assigned to SubCA1-SubCA4 and CP2 assigned to SubCA5 with corresponding OIDs (OID1 and OID2).

Regarding mapping between CP and CPS. You may create single CPS document and describe all policies in the same document. Like it was said, most sections (except §4.3 and §4.4) will be the same across all policies, because they operate under the same PMA. And provide separate §4.3 and §4.4 for each policy.

In addition, I would review entries for CP5. Each entry may have different policy OID. Certificates for merchant access and payment authorization may look the same, but there will be a software that will check whether the presented certificate falls under specified category (even though, they are issued under the same CP and CPS). Not sure how they are used in your environment.

Tip: you should not define Certificate Policies extension at root CA level. An absence of Certificate Policies extension on root certificate implies Any Policy for it. First Certificate Policies appearance should be at level 2 in hierarchy. Most likely, all CAs are under the same administrative control and don't require a separate policy for CAs. However, if root CA (or subordinate CAs) is outsourced, you may need to move to 3-tier hierarchy with dedicated Policy CA under root that defines the policy attributed to 3-level CAs.


What is a secure way to send credentials to the server?

Check what log is it. If this is a log before the TLS termination point, then the server does not see the URL and paramaters, because they are encrypted. If the log is behind the TLS termination point, then the server can of course see the whole request.

Use HTTP POST instead of HTTP GET. Put user name and password to the request, don't use them as request parameters. The bodies are usually not written to the log. Check the settings of your web server.

Use Basic Authentication instead of sending user name and password as a request. Then  the browser will send user name and password as a separate data package upon server request. Such data are normally not written to the log. Again, check the settings.


What should I do if I get no response from a security mailing list I reported a vulneratility to?

Sometimes you never get any feedback at all. It's just part of the game. It could also be a case of lots of people passing it over as "it's not their job to to look at this issue/component " in fact it's possible that nobody is working on that specific component anymore ..

P.s. I assume you got a cve number and included it with the report ?


How can a non-technical user verify a message was sent "securely"? ...or over TLS?

Your objective is to drive in a screw, and you want to use a hammer because you have one handy and it's easy to use. I'm afraid the most likely outcome is a sore thumb.

TLS is fundamentally about point-to-point security. It is only attached to the connection, not to the data. Email, on the other hand, is fundamentally designed to bounce through multiple hops. While the hops do leave a stamp tracing their actions, you would be dependent on the hosts to not be malicious (each hop can fake the whole message including the stamps of its predecessors), to not be fooled (e.g. into misauthenticating their predecessor), and to leave the stamps that you expect.

You can give the recipient confidence that the message was transmitted securely by delivering a signed, encrypted message produced by the sender. TLS is not useful for this. RFC that can help you include RFC 3156, RFC 4880 (OpenPGP Message Format), RFC 5750 and RFC 5751 (S/MIME).

In other words: use PGP or S/MIME.


You don't need to comment anything out.

Use:

/?search='-alert()-'

JS will attempt to create the search term string from the expression '' - alert() - '' which will trigger the alert function. I preferred - over + because it avoids potential issues with URL encoding and is rarely blacklisted, but you may also use any other binary operators to squeeze in your payload without causing a syntax error.


How can a hacker put malware on someone's PC when all precautions were taken?

A website does not need to be malicious. But the implementation of the website, the web server that hosts it, the OS that it runs on or the database may have vulnerabilities. Such a vulnerability may be exploited (by XSS, SQL injection, directory traversal etc.) and suddenly turns the trustworthy website into a malicious website without you (or anyone else) noticing it.


In short, it's because websites can send data by making POST request to other websites, but they cannot read data from other websites.

Let's forget about CORS (a way to explicitly allow sharing data between different domains anyway), and let's say A and B are two unrelated websites. A can make a POST request to B, sending data and performing actions. But A cannot read the content of B in any way (frames, Ajax requests, etc. won't work). So tokens provide a solution to CSRF because in order for A to make a successful POST request to B, the secret value of the token must be known. And there's no way to know it, unless you are on B. Only B knows the right value for your session.


How to get the password from Windows Application?

A not too technical solution is using an unmasking tool to unmask those asterisks in browsers and software.

These are 3rd-party unmasking utilites:

Bullets Pass View
Encrypted Reg View
Asterisk Password Spy (I have used)
Kernel Password Unmask

I don't know Metatrader 5 but there is a Windows built-in tool for this situation which usually used in organizations and enterprise companies.

Go to Control Panel\All Control Panel Items\Credential Manager then click on Windows Credentials, Then possibly you see your password there.


What are the security features of JRE 8?

JRE = Java Runtime Environment (meaning java.)
this will help you understand the differences between the different "versions", if you will, that java is listed/talked about.
https://stackoverflow.com/questions/250517/java-se-6-vs-jre-1-6-vs-jdk-1-6-what-do-these-mean

these should help you answer your questions:

http://www.oracle.com/technetwork/java/javase/8train-relnotes-latest-2153846.html

and

http://www.oracle.com/technetwork/java/javase/jre-8-readme-2095710.html


Why doesn't netsplit riding work on single node networks?

You've basically answered your own question. The way I see it is that an attacker can disconnect everyone, including the attacker, by performing a denial of service attack or exploit a vulnerability in the IRC daemon/server.

While performing a denial of service, in theory the attacker could gain op in one or more channels by stopping the denial of service and then quickly connect to the IRC network.

However, there are also IRC operators that could easily get back the channel, especially since it's a small network, so global rules for specific networks do not apply.

Counter measurements would be to install (a) service(s) like Anope where people can register their nick(s) and/or channel(s) to prevent take overs.


Well, using some dedicated VPN service like NordVPN, or like you said, Tor, should really be enough. That is, unless your employer or co-employees are really nosy or you don't work while you're supposed to. Other things, such as built-in apps, usually remain confined to local storage unless you decide to sync them. Even so, unless you decide to sync to reminders, memos to your non-work Apple ID, not much can me done. And as for preventing them from accessing data stored on your personal account, just make sure you have a strong password.

TL;DR Nothing much to worry.


Is Plaid, a service which collects user’s banking login information, safe to use?

I want to point out that despite Plaids apparently honest attempts at security, their approach is a privacy nightmare, as you give full access to Plaid, to all and every single information your bank has on you, including loans, funds, investment accounts, credit card statements, etc. This makes Plaid differ substantially from other payment services, such as PayPal, as they only have your account number.
If you don't believe me, here's their data collection description from their privacy statement (Effective Date: May 29, 2019, my italics):

Information collected from your financial institutions. The information we receive from the financial institutions and other financial service providers that maintain your financial accounts varies depending on the specific Plaid services our developers use to power their applications, as well as the information made available by those institutions and providers. But, in general, we collect the following types of information from your financial institutions and other financial service providers:

Account information, including financial institution name, account name, account type, branch number, IBAN, BIC, and account and routing number;

Information about an account balance, including current and available balance;

Information about credit accounts, including statement due dates and balances owed, payment amounts and dates, transaction history, and interest rate;

Information about loan accounts, including due dates, balances, payment amounts and dates, interest rate, loan type, payment plan, and terms;

Information about investment accounts, including identifying details about assets, quantity, and cost basis;

Information about the account owner(s), including name, email address, phone number, and address information; and

Information about account transactions, including amount, date, type, quantity, price, involved securities, and a description of the transaction.

The data collected from your financial accounts includes information from all your sub-accounts (e.g., checking, savings, and credit card) accessible through a single set of account credentials.

To make matters even worse, they can share all that information with their customers, i.e., the company that wants you to link with them. That means that when, e.g., your rent is paid via Plaid (my landlord uses a service that relies on Plaid), all of that information may be shared with that service! And while they, in turn, may not distribute that data further, you now have to trust another party that they are able to keep your data safe.
Again, here's the relevant excerpt from that privacy statement (again, my italics):

How We Share and Store Your Information
We do not sell or rent end user information to marketers or other third parties. But we do share end user information with third parties as described in this Policy. For example, we share your information with the developer of the application you are using and as directed by that developer (such as with another third party if so directed by you). We also share your information:

With your consent;

With our service providers, partners, or contractors in connection with the services they perform for us or our developers;

If we believe in good faith that disclosure is appropriate to comply with applicable law, regulation, or legal process (such as a court order or subpoena);

In connection with a change in ownership or control of all or a part of our business (such as a merger, acquisition, reorganization, or bankruptcy);

Between and among Plaid and our current and future parents, affiliates, subsidiaries and other companies under common control or ownership; or

As we believe reasonably appropriate to protect the rights, privacy, safety, or property of you, our developers, our partners, or Plaid.


Help! Ransomware encrypted my files. What do I do now?

Can I get my files back? How?

Maybe.

If you have backups, you can restore your files from there. Just make sure to completely reinstall your operating system first, i.e. "nuke from orbit", to remove the malware first. If you don't do that, you will just get infected again.

If you don't have backups, things get trickier. Some ransomware has been beaten and its encryption can be reversed. Others have not. To find out if you are lucky, you can use a decryptor (e.g. The No More Ransom Project, Kaspersky's No Ransom). They offer a service that helps you identify what strain of ransomware you have, and let you know if there is a tool to decrypt your files.

If you are unlucky and your ransomware is not on the list, you can backup the encrypted files on an external drive (with nothing else on it, it might get infected, too) in the hope of a future cure. But there is a real risk that your files are just irreversibly gone.

  Should I pay the ransom?

I wouldn't.

First of all, there is no guarantee that you will get your files back - there is no honor among thieves. Some forms of ransomware don't even bother to encrypt the files - it just replaces it with random junk to make it look encrypted. Obviously, paying in a situation like that does not help.

Second, you will be financing organized crime and creating incentives to create ransomware in the first place.

  What should I do so that this never happens again?

Apart from general good computer hygiene (don't download strange stuff, keep things updated, etc.) there is one killer solution to the ransomware problem: Make frequent external backups.


Are efforts being made to bring about password standards?

Password strength metres are often wrong in their appreciation of what makes a password good. Often they ask you to pick special characters with little regard for how guessable your produced password is. See Telepathwords for an example of what an informed password strength metre should look like.

For instance, P@s5WorD. is considered very secure by most password strength metres, yet a good password cracking tool will always check for variations of a dictionary word (especially such a popular one as password), which means you haven't moved from an input space of 26 to 95, but rather an input space of 26 + a few tens of permutations per word in that input space. This is simply due to the way humans make passwords; we don't actually create random passwords because we wouldn't remember them.

A lot password research focuses on helping people create more complex passwords, remember longer passwords or even remember passwords by providing an image on the auth UI meant to act as a reminder, which often ignores the fact that people pick short and similar passwords to cope with the number of credentials they are required to deal with. People don't want to select a password based on some secret/hint your UI provides them, or longer or more complex passwords; they want to remember less and fewer passwords because they've had enough! See this paper from Sasse et al. on an authentication study done... on NIST employees. Also, there are some field studies on how many credentials people manage online (for instance the Floriencio and Herley 2007 paper, which is a bit old already; probably people have many more accounts by now).

Once you've realised that, and the fact that (not always encrypted) password databases get stolen on a daily basis (hence the main issue is not password strength but password handling and storage), you start understanding that the issue is most service providers have no clue why they apply a policy and just mimic whatever they see others do... perpuetating unusable and unscalable password requirements and policies over time.

There was an effort in the past to bring about federated identities with services such as OpenID but service providers preferred to retain control over their customers' identities for a handful of reasons, which means more different authentication interfaces and more passwords for users.

There are interesting initiatives out there to replace passwords (see Pico), but I'm afraid you shouldn't expect any industry improvement over night.


How should one manage authentication on custom line of business software

As Graham had said it really depends on what you are wanting to protect against. But given the technology you listed, the big (marketing) push from Microsoft is to use Claims Based Authentication/Authorization through Federation: http://msdn.microsoft.com/en-us/magazine/ee335707.aspx.

However, since that alone probably doesn't help you at all, some more questions might need to be asked:

Where's the data?
How are you accessing the data? (E.g. directly through SQL connections/ORM, or through a web service)
Where do you want to store users?
How do you want to manage users?

From a technology perspective there are lots of options that don't involve writing things from scratch, including 3rd party products to integrate with. However, the 3rd party products usually exist for very specific feature sets, e.g. multifactor authentication.

EDIT:

  So what is it that people actually do when developing their own software?

They continue to write their own security code even though its insecure.

Thinking longer term, you are probably best off creating a WCF service protected by WIF and storing the credentials in the database using ASP.NET Membership providers. There's an open source project that would get you what you need: http://identityserver.codeplex.com/

All calls to the WCF service will require authentication, so the service would be the common interface for various types of applications accessing the data. It does require a little more work, but it will save you in the long run.


To answer your points:

In terms of finding one - there are a number of vendors who sell already encrypted disks. A quick google for 'encrypted hard drives' will give you a current list - the normal vendors have them (my quick search gave me this useful guide but it may be out of date)
In terms of what factors you may need to be aware of, these would be my criteria:

physical security: is the case resistant to attack; does it have a kensington mount
authentication mechanism: on device or on PC; fingerprint, PIN, passphrase
speed: well, it's got to perform, right?
encryption: strength; is the encryption on board or at driver level?
I would feel safest with the PIN/fingerprint on the device itself, and encryption enforced on the circuitry.

I don't think buying one will cause any suspicion - they are becoming more and more common for individuals to protect themselves in everyday life.
And as for your final point - you don't. There isn't likely to be a way to prove it, but best assume that unless you are an important target, it would be very unlikely that your drive would be compromised.


Why do unverified restaurants accounts pose a threat to the privacy and safety of users?

Your question lacks context. So, here is some (too) input:

Information security is about three things (order is not of importance):

Technology
Processes
People

Your example is lacking in "process" - i.e. how does the information get into the system?
So, your question is how secure is a system when the information in it may be false.

That depends on the system. There are systems, such as games, where "truthness" of the information is not needed. However, if it is a game, the users are aware that the information is fictional. If it is not a game, but a public service (like the restaurant you mention), then the users should be made well aware that the information is not verified. And then the question comes "who owns the information", i.e. who is responsible. If you order and pay, and then the restaurant is in another city and refuses to deliver, what happens? These are part of the "processes" mentioned above.

In my view, the app owner has some responsibility to verify the information, and cannot claim as being an entirely neutral provider. Just to store and process your personal information, they will certainly be obligated by some regulation to comply to some security norms, depending on which country they are in. And I doubt any security auditor will give them the go-ahead in this case.

But I find your question a good example of information security -- showing that it is not only the technology (SSL, encryption etc.). It is processes. And people of course.


Root of Trust - The general Mechanism of how RoT Authenticates higher levels of software

Great question! The article you link, to me, uses a lot of words to say very little (ie I find that it is lacking specific detail). Instead I will base my answer on this page:

Secure Boot | Microsoft Docs

This article uses different terminology from the article you linked. I will use the Microsoft terminology. I believe that "Secure Boot" == "Root of Trust (RoT)", but I'm not 100% sure.
Disclaimer1: below is my understanding of this complex process, I am still a student in this area. Corrections are welcome.
Disclaimer2: I'm going to be a bit sloppy with my use of the word "firmware" and use it mean anything pre-operating system kernel in the boot sequence.
Secure Boot
Secure Boot is a small piece of firmware code. It is the first thing to boot up. It is provided with a local database of:

Signature public keys that are allowed to sign firmware for this device (ie approved software vendors), and
hashes of allowed firmware code (ie approved software binaries).

This may or may not be backed by a hardware TPM, if one is available on the given platform.
Protection and updates of the Secure Boot firmware itself
The Secure Boot code itself is not verified at runtime, however since it is the first code to run on system startup, the only way to update or modify it is to ask it to update itself, and it will check the code signature on any update package before updating its own code in firmware storage. So assuming you trust the original Secure Boot code shipped on your device, you can trust all updates to it.
Detection of compromised firmware
When firmware in the boot sequence tries to load another firmware module, it will first ask the Secure Boot module "Is this allowed to run?". The Secure Boot module will perform checks something like the following:

Is there a code signature on this binary?

If yes, is it produced by one of the signing public keys in the database?

If yes, is this binary valid under this signature?

If yes, succeed; binary is trusted
If no, fail; binary has been modified / tampered with.

If no, fail; binary is signed by an untrusted vendor.

If no, hash this binary and check if it is directly listed in the database?

If yes, succeed; binary is trusted.
If no, fail; binary is not trusted.

This means that Secure Boot will only allow other firmware to run if it was either produced by a trusted vendor, or is explicitly trusted in Secure Boot local database.


Is it unsecured to use TOTP codes on the device that generates them?

My opinion is that if all the data needed to compromise your systems exists in one place, that becomes a single point of compromise. It doesn’t completely negate all the benefits of 2FA, but a sophisticated attacker would have one-stop shopping to grab your generator’s key and state, as well as your passcodes and passwords.

However, I am not the risk analyst assigned by your company to make the determination of whether or not this poses an acceptable risk to your organization. You need to contact your own security team and ask this question of them. They are the people who will weigh the risks of convenience against the potential for loss. They know the threats and the value of the company’s assets. They understand the need to balance usability and security. They’ll decide if it’s worth the effort to pursue a technically pure 2FA solution.

They should also make decisions based on the risks of a particular type of access. For example, the PCI rules may say “2FA required to view a credit card number”, which they might internally consider to be a medium risk, and they may have a dozen phone operators who all need similar access all day long, and so they approve phone-based 2FA for them. Or you might have access to your company’s cryptographic key servers, which hold the keys to all your databases and code signing servers, and they might decide you need to carry an air gapped 2FA token.

It’s all about risk and risk tolerance, and nobody on the Internet can definitively state what is right for your organization.


Security risks for a simple network configuration screen in android

From the UI snippet alone, we cannot tell much, but given your pseudo-code of:

http:// + {Whatever host they typed} + : {Whatever port they typed} + /path/

You might be in danger of someone crafting the following input:

http:// + {evil.com/evil_script.php?http://10.16.1.159} + : {8080} + /path/

In this case, the evil script now can input to your website (given certain conditions).


Is CAPTCHA necessary when I use an anti-CSRF token?

Yes its neccessary. A token can still be requested by a bruteforcer. Yes, it would cost the bruteforcer one request extra per try, but a captcha still blocks attempts completely instead.

If you dont want to bother your users with a captcha, you could set so when a incorrect password is used, the account in question will require a captcha. This both thwarth bruteforcers, but also alert the original account holder, that someone might try to access his account. To avoid that a bot might figure which accounts that exist or not, store this flag also for non-existing accounts.


Methodology for finding existing adversary presence on network

If the network experiences heavy loads at off times, i.e. in the middle of the night when no one is in the office. You can see the packets on your network with some firewalls and tools like Wireshark.


Is it possible to pass TCP handshake with spoofed IP address?

Short answer: no.

Longer answer: yes, if you control a router device close to the target device (it has to be on the path between the the real source IP address and the target, and on the path between the faked IP address and the target) or if the target network/host accepts source-routed packets.


The key factors I always look for in a Project Definition spec are missing here:

What are you protecting? Who are you protecting it from? What is the impact if it is compromised?

If you are protecting your list of friends birthdays it is almost certainly overkill.
If you are protecting Top Secret material from International or Corporate espionage then it may well be too weak.

You need to think about the potential risk, the threat actors who may target you, and other factors such as resiliency (does a failed login on a Monday morning make it exceedingly difficult for a user to gain access when they really need to)

Hopefully you do have answers to these, but unless you post them here it can be hard for others to provide guidance on security architecture.


Does deliberately wrong information from a DNS server violate standards generally accepted good practices?

Laws are a local thing, so what's legal here might not be legal somewhere else, but as a rule this sort of thing isn't directly legislated on. A court might extend some previously-existing law to cover this type of thing, but I haven't heard of that anywhere yet.

Does it break the standard? Yes and no. If I ask a server for the current time and it instead gives me back the current open market price for bananas formatted as a time -- well, the time is wrong but the formatting isn't. It does  look like the time, after all. The standards around DNS cover protocols and formatting; the answer you give to a query reflects your opinion as to what the correct answer is, and that bit isn't in the spec. You and I might disagree on the correct address, but the fact that you successfully retrieved my answer means that I followed the standard at the very least.

It's not uncommon for ISPs to redirect NX domains to their own "site finder" search engine pages, though this practice is widely frowned upon and openly scorned by people who like to defend the Internet and stuff like that, but it still happens and doesn't appear to draw legal action.

On the the other hand, if you get a false response for domains that truly do exist, this might be called a "man in the middle attack", and could start drifting into the darker shades of grey on the legality color chart. And it certainly smells malicious. Best to ditch your ISP's DNS server post-haste. There's dozens of handy publicly-usable DNS servers out there: 8.8.8.8 is run by Google, 4.2.2.2 and 4.2.2.1 are run by Level 3 I think and are generally very fast.

But test and verify. There are some networks that intercept DNS traffic and redirect it to their own DNS servers no matter where you attempt to send it. There's Sprint's 3G network that does this, for example (last time I checked, at least, they may have reformed but probably not).


Is there a digital "safety deposit box" equivalent?

There are three meanings for "safety" here:

safe against eavesdroppers (confidentiality);
safe against malicious alterations and/or theft (integrity & availability);
safe against accidental alteration and/or loss (integrity & availability, also).

Amazon S3 is a service which strives at providing safety types 2 and 3, but not 1. However, their liability in case of alteration or loss seems to be limited.

There exist solutions for higher security (at least for protection against loss), but they are not cheap. They involve storage duplicated into several data centers which are physically remote from each other (as was said in the aftermath of the World Trade Center destruction in 2001, "a local in the basement" is not remote enough, even in a 400m high building). One example of a society which offers that kind of "secure archival" is Zantaz.

Provable long term integrity (i.e. not only the files are not altered, but it can be proven in a way which could convince a judge during a dispute) requires Time Stamps, and (for the "long term" part) more time stamps in successive layers (e.g. as specified in ERS).

Confidentiality is mostly orthogonal to all of that. You get it through encryption, which reduces the problem (you no longer have to worry about 400 GB of data, but only a 128-bit symmetric key or an equivalent such as a "long" passphrase). You should be able to remember a single passphrase; for added safety, print it and store the paper in a bank (in case you forget it, or your heirs must get it after your demise).


How to achieve seamless SSO without having the user to login again (SAML 2.0 & ADFS using OpenSSO)

Configure the ADFS login page to authenticate using windows authentication. Then the user should be automatically redirected back to the destination page without actually having to do anything.

http://blogs.technet.com/b/abizerh/archive/2013/04/11/more-information-about-sso-experience-when-authenticating-via-adfs.aspx


Unsafe C program accepting malicious string inputs

Now when a compiler runs  printf("%s", text);, it would look into the stack and go to the address 5054. However what about printf(text)? How does it access the address of 5054 to print "%s" which after printing might result to a segmentation fault?

It doesn't. In the case where the user enters "%s" as the input, there will be two strings at different locations, both containing "%s": the string constant from the second printf, and the text char array containing the user's input.

Here's what's happening in more detail:

printf("%s", text);

In this case, the first argument is a string constant. So, the compiler creates a string containing "%s" and adds it to a table of string constants somewhere in memory (let's say at address 5054). When this printf is called, the address of the string constant (5054) is placed on the stack, along with the address of the text array. (The order in which they are pushed on the stack depends on the argument push order, but it's usually right to left). Then the current execution address is placed on the stack or into a special register (so the CPU can return from the function) and the CPU jumps to the address of the printf function. The printf function evaluates the formatting string, and when it finds the %s it looks on the stack for the second argument (the address of the text string) and prints it out.

printf(text);

In this example, only the address of the text argument is pushed onto the stack. Then the execution address is saved and the CPU jumps to the address of the printf function, as before. The address of the string constant (5054) is not placed on the stack, because there is no string constant in the list of arguments to the function.

In this case, the printf function evaluates the formatting string, and when it finds the %s that the user entered, it looks on the stack for the second argument, but there isn't one, so whatever was on the stack will be read out, treated as the address of a string, de-referenced in order to print it out, and a segmentation fault would likely occur.

printf is a Variadic function, which means it can take a variable number of arguments. It relies on runtime parsing of the formatting string to determine how many arguments (should) have been passed to it. This is what makes it vulnerable to malicious data: the contents of the formatting string do not match the number of arguments that were actually passed.


From a SQL injection side, you should be safe since you are prepared statement.

Please see the accepted answer here.

From the accepted answer:

  The main principle there is using prepared statement which is designed
  for sending safe query to db server, this can be done by escaping user
  input which is not part of the real query, and also checking the query
  without any (where clause) to check the validity of the query before
  using any parameters.

The query is limited to three results and is on a single value (cat_name) which will reduces the possibility of a DOS style attack. As an example:

If the query could be forced to take a very long time to execute, a remote attacker could potentially use a lot of database connections and force excessive load on your database.


Is this a sign of a successful XSS attack?

From your screen shots, this page does not seem to be vulnerable to XSS.

The correct way to prevent XSS is by using output encoding. If a user types <script> and the page puts <script> in the HTML source, it is vulnerable to XSS. If it instead encodes that user input and puts &lt;script&gt; in the HTML source, it is not interpreted as HTML but as the text <script>.

It looks like your site does this encoding twice instead of once, and this results in displaying the encoded HTML in the text fields.


How to check if Windows computer has SMB accessible over the internet?

If your port 445/tcp is exposed to the outside then your SMB is accessible over internet. This usually requires port forwarding and your public/private IP must be reachable from the outside.

(Wannacry) as you might now is using "an exploit" and is not accessing SMB the regular way..

And for the sake of sharing,  I guess you asked this question following what happened last Friday, Cisco released a snort rule for ETERNALBLUE (the SMB exploit) as SID 41978


Being 100% annonymous online is art itself, so let me give you some helpfull advice.

What you are looking for (for masking full internet connection) is a VPN, there are loads of free VPN's out there, but beware of their orgins, there are enough free VPN's that get malware or a remote client on your PC, and it could get infected.

Some good free VPN services are www.openvpn.net, www.hotspotshield.com

There are also Paid VPN services (i.e. www.barracuda.com)

If you want a cool browser that grants some masking too, you're searching for www.torproject.org, this browser bounces your connection over a relay network, making it harder for others to get your real IP.

Please note that there is never a 100% water-proof way to be annonymous on the net, these tools are simply helpfull things that help protect your privacy when visiting sites, or in example connecting to a gameserver while playing online.


How to secure SSH such that multiple users can log in to one account?

Yes, you can have multiple keys that are allowed to log into an account. This is a common configuration among users who have multiple trusted machines and keep a separate private key on each one.

This is also a reasonable configuration for a service account that is only meant to access one application. In this situation it is usually combined with a restricted or special-purpose login shell that only allows access to that specific application. For example, gitosis is a gateway to the Git version control system, and handles user authentication by itself, sticking to a joint git account at the unix level. If multiple people can run arbitrary command through this account, you should really give them different unix accounts.

Get the users to send you a public key, and concatenate the public keys together to form the ~/.ssh/authorized_keys file, or equivalently append each public key starting from an empty file.

You can put restrictions on the keys themselves in the authorized_keys file. For example, ssh-rsa AAAA… alice@example.com declares a key with no restrictions, whereas a user who logs in with the following key is only allowed to log in from a specific IP subnet, may not forward ports, and may only run a specific command:

command="/usr/local/bin/restricted-app",from="192.0.2.0/24",no-agent-forwarding,no-port-forwarding,no-x11-forwarding ssh-rsa AAAA… bob@example.com

If you rely on command restrictions, be careful that the command doesn't allow any indirect way to obtain a shell or to edit files in the .ssh directory or any other sensitive location. You may make the account's home directory, the ~/.ssh directory and its contents owned by root and accessible for reading by the user, which would prevent privilege escalation in case the restricted application has a file overwrite vulnerability but no shell escape vulnerability.

Set LogLevel VERBOSE (one step up from the default level INFO) in the server configuration (sshd_config) to log which key was used to log into the account each time.


MIT Kerberos: getting keytabs onto hosts securely

A keytab is the password derived into a key. That key is what allows you to authenticate to the KDC. As such, if the host itself is compromised it doesn't really matter if they saw the password or got the keytab. It's all the same to an attacker.
You also don't need admin credentials to generate a keytab. You only need the user's credential itself. That limits the attack to just that one account.


What would happen if one of the popular Linux repositories is hacked?

Note that kernel.org was, in fact, hacked.  There is an interesting analysis of how this did not affect any downstream provider.  Basically, the primary reason why this attack did not yield any significant results was due to the Git source control system that is used.

http://www.theregister.co.uk/2011/08/31/linux_kernel_security_breach/

(I can't seem to find the original kernel.org messages, though their original press release is buried in this article:
http://thehackernews.com/2011/09/kernelorg-server-rooted-and-448-users.html)


Can I use a vpn to securely use prototypes of webapps from my phone or laptop?

I think what you are looking for is to set up your own VPN, not to connect to a VPN service that proxies your connection to the internet.  The purpose of a VPN is to extend layer 2 (LAN/Home) connections accross layer 3 (WAN/Internet) connections.  So in your case you want to set up a private network between only your development server and devices.  If everything was located in the same pace you would simply setup a switch between the server and clients and either firewall the server from the internet or simply not connect to the internet at all.

If you have a linux VPS somewhere in the internet and want to connect to devices on your own LAN then you may want to look into setting up your server as a VPN server.  For your clients you'll want to look into what VPN clients they can support to connect to your server.

A nice option to avoid having to configure VPN access across multiple devices is to setup a router that can be configured to connect to your VPN server.  Many commercial home routers can be flashed with DD-WRT which supports several VPN protocols.  Your devices could then connect to this VPN router using regular wifi or ethernet.  Additionally, you could setup a VPN router on both ends to connect to each other.

There are also apps such as hamachi that lets you setup a VPN between a number of systems while allowing traversal of NAT.

If you require both internet access and access to a VPN between your clients and server then you can setup static routes using DD-WRT on your router or directly on your clients/server.  Windows supports adding routes using the route command.  You'll have to research what each client supports.

Now if your development server is on the same physical network then there's really no reason to use a VPN.  You simply need to segregate the server to client traffic from the internet.


You're probably using one of the possible tools right now.  Both Firefox and Chrome have developer tools that allow you to see both the request and response headers for any request that is made.

In Firefox go to Tools -> Web Developer -> Network and then make a new request by clicking on a link or refreshing the page.

In Chrome, go to the menu -> Tools -> Developer Tools and choose the Network tab and then make a new request by clicking on a link or refreshing the page.

To see the headers for a request in either browser, just click on the request in the list in the developer tools.