How can I protect my browser from being compromised? In enterprise environments, I have found great benefit to use binary white-listing,  web security gateway and end-point AV to help protect the end-user/system.  Unfortunately, I still see the browsers being compromised.  That being said, with this layered approach, the typical use of a dropper is prevented from secondary execution by the binary white-listing.  The anti-virus is typically able to pick up the dropper a few days later (once a signature is available) lying dormant on disc.  This works fairly well, but the browser is still being exploited.  In my experience, relying on patches, AV signatures, IP reputation, domain reputation and HIPS have left me still vulnerable.  Both invincea (www.invincea.com) and blade defender (www.blade-defender.org) show promise, but what else is there?

With that in mind, how can one prevent that initial code execution?

Code execution? You say it like it's a bad thing :)

The fundamental problem with information security is that we've built Turing complete, computationally universal systems that can have any state and then we realize that some states aren't desirable and we can't control the system to not go into those states.

The best you can do is be security minded and layer multiple security controls starting from the hardware to the browser. But remember that there is a tradeoff between security and usability.

Qubes is an open source operating system designed to provide strong security for desktop computing. It is based on a secure bare-metal hypervisor (Xen) and you can use it to segregate your trust zones. Code execution in one environment would be isolated and be deleted when the environment reverts to the safe state.


How do you properly setup Tor on Windows 7? How do you properly setup Tor on a Windows 7 box to guarantee that ALL connections will run through Tor?

You should be able to to that with the Windows Firewall "with advanced functionality" (something like that), as this firewall knows about local processes: you can make per-program rules (a "program" here is actually just a file name, as for example C:\Window\explorer.exe).

So you should be able to:

block all outgoing packets (for all protocols, not just TCP or UDP)
allow everything only for the Tor program, defined by its file name (often C:\Program Files\Vidalia Bundle\Tor\tor.exe). For a working Tor relay, you must allow both outgoing (active open) and incoming (passive open) TCP connexions.
A Tor exit node needs to do DNS resolution. You might need to unblock the Windows DNS resolver if it is a standalone process - or is the resolution done by each program?

Note:

I have not tested this configuration.
Before changing any firewall rule, make sure you understand Windows firewall UI and what the rule means.
Before making a block all rule, make sure you know how to reset the firewall to normal state (without turning it off, unless it is usually off).
With Windows you can have different "profiles" with different firewall configurations. Make sure Windows 7 does not automatically change active profile without user confirmation (as Windows Vista sometimes does).


Avoiding password cracking by using custom hashing procedure? In summary: the idea behind password cracking is just to replicate the password validation procedure of a web server locally with lots and lots of attempts and check whether the output of that verification matches any known leaked hash.
However this kind of attack is only possible if the procedure by which the webserver validates a password is known by the attacker!
The way I understand it, there would no way for an attacker to crack passwords if each webserver "handcrafted" their own password hashing procedure (unless the attacker got their hand on that procedure of course)
Let me clarify: What I mean by handcrafting a hashing procedure is not "come up with a custom hash function" but rather a custom procedure to modify the clear data before hashing it with a known hash function.
For instance :

Take the password in clear.
append the first n letter of the username
generate a key with, (let's say you generate that key from the account creation date) and then encrypt it

... how many steps you can come up with?

hash the result and store it in the database

Heck, you could even generate a different procedure for each password based on the account information...
I'm not pretending this particular procedure is worthwhile, I've just typed that from the top of my head but you get the jist of it.
Of course that's not bulletproof as now you have to keep your algorithm secret, but that would at least circumvent database leaks from sql injection for instance.
Would this be advisable? If not, why? Is that common practice?
(I have no formal training in cryptography whatsoever so I do realise that I could be missing something really obvious that renders this whole idea completely useless)
PS : now that I realise, this "procedure" idea could be replaced by a digital signature.
As a webserver, you take the password, hash it, then sign it with a private key.
Then only someone who knows the private key could replicate the password verification.

The problem is that you would need to justify the extra design, and subsequent processing costs, against the benefits. Then compare that to simply using established, strong, hashing processes.
And, as you say, all that extra effort and cost remain while the benefit evaporates once someone knows the procedure you use.
Instead, what people do is design strong hashing processes that do not need to be a secret and do not need "custom" hashing beforehand to remain strong. This approach follows "Kerckhoffs's principle".
Yes, there are cases where "obscuring" your process can have a place, but those cases tend to be niche and obscuring solves a very particular problem. It's not a great general design principle.
A Pepper is a version of obscuring. The problem is that once someone knows the pepper, its benefit goes away. Peppers have very specific use cases.


Encryption Engine vs Key Server What is the difference (if any) between a Key Server and an Encryption Engine?
Is a Key Server also the same as a Key Manager?

I've seen the terms Encryption Engine, Key Server and Key Manager used interchangeably and now I'm very confused. Are these the same thing or how do they all interact with each other?

I can see some slight differences.

Encryption engine is just processor (mathematical engine) which takes the data and encrypts/decrypts/hashes them using some keys and given algorithms.

Key server can be a separate server so called Key Vault where encryption keys or other secrets can be stored.

Key manager, form my point of view, is component of key server. Its role is to control access to keys and manage their lifecycle. Both components can be separated so keys can be stored on a different server than where the Key manager is running on.

If keys should be really secure it is good practice to have all these 3 components in single, physically protected box which ensures the keys will never leave the box and will be used just inside for the data encryption/decryption. These boxes are so called Hardware Security Modules (HSM).


Are there any ways to leverage NTLM V2 hashes during a penetration test? I am on a penetration test at the moment, where LM/NTMLv1 hashes are disabled. I have captured a number of NTLMv2 hashes via NBNS spoofing, however was unable to crack them after running them through rainbow tables.

I was able to crack some credentials due to the password being the same as the username, however I have been unable to use these credentials to get anywhere. RDP is locked down to only specific users and I have not been able to connect to any machine via psexec (access denied).

Passing the hash does not work with NTLMv2 so I fear I may be out of options, but would like to get suggestions for anything else I could try. I have a number of NTLMv2 hashes and a few valid user credentials.

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

For further information on relaying, check out --

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

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

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

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


Is a firewall required for a SOHO network? Would a firewall router be required on a SOHO network ?

The network has a LAN to LAN VPN (no end user in).

There is no server / services on the network other than some consumer IOT devices, the network is mainly used for end user browsing, voip etc.

For a network like that if there was a firewall what would it typically be monitoring / blocking / allowing and would a firewall in fact be required or overkill ?

There's very little that's required.  However, is it a good idea?  That's possibly a better question.

Given that the O in SOHO stands for "Office", it would be a good idea to firewall that traffic off.  IoT devices, as a rule, aren't built with security in mind and some of them can be/are used in botnets.  If nothing else, blocking incoming traffic would be a useful principle to place on that network to keep those devices from being attacked.


If I join a war zone using an Ubuntu VM, can others on the war zone breach my network? I am getting into the area of hobby exploitation on crack-me systems. So far, I have been playing through overthewire’s Bandit crack-me. One thing that interests me, overthewire has a war zone, which they advertise as a network where you can hack anything. Their warning: use a VM. I have an Ubuntu VM that I can back up, and I would like to join this war zone. My biggest concern is security. Is there any way anyone in that network could attack my home network outside of the VM?

Yes, if your VM is accessible to other participants, it could potentially be attacked and/or compromised. Once the VM is compromised, it can trivially be used to attack the rest of your network.

While this may not be likely for a default install with no services running, be careful what services you expose (if any). Like the site says, a properly configured firewall should prevent most issues.


How can I convince my communication partner to use encryption in everyday life? The latest developments made it very clear, how easily basically all communication channels can be wiretapped. However, I think most people still ignore this fact. Especially in business most confidential information is still sent totally unencrypted (at least at my company). I wonder if people are unaware of the risks or reluctant to use encryption.

On all my emails I use a mail signature stating my GPG key ID. Probably only very few people understand why I do that. Now I was wondering if I should go further and raise awareness by adding a sentence like:

  Please note that unencrypted emails can easily intercepted and read by third parties. For transmitting confidential information please use my encryption (GPG) key.

Will people care?
Should I try and enlighten people about the risks?
Do you know of a good website explaining in a simple language the risks of unencrypted (mail) communication? I would place a link to it into my mail signature. Example.

The problem isn't so much awareness of the risk.  I'm sure some (many?) people still don't know that e-mails can be intercepted, however an increasing number do know and they simply don't care.  The amount of resources needed to be able to compromise e-mails is still relatively high and the threat isn't seen as all that serious by non-government entities.

Most people don't particularly care if the government has access to their e-mails, even relatively sensitive ones, because they don't see the government doing anything with them.  It has no detrimental impact on their life, nor does it realistically have much of any potential to have a detrimental impact on their life.

Trying to use encryption, on the other hand, does have a detrimental impact as it requires further study, time and effort, both to learn and to use properly.  It simply isn't a smart trade off for most people.  The threat is too small and the cost of avoiding it too great (and I'd argue, rightfully so for the vast majority of people).

There is already an ever increasing awareness not to send things like passwords by e-mail and other means exist that people can use such as uploading files to a secure file sharing site rather than trying to attach them to an encrypted e-mail.  This isn't necessarily because they are security conscious, it is just easier due to e-mails not handling attachments particularly well.

Unless there is a real and measurable threat with a cost to failure, paying a cost to protect yourself from a threat that won't cost you much, if anything, is not a good way to balance your resources.  Security is a lot like insurance.  It is about balancing the cost of protecting yourself from the potential cost of a compromise and for most people, encrypted e-mails is a bit like buying extended warranties.  It's over paying for protection you most likely won't need or use.


