I'm using a Cisco ASA as a VPN endpoint. Where do the VPN clients get firewalled? I've got this ASA in front of a network that I didn't set up.  It's been configured with the clicky GUI (the ASDM), not the CLI, but I'm willing to use the CLI if it makes more sense.

One of the jobs of this ASA is to allow remote users to VPN in and use internal stuff.  It does this well enough.  However, now I'm wanting to limit where those VPN users go.  Where do I insert firewall rules for them?  There are two networks on the thing, creatively labeled "outside" and "inside".

If I were making a firewall rule to say "X external entity can get at this internal thing", I would put it on the "outside" interface.  Same for VPN clients?

Here's how to do it: tunnel_vpn_userX controls what subnets to tunnel, filter_vpn_userX  applies normal access list filtering within that tunnel.

object-group network tunnel_vpn_userX_local
 network-object <some local network>
 ...

access-list tunnel_vpn_userX extended permit ip object-group tunnel_vpn_userX_local any
access-list filter_vpn_userX extended permit tcp any <some local address> eq www

username userX password ...
username userX attributes
 vpn-group-policy userX
 vpn-tunnel-protocol IPSec
 service-type remote-access

group-policy userX internal
group-policy userX attributes
 vpn-filter value filter_vpn_userX
 vpn-tunnel-protocol IPSec
 split-tunnel-policy tunnelspecified
 split-tunnel-network-list value tunnel_vpn_userX

Hope I didn't miss anything...


Can I trust browsers not to snoop into my activities? Is there anything stopping web browsers from snooping into our activities? I don't mean web history or any of that generic stuff (Chrome already collects them, right?), but is it technically possible for a web browser to intercept what is being entered in a secure page (or let's say the password field)?

Is there anything stopping from web browsers snooping into our activities?

Nope, not really. That's a bit like asking

  Is there anything stopping my keyboard from recording my keystrokes?

In theory, we are interacting directly with the keyboard / web browser, which in turn talks to other components for us, and we are trusting that it is acting in our best interest.

You could do as @StackAbstraction suggests and monitor the network traffic in and out of your browser looking for suspicious exfiltration, but you're going to lose this game since there are many many sneaky ways to exfiltrate data.

Fortunately, both Firefox and Chromium ("the open-source web browser project from which Google Chrome draws its source code." -- Wikipedia) are open source. With some google-diving, you can probably find 3rd party security audits of the source code.

P.S. If you think I'm being dramatic to draw a parallel with trusting your keyboard, check out the Razor "Stats & Heatmaps" feature that they quietly snuck into their Synapse 2.0 keyboard driver in 2012. It logs all your keystrokes and uploads them to a Razor server so you can "analyze your gameplay". They removed it due to public outcry, but according to this thread they've put it back at some point.


How can I protect myself against programs that turn the webcam on without the indicator light? Webcams can be turned on without the indicator light: to prevent unwanted use, I wonder whether there exist applications warning that the webcam is being used, or any other kind of protection.

Since I cannot answer to my question since it gets closed for whatever reason, one possible solution beyond shitting on my webcam:

http://lifehacker.com/find-out-what-windows-program-is-using-your-webcam-on-w-158237256:

  To do this you'll need Process Explorer, the awesome Windows
  Sysinternal tool developed by Microsoft for IT work. You can download
  the installer here if you like, or you can just run the application
  from their server (which is faster).

  With Process Explorer running, follow these steps:P

  Figure out what your camera's object name is by finding it in Device Manager. For Windows 7: search "Device Manager" in the start
  menu. For Windows 8.1: search the same thing in the Charms bar.
  Once you locate it in the Device Manager, double-click and go to the "Details" tab. Open the property drop-down and select "Physical
  device object name", then right-click to copy the name.
  Return to the Process Explorer, or get it started if you haven't yet. Then hit Ctrl+F and paste the camera's object name into the
  search field and click "Search." You should see whatever processes are
  currently using your webcam.

  If the program using your webcam is something you recognized, there's
  no need to worry (but you may need to quit it if you don't want it
  running)! If you don't recognize the program, right-click it in
  Process Explorer and select "Kill Process", then uninstall it from
  your machine. After the program has been removed, run a full-system
  virus scan to ensure your machine is safe to use again.

(Obviously the attacker might prevented it from working.)

If an attacker can turn on your camera without you knowing no application is going to be able to protect you. They own the machine.

The only real way to ensure you are protected is to use physical means to disable the camera. Keep in mind many have microphones as well, so that needs to be considered as well. If it's a separate unit, unplug it when not in use, and if it's part of a device you have to cover it with something.


How to find who hacked my WhatsApp account and sent messages via WhatsApp web I want to know I can get the location/IP address of the sender of a WhatsApp message sender which was sent using WhatsApp Web.

Someone has logged into my WhatsApp account and sent messages to my family, and after that deleted those messages. Now I have a big problem, I want to know how to find from where my WhatsApp was logged in to? From which device?

You can't.

All WhatsApp messages are first sent to WhatsApp's own servers and then forwarded to the recipient. Your IP address will not be sent along to the final recipient (but it will certainly be recorded and stored on the WhatsApp servers). As an end user you can neither obtain it from a regular message nor from one sent over the web messenger interface.

The obvious exception are of course official requests by a law enforcement authority. Despite end-to-end encryption WhatsApp is not an anonymizing communication tool.


Google suspicious activity warning persists for 4 days despite my confirming I recognize it, does this indicate additional security issue? I had a google suspicious activity warning four days ago triggered by logging in from a location I don't use often. I accepted the offer to view the activity and acknowledged that I recognized it. This normally makes the warning go away.

However in this instance every time I log back in over the last four days, I get a red warning bar at the top of a signed-in google page.

When I click Review your recent activity I get the critical security alert box grayed out with a white box over it saying "You've already replied that you recognize this activity" followed by two options Change reply and OK.

Of course I click "OK" every time because I do not want to change my reply and risk the possibility of locking my account.

QUESTION: Does this behavior indicate that there is a further security issue that I'm unaware of? What would happen if I instead clicked Change reply? Right now I have two-factor turned off so I'm very concerned about getting locked out. Are there any further problems that I could look for somehow?

macOS & Chrome incognito mode

I should note that in the last weeks I received two dialogues from google when initiating a search, to verify that I was not a robot, due to "unusual traffic from (my) computer network". (also shown below)

That happened at a shared WiFi connection using a DSL line.

update:

Following AlphaD's comment to go to https://myaccount.google.com/security-checkup I found that there is an issue of a possible 2nd device being logged in.

Does this mean that for certain there is a Mac somewhere that's been logged in to my google account for 164 days without me knowing it? I haven't ever knowingly logged in on any other computer than my own computer.

I don't know how to check if this device is real or not.

However if I go to https://myaccount.google.com/security I only see one device:

Google suspicious activity warning persists for 4 days despite my confirming I recognize it

This behavior is intentional. If an attacker had gained access to your account, allowing the warning to be dismissed would allow the attacker to dismiss the warning before you were able to see it.


What's the safest way to store data on a server abroad? A very good friend of mine is a journalist in a country where the state is becoming more and more despotic.
She would like to store critical data on a server abroad. Is there any service that would be safe for her ?

She can encrypt her files locally on the computer that she is working on (using a tool such as pgp), then store the encrypted files on any server.


How to verify if my OpenSSL version is vulnerable to CVE-2016-7056 (ECDSA P-256 Key Recovery Timing Attack) The application I am testing has the OpenSSL " 1.0.1e-fips" version on it.

I came across this vulnerability CVE-2016-7056 (ECDSA P-256 Key Recovery Timing Attack) and could not find a way to verify if our OpenSSL is vulnerable to this attack.I am curious to know about the way/steps to verify this vulnerability for our application.

Check your open ssl version
openssl
--version

Below are the list of affected versions.

Versions Affected:
OpenSSL 1.0.1u and previous versions
LibreSSL (pre 6.0 errata 16, pre 5.9 errata 33)
BoringSSL pre November 2015

Mitigation:
Users of OpenSSL with the affected versions should apply
the patch available in the manuscript at [1].

Users of LibreSSL should apply the official patch from OpenBSD [2,3].

Users of BoringSSL should upgrade to a more recent version.


Self-Coded User Authentication Security We are currently using Apache Shiro for our User Authentication needs. We have dynamic authorization\authentication needs, in some cases users will be authenticated using Active Directory while some will be authenticated using JDBC, but all users will be authorized using JDBC.

Shiro has proven up to the task, but not well. It does work, but only sometimes. The programmatic realms I've created don't seem to run the same way each time. Sometimes when attempting logins several times it will fail, only to eventually succeed. This is the exact same request with the exact same data. Debugging shows that sometimes it simply doesn't call the necessary functions to get the authentication or authorization data. Restarting the instance will usually fix this, but only for a time. It also seems to have a serious problems with multiple shiro applications existing on the same Glassfish instance.

As such, Shiro seems to be not be tenable choice especially given how little documentation exists for it. I am already overriding Shiro's methods to tell it exactly how to get the data, so I'd like to simply code my own java user authentication classes.

Currently the best argument I've heard against this is that a custom-coded system will not be as secure as an industry standard one. However from what I've read online and been taught in class, most hacking attempts focus on gaining access to usernames and passwords, or figuring out how to send rouge code into the system. Most methods don't actually breach the software itself; it basically just checks whatever data is provided and as long as all inputs are sanitized the user authentication software itself isn't usually the problem. Is that assessment accurate?