How can I securely check if a username exists? I'm working on the onboarding functionality of my web app and at some point I'm asking a new user to choose a username.

When the user gets to this point, I have his/her email and a cellphone number that is validated with an SMS and he/she has passed Google's no CAPTCHA reCAPTCHA.

I need to check if the username one chooses already exists and if it does, then the user is prompted to choose another one.

Upon browsing the web, I came across some pages that say implementing such functionality also provides attackers with a tool to check if a username exists.

What are the best practices for checking if a username exists?

This source says that it is almost impossible to avoid user enumeration in this situation and delaying an attacker is the best you can do:

  If you are a developer you might be wondering how you can protect your site against this kind of attack. Well, although it's virtually impossible to make an account signup facility immune to username enumeration, it is however possible to avoid automated username enumeration attacks against it by implementing a CAPTCHA mechanism.

However, I might have missed something - I'm also curious if anybody else has a better solution.


Is blockchain security dependent on number of transactions in time? I have a basic understanding of how blockchain technologies works.

I know that in depends on the ledger where are transactions recorded and can be effectivelly verified.

No one should be able to modify the ledger because of the cryptographic hash functions collisions can't be found so fast with current options.

But from that point of view the security of the blokchain technology or use case depends on how many transacations are done through time.

For example, if I will have root record and then 5 transaction recorded in ledger and no other transaction for 1 year, would theoretically someone be able to change the ledger? Possible attacker will have enough time to find collisions.

Is that right or blockchain technologies are resistant for such scenario?

Such a feat would require the attacker to find a second-order preimage (a special type of collision) in the hash function. This is generally infeasible in most cases, even with many years of computation.

If the target blockchain system were to use a hash that is broken in a way that allows second-order preimage attacks, this may allow forgery. However, most existing cases of this in standard cryptographic hash functions (e.g. SHA-1, MD5) there are specific bounds on how the collision works and little control over the data which produces a collision. As such, not only would the attacker have to find a collision, but they'd also have to find a collision that's useful.

The use of SHA256 in Bitcoin and other cryptocurrencies is interesting in this regard, as it is a Merkle-Damgård construction hash similar to MD5 and SHA-1, both of which have been proven to be broken in a number of ways. However it is important to note that the inherent weakness in Merkle-Damgård constructions (length extension) is length extension attacks, which are not useful for blockchain forgery. However, the shared construction does imply that lessons learned from breaking MD5 and SHA-1 may be transferable to SHA-256. This is largely speculation, though.


What does C=il mean/stand for in OpenSSL and this error? When I verify one of Firefox's certificates I get the following:

I know what CN and O is, but I don't know what C=IL is. Nor do I understand the error I get. Can somebody please tell me?

Thanks

C in a DN is country code, so C=IL is Country=Israel.

Error 18 means that the cert was badly generated, or is not configured properly on your host, so it's hard to diagnose that error message without more context. It found a self-signed root certificate (ie "0 depth"), but was not happy about it for whatever reason.

My immediate guess is that you need to add this root cert to your OS trust store. The OpenSSL Verify will try and chain the cert you provide back to a cert in your trust store. If it can't, then you'll get an error message like the one above.

EDIT addressing comments:

The OP exported a cert from Firefox's trust store and is attempting to verify it using openssl. The root cert that it chains to is not in the OS's trust store, so openssl is reporting: A) error: cannot establish trust in the root, but B) the cert is otherwise cryptographically valid.


The security of the PASSWORD function in MySQL The PASSWORD function in MySQL can be translated to the code in php:

function mysql_password($string){
    $pass = strtoupper(
            sha1(
                    sha1($string, true)
            )
    );
    $pass = '*' . $pass;
    return $pass;
}

which returns a 41 character hash.

I am worried about this function because if I run:

SELECT PASSWORD('securepassword');

on any device it returns the same hash:

  *214C2FAF32F109AE748170BFABDDFB9B05889E64

Surely that means that if my database is breached an infiltrator can easily create a rainbow table with a load of popular passwords and match the hashes - is this not something I should be worried about?

I was hoping that the PASSWORD function was unique to every device? How would I go about making it unique for every device?

Surely that means that if my database is breached an infiltrator can easily create a rainbow table with a load of popular passwords and match the hashes.

That is correct.

The hashes don't differ from user to user. This means that an attacker can calculate a hash once and check it against the hashes of all the users. A salt would make this impossible.

In fact, the hashes don't differ at all, so an attacker could precompute a lot of hashes even before gaining access to your system.

Another problem is that the hash function used (2x SHA1) is very fast, and a brute-force attack can try many passwords in a short time. With commodity hardware it would be possible to try 3,000,000,000 passwords per second.

This password hashing method does not meet modern security standards.


How to protect users from malware utilizing protocols such as DNS over HTTPS? With the increased drive to enable DNS over HTTPS (DoH), it's likely that non-browser applications and systems may utilize DoH services other than those promoted by Mozilla and Google.

Since malware authors will leverage these capabilities, are there effective ways to protect users and devices? If yes, what would be examples of these?

By looking at the non-DNS traffic, as you should be doing anyway. Remember, malware can use raw IP addresses just as easily as it can use DNS-over-HTTPS.


zero knowledge proof and its protocol In Zero-Knowledge Proof where we take the analogy of Peggy (Prover) and Victor (Verifier):

In this story, Peggy has uncovered the secret word used to open a magic door in a cave. The cave is shaped like a circle, with the entrance on one side and the magic door blocking the opposite side. Victor says he'll pay her for the secret, but not until he's sure that she really knows it. Peggy says she'll tell him the secret, but not until she receives the money. They devise a scheme by which Peggy can prove that she knows the word without telling it to Victor.
First, Victor waits outside the cave as Peggy goes in. They label the left and right paths from the entrance A and B. Peggy randomly takes either path A or B. Then, Victor enters the cave and shouts the name of the path he wants her to use to return, either A or B, chosen at random. Providing she really does know the magic word, this is easy: she opens the door, if necessary, and returns along the desired path. Note that Victor does not know which path she has gone down.
However, suppose she did not know the word. Then, she would only be able to return by the named path if Victor were to give the name of the same path that she had entered by. Since Victor would choose A or B at random, he would have a 50% chance of guessing correctly. If they were to repeat this trick many times, say 20 times in a row, her chance of successfully anticipating all of Victor's requests would become vanishingly small.
Thus, if Peggy reliably appears at the exit Victor names, he can conclude that she is very likely to know the secret word.

The following method of verification is convincing enough for me:

Victor goes through both corridors A and B and assures himself that there is no way one could go to the other end.(Since Victor has no knowledge of secret, he is convinced himself this is true).

He could go to entrance of corridor A, ask Peggy to go through entrance B and come from the end of A. (Peggy does, and comes out of end of A)

Victor would also proceed the other way where he stands at entrance of B and ask Peggy to come though end of B after going through A.

If Peggy could do both 2 and 3, Victor is convinced that Peggy knows the secret.

I feel that this method is wrong and wonder why. So, why would classical method be preferred over this? What are the weaknesses of this method?

The discussion on Wikipedia linked to by Kerrek SB is close but maybe not quite clear.

Let's say that Peggy manages to convince Victor that she knows the secret. Can Victor convince you that Peggy knows the secret? In a zero-knowledge proof, the answer should be no. Victor not only gains "zero" knowledge about the secret itself, but also no transferrable knowledge about who knows the secret.

As mentioned in the link, consider the scenario where Victor videotapes the session for you. In the first protocol, the video tape could be faked simply by having Victor and Peggy agree on the "random" challenges Victor will give to Peggy ahead of time. Since you have no way of knowing whether Victor told Peggy the challenges or not, the videotape is actually worthless and does not convince you of anything.

However in your modified protocol, a videotape would be convincing. Therefore it leaks more than "zero" knowledge. Now having the ability to transfer knowledge is not always bad! In some applications, you want to use something that is zero knowledge in all respects except that you can transfer knowledge (these are called non-interactive zero knowledge proofs).

The comments on Wikipedia then go into dealing with a verifier that is dishonest (that is if Victor can prove that he generated his challenge after Peggy is already in one of the paths, maybe by flipping the coin on video) and maintaining zero-knowledge with rewindable blackbox access to the verifier (which is where the analogy breaks down somewhat). However it is not necessary to consider the dishonest case to distinguish between the two protocols in the original post.


err_ssl_pinned_key_not_in_cert_chain I have a question: how I can prevent this error from server side? We have a new cert, and it's valid, but users getting this error.

Earlier, I've added HTTP response header Public Key Pins with 1 valid key, but I've deleted it from IIS.

In this case you have to wait until the time period you set in max-age is passed.

In this situation it's better to roll back to the old certificate, add a new pin to Public-Key-Pins header and wait for some time until the vast majority of clients receive the updated header.

In future, just don't rely on only one pin - always have a reserved certificate.


How to determine if a VPN provider respects data confidentiality? I've read about why I really should use a VPN and I've been looking into different providers, but there's one thing I'm worried about.

Can't a VPN provider just look at my traffic all they want and see what I'm doing as I'm connected to their network and their servers ?

Don't I just have to trust them not to spy on me ?
If that's true, how do I pick one I can trust, when they can all see what I'm doing ?

Short answer: You can't.

Before you buy any service you should take a look at their Privacy Policy. For instance Hide My Ass:

  What data we collect: We will store the stamp and IP address when
  you connect and disconnect to our VPN service, the amount data
  transmitted (up- and download) during your session together with the
  IP address of the individual VPN servers used by you . We do not store
  details of, or monitor the websites you connect to when using our VPN
  service.

  Why we need this data: We do this so that we can monitor the performance of our Site, for example it enables us to sort server nodes by the number of users connected, to limit your account to one concurrent IP address per VPN connection (to prevent shared accounts), resource analytics (to carry out usage analysis for administrative purposes) and to prevent abuse and fraud. This data is stored on our system for between 2 and 3 months unless we are required, for legal reasons or under exceptional circumstances (including our own investigations of fraud or abuse), to retain this data for an extended period.

You have plenty more services but who can guarantee that they won't sell your data?

The scope of the answer is much larger (legal side, technical side, etc...). I hope someone can develop a better answer for you.


RADIUS authentication: is it possible to get the user groups or other attributes? RADIUS is a networking protocol that provides centralized Authentication, Authorization, and Accounting (AAA) management.

The question if is it possible to get the user groups or other attributes.
According my understanding the answer is not but I will happy to clarify if I miss something:

During Access Request the client sends the client credentials (and optionally IP address and other parameters).
A server responses with Access Accept (or Access Reject) but does not provide the user groups or other attributes.

The radius response is not restricted to accept or reject but can actually contain more information. For example you could use the 'Class' attribute to use as the group name. But of course the radius server needs to put the necessary information into the attribute you expect, i.e. it need to be configured to match your expectation. See also Cisco WSA : What is RADIUS CLASS attribute ? or Configure group-role mapping using Radius class attribute on Security Management Appliance (SMA).


Google shows my site as hacked in their search results Google shows a "This site may be hacked" warning underneath my domain in search results. No further warning are shows when visiting the page.

I have tried to make sure my site is safe. I've looked over the code myself without finding anything suspicious. Googles Transparency report shows no issues, and neither does Quttera, IsItHacked.com or VirusTotal. I'm running the latest version of Magento (2.2.3) and Magereport reports the site as clean.

I've been trying to find an explanation in Google webmasters search console, but without any luck. Is there any other way to check why Google has flagged my site and what they have detected? Or how can I contact Google for an explanation of this?

According to Google, in the Google Search Console you should be able to find suspicious URLs on your site, that originated the message. If no URLs appear, your only recourse is contacting Google for an explanation.

After solving the error (or vulnerability: for example if you have a Magento Community Edition software v. 2.1.6 or below, you should upgrade), you need to request a new check from the Security Problem section of the Console.

The notice might appear even if everything is fine, if some components of your web site are obsolete AND they are vulnerable AND an update exists AND you did not install that update.

The most straightforward way to contact Google is not straightforward at all - not to my metric for straightness at least. You run the search, get your site with the problem, go to the end of the page and click "SEND FEEDBACK". Choose 'Send Screenshot' and activate the selector tool, border your result in yellow, and explain what happened. Include your email, specify that Google Admin Console is not working, and hopefully you'll be contacted (or maybe they'll silently fix the problem).


Do I need to keep the NTLM token in the HTTP Authorization header a secret? I'm troubleshooting a problem with one of our vendors and plan to send them a Fiddler trace of the http traffic between the client and our servers while replicating the issue.

Our servers use NTLM authentication so the NTLM token is passed in the http authorization header. If the token captured in the Fiddler trace can be used by someone else to impersonate the authenticated user I need to scrub it from the trace. Is it necessary for me to scrub it?

Yes, you should remove the authorization header unless you are absolutely certain that NTLMv2 was being used.

NTLMv1 is very weak; somebody could easily brute force the password of your user, and then impersonating him or her. With NTLMv2 that is not possible.

Either version of NTLM authenticates the TCP connection with a random challenge/response, so there is no real danger of an attacker possibly reusing the token for impersonation.

Unfortunately, it is not possible to determine which NTLM version was used by looking at the token alone. You really need to check the NTLM security settings for both the client and the server at the time the TCP connection was established. If you cannot do that, remove the authorization header.


Sniffing ldap credentials? I am going to performing an internal pentest. Is it possible to sniff active directory credentials using Wireshark or Ettercap when a user logs on and authenticates to using their domain credentials?

Provided a server is involved in the authentication process, yes, it is possible to sniff the login credentials.


ASIC/FPGA hardwares to compute Scrypt hashes this company claim Scrypt mining by ASIC (on crypto currencies who use scrypt hashing as proof of work)

scrypt is made to keep ASIC/FPGA attackers away, is that claim expired?

scrypt is designed to be expensive to implement in hardware because of the memory requirement. Technically it's possible to create an ASIC that will compute scrypt hashes, but such a device would require very large amounts of RAM and would be cost-prohibitive to produce.


How to retrieve an IPV6 knowing the IPV4? I'm using nmap to scan a training lab environment, and I would like to check if a remote machine has an IPV6 address. I only know the IPV4 of the machine.
And I know that scanning through IPV6 would give me much informations about the target, but I don't know how to retrieve it (nmap won't help me with it).

p.s: I don't know if it's the good place to post this question, so if you know a better place please tell me.

Cheers

There is not an IPv6 equivalent for every IPv4 address. They are completely independent addressing schemes.

They also can be configured totally differently, even for the same ISP or for the same device.

You would need cooperation from the device in question to find out a) if it uses IPv6, and b) what the IPv6 address is. Still that might be subject to change though.


Is it possible to trick a CA into signing a certificate by intercepting on SSL domain validation email? From my understanding domain validation certificate are verified by receiving an email on some special email addresses on the domain (e.g. postmaster@example.com, admin@example.com) or by sending on the designated email address on the domain name registration record (the information published on WHOIS).

Since many emails servers from non major email service providers do not encrypt and only few email providers even supports STARTTLS. Therefore, it is possible to intercept emails sent to these vulnerable email providers (how hard would this be?).
Is domain validated certificate somewhat useless if the website's designated contact email address is hosted in less than secure email provider (e.g. self managed email servers in particular)?

What would prevent me from being issued a valid SSL certificate signed by a recognized CA for a domain I do not own by doing a passive/active MITM on an email service provider?

I'd assume that if you control the authoritative DNS, then you also control the Domain Validation by definition, so that's not realty a vulnerability. However, DNS caches is another matter, how could a CA make sure that its DNS entries comes from a legitimate source especially if the site owner don't make use of DNSSEC?

So yes, if the operator of www.dodgy-domain.elbonia lists a WHOIS contact address of admin@dodgy-domain.elbonia, or if a CA can be convinced to send a verification e-mail to postmaster@dodgy-domain.elbonia, and that operator has not set up SSL support in e-mail yet or the CA doesn't have outgoing SSL support for e-mail, several parties could potentially intercept that e-mail, including the Corrupt Communications Ministry of Elbonia or someone with a tap on the party-line modem link out to the operator's site.

There's a chicken-and-egg problem too, because you can't receive STARTTLS-protected e-mail without a certificate on your mailserver.

However, that isn't necessarily a problem for the Internet as a whole, or for the majority of domains, or for a typical domain. Google, Yahoo!, Microsoft, mail.com, Apple all support STARTTLS, and a lot of newly established domains, personal domains, or small-business domains would have WHOIS addresses from one of those services rather than from the domain itself. Other organizations use Google Apps or hosted Exchange for their incoming mail, which means they get the same STARTTLS protection. Notably, markmonitor.us, which handles domain registration on behalf of a lot of Fortune 500 firms and other large organizations, uses Google Apps hence supports STARTTLS.

Also, a passive attacker (who could read the message but not block its delivery) would leave the "confirmation" e-mail in the target mailbox, which gives some risk that the real administrator will notice the e-mail, contact the CA, get the certificate cancelled, publicly warn his users, and report the matter to the police.

Note that at least one CA does not issue DV certificates in part because of concern for possible man-in-the-middle attacks.


How updated is the HTTPS Everywhere list? I was wondering if the HTTPS Everywhere extension by EFF is updated at all. Looking over their extension page on Github, it appears that the list (containing the rules) hasn't been updated since 2014. So, excluding the rules that the user can add themselves, isn't this terribly outdated? Does anyone have any idea whether I am looking at an older list, or whether this is indeed the definitive list currently being used in browsers.

You are looking at someone's fork. https://github.com/EFForg/https-everywhere is very frequently updated, with 131 commits the last week.


Why doesn't `nmap -sn 192.168.2.1/150` show the hosts that are up? I wanted to know the hosts that were up on my network. So while working with Nmap I couldn't understand why using the command nmap -sn 192.168.2.1/150 it didn't want to tell me the hosts that were up, But then after using nmap -sn 192.168.2.*, it worked for me instead of the other one.
Can somebody explain me this event?

Your first example uses the CIDR notation to specify the host range as a netmask.

But since /150 is an illegal value for an IPv4 subnet mask, nmap falls back to the largest plausible value which is /32 (because an IPv4 address only has 32 bits), making you scan exactly one host:

$ nmap -sn 192.168.2.1/150