Also, are there any pitfalls I should be aware of? I understand there are other options like Spring Security or JAAS but since I already essentially have the system I need built inside Shiro and only have to remove it from that software, it seems to be the best option would be to use that at this point in the development cycle.

Software developers tend to get exposed to just the tip of the iceberg of credentials and authentication because 98% of the application involves the business logic the app involves and only 2% of the application is handling user authentication. Authentication schemes need to be able to thwart attempts of brute force cracking, intercepting the network communications, man in the middle, etc. and many more ways to break into a closed system. In addition to authentication, you also have to ensure that the user session, once authenticated, works across the app and is secure, e.g. session can't be hi-jacked, etc.

All of this is what Apache Shiro is handling for you, and while I don't have hands-on experience using it yet I am unable to find claims of unreliability, bugs, etc. If it were me, I'd focus on figuring out where the unreliability is coming from and resolve that instead of rolling my own. Because even if you do it right and it is "secure" by today's standards, that doesn't mean it will still be considered secure a year, three, or five years down the road. You will always have to remain knowledgeable of developments in the security/cracking space that develop over time which may put your authentication methodology at risk, update, etc.

The documentation set looks pretty good: Apache Shiro Documentation


Outsourcing security evaluation Does anyone have any experience with outsourcing security code review via freelance sites (like Rent-a-coder, Elance, Guru, Getafreelancer, etc.)?  Is this effective?  What are the best practices?  Are there any pitfalls?  Does anyone have any recommendations or lessons-learned?  Are there any resources or readings to learn more about others experience with this?

Some example questions: Do you have any advice for how to screen for freelancers with security knowledge?  (Is there a standard pre-test to screen candidate freelancers?)  For security review, is it more effective to ask for open-ended review, or is it more effective to create many smaller tasks with a narrow scope (e.g., review this codebase for SQL injection vulnerabilities)?  Pricing-wise, are there any standard rates or pay ranges?  Is it more effective to charge a fixed price, or are bonuses effective (e.g., a bonus for finding a vulnerability)?  Is it a good use of money to try to hire multiple people for the same code review task, to maximize the chances of finding problems, and/or to cross-compare their results and identify the most effective freelancers?

One issue you can take as out of scope: you can assume that I understand the risks of sharing such code with unknown individuals, and am comfortable with that.

Trying to cut the code review up into multiple pieces suffers from two problems. The first is the infamous and ever present problem of enumerating badness, and the second is the overhead of recruiting and managing the remote freelancers.

Going for an open ended review will avoid the issues of splitting it up, but you will need to take care ensuring that the freelancers don't just stop at the low hanging fruit because they feel that they have written as much as you paid for. Any remote outsourcing needs to be very carefully specified - being very specific about how you want the review reported will manage the risk of freelancers stopping early. Developing this specification interactively with the freelancer - maybe even starting with a complete blank slate - will provide a great opportunity to assess the scope and depth of their knowledge better than a quiz would allow.

Deliberately seeding the code for review with problems is also a possible approach to assessing reviewers, but you get the feedback too late in the process to be of use unless you're looking for reviewers to use on a repeat basis.

While getting multiple reviews will probably be worth your money it may not be worth the increased process overhead. The trade-off will vary between organisations - if technical staff are doing all the recruitment and management their time is likely better spent on code and internal review, if project management time is plentifully available the overhead may be acceptable.


What happens if the text editor I paste e.g. passwords in, sends everything to the developer? I run an OpenVPN server at my home for purely personal use. To manage e.g. private keys and passwords, I sometimes paste them into a text editor. The content, if an adversary gets it, would be enough to connect to my VPN server.

Should I worry about the possibility that my text editor sends everything I type in it to the developer?

In my case, I use the open source editor Atom with a couple of packages, also open source. I guess one possibility is to review the source code, but I'm not that good of a programmer. Others may have reviewed the code of Atom, but maybe not checked out all packages as carefully? (Not trying to accuse Atom here, it just happened to be the editor I use.).

Taking a step back, even if the editor can be trusted, what if another program sends my information? Or the OS itself?

Or is the concern outlined here not of much priority compared to other threats?

Much of the phishing spam you receive is a link to malware that is attempting to install a malicious key logger on your computers.  Key logging is a highly profitable way to steal credentials, passwords, credit card numbers, etc., so the thieves are highly motivated to do this.

Can an attacker to create a malicious plug-in for your favorite editor that would perform some trivial but useful function, acting as a Trojan Horse, but underneath serving as a key logger?  That's not only possible, it's the bread-and-butter of typical attackers.  It seems the trick would be getting developers to install it, and finding a way to hide the malware and traffic so these tech-savvy users are unaware that their keystrokes are being recorded; however, people are people, and anyone can get phished.

Your question is if this is likely.  In the last few years there has been an increase in attackers attempting to break into code repositories, with the intent to implant malware hooks directly into application source code.  Krebs has at least one story that hints at this.  There is no reason to think this avenue of attack isn't still being explored.

So the standard advice applies to editor plugins as much as to any other application you might download: don't install software from untrustworthy repositories; don't fall for phishing attacks; compare the checksums before installing, etc.

Is the editor itself betraying you?  Again, make sure your editor came from an official repository or web site, and not simply from the first random link from google.


website hacked and all its content erased despite the protections i was hacked by a guy who erased everything. I spent the day to put everything in order, and i would like to find a solution for this : he erased all the files, and also changed the title for "www" in the FTP in "www-xXX".

Is there a possibility to track the one who is trying to hack the website? (He just erased the content of the whole website, who would do that for no reason...) It is a small website, that just gives free content (some articles for free), so it took almost the whole day to upload everything back through the FTP. I am using FileZilla.

Also if i set the file permissions to 440 (in the FTP, it changes to 540), could he still access and modify the files in the FTP?
There was a .htaccess and .htpassword to protect the back office interface, i don't know anything else i could try to protect the website.

It is such a silly thing to erase the whole content, as it took me a day of work to fix it, and for nothing, he was just amused to delete everything.

Thanks for your help

Is there a possibility to track the one who is trying to hack the website?

Assuming they only deleted your website content and not literally everything off your box, you may be able to find information in your log files. Inform your hosting company about the situation.

Change all your passwords yourself (also change your email password while at it). From reading your comment it sounds as like your hosting company provided you with these credentials to begin with; through email I assume? This is a big no no (Email is an insecure form of communication). Solution: change them yourself, and if you want to be really pedantic, set up two factor authentication (DuoSecurity would be my pick). Basically every time someone tries to SSH/SFTP into your server you will receive an SMS or Push Notification (if set up) asking to allow or deny access to user with IP x.x.x.x.

Also ensure you are using SFTP not FTP, and keep complete backups.

Fortunately in your situation it just sounds like someone peeked at your credentials and only gained access to your FTP stuff. If you have the time you could set up a honeypot but is it worth the time in your situation, probably not.

Goodluck.

P.S The attacker deleting all your content was probably a good thing. (1) it was blatantly  obvious someone gained access; (2) for security reasons you probably would have to erase everything anyway; (3) there are much worse things they could of done; (4) it reflects their intelligence (subject to personal opinion)


what does Pn options stands for in nmap I have a very weak memory, and i can't remember an option unless i understand what it stands for.

I can remember -sT option in nmap because i know that s stands for scan, and T for TCP Connect.

I know that -Pn skips the ping discovery and assumes directly that the host is up, but what does the P and the n stands for in -Pn ?

Here a cheat sheet that summarizes all nmap switches.
https://pentestlab.wordpress.com/2012/08/17/nmap-cheat-sheet/
Notice all ping-related switches begin with 'P', so I assume Pn means Ping Not.
I thing it easy to remember now :)


Can WiMAX track its users' geo position? We all know that if you carry a GSM terminal with you, its location is being tracked and stored in operators' databases without any need of cooperation from the terminal itself.

Is tracking user's geo location possible with WiMAX, or is the technology safe from operators tracking subscriber stations?

I've seen a patent for geo locating users, but it looks like it requires cooperation from the device, and such cooperation would require support from the application layer (so if I have root, I can probably disable it). But then I could have understood it wrong, I'm not an expert. And there could be other technologies too.

WiMax is a radio communications standard, so locating the origin of a broadcast signal is of course possible whenever you're transmitting.

As implemented in cellular networks, such as LTE, the coverage will overlap and the protocol will provide means of switching between masts as you move between cells. This means you will likely be within contact from two or three masts at any one time, hence triangulating your location is completely possible whenever your device is on the network, just as it is with current GSM cell networks.

As far as co-operation from your device, of course if you can control when your device transmits, you can make it difficult to determine your location by only communicating with a single mast at a time, meaning you can only be determined to lie somewhere on a circumference at a radial point that is the determined distance you are from that mast, bearing in mind however that you will usually also be identified as being on a certain arc at that distance which is usually 120 degrees or so. This is known as the azimuth of the mast you're connected to.

As soon as you communicate with two or more masts, your position becomes very precise. The patent you referred to covers determining your location from two base stations meaning your location is an estimate of being somewhere in the regions where the two range rings overlap. In practice, a few things are different from the image below. First as an azimuth is known, depending on the length of its arc it might be enough to rule out one of possible intersects (that would exist if it were a single radial antenna), meaning you location is anywhere where the lines are intersecting (a physical area in practice). Secondly the lines shown below would typically be thicker indicating that the area you are within is only known to a given precision, which I recall is still usually enough to implicate you as being in a certain building (say, an area of 20 metres that looks roughly like a square on a map).


TLD Re-direct precedence in law I hope to soon resurrect an old web-site of many years standing:  it has the URL xxxx-xxxx.com, and I still rent the domain name.