Starting Nmap 7.60 ( https://nmap.org ) at 2017-12-30 19:45 CET
Illegal netmask in "192.168.2.1/150". Assuming /32 (one host)
Nmap scan report for easy.box.local (192.168.2.1)
Host is up (0.0026s latency).
Nmap done: 1 IP address (1 host up) scanned in 0.01 seconds

The CIDR-noted range equivalent to

$ nmap -sn "192.168.2.*"

is

$ nmap -sn 192.168.2.1/24

because 255.255.255.0 has 24 leading 1 bits.

You can verify that assumption with more verbosity (-v):

$ nmap -sn -v 192.168.2.1/24

Starting Nmap 7.60 ( https://nmap.org ) at 2017-12-30 19:58 CET
Initiating Ping Scan at 19:58
Scanning 256 hosts [2 ports/host]
Completed Ping Scan at 19:58, 2.40s elapsed (256 total hosts)
Initiating Parallel DNS resolution of 256 hosts. at 19:58
Completed Parallel DNS resolution of 256 hosts. at 19:58, 0.06s elapsed
Nmap scan report for 192.168.2.0 [host down]
Nmap scan report for 192.168.2.1 [host down]
...
Nmap scan report for 192.168.2.255 [host down]
Read data files from: /usr/bin/../share/nmap
Nmap done: 256 IP addresses (2 hosts up) scanned in 2.47 seconds


Protection against synthetic queries Note: One, I am not sure if synthetic queries is right word for the risk I am talking about. Second, though I am considering 3-tier model of web-applications general answers are welcome in client-server situations where server side validation is not possible.

Currently I have a page where you do certain computations using what is called as DHTML, This computation generates a string which has no particular pattern as such. This string is sent to a server side script using AJAX.

Anyone with basic training in these technologies can read the code and realize that the query is sent is something like this:

 http://domain.com/script.php?var=theStringSoGenerated

Hoping to exploit a possible flaw, a hacker types in his browser:

 http://domain.com/script.php?var=aCompletelyRandomString

He does this a few times and sees no evident benefit and quits, but in the middle tier, the PHP script, completely helpless without a possible validation, updates and inserts the random string into the database impacting its integrity and leading to wastage of resources.

Question: How can I protect my application against such attacks?

It seems that you are not actually asking about 3rd party attacks like CSRF or XSS, but actually worried that the authorized user will rewrite the JavaScript or send a query by hand.

There is no protection against that, unless you're willing to try extraordinary measures to lock the user out of their own computer and browser.  See e.g. Is AJAX fundamentally insecure?


Can NATs and firewalls blacklist IPs when trying to UDP hole punch? I am developing a P2P application that will make use of UDP hole punch to connect two peers behind NAT.

When dealing with connections between a cone and a symmetric, unpredictable NATs, however, hole punching is not as trivial as it could be with connections between cone NATs. The only way I found to do that is to just try as hard as I can until I manage to find a correct port.

My strategy works as follows:

Open a large number of ports on the symmetric side, and send packets to the cone NAT port.
On the cone side, send packets to random ports until the peers manage to connect.

Having a symmetric and a cone NAT at hand, I did the following experiment:

Opened 32 ports on the symmetric side
Sent 64 packets every 0.1 seconds from the cone side to the symmetric NAT on random ports

In a couple of seconds I always manage to connect. However, I was wondering if some firewalls and NATs could use some form of blacklisting under these circumstances. For example, is it possible that a NATs that has to drop several packets on different ports from the same source will blacklist the source for a while?

I tried to find out about this around and I found out that sometimes some form of blacklisting can be used if the NAT is under DoS attack. However, this hole punch technique is 4 to 6 orders of magnitude less heavy than a typical DoS attack.

So is this technique feasible under reasonable conditions or am I likely to incur in blacklisting or other problems?

Its totally depends on the security level of the NAT. 64 packets per 0.1 seconds means 640 packets are hitting on Symmetric NAT (640 ports? as you are sending to random ports). Now say like connection established after 5 seconds that means you are hitting from PRC to SYMM around 3250 packets on Symmetric NAT (3250 ports?). Seems like most of the NAT will take it as DoS attack/ packet flooding (!)

I am sorry, may be I don,t understand your procedure correctly. There are two types of Symmetric NAT 1) Sequential Symmetric NAT (incremental/decremental) 2) Random Symmetric NAT (totally random). It is possible to do P2P between PRC to sequential Symmetric using port prediction mechanism.

But in case of random symmetric it is not possible. I wonder how it works by opening only 32 ports on the Symmetric nat. And how are you chossing these random ports when you are sending packet from PRC to Symmetric at the rate of 64 packets every 0.1?


Is there a maximum for the number of certifications on a PGP public key My question is about openPGP and the GnuPG implementation in particular.

The web of trust idea seems to have your public keys signed by those who meticulously verify it. So when someone does this verifications, he could send my public key back to me carrying its signature so i can import it to merge the signature with those it already carries.

Is there a maximum number of signature for a given public key ?

If not : i am right to consider i should have as many signatures on my public keys as i can ?

I don't believe there is a maximum limit on the number of signatures on your key. I'm sure there is one in GnuPG that is dictated by memory allocation restrictions, but it's probably an unreasonably high number that you're very unlikely to ever hit. I should know, as I help maintain the web of trust for the Linux kernel developers, and "too many signatures" is not a problem I've ever come across.

Getting as many signatures as possible is not the right goal to try to reach. There is no such thing as "The One True Web of Trust" -- each user of PGP spins their own individual "webs of trust" that they use to establish key validity for their correspondents. Having a lot of signatures on your key means nothing if none of the signing keys are trusted by the person with whom you are communicating.

Your goal should be to have a few signatures from important key members of each group of correspondents -- lead developers, heads of departments, or thought leaders in your online community.


Exporting non-exportable private keys in Mac How would one extract a non-exportable private key in Mac OS X 10.12.4?

Plenty of tools for this, I'll leave this here: https://github.com/n0fate/chainbreaker  but Elcomsoft and other folks sell pretty versions ostensibly for law enforcement purposes.

The non-exportable flag for most keychains is typically a simple UI limitation not an actual security feature.  Which means it needs to be stored/extracted into memory at some point.  This is one behavior we can take advantage of.

It's a known limitation of most implementations of keychains/certstores etc. This is changing as operating systems begin to take advantage of TPMs for hardware backing of keychains.  (For example, you cannot do this on ChromeOS: https://www.chromium.org/developers/design-documents/tpm-usage)


Which is safer as a URL storage, favorites or browsing history? Somewhere on this site I read that I should connect to websites by entering the URL myself or using a bookmark when security is critical. I started wondering why that didn't include browsing history. Of course it is true that my browsing history might have some mistyped URLs in it, whether entered by me or by people I trust enough to let them use my browser without my supervision. And my favorites/bookmarks are less likely to include such. But supposing I'm confident no one besides me has touched my computer ever and that I'm confident I have no dangerous typos in my history, are there any reasons to think my browsing history is a less secure URL storage than my bookmarks? Does it depend on the browser I use? The browser's version?

The advice is usually in the context of avoiding phishing links:

  Don't click on links in emails! Bookmark your banking websites and
  always use the bookmark!

I think using browsing history as a similar safeguard is probably fine also (within the parameters you described), as long as you've never clicked on a malicious link in the past.

However, it's probably not widely mentioned because:

Browser history will often have many entries for a single website because of all the individual pages on that site that you've visited
Browser history should be viewed as temporary. It can be easily cleared deliberately or accidentally. Bookmarks are much more permanent.


Is Android Gmail app susceptible to MITM, sslstrip? If yes, how? My scenario:

I connected to an open WiFi at Kuala Lumpur Airport to read a news site from home (I know I was being absolutely careless).
I forgot to turn off sync on my Android phone, so all my apps "fired".
2 minutes later I get a warning email from Google that someone knows my password and tried to log in from the Netherlands.

I would like to know how it was possible - is Android Gmail app susceptible to MITM + sslstrip attacks? If no, how else could it have happened? Does a well-configured VPN protect against such attacks?

SSL-strip is not an issue when you are using an app, it is only an issue when you are browsing the web through a browser. It works by replacing HTTPS links with HTTP links in an HTTP page. Since the URLs are usually hardcoded into an app, they can not be replaced by a MITM. So there is not the same need to worry about SSL-strip. (I guees you could get in trouble if the app follows URL:s in an API response, but I am pretty sure Google is smart enough to make sure they are to the right domain and use the right protocol.)

I have not been able to find an official statement, but I am pretty sure that the Gmail app uses TLS. Their webmail is only served over HTTPS, and other clients connecting to Gmail must use TLS. I find it hard to believe that they would make an exception for the Android app. So I would not worry about a MITM even if you're using public Wi-Fi.

Besides, I am not sure the app even uses the password - probably it uses some other kind of access token.

So how was your password stolen? I have no idea. Maybe you reused it on some other site? Maybe you entered it somewhere else? All I'm saying is that it was probably not sniffed from the Android app. Anyway, if you haven't already done it, you should change it.


Should inactive administrator accounts be DELETED/expunged? Given:

A web application
Some active administrator accounts.
Some inactive administrator accounts.
No existing "audit" mechanism to keep old accounts for.
Inactive administrators cannot log in.

Is it more beneficial or less to periodically delete inactive administrator accounts?  Are there any experiences for or against that argue for one side?

I'll argue to delete them.  The only thing that prevents these accounts from being used is:

  Inactive administrators cannot log in.

And that is a defense against brute forcing (or fooling) an authentication, yet it does not defend against privilege escalation.

OWASP guidelines for web applications argue that a client should never hold a session with authentication for two separate accounts.  That would prevent privilege escalation in most cases.  Yet, by far, not all web applications follow OWASP guidelines.

Therefore, keeping those inactive but still privileged accounts is a possibility of an attack vector.

The other side of the coin is that the procedure for deleting the accounts may consume resources or, even, be insecure in itself.  But managing to produce an account deleting procedure that is vulnerable to an attack is much less probable than being hit by a privilege escalation.

Just don't make the periodic account deletion procedure to delete the inactive accounts by first logging into an active administrator account over the network.


Can a PC without VPN expose the public IP of another PC with VPN on the same local network? Computer 1 is surfing the internet while using a VPN and at the same time accesses files on computer 2 (this computer does not have VPN) on the same local network. Since computer 2 does not have a VPN would it somehow reveal the public IP of computer 1 even though it has a VPN?

It is irrelevant that they are in the same network. If the PCs are clean (free of malware, etc), there should be no such issue.

Exception to this is if you use 'internet connection sharing' between them. This combined with default routing distances can cause things to go out through the wrong way.

So if there is no ICS or malware on the computers, everything should be fine. At most, if they both have public IPs, the other IP can be determined if the whole IP subnet is scanned, so one could determine that you have another PC in the same network.


How to externally backup a fully encrypted disk partition For a kind of NAS/server running Ubuntu with SAMBA to host files for several Windows computers, I would like to encrypt the files on the server. I know I could do this for the partition using ZFS or LUKS.

But I have another challenge: Each night I want to sync all changed files into a cloud drive via rsync. In the cloud and before transfer, I want all files to be encrypted. If the complete partition is encrypted, files will appear unencrypted to rsync. Unfortunately rsync does not support synch together with encryption (due to its hash and date algorithms). Thus it would be best to have an unencrypted partition with encrypted files so that rsync can do its job. Having visible file names is not a problem.

Are there any recommendations for how to solve that? I wonder whether SAMBA could do the encryption/decryption or whether there is a file system supporting this. Or maybe there are alternatives to rsync? Cloud Drive supports FTP, SFTP, FTPS, WebDAV, SMB / CIFS with and without VPN, SCP and rsync.

Please take a look at Duplicity, which is a tool commonly used for the exact thing you want to achieve. It can encrypt your files via GPG and it does utilize rsync to create back-ups at some destination.


How could I make the results of a yes/no vote inaccessible unless it's unanimous in the affirmative, without a trusted third party? A family of N people (where N >= 3) are members of a cult. A suggestion is floated anonymously among them to leave the cult. If, in fact, every single person secretly harbors the desire to leave, it would be best if the family knew about that so that they could be open with each other and plan their exit. However, if this isn't the case, then the family would not want to know the actual results, in order to prevent infighting and witch hunting.
Therefore, is there some scheme by which, if everyone in the family votes yes, the family knows, but all other results (all no, any combination of yes and no) are indistinguishable from each other for all family members?
Some notes:

N does have to be at least 3 - N=1 is trivial, and N=2 is impossible, since a yes voter can know the other person's vote depending on the result.
The anonymous suggestor is not important - it could well be someone outside the family, such as a someone distributing propoganda.
It is important that all no is indistinguishable from mixed yes and no - we do not want the family to discover that there is some kind of schism. However, if that result is impossible, I'm OK with a result where any unanimous result is discoverable, but any mixed vote is indistinguishable.

Some things I've already tried:

Of course, this can be done with a trusted third party - they all tell one person their votes, and the third party announces whether all the votes are yes. However, this isn't quite satisfying of an answer to me, since the third party could get compromised by a zealous no voter (or other cult member) to figure out who the yes votes are. Plus, this person knows the votes, and may, in a mixed vote situation, meet with the yes voters in private to help them escape, which the no voters won't take kindly to.
One can use a second third party to anonymize the votes - one party (which could really just be a shaken hat) collects the votes without reading them and sends them anonymized to the second party, who reads them and announces the result. This is the best solution I could think of, however I still think I want to do better than this - after all, in a live-in settlement cult, there probably isn't any trustworthy third party you could find. I'd like to find a solution that uses a third party that isn't necessarily trusted.
However, I do recognize that you need at least something to hold secret information, because if you're working with an entirely public ledger, then participants could make secret copies of the information and simulate what effect their votes would have, before submitting their actual vote. In particular, if all participants vote yes but the last one has yet to vote, they can simulate a yes vote and find out that everyone else has voted yes, but then themselves vote no - they are now alone in knowing everyone else's yes votes, which is power that you would not want the remaining no voter to have.

EDIT: After BlueRaja's comments, I realize that the concept of "trusted third party" isn't quite well-defined, and that at some level, I probably actually do need a trusted third party at least for reliably holding state. The key is what I would be trusting the third party to do - for instance, in the first and second bullet point examples, I may not trust a third party to know who voted what, but may trust them with the contents of the votes. Ideally, of course, I would still like to be able to operate without a trusted third party at all, but failing that, I would like to minimize what I have to trust the third party to do. (Also, yes, a third party can include an inanimate object or machine, as long as it can withhold any amount of information from the participants).

The theory
This could be implemented in several ways, by applying the principle of idempotency.
You want a system that only produces a result (binary 1) if all the inputs are active, that is, it tells you that everybody wants to leave the cult only if everybody has voted yes, otherwise the system must not return any kind of information (binary 0). This is basically an AND relationship between the inputs, as seen in the following table (0 = no/false, 1 = yes/true):
Input: You want to leave the cult.
Output: Everybody wants to leave the cult.

0 0 0 | 0
0 0 1 | 0
0 1 0 | 0
0 1 1 | 0
1 0 0 | 0
1 0 1 | 0
1 1 0 | 0
1 1 1 | 1 ---> hooray, everybody wants to leave, we can talk about it!

Now, that might not be trivial to implement safely, because you need something that can count (N-1 will not be enough to trigger the result, but N will), and something that is able to count might also be able to leak information about the number of votes. So let's forget about that, and realize that since you are actually dealing with single bits of information (either yes or no, 0 or 1), then you will be able to get valuable information if you just check the opposite (no instead of yes, 0 instead of 1, etc.). So if you check if they want to stay in the cult instead of leaving, and if you check if at least one person want to stay instead of checking if they all want to leave, you get the following truth table where all 1s have been replaced with 0s and vice versa:
Input: You want to stay in the cult.
Output: Somebody wants to stay.

1 1 1 | 1
1 1 0 | 1
1 0 1 | 1
1 0 0 | 1
0 1 1 | 1
0 1 0 | 1
0 0 1 | 1
0 0 0 | 0 ---> hooray, nobody wants to stay, we can talk about it!

Note that now we have an OR relationship between the inputs, which I believe is easier to implement safely, because you just need a system that respond to any input in the exact same way. Such a system would be idempotent: one vote is enough to trigger the output, and any subsequent votes would have no effect. Now, what can we use to implement such a system? The system would need the following features:

It must be trusted by everybody. It can't be built or bought by a single member of the family, or by someone else. So I suppose it must be something very simple that everybody can understand and trust. To avoid malicious manipulation of the system, it should also be operated while being supervised by all the members.
The voters must not be able to check the output before the experiment is over. This means that the vote must not return any feedback about the current state of the system. For example, blowing out a candle is not safe if you can see it, or feel the heat, or smell anything.

The system
The simplest solution I can think of is something involving an electronic device with an idempotent button, like a remote control to change the channel on a TV. Here's an example of how I would set up the system:

Get a device with an idempotent button. It might be a TV with a remote control, providing that changing to channel N always has the same effect no matter how many times you do it (idempotency). Or anything else you have at home, like a button to open a gate (if opening an open gate leaves it open), etc. The important thing though is that the system needs to be trusted by everybody, so if you really want to do everything safely the family might consider buying a new device (going to the mall, all together, and buying a trusted device).
Set up the system safely. All the family must be present while setting up the system, otherwise the system might be corrupted by the one who sets it up. In general, the whole family must be present and check all the operations from the beginning to the end of the experiment (like from buying the equipment to throwing it away safely).
Avoid any kind of feedback from the system while voting. For example, to change the TV channel, the TV and the remote could be under a huge thick blanket, and to vote you need to slide your hand under the blanket. But the volume should be muted, and maybe you'd better turn on some music in the background, loud enough to not be able to hear any possible buzz or noise from the TV. You might even want to define some delay between one vote and the next, to avoid getting any feedback from the possible heat of the remote control caused by the hand of the previous voter.
The voting process should be the same for everybody. During the experiment the other members must make sure the voter is not cheating (like peeping under the blanket, acting strange, etc.), so everybody is present during the experiment. There is a relatively fixed length of time that the voter should be able to stay with their hand under the blanket. Sliding it under the blanket and immediately pulling it out is not considered valid, since that would be an obvious and publicly distinguishable NO vote. From the outside, every vote must look pretty much the same.
Test the system before using it for the real experiment. You need to make sure everybody understand the process, votes correctly, and the system responds accordingly. The whole family takes part in several simulated votes for testing the system (simulated votes are fake and publicly known, not secret).
At the end, the system must be dismantled safely. Any buttons or parts that have been touched might need to be cleaned carefully, to remove fingerprints. If the family members don't trust the system after the vote, fearing that somebody might be able to extract information from it, all the parts of the system might need to be thrown away.