Now I am not anxious to continue hosting it in the USA   ---  though perfectly happy with hosting other sites there  ---  and it will be hosted in one of the Baltics on a VPN;  this has no bearing on the question, just forestalling some lines of answering.

Since .com is American owned, and this fact gives them jurisdiction over sites using .com   --  as in recently Homeland Security seizing a British advertising firm's site ---  I am thinking of running it under xxxx-xxxx.li and whilst keeping xxxx-xxxx.com redirect the .com to the new address [ just as i always rented and redirected xxxx-xxxx.org etc.. ]

My question is, if a secondary redirected URL is .com, though it redirects to .fr or .gr, can the American state still claim jurisdiction ?

I know tlds are basically scams;  but since we have states claiming a universal imperium, as much as say the old Soviet Union did, it seems best to protect the sites we control as best as possible.

Thanks

For legal question please use Law.

But from a technical point: it does not matter if a redirect happens and where it points to. The visitor first hits the .com domain and whoever has control over this domain decides what happens next. And control over this domain means that the owner can make the DNS resolve the .com domain to an IP address controlled by the owner.

If the government or somebody else gets hold of the domain name it can make the DNS point it to an IP address controlled by the new owner and the intended redirect by the old owner will thus not happen.


How secure is iterative password enhancement? Suppose I have a master password to my password manager. It's more or less secure. Now I want to enhance it - e. g. add 5 more characters somewhere, replace some characters, but let's say 20 chars of original password remain the same. How secure is such approach comparing to inventing (and remembering) the brand-new password?

To a first approximation, your problem is one of entropy computation. Estimate the entropy of your first password then the entropy of your second one and compare the two. You should aim to have at least 128 bits of entropy. Zxcvbn is a good estimator. You can also do it by hand.

Compared to inventing a new one, do what's more convenient for you. However, if you reused this password in part or in totality elsewhere, you should definitively invent a new one for your password manager.


Decryption only on specific Device Let's say I have a closed user group and want to send them encrypted data over an insecure channel. I have previously had access to their devices and could have installed a decryption key. Is there any way to make sure that the decryption key can only be used on those devices?

I am not asking how to prevent key leakage in general, as that would be an overly broad question. Rather I am wondering if there is a way to lock down a key to a certain hardware environment?

Bitcoin wallets are a potential example. Some vendors (e. g. Trezor) claim that they can generate keys internally and the keys never leave the device. Does something like that exist for general-purpose encryption/decryption of data?

A smart card sounds like what you need. It's designed to let users decrypt whatever data they want with its onboard key for as long as they have it, but it doesn't let them extract the key itself from it. Note that this won't prevent users from leaking the decrypted data afterwards; this would be equivalent to effective DRM and is basically impossible.


Does the server certificate control the cipher suites available to secure the communications? If a CA signs a certificate with a SHA1 signature hash algorithm, does that mean a client would be unable to communicate with the server if TLS 1.0 and below is disabled?

I think what I'm asking is if the identification of the server and the encryption of the communications is limited by the certificate of the server.

Let me know if you need additional details to help clarify my question.

No, there is no restriction coming from the TLS protocol version with regards to the hash function used by a CA in its signature algorithm.

In TLS 1.2 the client can advertise both the signature algorithms and the hash functions that it supports; this is done in the signature_algorithms extension, which is optional. A given client may perfectly well send such an extension stating that SHA-1 is supported as part of RSA / DSA / ECDSA signatures. Actually, if the client does not send the extension, then the server is supposed to assume that the client supports SHA-1.

In SSL/TLS versions prior to TLS 1.2 (thus up to, and including, TLS 1.1), there is no such extension: the client does not indicate what hash functions it supports.

In practice, a server usually has only one certificate at its disposal, and will send it, regardless of how that certificate was signed by its issuing CA: the client will accept the certificate, or not, but the server does not have anything better to send anyway.

Google and Microsoft currently appear to want to wage a war on SHA-1 (in fact Google started it, and Microsoft must follow so as not to seem lagging and irresponsible), but this is not related to the TLS protocol version.


Potential services.exe infected file? I was asked by a coworker to help solve a problem with a remote client site through VNC. Immediately after connecting I've started noticing some strange behaviors that I am lead more and more to believe are virus related.

1) When first logging in a popup warning "services.exe" had stopped working.
2) The windows error log has numerous (I'm talking into the hundreds) of WinVNC lines stating blacklisted connections from all different IP addresses
3) The SQL Server 2005 Express database is no longer accessible. Previously it was set to allow Windows Authentication but that no longer works. Issuing commands like:

osql –U sa –S SQLSERVER\INSTANCE

...Or similar from the command line give errors stating that the authentication is denied.

4)

netstat-an | find /i "established"
TCP    192.168.15.20:4366     <SUSPICIOUS_IP>:1015     ESTABLISHED

netstat -b -a -n
TCP    192.168.15.20:4366     <SUSPICIOUS_IP>:1015     ESTABLISHED     3148
[services.exe]

And the final kicker....
5) When searching for "services.exe" on C:\ I find two. One in system32, one in system, Looking at the properties of the file in system in the Version -> Original Filename tab I get GuardS5.exe along with a few other oddball entries throughout the properties.

The question I ask.... how can I troubleshoot this further from a strictly remote connection? I will not be able to do Safe Mode or reboots. Ultimately if I can get definitive proof that this is an infected PC then more drastic steps can be taken.

Yes, you're likely infected. The services.exe process you mention is highly suspicious, and when you combine that with the intrusion attempt via VNC, it's pretty definitive. Assume all your data has been stolen, nuke it from orbit, start over, then change all of your passwords to everything. They're all compromised.

Next time, use source address whitelisting on your VNC, properly configure your firewall, and preferably set up certificate-based authentication instead of using passwords.


Best method to sandbox X applications in ubuntu What's the best way to sandbox an X application like firefox or thunderbird in ubuntu (going into the direction of what qubes os does, but only for single applications)?

I know there are many different sandboxing technologies. For example