The vote
Supposing they have chosen to implement the TV-remote-blanket system, what happens is this. "Ok everybody, the TV is on, the current channel is 123. If you want to stay in the cult, change it to channel 0". Each member in turn slides a hand under the blanket and either changes the channel (if they want to stay in the cult), or pretends to change it (if the want to leave). At the end, the blanket is removed and... Channel 123! Then nobody wants to stay in the cult, hooray! ...or ...Channel 0! Then at least one member wants to stay in the cult! Or maybe all of them, there's no way to know.
Final notes
It was fun trying to think of a solution to this problem, but I consider this more of a thought experiment than a real security question. The problem is that the threat model is incomplete, because I don't think this scenario can actually make sense in a family where all the members are part of a cult. Cult members are brainwashed and paranoid by definition. They might not even trust a store to buy a new TV or a remote control, thinking anyone they don't already know (including any sellers) might be "enemies". It is definitely possible to set up a system without any electronic devices, using only simple objects like candles, pots, water, ropes, etc. That stuff might be easier to trust, compared to a black-boxed electronic device, but it might also be harder to make such systems work reliably. I'm also wondering: if a member of the family suggests that a vote is needed, isn't that suspicious? Why should a member of the cult want to know if everybody in the family wants to leave? Chances are the one who proposes this system is the one who wants to leave. Or this might all be a trap to find out who wants to leave.


How long will it take to break a salted password? Let's say that I have a system where all passwords must be 8 characters long and each character can be any 32 different values. All my passwords are hashed with a salt.

I can test 64 passwords per second and I have a dictionary of 2^30 common passwords with 1/4 probability. The password file has 256 password hashes.

I know that I have 32^8 possible passwords, right? and that the probability of finding a password in the dictionary is 1/4 and 3/4 probability that is not there.

So I have this: (2^29/4)+(3*2^39/4) that is, the amount of work required to crack one particular password. And to know how long will I take to crack it, I need to divide that amount by 64, right?

Can you tell me if I am wrong or not?

OK, let's slowly walk through this.

We have 32 possible characters at each of the 8 positions within the passwords. This yields 32^8=2^40 possible passwords overall. From this set of passwords there's a subset of size 2^30 from which the password will be with probability of 1/4 and not with probability 3/4. This means you'll first try the small subset and get a hit with expected probability of 1/4 and thereby have expected workload for this of 1/4 * 2^29. Now you test the remaining passwords which are of size 2^39-2^29 which is roughly 2^39. You now test those with a probability of 3/4 and thereby your overall workload becomes 2^27+3*2^37. If all 256 passwords in your password file have the same salt, your workload doesn't increase and if they do have different salts, you need to multiply (2^27+3*2^37) with the number of distinct salts s. Now you can test 64 passwords per second and thereby you divide your amount by that number and get (2^22+3*2^32)*s seconds or roughly 150k years per distinct salt.


How to safely allow upload of executable files I need help regarding file uploading. In one of my projects the client wants to allow a file upload without restrictions on the file type. But I'm afraid that then users can upload executable files like .php, .aspx, .dll, .so and then they can easily do "remote code execution" or "script attack".

How to solve this issue?

The most common solution for this kind of issue is to make sure the stored file is not accessible by the web server.

One simple way to do this is is to store the file in a database and never save it to the disk. You need to be careful not to create some kind of XSS though: do not allow the file to be linked to directly or, ideally, downloaded. If you need the file to be made available through your web interface, use the "attachment" content-disposition header to make sure the browser will not attempt to interpret the file.


Are images created with commercial software stamped with identifiers that can be traced back to a serial number? To the best of your knowledge, do images created with Photoshop and/or other commercial software embed any bits of information that can allow someone (governments, security agencies?) to trace the image back to the package & serial number the image was created with?

How hard can it be to do it?

This would be difficult to conceal, for a number of reasons:

Most image formats used these days have well-documented formats, and are interchanged between different companies' software, so extra fields would be difficult to conceal
Lossless formats (e.g. PNG, GIF) would by definition not allow such modification; in practice it could be done, but it's likely users would notice
Lossy formats would allow such seganography, but there are likely too many formats and too many software companies for there to be any concerted effort that has yet to be publicized.

On a separate note, many (most? all?) manufacturers of color printers DO print almost-invisible pattern of yellow dots on each output page, encoding information about the printer, probably as an anti-counterfeiting tracing device


Is it considered bad practice to use company name as part of an SSID? From a security perspective, is it considered bad practice to use the company name as a part of an SSID?

Assuming that the company is located in a densely populated area with a lot of "competing" wireless networks, having an easily identifiable SSID would make it easy to find the network for those who work at that office. However, it would be equally easy for others outside the office to find the network.

Would I be overthinking this if I required wireless network SSID's to be random strings?

"Hiding" your SSID is just "security by obscurity" - like hiding the front door key under the mat. It works only as long as no one figures it out. Once it is figured out, it provides zero security.

In general, you want security measures that will work even if everyone knows what measure you've used.

Yes, by providing your name, any opportunist can focus on your network if they have that desire, but just having a WiFi network broadcasts that a network is there, anyway. If someone is targeting you specifically, they will find your SSID, even if you obscure or hide it.

So, hiding or obscuring the SSID provides very, very low protection. Unless you have a specific reason to need such specific, low, and opportunistic protection (and there are possible reasons), I'd focus on securing the network instead.

As JPhi1618 and emory point out in the comments, you could even create a security issue by using a nondescript SSID: If you set it to df42Sdd235f2, for example, then someone could set up a WiFi network with your company name or even df42Sdd235f3 in order to attract people to connect to it instead of your corporate network and the victims would not have any clues that the network was not the official network.


I stupidly responded to an email from a hacker posing as a friend I responded to an email from a hacker posing as a friend in distress.  I have a really long secure password ... caps/special figures/numbers/over 14 characters long.  My account name is my first, middle initial, and last name.  I just changed my security question to something I believe is not guessable.  I have other accounts associated with my account that are not as secure (password not as long/no special figures or caps) and am going about changing their security questions and passwords.  Anything else I should do?  Do you think I'll be ok?

Based upon the information you have provided -- I would not bother doing anything.

This is most likely a social engineering attack, where they're going to try to persuade you to wire money via Western Union to some location where they (or a confederate) is ready to pick up the money.  It sounds like you did not provide them with any useful information.  Your email address and name is already information they could easily obtain, and isn't likely to be very helpful in attacking you via any method I can imagine.

You mentioned you already have chosen a long and strong password for your email account.  That's good, and the main thing.  I don't think you really need to do anything else at this stage.

If you have other accounts that you care about with a poor password, it wouldn't be a bad idea to change those passwords to something stronger -- not so much because of this incident, but rather because this is as good a time as any to do some basic security hygiene.  Also, if you don't already use your browser's password manager, I encourage you to start using it.  Password managers make it easier to use long and strong passwords, and reduce the temptation to pick something guessable.


IP address in SubjectAltName Is it allowed to specify IP as DNS name for SAN certificate ?

Is it allowed to specify IP as DNS name for SAN certificate ?

According to RFC 5280 dNSName is a IA5String which means in theory you could put the string of an IPv4 or IPv6 address as string inside it. And sometimes it is also necessary even though the proper type for IP addresses in SAN is iPAddress since:

MSIE and MS Edge tend to ignore iPAddress and expect the value as string in dNSName. Same does Python 2.
but Chrome, Safari, Firefox don't expect an IP address as dNSName but need it as iPAddress. Same does Python 3.

Thus the best compatibility can actually be reached by giving the IP address both as iPAddress and dNSName.


DB Service accounts: is it possible to avoid storing a password somewhere Is it possible to avoid having to store DB passwords applications/service accounts needing access to the DB? I would like to avoid the risk of a system admin obtaining the password and then accessing the DB himself.

Windows Integrated Security allows you to use the account already running the application to login to the database thus avoiding the need to put a password in the connection string inside the configuration file

https://msdn.microsoft.com/en-us/ie/aa984236(v=vs.94)


Servers/Websites for vulnerability scanning I need to test vulnerability scanners such as Nessus, Nmap, and so on. My teacher told me, that there are some prepared websites (these scanners need the IP address of target to scan) with known vulnerabilities, that can be directly scanned with these scanners, without installing locally on my machine. But I can not find any suitable solution. Do you have some tips? The best would be any IP address with vulnerabilities that I can directly scan. Thank you very much, people.

There are quite a few sites available for this. Some are online, e.g. Google's Gruyere.

As Sam mentioned above, some are designed to be run within a virtual machine like virtualbox or vmware, or even in a container like Docker. bWapp & OWASP's own Juice Shop and Webgoat spring to mind.

If it's a downloadable web app best to ensure that you're VM network is isolated from the host so that you don't unintentionally cause issues for yourself.

In any case here are some lists of legally compromisable sites and apps for learning pursposes.

15 Vulnerable Sites To (Legally) Practice Your Hacking Skills
and
40+ Intentionally Vulnerable Websites To (Legally) Practice Your Hacking Skills

Some of these tools are old, but that shouldn't be a concern as many of the most leveraged vulnerabilities have been around for donkey's years.


If Whatsapp media messages are e2e encrypted, what is the point of storing popular messages on the server? There is something I don't understand about whatsapp's privacy policy.

Your Messages. We do not retain your messages in the ordinary course of providing our Services to you. Once your messages (including your chats, photos, videos, voice messages, files, and share location information) are delivered, they are deleted from our servers. Your messages are stored on your own device. If a message cannot be delivered immediately (for example, if you are offline), we may keep it on our servers for up to 30 days as we try to deliver it. If a message is still undelivered after 30 days, we delete it. To improve performance and deliver media messages more efficiently, such as when many people are sharing a popular photo or video, we may retain that content on our servers for a longer period of time. We also offer end-to-end encryption for our Services, which is on by default, when you and the people with whom you message use a version of our app released after April 2, 2016. End-to-end encryption means that your messages are encrypted to protect against us and third parties from reading them.

From whatsapp privacy policy.
If the media messages are e2e encrypted, what is the point of storing popular messages on the server for a longer period?

It explains what it means. It's not storing messages it is storing media.
Since transmitting media can take a lot of bandwidth, it is better and easier for everyone if there can be a copy that is cached somewhere for lowered traffic needs and faster access. If a lot of people in the group and accessing, downloading, and playing that media over a long period of time, it's a waste of resources to have to re-download and re-cache that media. So it is saying that it will keep a copy of that media for potentially a longer period of time until it is not being accessed so much.
The concept you are looking to understand is: "caching".


Is it possible to attack the main server through a reverse proxy server that only serves as a url rewrite? I have a content site https://www.mysite.com

I'm asking a client to configure a reverse proxy server connection in their server so everything inside the subdirectory 'external-content' gets pulled from my site.

For example:
https://www.client.com/external-content/content1.html

Would get loaded from:
https://www.mysite.com/content1.html

They don't want to do this for fear of exposing their LAN to the Internet. I understand that a reverse proxy server is nothing but a sophisticated redirect and that their main network wouldn't be exposed to, say, directory traversal attacks, mysql injection, etc. Is this correct?

Suppose my site is super vulnerable, is it possible to attack the main server through a reverse proxy connection that doesn't interact in any other way than the one mentioned above?

Is restricting traffic from the reverse proxy IP to only that subdirectory a viable solution?

Thanks in advance!

A reverse proxy is just an efficient tool, but not a magic bullet. When it is properly configured, it can ensure that only legal urls can be reached. But if you let anything pass through it will not protect much.

Security is hard because it is not only a matter of tools: any defect in the configuration of the security tools will open a breach. So the actual security of the solution will depend on the used tool but also on the proficiency of the administrator. Things are like that ...


How do I know my tools aren't compromised? After reading different articles, most notably/concerningly:

If the NSA has been hacking everything, how has nobody seen them coming?
Ken Thompson's Hack (more the concept than specifics)

I am wondering: How can I be sure that my toolchains and application software are not compromised?

The obvious but elongated answer is to write a compiler in machine language for a specific processor, then an OS, and so on up from there. (Though this does not discount the possibility of hardware compromise.) Open source software is fantastic, but that does not remove the possibility of a Kevin Thompson-esque hack such as not allowing a compiled application to open a connection on TCP Port 12345 (for example), and seamlessly bridging it to (say) 12344 unless certain conditions are met. (Critical for an application like nmap).

How likely are these essentially "invisible" exploits that are baked into our software without our knowledge?

Actually, you cannot. Even without speaking of an actual compromise, from a security perspective you may assume that your application already contains bugs which can be at least be as effective than a software compromise.

That's why, when building a secure system, your security must not rely on a single tool. Instead, you must use a layered security approach, the final application being in the center, adding several layers of security over each one with the following approach:

The outer layer N+1 is in charge to control the security of the inner layer N,
While there can be a way to pass data/session from layer N+1 to layer N (think about proxies, firewalls, etc.), there must be no easy way to pass from layer N to N+1.

Such scheme can be achieved:

On a host using a combination of all different segmentation tools provided by you OS (each service running a different user with minimum rights, use of jails/container/..., etc.),
On a network using proxy, firewalls, NIDS, monitoring, etc. (it might be a good idea to use slightly heterogeneous platforms)

This will provide you two advantages in case of any kind of backdoor would be used:

Unusual activity has by far more chances to be detected since it would at least require some time before climbing up the layers,
If you set your system right, the flaw will be limited to the area actually accessible to the backdoor, all the rest of the data will remain safe.


Linux, Security and Safety inside a large intranet One needs to configure freely a development environment under Linux set up inside a large intranet, with access to the internet.

I am not a Linux Administrator, nor a Network Expert.  From what I can collect from the net, however, my understanding is that:

security does not mean or necessitate over-restrictive control, rather it is about understanding basic principles, following secure and safe practices
the Linux kernel firewall matters
the intranet's firewall matters even more
remote root access should not be allowed, rather use of ssh key authentication

Are the above and the following questions the appropriate points to discuss and ask, when it comes to security and safety inside a large intranet?

Is it a necessity or best practice to restrict a Linux user from having "sudo" rights in his "own" system, for the sake of security and safety, for protecting from outside threats?

Can security and protection from outside threats be performed with a good set of rules for iptables and adequate maintenance of the intranet's firewall?

Is remote root access to a Linux machine, from inside the intranet, a safe practice?

security does not mean or necessitate over-restrictive control, rather
  it is about understanding basic principles, following secure and safe
  practices

That is a reasonably true statement, especially when you're describing a development environment.  But be aware that the security/administrator's definition of "restrictive" is going to differ from the developer's definition!

  the Linux kernel firewall matters

On an intranet Development environment, not so much.  Such systems often require loose and flexible port access.  In any environment, maintenance of local firewall rules across any number of machines is daunting (read: breaks functionality early and often, ties the administrator down loosening it).

  the intranet's firewall matters even more

Absolutely.  With a development environment, it often needs to be loose and open internally, so the border has to be more restrictive - definitely inbound, but also outbound.

  remote root access should not be allowed, rather use of ssh key authentication

There are couple of best practices in this area which, combined, equal what you're talking about.

Direct remote root login is discouraged due to attribution issues.  Users, even administrators, should log in as themselves and su or sudo to root so that their actions can be attributed to a person, not a crowd of people with the credentials necessary to log in as root.
Remote root logins, if allowed (perhaps for configuration management software) should require SSH keys to make brute-forcing them impractical.

  Are the above and the following questions the appropriate points to
  discuss and ask, when it comes to security and safety inside a large
  intranet?

They are all good points.  However, you've missed the two most important parts of this adventure:

Patching.  Patching should be automated, centralized, and vigorously
often.
Configuration management.  Something like Puppet should be used to centrally manage the configuration of the machines and common software.

Patching is pretty obvious.  Configuration management, while less obvious, is just as important.  Configuration management means:

When you need to tweak configuration, it happens across all your
systems without relying upon you to run around doing it everywhere.
Developers who tweak their configuration (often with security
implications) are swiftly overridden and brought back into
compliance.
When you bring a new system online, it's quickly brought into
compliance with your standards, and doesn't get "missed" or left out.

  Is it a necessity or best practice to restrict a Linux user from
  having "sudo" rights in his "own" system, for the sake of security and
  safety, for protecting from outside threats?

There must be balance between security and business need.  Developers often have a legitimate need for privileged access.  To balance that need, security will often restrict privileges (e.g., sudo to particular commands but not a root shell), log for audit (e.g., bash to syslog, available in 4.1+), and limit damage to the pool (e.g., restrictive outbound access through the firewall).

  Can security and protection from outside threats be performed with a
  good set of rules for iptables and adequate maintenance of the
  intranet's firewall?

No, more than that is needed, as described above.

To quote Gary Larson:

  Is remote root access to a Linux machine, from inside the intranet, a
  safe practice?