Just using a virtual-box: This seems to be very secure but a resource overkill. You would need a minimal OS in VirtualBox just to run firefox.
Using the SE-Linux sandbox technology. This seems to be the best option but as far as I know SElinux is available in ubuntu but not very well configured by default (in contrast for example to RedHat-linux). Furthermore the sandbox part of SELinux seems to be missing: https://unix.stackexchange.com/questions/67127/how-do-i-install-selinuxs-sandbox-utility-on-linux-mint-debian-edition?lq=1 so one would have to compile it.
The apparmor equivalent seems not to be production ready and is currently not shipped with ubuntu as far as I know. However I cannot estimate what's the state of development and if it would be worth to wait for the next ubuntu release where it will probably part of it.
The gnome desktop seems to support X-sandboxing. It is not clear to me if one can use this in a wm-independent way.
The lightweigt tool mbox seems to operate only on filesystem level, which would be not sufficient for X-applications.
The same is true for self made chroot solutions as for example the sandfox-script.
A more lightweigt and secure option than chroot seems to be Plash. But I am not sure how well the X protection is implemented.
Same Immunity and FBAC-LSM
There is also a program called arkose which seems to be well supported for ubuntu, but at the same time there is very little documentation of how it works and I have no idea how secure it is compared to other approaches.
Docker seems to be made more for server applications than for desktop ones. I don't see if it is secure for X applications. There is a newer project called kagome which seems to combine Docker with xephyr for X isolation. But the author notes that docker has some security flaws and it might be better to switch to another container solution such as systemd-nspawn, rkt or lxd.
Other solutions are: seccomp-nurse, Rainbow, vagrantup
Finally especially for firefox there is an apparmor profile for ubuntu but which is not enabled by default. This is not a sandbox but should give you some level of security when using firefox (but I don't know how it compares to the sandbox solutions above).

So there seems to be many approaches but I don't how (and why) those compare in terms of security for sandboxing X-applications like firefox or thunderbird, in terms of usability, especially in ubuntu-linux and which are production ready and well supported. Would be gread it someone could give some details about this, how to categorize them and which of them would be worth for me to have a closer look at for my purpose.

You can use subuser to sandbox an application using Docker. Say you wanted to sandbox Firefox:

You would create a folder my-subuser-images and then create a second folder firefox in the first one:

my-subuser-images/firefox

In the firefox folder, you need to create yet another sub-folder: docker-image

Once you have done that you need to create two files:

permissions.json

And

docker-image/SubuserImagefile

Your file layout should look like the one found at the subuser-default-repository

In the permissions.json file, you tell subuser what Firefox is allowed to do:

{"description":"A popular web browser."
,"maintainer":"student"
,"executable":"/usr/bin/firefox"
,"gui":{"clipboard":true}
,"sound-card":true
,"allow-network-access":true
,"basic-common-permissions":true}

Here is an overview of the permissions that I just set:

"gui": Allows Firefox to display windows to X11 securely using the XPRA X11 bridge
"sound-card": Allows Firefox to communicate with your sound card
"allow-network-access": Allows Firefox to access the network
"basic-common-permissions": Allows Firefox to do some basic things like save settings to it's own specially contained home directory, see the LOCAL and timezone ect.

It does NOT however, allow Firefox to access any files outside of it's own subuser. You could add a user-dirs permission to allow it to access the Downloads directory, for example, if you wished.

Once you have created a permissions.json file, you can go on to create a SubuserImagefile.

The docker-image/SubuserImagefile should look just like a Dockerfile:

FROM ubuntu
RUN apt-get update && apt-get upgrade -y && apt-get install -yq firefox

Now you are done setting up your subuser image.

You can create a firefox subuser by running:

$ subuser subuser add firefox firefox@/home/student/my-subuser-images

You can run the firefox subuser by running:

$ subuser run firefox

You can create more than one firefox subuser. This is useful, if you want to have more than one Facebook account or Google account and not have to log out/in all the time. It is also usefull if you want to reduce the risk of cross-site scripting when you do internet banking.

subuser subuser add internet-banking firefox@/home/student/my-subuser-images

You can run your internet-banking subuser with the command

subuser run internet-banking

You can access a subuser's home directory by visiting ~/.subuser/homes.

Here is a screen shot of Firefox running on my system with the demonstrated configuration:

Note how despite the fact that I am running Debian, it is the Ubuntu version of Firefox that is installed!

You can share your subuser images with others, to reduce the burden of sandboxing applications for everybody. If you want to share your Firefox image, you can cd to my-subuser-images and turn that folder into a git repository:

$ cd ~/my-subuser-images
$ git init
$ git add .
$ git commit -m "Add Firefox image"

If you then push this git repo somewhere, then others can install your Firefox image easilly with the command:

$ subuser subuser add firefox firefox@http://example.com/student/my-subuser-images.git

They would run that subuser in the same way as if they had done the setup locally.


How many UDP packets is too many? My Company recently got hit by a spam email with a link that executed an .exe file. Apparently our Antivirus stopped it from executing (Symantec enterprise).

I'm no security expert, but I am a computer scientist (with development being my strong suit) so I decided, however, to check the traffic log to look for anything unusual and noticed a gigantic number of UDP requests. Are these normal? It has me a little concerned.

I wanted to analyze the packets with wireshark but I don't have enough privileges, since I'm getting a new laptop so I have a temp one at the time being. When I get mine, what should I look for?

This is normal. UDP is sent in bursts, and the small window of time in the screenshot shows a few dozen UDP datagrams in the timespan of one second, which is pretty standard. The answer to how much is too much is simply whenever it is so fast that packets start being dropped.

This UDP is coming externally, whereas a malware threat is internal. Not only was the malware you noticed not executed, but even if it was, it would not result in a burst of incoming traffic, rather you would see it attempt to connect to a C2 (Command and Control) from the inside. UDP is nothing to be scared of. It's a very harmless protocol used for high-speed communication when reliability is not a major concern. It is used in DNS requests, NTP, VPN traffic, video streams, video game traffic, and more. Look on the far right where the destination port and service are specified. Assuming the UDP ports are used for their standard services, the connections are:

1900 - UPnP (Universal Plug N' Play)
5355 - LLMNR (Link-Local Multicast Name Resolution)
5357 - WSDAPI (Web Services or Devices)
67 - DHCP (Dynamic Host Configuration Protocol)

If you are worried that some of these are unintentional, remove the services. None of them are themselves malicious, and the amount of UDP being sent to them is normal.


Buffer Overflows - Memory Addresses Alright, I've been looking into buffer overflows lately out of curiosity. What I don't understand is when you develop the exploit with a virtual machine or whatever, you find the memory address to overflow the instruction pointer with and bam, your exploit works. What I do not get is how does that exploit work on another machine? Wouldn't that memory address be completely different?

Yes and no.  The memory addresses that you see from a process do not directly correspond to the physical (or even virtual) memory.  One of the tasks of the kernel is to map the memory of each process and give that process the illusion that it is the only process running on a machine.

Therefore all processes start their .text (and other parts of code and static libraries) from memory close to 0x0 and their stack starts from the end of the memory.  (That's a actually more complex than that, but it is a decent enough analogy.  Moreover, since malloc() is a system call the kernel will tell the process an out of memory issue no matter how much memory the process sees).  If you start the same process with the same input two times, its memory shall look the same on both starts.

The final mapping between the memory seen by a process and the physical memory is done by the CPU by the use of mapping tables (of which the CPU is told by means of a register).

On the other hand it isn't that easy.  Seeing the problem with the possibility of the overflow using the same memory address stack randomization (ASLR) came into life.  Several Operating Systems today enable stack randomization by default, where the kernel do not start the memory of a process from 0x0 but from a random initial value.  This makes the memory of the process to be shifted by a handful of bytes even when the same process starts two times.

Example

The following trivial program:

#include <stdio.h>

int main(void) {
    int i;
    printf("%p\n", &i);
    return 0;
}

When run on a machine with stack randomization (ASLR) enabled will print distinct addresses, but when I disable it it starts printing the same addresses (assuming the file with the program is named c.c):

[~]$ gcc -o c c.c
[~]$ ./c
0x7ffd52d0aa3c
[~]$ ./c
0x7ffc27da904c
[~]$ sudo echo 0 > /proc/sys/kernel/randomize_va_space
[~]$ ./c
0x7fffffffe86c
[~]$ ./c
0x7fffffffe86c

Extra Note

After testing this on two very similar machines (x86_64 linux 4.8.13) I got exactly the same output from the last two lines.  That is because the program and the kernel are deterministic.

Yet, that may not be the case across very different versions of the kernel.  For example, kernel 2.x will likely produce a different address for i.  This means that the VM where an exploit is developed must mirror the target machine as much as possible (hence the danger of machine fingerprinting).


How to secure a websocket connection with challenge-response? TL;DR Given that all of the state information for a web browser is accessible to a (potentially hostile) user, how can challenge-response authentication between the browser and the server be considered secure?

The Longer Version

I'm developing a web application and I want to implement web sockets for communication between the client and the server. I'm looking at implementing a WAMP router and I'm trying to understand modes of authentication with a system like this.

The WAMP protocol allows for challenge-response authentication (CRA). The way I understand it (and please correct me if I have this wrong), when a client makes a request to connect, the server sends a challenge. The client then encrypts the challenge using a secret key which is shared between the client and the server and returns it. The server checks the encrypted version from the client and, if it was correctly encrypted, allows access. The use of a shared secret allows the server to know that the request came from an authorized client.

This leads to question #1: the Javascript code sent to the browser must contain the shared secret. So the shared secret is not very secret, is it? So how can we consider this a secure method of authentication?

In thinking about this question, I've come up with a solution that I think might solve the problem.

Important note: all connections will be secured via TLS.

Here's how my authentication system might work:

user logs in through the normal, form-based authentication method
server generates an authentication key and a secret, and passes those values to the client as part of the page HTML. The key and secret are both generated via a cryptographically secure method.
client then initiates websocket connection. This begins the challenge-response authentication sequence, using the key and secret generated by the server
server authenticates, using key & secret, and everything is cool.

The key here is the one-time use of the key and secret values. If they change periodically, then there is no way an attacker could generate a key/secret pair or use one that they had saved from a previous visit.

Which brings me to question #2: is this an adequate authentication scheme?

And finally, question #3: assuming the authentication scheme described above is adequate, how often should the key/secret values change? I'm thinking it should definitely change every time the user logs in, and should also expire after 6-8 hours have elapsed. Thoughts?

This leads to question #1: the Javascript code sent to the browser must contain the shared secret. So the shared secret is not very secret, is it? So how can we consider this a secure method of authentication?

If you study the documentation of the Challenge Response Authentication with WAMP you should notice the following information:

  The client and the server share a secret. The secret never travels the wire,

Instead it is considered that the secret was shared before doing the authentication:

  The actual pre-sharing of the secret is outside the scope of the authentication mechanism.

In case of using Websockets from the browser that probably means that the code which contains the secret should be transferred with TLS. When using Websockets inside a standalone application shipped to the user the secret can be pre-shipped inside the application. Since the secret itself is not specific to the user but only used to secure the communication it can be exchanged before any kind of authentication.

  Important note: all connections will be secured via TLS.

WAMP-CRA is explicitly designed to be usable with non-TLS. From the documentation:

  ... hence WAMP-CRA can be used via non-TLS connections

Of course WAMP-CRA can be used with TLS, but if you have a secure connection already you don't need to use a protocol designed to work within the limitations of non-TLS, but you could use a much simpler authentication like cookie-based or make use of mutual authentication provided by TLS.

  ... Which brings me to question #2 ... And finally, question #3:

Since your original assumption was wrong there is no need to add security on top of the existing protocol. Thus I don't cover these parts of the question which deal with the security of your added authentication layer.

But a more general answer, independent from the framework you use: Websockets are a communication channel created by upgrading an existing HTTP(s) connection. This means any kind of authentication done for the HTTP(s) connection can be applied to the Websocket connection, i.e. mutual TLS authentication, Basic Authentication, session cookies etc. Thus if the HTTP(s) connection is already authenticated their is no need to do an additional authentication inside the Websockets channel because this is the same TCP/TLS connection which was already authorized.


Making a Judgement on a User's IP Usage We have a click exchange-type web application that allows users to receive stats boosts within a game. Stats boosts are based off unique IP addresses which poses a problem for users who use proxies or VPN, connect from home and then from cell, have a dynamic IP, connect from multiple locations (public wifi), or spoof.

We've begun tracking actively-used IP addresses for each user and have begun enforcing temporary 24-hour suspensions on those who reach the limit of 10 unique IPs in a certain period.

So far, we've received numerous reports from users claiming that these suspension have been false positives and that our filters have been inaccurate. But somehow these users always manage to hit a limit of 10 IPs.

And so our problem continues...

What is one of the best ways to determine whether or not a user is abusing IPs?
As we've been tracking IPs, we notice that sometimes users hit a limit of 10 IPs but only the last quadrant of their IP changes. Does the pattern/style of IP change indicate the type of service they might be using to alter their IP? (Sometimes it's a combination of the third and fourth quadrant that changes.)
How can you determine if a user has a dynamic IP in a web application?

What is one of the best ways to determine whether or not a user is
  abusing IPs?

There's no good way, and it probably shouldn't be your goal.

The fact that you've been "tracking actively-used IP addresses for each user" means that you already have a tracking mechanism better than IP addresses that you should use instead.

  As we've been tracking IPs, we notice that sometimes users hit a limit
  of 10 IPs but only the last quadrant of their IP changes. Does the
  pattern/style of IP change indicate the type of service they might be
  using to alter their IP? (Sometimes it's a combination of the third
  and fourth quadrant that changes.)

It suggests that they're staying in the same office, using the same coffeeshop, wandering around the same mall, connected to the same ISP but have changing addresses, or are using an anonymizing proxy provider (which one can do for legitimate reasons).  Nothing bad or unusual about any of that.

  How can you determine if a user has a dynamic IP in a web application?

If it changes, it's dynamic.

If it doesn't change, it might still be dynamic.

If it's static, it's not dynamic, but it still might change.

Client IP is not something you can reliably draw many conclusions about.  Use authentication, use cookies, use client certificates, but don't use IPs to track anything about the endpoint.


Will ransomware reach an air-gapped computer? I'm doing some research and wondered since ransomware allows a user a decryption key- how that would be possible if it is not on a network?

12/23 Edit: After learning how ransomware works I'm now considering prevention methods.

Is it possible to have an air-gapped network? If so, can you explain how non-physical attacks could still get through?

I assume you mean with an air-gapped system that it has no network connection but that it is still possible that the system get infected, for example using an infected USB drive as in the Stuxnet attack.

While most ransomware requires a network connection to communicate with the command and control server there are variants which don't require it. Such case is described in Avira: Locky goes offline (by design). In this specific case the public key used to encrypt the randomly generated encryption keys is contained in the ransomware itself instead of getting it from the C&C server. The files are encrypted and the user presented with the usual prompt which asks for payment and presents a reference number. It is the problem of the user then how to get the decryption key to the air-gapped system.


Is moving data between devices on an SD Card safer than a USB stick? From the perspective of USB device-born malware/exploits, especially affecting firmware (e.g., can an infected computer reprogram an inserted USB memory stick to act like a keyboard and autotype malicious scripts on another machine? Or flash the BIOS or hard drive firmware on that machine?).

Assuming I have multiple devices that all have USB ports but also all have SD card readers, is it safer (and how much safer?) to move files between the devices using an SD card instead of a USB memory stick?

Some devices are computers running windows, laptops running various flavours of linux in various locations. Ignoring electrical attacks as I would buy the USB memory stick / SD card new from amazon.

Does using an SD card in this way limit the potential threats to autorun executables? Does doing this prevent the computer from seeing the SD card as anything other than a storage device?

Thank you for wading through this poorly written question.

While SD cards cannot be programmed to behave as a different key of USB device like a keyboard (i.e. Bad USB) they have their own vulnerabilities since they also contain firmware which can be hacked. From On Hacking MicroSD Cards (12/2013):

  ... code execution on the memory card enables a class of MITM (man-in-the-middle) attacks, where the card seems to be behaving one way, but in fact it does something else...

One attack vector I could think of is to return a different file (i.e. malware) instead of the real file when reading from the card, but maybe only after the 3rd attempt to read the file so that it can not be easily detected.

So yes, they are probably safer to use than USB sticks but misuse is still possible.


About browsers injectors (Sonic Train) I know that viruses use some ways to inject some ADs in the browsers web pages like :

1-Inject an extension

2-Inject some codes to the browser process

3-With a proxy server

4-Install an injected browser

So with one of these ways bad people can infect normal users browsers But my question is how could the Virus "Sonic Train" hijack all the Web-Browsers and he is not using any of the last four methods ?? (I mean what is the other methods)

It uses browser extensions. According to MalwareTips.com

  Integrates into the web browser via the Sonic Train browser extension

How-to-remove.com has images of the extension installed in IE and Firefox. Fixyourbrowser.com also says it is done by browser extension.


Verify S/MIME signature with no certificate included Let's sign a file with

 $ openssl smime -sign -in file -out file.sign -outform DER -inkey private.pem -signer certificate.pem -nocerts

With the option -no certs no certificate is included in file.sign.

Now if you try to verify file.sign:

$ openssl smime -verify -in file.sign -inform DER -content file -noverify certificate.pem

You get

Verification failure
139909488150168:error:2107C080:PKCS7 routines:PKCS7_get0_signers:signer certificate not found:pk7_smime.c:466:

The example works, if you sign without -nocerts of course.

But is there are way to tell openssl verify how to find the certificate ?

Aside: you mean openssl smime -verify (or the newer and slightly better openssl cms -verify). openssl verify is a quite different operation which verifies one or more cert(s) against a truststore and optionally a purpose.

From the man page which is on your system if Unixy, or on the web at https://www.openssl.org/docs/manmaster/man1/smime.html (emphasis added):

  -certfile file

  Allows additional certificates to be specified. When signing these will be included with the message. When verifying these will be searched for the signers certificates. The certificates should be in PEM format.


Is it a security concern if MySQL manipulates parameter types? This is a follow up to a question I posted on Stack Overflow but you don't need to read that question - I'm recapping the pertinent details here.

I'm testing a PHP application which uses a MySQL database as a data store. I am using parameterized queries exclusively, via an ORM library.

I have discovered that a particular POST request with a payload like this:

id=3-2&value=whatever

will modify the database row where id = 3. After some investigation, it was determined that the value "3-2" is passed through to the database (via a parameterized query) and selects the row where id = 3, which is then updated.

Now it seems to me that this is a security flaw: I am able to manipulate the data in my database by POSTing an arbitrary value for the id parameter. Admittedly, the range of values for which this kind of attack is possible is limited: the ID parameter must be a string prefixed with a number, and that number must correspond to an ID in my database.

So I have two questions:

Is this really a security flaw that I should be worried about?
At what level should this be addressed in my application?

The MySQL server, perhaps by changing some configuration values?
The ORM library, perhaps by checking the value of the ID used before attempting to query the database?
In my code, before I even try to instantiate the model?

Thanks for you help! I'm just starting out learning about security & any input will be helpful!

This allows for (potentially malicious) actions that are contrary to the intended use of the application, so yes it is a security flaw that you should be worried about. Just because you have found limited use cases / attack vectors does not mean that others don't exist.
Ideally you should take a "defense in depth" approach whereby you mitigate the concern in as many levels as is practicable. As mentioned above you have only discovered a single attack vector, and mitigation at all levels requires that any related vectors will have to bypass all mitigations rather than a single-layer one. That being said; it may not be appropriate to modify the ORM library as it is not necessarily a generalisable issue.


Best practices for handling wrong TOTP tokens Assume a 2FA system with user-supplied passwords and 6 digit TOTP tokens.  It is not possible to test a TOTP token without authenticating with a password first, so whoever submits a token is presumed to know the password.  Each token is generated for 30 seconds and is also valid within the preceding 30 seconds and the next window of 30 seconds alongside the "then current" token.

It's quite common to see false alarms because the token took a little too long to enter, so tokens can't be much longer to be practical.

Should a certain number of wrong token inputs in a row result in forced password invalidation, based on the assumption that the password may have leaked?  (It might not have leaked.  There might be just some problem with the second factor that will eventually go away.)  If current widely used 2FA systems do this, what are the typical thresholds?

I am aware of RFC 4226 suggesting a throttling parameter of 5.  I am not sure what exactly happens after the threshold is reached.  Account lockout?  Password invalidated?  Wait a little and allow retrying?

RFC 4226 doesn't tell me what others are doing, but it does have some viable suggestions in its Section 7.3.

Apparently, after the 5 attempts per account and device are exhausted, either a full account lockout or exponentially increasing delays should kick in, semi-permanently.

The counter must apply across login sessions and across individual TOTP tokens, as long as they are associated with the same authentication device.  That way, it is impossible for too many unsuccessful device factor authentication attempts to accumulate before the constant need for the administrator to reset the device factor lockout hopefully draws appropriate attention to the account under attack; and once the password is eventually changed, the lockouts caused by the attack will stop.

Lessons taken:

The protection of the device factor is no different from the
protection of the password, and the two need independent protections
from brute force attacks, regardless of the authentication flow.
If the device factor is adequately protected in itself, it would be redundant to speculate whether the password has leaked or whether the legitimate user is just having a modest amount of trouble with their devices.
To protect the device factor, it is not sufficient to protect only keys (against leaking) and tokens (against eavesdropping or guessing).


How secure is BCRYPT(SHA1(Password)) This question is a fork from a previous question here:
Is it safe/wise to store a salt in the same field as the hashed password?

Assume you run a web portal, and store passwords in SHA1 hashes. How do you upgrade this to BCRYPT hashes instead?

Typically, you'd wait for users to log on, and re-hash their passwords (from the plaintext they entered) to BCRYPT. But it could be a while before all users to logon to your platform, and there will always be inactive users who will never come back.

A separate proposal (which I first heard from Troy Hunt) was to BCRYPT the existing SHA1 passwords in your database. Effectively you'd be BCRYPT(SHA1(plaintext_password)). This way all users on the system get upgraded to BCRYPT at once, regardless of their activity.

This way, a breach on your database, doesn't expose users who haven't logged in yet and still on SHA1.

The question is:

Is BCRYPT(SHA1(plaintext_password)) is equivalent in security to BCRYPT(plaintext_password)
If Not --Why? And is the gap reasonable enough to consider this option?

The question focuses on BCRYPT(SHA1) but could easily apply to any two hash algorithms with the stronger one being applied last.

First of all, thank you for taking the time to determine how to do this correctly and improve security for your users!

Migrating password storage while taking legacy hashes into account is relatively common.

For your migration scenario, bcrypt(base64(sha1(password))) would be a reasonable balance. It avoids the null problem (important - you definitely don't want to leave out the base64 stage!), sidesteps bcrypt's native 72-character limit, and is 100% compatible with your existing hashes.

You would simply hash all existing SHA1s with bcrypt(base64(sha1)), and then hash all new passwords with the full sequence. (You could also use SHA256 instead, though this would increase your code complexity slightly, to check to see if SHA1 or SHA25 was used (or to just try them both and pass if either succeeds) Long term, SHA256 would be more resistant to collisions, so would be a better choice).

For resistance to bruteforce, this would not only be equivalent to bcrypt, but would be theoretically superior (though in practice, 72 characters is so large for password storage than they are effectively the same).

Bonus advice:

Be sure to use a bcrypt work factor that is high enough to be resistant to offline attacks - the highest value that your users can tolerate, 100ms or higher (probably at least a work factor of 10). For speeds under 1 second, bcrypt may actually be slower for the attacker (better for the defender) than its modern replacements scrypt and Argon2 (YMMV).
Store the default value for the work factor as a system-wide configurable variable, so you can periodically increase it as your underlying hardware speeds get faster (or more distributed).


Why doesn't the TLS protocol work without the SSLv3 ciphersuites? While disabling SSLv3 from our ssl.conf files to overcome the Poodle vulnerability, I also disabled the SSLv3 ciphers using !SSLv3. With the ciphers disabled, we were not able to access the website through Firefox and IE. The following was the error message from Firefox:

An error occurred during a connection to xxxx.example.com.
Cannot communicate securely with peer: no common encryption algorithm(s).
(Error code: ssl_error_no_cypher_overlap)

So we went back and enabled the SSLv3 ciphersuite and it all started working fine. Right now, the SSLv3 protocol is disabled, but the SSLv3 ciphers are enabled.

Am I assuming correctly that we got the error with one of the browsers because TLS ciphers were not available in the browser?
Is it possible that the protocol used is TLSv3, but the ciphers are of SSLv3?

SSLProtocol all -SSLv2 -SSLv3
#SSLProtocol -all +SSLv3
#   SSL Cipher Suite:
# List the ciphers that the client is permitted to negotiate.
# See the mod_ssl documentation for a complete list.
SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:!MEDIUM:!LOW

We can upgrade the browsers at our office, but can't do that on our customer's machines. Is having SSLv3 protocol disabled, but with the ciphers enabled a recommended setup? In other words, are we okay with connecting through TLS with SSLv3 ciphers?

I presume from your ssl.conf setting that you are using the mod_ssl module from Apache web server. This module relies on OpenSSL to provide the cryptography engine.

From the documentation on OpenSSL, it states:

  Protocol version: SSLv2, SSLv3, TLSv1.2. The TLSv1.0 ciphers are
  flagged with SSLv3. No new ciphers were added by TLSv1.1

You can confirm the above by running the following command:

$ openssl ciphers -v 'TLSv1' | sort
ADH-AES128-SHA          SSLv3 Kx=DH       Au=None Enc=AES(128)  Mac=SHA1
ADH-AES256-SHA          SSLv3 Kx=DH       Au=None Enc=AES(256)  Mac=SHA1
ADH-CAMELLIA128-SHA     SSLv3 Kx=DH       Au=None Enc=Camellia(128) Mac=SHA1
ADH-CAMELLIA256-SHA     SSLv3 Kx=DH       Au=None Enc=Camellia(256) Mac=SHA1
...

This means that if your configuration file excludes ciphersuite SSLv3, you are effectively removing support for TLSv1.0 too! That leaves you with ciphersuite TLSv1.2 only since support for SSLv2 has also been removed:

$ openssl ciphers -v 'ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:!MEDIUM:!LOW:!SSLv3' | sort
AES128-GCM-SHA256       TLSv1.2 Kx=RSA      Au=RSA  Enc=AESGCM(128) Mac=AEAD
AES128-SHA256           TLSv1.2 Kx=RSA      Au=RSA  Enc=AES(128)  Mac=SHA256
AES256-GCM-SHA384       TLSv1.2 Kx=RSA      Au=RSA  Enc=AESGCM(256) Mac=AEAD
AES256-SHA256           TLSv1.2 Kx=RSA      Au=RSA  Enc=AES(256)  Mac=SHA256
...

From the above, it is not hard to see why you should NOT remove SSLv3 from the ciphersuite. Disabling SSLv3 protocol is more than sufficient to protect your clients from POODLE vulnerability.

The error message you are experiencing is likely because you are using older browsers such as Firefox < 27.0 or Internet Explorer < 11.0 as these versions do not support TLSv1.2 by default.


Where to store passwords of encrypted backup drives I have all my backup hard drives encrypted with LUKS. Currently, the passphrase is some 25+ random password that I store in my password manager KeePassX. Since I have the backup drives for the case that a single one of the is the only working drive left, I have a small unencrypted partition on them where I have this password manager file. That way, I only have to remember my long password for the passwort manager and use a strong password for the disk encryption and a different password for every disk.'

A friend pointed out that in effect this is not better than just having the same password on all the disks that I can memorize.

Are there reasons to pick one approach over the other one? I have no idea whether the password on LUKS or KeePassX would be harder to crack. What I thought about is that each LUKS drive probably has the a different crypto key, which might not be good if those different keys are protected with the same password?

All those backups disks contain the exact same data, so it only matters whether one of the drives is brached.

There is a major advantage to asymmetric encryption for backups: you can make the backup automatically, because this only requires the public key. Only restoring requires the private key, and that can usually be interactive, because it's a rare operation.

Symmetric encryption has a definite performance advantage, especially if you do it at the media level. But as your friend notices, backing up the encryption key with the ciphertext defeats the purpose of encryption. In your scenario, your backup is as easy to crack as your memorable password.

You can get the best of both worlds by using asymmetric encryption (e.g. with a GPG key) to save your key store. Since this is a small file, it won't hurt performance. Use a strong, long, randomly-generated passphrase for the GPG key, which you won't need often. Write down the passphrase on a piece of paper and put the piece of paper in a safe. (Actually you'll probably want several copies in different places!)


Anonymity on the Web 101 nice to meet you all! I'm newbie on this stack. Sorry if I did anything idiot :)

Well, I'm very curious about browsing on the web completly anonymous. I would like to hide the websites, e-mails, messengers, downloads and most of the basic services from my ISP provider and the NSA/CSA/NORAD/USGOV/BRGOV etc etc etc.

There's an 101 about that somewhere? what softwares to use, what internet services restrict logs and things like that?

Thank you all for helping, sorry my poor english and good day to evebody!

If you want to hide that stuff from your ISP check out the different VPN providers out there like PrivateInterNetAccess or BTGuard. There's a ton of others out there too. It's not that expensive and you get an encrypted tunnel to the VPN provider. Now you just have to trust the VPN provider :)

Another thing you can check out is tailsOS. This is a virtual machine that will route all of your traffic through the tor network. On the tor network you don't really want to use any of your personal accounts because anyone can setup an end node and anyone can sniff on that end node.

The NSA and the other TLA's out there already have access to google, facebook and god knows what else so if you send email through google they will have it no matter how many VPN's you use.


What happens when authenticating through a phishing attack with FIDO U2F tokens So I have looked around and haven't found this anywhere.  What happens when the response server is a phishing site with FIDO U2F tokens?

Basically, if login just fails, I would assume that the user would try again a couple of times, assume that something is broken and fall back to using OTP 2 factor which defeats the purpose.

The other option would be that there would be some form of notification, which would be helpful and logical, but I havent seen anything saying that this happens.

I ended up asking Yubico about this through twitter. The authentication currently just fails, but a manufacture could add a screen to a key that would give a more helpful notification.

The default user behavior will be to try again and then circumvent the security key through a one time password, which does allow man in the middle attacks.  So an important side note will be to teach users to not ever use the one time password option.


For a cipher school challenge I need help breaking this cipher [CIPHERTEXTSTARTS]HI wsndtonInehbihs if at t  iyoncniegtrf .e  noionbpni y,iu.w ahoui  hs hroyh!euecsy m.ot ew hrc hb;ntsresnmdma ipMsat ln  ts , ryiceg ensh  c  n byr  t k t  oe de uhw stiytoer s eevlde utln a lerytkhhte ae srdaBry,etyofattu.ttd t?ybor ubeusf elog oentiyrueeruuuemcndu ’naIlaow  ystal nta.mAy dt ddin aoa,’une yeof hct dsirnetso lruohwpo ctoioa oyif awtowsrdupttep nm aIraulnhiebW ynoi[CIPHERTEXTENDS]

If I where you I would look at Cryptanalysis, in particular letter frequency. The idea of which, certain letters in English occur more regularly than others (e.g. vowels).


Can I brute-force a password hash even if I don't know the hash-algorithm used? Can I brute-force a password hash even if I don't know the underlying algorithm?

For example if I get hold of a database with password hashes and the used hash algorithm is unknown, like a random mix of SHA/MD5/Bcrypt/custom/Salt/Pepper.

Will a password cracking expert still be able to brute force the password hashes?

I also guess (for a public web site) that you can at least create your own "account" with a known password, so you have perhaps one known input->hash pair. Will that be of any use?

You question does not make a lot of sense to me. If you already know the hash and know what input generates it, what is the point of your bruteforce?

On the other hand bruteforcing something means to apply some procedure many times with different inputs and comparing the output with your hash. If you do not know what procedure to use, there is no way you will be able to apply it many times.

But if you know the input and the hash, you can bruteforce it in the beginning to find what algorithm is used. For example

sha1(i), sha1(md5(i)), md5(i) and so on trying many combinations of possible hash functions. You might guess partially what is used. So if you output is 160 bits long, you can guess that may be the last step was sha1.


Timing attacks on password hashes Timing attacks can have a devastating impact in scenarios where the secret is involved, often in cases where byte-wise array comparison is used.

Now there are those that advertise using constant time array comparison in any situation where data is compared that was derived from a secret, not only when comparing the secret itself. The rationale is "better safe than sorry".
Although this is fine, I'm still wondering if it is really necessary all the time.

A particular case where I would tend to think that constant time array comparison is probably unnecessary is comparing stored password hashes with those provided by the user. Let's assume the password was properly stored using for example bcrypt. If the application uses short-circuiting array comparison, an attacker could gain information about the "number of correct bits" of arbitrarily chosen passwords by evaluating the time it takes for a response.

Now my question is whether this can be transformed into a "better than brute force" attack? Is there a possibility for an incremental attack, i.e. is it possible to construct a password with n+1 correct bits from a password with n correct bits other than using brute-force guessing?

I would be interested in the following:

Existence of theoretical results that prove that such an attack is (in-)feasible for one-way (compression) functions that do not assume the hash function to be (pseudo-)random
Negative/positive results for real-world hash functions such as MD5, SHA-1 etc.

Short version: I think there is no danger doing short-cut comparison of salted hashes of passwords, if the salt is hidden to the attacker.

Long version:

Using timing attacks in this case will in no way tell an attacker more than what he would know if he had the actual stored hash and salt ... and brypt's security parameter (iteration count exponent) should be chosen such that even knowing the hash and salt would not give the attacker a significant enough advantage to derive the password (since he would have to brute-force the password from this).

On the other hand, if the attacker does know neither the used salt nor the stored hash, I would guess that a timing of the comparison of calculated and stored hash will not give any information at all, since every (even single bit) change of the password input will result in a completely different hash.
(This applies to every pseudo-random function, not only bcrypt. We actually need only the avalanche effect here.) See below for a more formal elaboration.

Other than this, normally the hashing process itself is included in the measuring, which takes much longer than the final comparison at the end, and thus will dominate the total measured time. I don't know how much this hashing time will variate, though.

Mathematical version:

  Now my question is whether this can be transformed into a
  "better than brute force" attack? Is there a possibility for
  an incremental attack, i.e. is it possible to construct a
  password with n+1 correct bits from a password with n correct
  bits other than using brute-force guessing?

So we have a function c_h(y), which is the number of leading bits
matching between H(s, y) and h. Let m be the total number of bits of H's output.

Assume we have an algorithm A which can do your attack, i.e. an algorithm which,
for a hash h (unknown to A) and a given message x with c_h(x) = n, finds a message x' with c_h(x) >= n+1, in time better than exponential in n.
(Simple brute-forcing the hash is exponential in n.) We can assume that this algorithm has O(1) oracle access to c_h(y) for arbitrary y.

Then we can from this construct an algorithm B which will do a preimage attack on a given hash h and salt s, i.e. finds a message z with H(s,z) = h. It works as follows:

The oracle for A is simply done by calculating H(s,y) and
comparing it with h, counting the correct bits until the first non-match.
We choose an arbitrary message x_0, calculate n_0 = c_h(x_0).
For each i > 0:

We pass x_(i-1) to A, and get back x_i with n_i = c_h(x_i) > n_(i-1).
if n_i = m, stop and return z = x_i.

The output of B is a preimage for (s, h).

As each n_i is larger than the previous one, this will take at most m passes through the loop, with each pass taking at most o(exp(n_i)) time, i.e. in total o(exp(m)). Thus we got a sub-exponential preimage-finding algorithm.

This shows that, assuming H is preimage-resistant, there can't be an algorithm which efficiently produces longer partial matches from shorter partial matches, given the match length as an oracle.

(I assume one can refine my timing approximation a bit better.)

Notes regarding the comments:

As the comment thread is getting quite long, I'll try to resume the important points here:

With weak passwords, an offline dictionary attack on password hashes
will become feasible, which would be our algorithm B. This is why
we want to choose the bcrypt work factor high enough.

Still, I see
no way to get from a fast B (offline preimage attack with given salt)
to a fast A (online partial preimage finder from hash prefix length oracle)
algorithm, only the other way around.

I expect that even for functions which are preimage-broken there
would be no easy way to get our online attack, as long as they
still fit the avalanche criterion.
Real-life hash functions are not really random (which is caused
by their iterative design), but this does not really affect their
suitability for password hashing, which works on inputs shorter
than the block size.
The important property here is preimage resistance, not collision resistance.
(Every collision resistant function is second-preimage resistant, and
second-preimage resistant functions are preimage resistant - though
we usually expect a higher resistance against (second) preimage attacks
than given by this reduction from collision resistance, due to the generic
birthday attack to find collisions.) This means this proof applies
to MD5 (which is broken collision-wise), as long as there is no preimage
attack.
The proof above does not rely on the hash function being a random oracle,
it just uses an oracle access to c_h(y), which abstracts the timing
measure for the


Logged into same network of residence, owner knows my Mac address.. what can they see? Logged into same network of residence, owner knows my Mac address.. what can they see?

They are techy and know my Mac address for my phone and PC.
Can they see text message to and from me? My email? My pictures and documents?... Maybe even this right now..?

They can set up a packet sniffing program such as Wireshark to intercept all communications. As long as the websites you visit have an https - you're protected. As for apps and other things, try to find out if they use TLS encryption. Even with encryption/https they can see what IP addresses you connect to. If you don't set up your own DNS settings (with DNS encryption) they can see what domains you access. So if you type in google.com they can see your device made a DNS request for that but that's it they cannot see what you do on Google.

Perhaps you may be interested in using a VPN


How to share an emergency list with non-technical users so they can only open it in emergencies? A lot of personal life is digital and should be protected to stay private.
But in case of a medical emergency, like being unresponsive in hospital, maybe being in a coma for a few years (possibly waking up afterward) or dying, one may want to share some information with relatives. An example would be:

When I am unresponsive in hospital, please use the following login to renew my payments for service x, z, y, so they do not get canceled.
When my emergency takes longer than four weeks, please inform these people: A (a@mail), B (b@mail). Please also notify people I am chatting with in the private chat C. My login (please keep it secret!) is user:password
In case of my death, please also inform D, E, F and delete my accounts G, H. The needed usernames and passwords are (...)

Or something along these lines. I guess writing the actual digital last will is a huge task by itself, but the problem that comes before is how to protect it until it is needed on the one hand and make sure your non-technical relatives can access it on the other hand.
Just having a letter stored at home and informing one's relatives is one option, but someone may steal it and get a lot of access rights and personal information, e.g., about private contacts that you did not want others to know about, except in emergencies.
Schemes like Shamir's secret sharing are probably one way to protect it, but they are both technically challenging (think about the average user), even the concept is hard to grasp for some, people may lose their share of information or not cooperate, and when one makes it too complicated, people think you're paranoid or at least strange.
Finally, one should be able to update the information. This would, for example, mean sharing a password and an URL, so you can upload the updated encrypted information each time you're adding something. This not only exposes the (encrypted) list but also poses a risk of being unreliable. Maybe one did not check if the URL still works, and for some reason, the site you chose to host the list deleted it. Then people will find the instruction and password but not be able to download the information.
What are good ideas to share sensitive information with non-technical persons, such that it can only be accessed in emergencies?
Existing solutions:

Web services like Google allow you to define what happens to an account after your death. This solution would, for example, allow you to store a list with all necessary information in your mailbox.
On the other hand, you need to trust Google not to abuse it (most people are probably not a target of people who may have access, trust Google to verify the necessary documents and trust Google not to have security incidents in which people may access your mailbox and your list with everything needed to take over your online life.
Building yourself some kind of dead man switch. This is an option that both needs a lot of maintenance and a lot of care not to trigger false positives or false negatives, as both have grave implications.
Some companies offer to handle such cases. I didn't look up the current offers, but there are companies who provide this service as far as I know. But here, you need both to trust the company and its security a lot because everyone knows that such a company stores are a lot of sensitive data that may be of interest for either misusing it or extorting its owner.

Search around for a digital dead man switch. You can build one yourself, and keep checking out on it every day or week to keep it from triggering.
With a cheap VPS (you can buy one for a dollar or less per month), you can have a simple service running that you write the rules, and what should be sent by email and to who.
So if 2 weeks passes without you checking in, login for the payment is sent. After a month, people are informed. And after an year, the request for deleting your data is sent.
You only have to be sure to not let the switch trigger before it was intended, and keep enough credits on the VPS account to outlive you at least one year. Renewing it for 2 years, and refunding it halfway would be enough.


Can Simultaneous Logins Occur When Two Users Have Both Pieces Of Two-Factor Authentication Information? In a hypothetical situation (say a screen capture program or rootkit, where, incidentally, a password change will not make any difference) where an attacker has both your password, and sees the two-factor response upon logging in with that password (whether it's via SMS or a more robust system like iCloud to iPhone Two-Factor), is there a situation where both users, having both password and two-factor, can log into a system at the same time?

For the sake of the example, let's use Apple's iCloud system, logging in on a Macbook, receiving a two-factor code on an iPhone (not via SMS, via their cloud-based two-factor system).  Both the laptop and phone are rooted, so both are visible.  Can the login information be used to log in in more than one place simultaneously?

It depends on the type of the OTP method and implementation details.  Whereas [RFC4226][1] (the counter based OTP) can be understood to forbid reuse, as it says:

  the server's counter value is only incremented after a successful HOTP
  authentication

But that may not be a guarantee that there is no time window that the same HOTP token will be usable - multithreaded authentication servers, with concurrent database access may overlook this detail.

It is also describing that:

  RP3 - P SHOULD be implemented over a secure channel in order to protect users' privacy and avoid replay attacks.

Which implies they don't consider it the property of the protocol to protect against reused tokens!

Similarly, for time based OTP [RFC6238][2] explains that it's a good protection against attacks to reduce the time window when a token is valid.  But it is mentioning the token is consumed, which, to some may imply it cannot be consumed again.

  First, a larger time-step size exposes a larger window to attack. When an OTP is generated and exposed to a third party before it is consumed, the third party can consume the OTP within the time-step window.

I, personally do not think a copied second factor should be valid, but this is not necessarily what the standards say, so there may be variations on how this is interpreted.  Other 2FA vendors may not even adhere to any of the standards, and may have stricter or looser requirements.  Let me also note that it may be difficult to implement a reliable method of locking out all but the first use of a token within widely distributed networks, for all cases.

Update: now that I think of it, I can see two additional ways of preventing access with duplicate OTPs - one is at the preparation: making sure there's only password login out there that is in progress of accepting an OTP until the authentication timeout.  The other is invalidating the already granted session, in addition to the duplicate one.  This can be easy in a web-based service, but not as convenient with a computer shell access.

Also to be considered that you can't be sure the valid user is the first one, so it can be a hindrance for the them as well.  In the case of true MITM, the attacker can even stop the genuine attempts by them so that there can't even be a notification over the same channel.

As you can see, it's not as simple of accepting or not accepting the duplicate OTP - you need to consider the user of the service, how they can get into this situation and how they will be the least harmed, or best served.  Perhaps this is why the standards won't discuss these details, and leave it up to you.

[1]: https://tools.ietf.org/html/rfc4226 RFC4226-HOTP
  [2]: https://tools.ietf.org/html/rfc6238 RFC6238-TOTP


Does License check response needs further obfuscation to make it more secure? I have created an android app which is a paid app.The app utilizes google's licensing verification library for the license checks and implementing ServerManagedPolicy in it.  As the ServerManagedPolicy caches the license response data from the server with obfuscation in SharedPreferences,  do I need to implement any further obfuscation method to make the cached response data more secure and tamper proof?

Answer No to "Does X need obfuscation to make it more secure?" for any given X

If you want something to really be more secure, obfuscation won't provide it.


Major differences between Snort and Snort 3.0 When I visited the the Snort's website to download the source code for compilation, I found there were 2 downloads available.

One was titled Snort and another was titled Snort 3.0

Has the development of Snort stopped and they've shifted to Snort 3.0 or is Snort 3.0 still in alpha phase and we should be be careful using the new version ?

What are the major differences between old Snort and Snort 3.0 ?

From the https://www.snort.org/snort3 web page linked to from the page you linked, they list the following:

Support multiple packet processing threads
Shared configuration and attribute table
Use a simple, scriptable configuration
Make key components pluggable
Autodetect services for portless configuration
Support sticky buffers in rules
Autogenerate reference documentation
Provide better cross platform support

Were you looking for more than this?


Two-factor encryption model Please some on help me to understand this

"Are you ready for this? With the two-factor encryption model your data is protected two-fold. First, a unique key is generated, encrypted, and turned into a token, which is then stored. This token can only be accessed by the administrator or end user providing his credentials as the complementary part to decrypt the stored token; and second, the data is also encrypted. In order to access the encrypted data, both parts of the equation need to work together to recreate the key, which only exists in that unique session. Since only the administrator or end user has access to that token, anyone who wants the data would have to go to him to get the first piece of the puzzle. Effectively, no one can access the data without your knowledge."  -- source

I can say this: Is isnt secure. Once someone authenticates and get the encryption key for the data, they have unlimited access to the data that is protected.
The solution in your description, uses a 2-shared key, where the first factor (password) is generating key1. then the second factor, like a OTP athenticator, is used to authenticate at the administrator, and key2 (the token) is generated.
Then the 2 keys are combined in a way, like key1 XOR key2, and gives key3. key3 gives access to data.

A adversiary that want to break the system, could ensure the real user authenticates successfully. After this, key1 and key2 is copied, and thus the two-factor authentication is bypassed.

For two-factor to be really two-factor, the physical second-factor must have a property, ensuring that the secret key cannot be extracted, rather disk data has to be fed through the second factor.
In other Words, like a HSM. This ensures that the two-factor requirement is enforced at all times, and that you could even lend out the second factor to someone that needs temporary access, and once the access is revoked, the second factor is taken back and then the advesary is guranteed to no longer have acccess to the data.

A smart card is too slow, so you need some disk encrypting solution that uses some sort of high capacity HSM that is inside a Little key, that is inserted. For the "what you know" factor, a PIN can be used.

Using a Smart card or HSM, that stores a "master key" securely, but is used to decrypt a "disk key" that is later used to decrypt data, isnt secure either, since a adversary could just ask the smart card or HSM to decrypt the disk key for them and then they have full access, even when they lost access to the Smart card or HSM.


Admin privileges from Random regedit modification So lets say you can edit/insert one random key inside regedit (can be in any position in the entire tree structure HKLM/HKCU) in order get admin privileges. Any ideas?

In HKLM\Software\Microsoft\Windows\currentversion\run or runonce, I would try to insert a new string with this command:
cmd.exe /c net localgroup Administrators <my windows account> /add

With that, at the next startup of the computer, your account will be in the admin group.

Or I would try to modify the proxy paramaters of Ie in \CurrentVersion\Internet Settings to be able to capture http traffic.

However, for writing in those keys, you must be logged as admin...


How Have SQL Injections Evolved? (Specific Question + Open Discussion) First time posting on Security Stack but I have benefited a lot from
  previous posts. I am currently a security cyber security grad student
  and I am building up my thesis project right now: it is effectively
  another vulnerable web application suite (like DVWA or WebGoat) but
  focuses heavily on teaching the back-end of these attacks and
  providing more hands-on examples--along with hopefully updated and
  more relevant kinds of attacks based on things like the OWASP top 10
  for 2017.

  For the sake of time and my thesis I am just going to build section
  covering injection attacks (as it seems like that is some of the most
  common and devastating kinds of web-based attacks). The rest will come
  on my own time. Anyway, here is my question:

It seems that we are in a shift about how vulnerable we actually are. Right now I am building my application in PHP and MySQL, and it seems like the shift to MySQLi has really solved a lot of the appending-based SQL injections. Meaning that injections like:

mysqli_query("SELECT email, passwd, login_id, full_name FROM members WHERE email = 'x'; DROP TABLE members; --'");

don't really work, as the updated mysqli_query() only allows for a single SQL statement to be passed at any give time, and if more are attempted then the function returns false. Developers would specifically have to use the mysqli_multi_query() type for that to happen--and that does not seem likely for simple login forms.

So right now I have a simple application that will display a table row based on the user supplying a correct username and password:

<?php
    // Prevent errors from showing
    error_reporting(0);
    // Connect the db
    require '../../connect_db.php';

    if (isset($_POST['UserName'], $_POST['UserPass'] ) ) {

        // Grab user Input
        $UserName = $_POST['UserName'];
        $UserPass = $_POST['UserPass'];

        // The passwords in this case are stored in the clear. This is an early example.
        // BINARY is used to force matching case.
        $query = "SELECT * FROM users WHERE UserName='".$UserName."' AND BINARY UserPass='".$UserPass."'";

        $result = mysqli_query($db, $query)
         or die("Error: " . mysqli_error($db));

        // Echo out the table row(s)
        while($row = mysqli_fetch_array($result)) {
            echo '
'; // Class is added so that jQuery can remove old ones
            echo '' . $row['UserId'] . '	';
            echo '' . $row['UserName'] . '	';
            echo '' . $row['UserPass'] . '	';
            echo '' . $row['UserRole'] . '	';
            echo '
';
        }
    }

I know that, as written that this attack is vulnerable to the '' OR '=' injection--but for the above code what other kinds of injection attacks might happen? It really seems like most well-known injection attacks really relied upon the ability to UNION or in some way to stack SQL commands--assuming that developers are using the updated MySQLi syntax, what other kinds of injection attacks are worth preparing for? And can we effectively not worry about the 'stacked-based' injection attacks?

I would love any and all resources that you can throw at me, as I am hoping to be able to share this with the greater security community.

Your question is quite broad, but I think it can be boiled down to:

  Have SQL Injections changed with PHPs change from mysql to mysqli (because of missing stacked query support)

The answer: No, they haven't. mysql also does not support stacked queries.

Regarding the limitations of not having stacked queries: Apart from UNION-based injections, you still have error based and blind injections with subqueries, which don't necessarily require UNION (see eg here; there are other bypasses in case UNION is actually filtered out, but that's another question). You are stuck with the type of query you are in (SELECT, UPDATE, DELETE, etc), but apart from that, you have a lot of possibilities (but again, this seems like another question).