It is more unsafe than local root access, simply because the authentication of the user responsible for running commands is lost (or, removed 1+ steps).  Requiring that privileged commands be tied back to a user, and logged that way, is necessary both in content (now you know) and consequence (developers held personally accountable are less inclined to do things they shouldn't).


How to MiTM HTTP/2 Traffic I recently had to MiTM an HTTP/2 connection over TLS and realized there is no MiTM tool out there that fully supports HTTP/2 over TLS, and no articles/blog posts written about this topic. After struggling with this for a while, I decided to post my solution to this problem.

The problem:

Standard MiTM tools don't support HTTP/2.

SSLSplit and Burp do not offer any kind of support, and instead just downgrade the connection to HTTP1.1. If the server only accepts HTTP/2 requests, you will get the following error:

Unexpected HTTP/1.x request

mitmproxy offers only partial support. For my use case it didn't work however, as I ran into the following error described here, which currently has no fix:

Initiating HTTP/2 connections with prior knowledge are currently not supported

I will post my answer below, and leave this thread open in case anyone has anything else to add, or a better solution.

To solve this, I used an HTTP/2 proxy called nghttpx, which translates HTTP/1.x requests to HTTP/2 and vice-versa.

I used SSLSplit to MiTM the connection, and nghttpx as a secondary proxy between the downgraded requests from SSLSplit and the server. Here is a quick diagram:

Client Request [HTTP/2] -> SSLSplit [HTTP/1.1] -> nghttpx [HTTP/2] -> Server
Server Reply [HTTP/2] -> nghttpx [HTTP/1.1] -> SSLSplit [HTTP/1.1] -> Client

In my use case, the client was making requests to multiple domains, but only one of them was HTTP/2. The domain in question was resolving to multiple IP addresses, so I didn't bother using iptables and just added a rule to my /etc/hosts to resolve that domain to localhost:

127.0.0.1     my-domain.com

I then fired up SSLSplit with my regular iptables setup and started nghttpx:

nghttpx -k -f'*,443' -b'IP_ADDR,443;;proto=h2;tls' mitmca.key mitmca.crt -L INFO

Depending on your use case, you might have requests for multiple domains, which will need nghttpx listening on a separate port for each domain, and iptables entries for each one.

Hopefully standard MiTM tools will add full support for HTTP/2 in the future, but for now, this is a good enough solution.


What are the main advantages of using LibreSSL in favor of OpenSSL What are the main advantages of using LibreSSL vs OpenSSL?

As I understood LibreSSL is a fork of OpenSSL:

  LibreSSL is a version of the TLS/crypto stack forked from OpenSSL in 2014, with goals of modernizing the codebase, improving security, and applying best practice development processes.

Seems like a good idea to use it.

Is it this library widely used? Why would server administrators choose LibreSSL over OpenSSL?

There is a very extensive article at Wikipedia and it does not make sense to reiterate everything here. But to give you some highlights:

It replaces OpenSSL on OpenBSD, OS X since 10.11 and on some other systems.
It started with throwing away lots of stuff which was considered useless for the target platforms or insecure by design and it also added some more secure defaults.
The result of this is that from the 6 critical vulnerabilities in OpenSSL since the fork none affected LibreSSL.

  Why would server administrators choose LibreSSL over OpenSSL?

If anybody cares about security or wants to better sleep at night and not care about the next OpenSSL vulnerability the choice should be clear.


QR Code Security Testing Within the scope of a project for my client, I test the existing site and the project for security vulnerabilities using OWASP ZAP. The client uses invitations with QR Codes and QR Codes to login to his project.

How can I test QR Codes on security issues?

Can I also automate this process in the CI area?

Details to the QR Code:

The QR Code of the customer contains a login number.
The QR Code is currently only sent by mail.

https://resources.infosecinstitute.com/security-attacks-via-malicious-qr-codes/

How can I test QR Codes on security issues?

The QR code is just a piece of data. It's no different from a bar code - or a text string.

It encodes data. Your question is essentially meaningless, as the QR code will not have security issues. The use of it, the distribution of it, or the content may have security issue.

So the real issue is:

What does the QR code encode?
How are they distributed?
How are they used / read by the end users?

Except for the reading action (there may be security issues in the reader application), they're no different from a link in an e-mail or similar.


What security scheme is used by PDF password encryption, and why is it so weak? Many PDFs are distributed as encrypted PDFs to lock out some of their functionality (eg printing, writing, copying). However, PDF cracking software is available online, which usually cracks the PDF passwords in less than 1 second.

It doesn't make sense that the PDF system is so easy to crack if Adobe implemented a proper encryption techniques in their document security, and it looks like that there is some major implementation error in their PDF encryption scheme that allows documents to be unlocked with trivial amounts of work.

What is the security scheme used in such locked PDF files, and why do these PDF password removers take so little time to defeat it?

There are two types of PDF protection: Password-based encryption and User-Interface restrictions. You are describing the second type of protection, namely the missing permission to copy-and-paste, to print and so on. If there are user-interface restrictions placed on a PDF file, the viewer still needs to decrypt the contents to display it on your screen, so you are not in an "password-based encryption" scenario where you are missing a key to decrypt the document, but in a "DRM" scenario where you trust that the applications that are able to decrypt the file (based on static knowledge like master keys) do only the things the author wants them to do.

Nothing prevents computer experts reverse engineering how the legitimate application decrypts the data (no password needed), and performing the decryption themselves. After having the document decrypted, rights may be "adjusted" to e.g. include printing permission or the decrypting application can do things (like copy all bitmap images) itself.

Adobe tries to prevent "rogue applications" that allow you to circumvent the usage restrictions by their license on the PDF specification: They revoke the license to use the (claimed) intellectual property in that specification for applications that do not obey the usage restrictions. AFAIK some open source tools have or had a build switch for whether the usage restrictions should be obeyed or not. This makes a perfect starting point for people selling "PDF deprotector" software.

In the case described above, the "user password" is the empty string. PDF readers are required to try to an empty user password if a protected PDF file is opened. Only if that fails the password validity check is the user asked for a password. begueradj describes the key derivation in his answer, and as you see, the "DRM permissions" (/P entry) enters the key derivation, so if you just "fix the permissions" in a protected PDF file, a conformant reader will derive the wrong key and fail to open the document. On the other hand, if a PDF file is completely protected by a password (even against opening), the user password is no longer empty, and this type of PDF protection is reasonably secure.


Why does pinning a CA root certificate not present a security risk? AWS recommends pinning their root certificate when implementing SSL pinning. My understanding is that SSL pinning for mobile applications mitigates a situation where an attacker has installed a malicious certificate on the device's certificate store. However, if an app is instructed to trust all certificates signed by AWS, couldn't an attacker trivially buy a malicious cert from AWS and install that in order to pull off a MITM?

TL;DR: No. That's not how certificates or pinning work.

All certificate pinning does is limit the root of the trust chain to a smaller set, for a specific domain. It doesn't change how the certificates work. It only adds a new constraint on acceptable roots, without disabling any others, and they all have to match -- domain name, date, etc., and now pinned root.

The only way a MITM like you describe could occur is if someone managed to get a certificate, through Amazon, of your domain. Such a thing is technically possible, of course, because people run the systems and people are fallible. However, if anything, pinning a cert makes that attack harder. Without it, they could attack any trusted root certificate. With cert pinning, they have to attack the one(s) you've pinned.


Online only encryption I understand that one can use for example PGP (or GnuPG) to encrypt emails and files. (And I understand that there are other programs out there that will do "similar things") This, though, requires that both the sender and recipient have PGP installed on the computer that they are using. And it requires, of course, sharing keys. From my understanding, this means that one can't use a public computer or for example a work computer to do encryption with PGP. Since we can't assume that all computers have PGP installed, this, in my mind, seems to make PGP undesirable to use on a large scale

I understand that

There is pretty much no such thing as perfect secrecy in the real world
One might not want to use public computers or work computers to send sensitive information even though there might also be an advantage in using a public computer in a library.

Since most computers are connected to the internet, my question is:

What is a "good" way to encrypt messages using just the internet that does not assume any installed program except a standard browser like Firefox, Chrome, etc?

So I am looking for a way to use for example Yahoo Mail or Gmail with online based encryption.

I am not necessarily interested in "very strong" encryption. I am just interested in encrypting emails and not necessarily files.

I don't know any good methods that already exist. I see two ways to fulfill your requirements.

Javascript Cryptography. There is widely differing opinions on the effectiveness of Javascript cryptography. I personally believe that most of the current implementations have huge flaws. For a good argument against Javascript cryptography, see this link.
Trusting an online server somewhere to perform the encryption. This might work provided you trust the provider of the encryption service. I personally have no problems with trusting some of the more reputable companies out there to do this for me, but I can see some of the more suspicious or paranoid individuals having problems with this approach.

Both methods have flaws. Besides being slightly easier to use, I don't see much of a point. Any information you decrypt on a public computer will always be susceptible to keyloggers or other forms of malware. If it is information you need to keep secure, always access it from a trusted computer.


OAuth2 - Resource Owner Password Credentials grant The OAuth2 spec describes the Resource Owner Password Credentials grant type and authorisation flow here. I understand that only 'trusted' client applications would be allowed to use this grant, for example the 'official' iPhone or Android client application to by backend API.

My question is: how can I guarantee that requests from sources claiming to be this client application can be trusted? For example:

I have registered my android app on my OAuth2 server with the client_id of android_app with access to the grant type of password (i.e. Resource Owner Password Credentials).
As the Android app is a client application so I have assumed it is not trusted to keep the client secret 'secret' and so haven't assigned it one. The app config contains the client_id and grant_type as well as the authentication endpoint.
A user decompiles / unzips / de-obfuscates my app and finds the client_id and endpoint

What's to stop them client making authentication requests to that endpoint with the client id? I'd consider assigning the client a client_secret, but it just seems like that won't solve the issue because a user could just find it in the app.

These are really two questions.

How can I guarantee that requests from sources claiming to be this client application can be trusted?

You can't. The specification says:

  The resource owner password credentials grant type is suitable in
  cases where the resource owner has a trust relationship with the
  client [...]

The resource owner (aka. user) has to decide if he trusts the client, not the authorization server. If the user decides to trust a third-party app so much that he enters his plain password, you can't automatically detect if the third-party app is trustworthy.

What's to stop them client making authentication requests to that endpoint with the client id? I'd consider assigning the client a client_secret, but it just seems like that won't solve the issue because a user could just find it in the app.

OAuth2 differentiates between confidential and public clients. Confidential clients are "capable of maintaining the confidentiality of their credentials", for example a web application which access another on server-side.

Native applications (like an Android app) are mentioned explictly as public clients:

  A native application is a public client installed and executed on the
  device used by the resource owner. Protocol data and credentials are
  accessible to the resource owner. It is assumed that any client
  authentication credentials included in the application can be
  extracted. [...]

Therefore a client secret won't add security to a native application in most use cases.


Are Kismet (on OpenWRT) and Snort IDS (on a linux server) compatitble? I'm trying to develop an IDS/IPS system project to include these elements:

A router running OpenWRT running Kismet drone (Attitude Adjustment 12.09rc1)
A Linux server (Running Kismet server + client)

I have successfully installed Kismet drone/server on their respective platforms.
But I have heard that Snort is rather more well-implemented for an IDPS system.

Is there a way to pass packets captured by Kismet to Snort IDS? I have looked on the internet but I have only found outdated and incomplete answers.
Would it be a good idea to develop this system by just using Kismet as an IDS, without using Snort at all?
Any other ideas and suggests are mostly welcome, thank you.

I think libpcap and/or tcpdump are what you're looking for. Kismet is a wireless analyzer that will display the 802.11 metadata. There was some activity awhile ago to add 802.11 intrusion detection capabilities (snort-wireless). You might still find useful remnanats of that.

Kismet pulls the 802.11 frame data and analyzes that, then examines some of the TCP/IP data (when it's unencrypted or decrypted) for additional network activity reporting. Kismet can also log the captured data, which you could then feed into an IDS (or any other process) using tcpreplay.