Firewall with packet capture and inspection? Is there such thing as a firewall with packet inspection? Most outbound firewalls simply prompt the user with "program.exe is trying to connect to the internet - allow or deny?". I find it impossible to make an informed decision without seeing the actual content being transmitted.

Ideally what I'd like is an outbound firewall that gives me a third option: "inspect packets" which kicks in a wireshark style monitor that lets me see what the application is trying to send and receive. This would allow me to pass packets one-by-one until I'm reasonably confident that the application is legitimate.

It would be great if such a firewall existed for Windows but I'd also be curious to hear if there's anything available on other OSes or in server environments too.

You probably won't find it for desktop firewalls. That feature requires a much higher level of network knowledge than most users have/are willing to study.

Therefore, firewall companies won't put much effort developing something like this.

On the other hand, professional network appliances tend to be more inclined in that direction. I know that the Palo Alto Firewalls have some tools for capturing and analyzing traffic "wireshark style".


Is accession number+service (CPT code)+date of service considered PHI (protected health information) under HIPAA? Imagine you are designing a system that's comprised of overdue worklists for doctors (e.g., Doctor X you have 3 overdue studies to look at).  In the notification, you identify the studies they have to review by their accession number / CPT code / date of service, so that the doctor can see what studies they are missing (in case they disagree that they have three overdue studies).

Could that accession number / service / date of service be included in an email that may be sent or forwarded to a non-hospital system?

On the one hand, knowledge of the accession number+service+date, does not let you identify any patient (so I would say no) or the results of the study without additional information.

On the other hand, each accession number is tied to only one individual, so it is the type of PHI that is typically removed when anonymizing data for say research purposes.

I've answered this myself months after asking here based on HIPAA law (see page 66 - section 164.514).

To summarize: accession numbers (a unique identifying number) should be removed when de-identifying clinical data before being used for research purposes.  However, using accession numbers (without connecting to detailed patient data) for routine business purposes (in say generating doctor's overdue worklist) over unencrypted emails is probably fine, but the law is murky enough that you may want to avoid doing anyway.

An accession number on its own is a meaningless 6-10 digit number tied to each service done at some specific hospital.  Without having access to that hospital's specific database that ties  accession numbers to a specific service done on a specific patient, you cannot identify a patient.  You can easily argue in this sort of scenario, an accession # is not PHI and HIPAA specifically has an exception for experts determining that the risk that this number could be used to identify someone is negligible (as in this case).

However, if you are de-identifying clinical data (say an actual MRI scan or the detailed test outcome), it would be prudent to remove all accession numbers.  This prevents someone from using the normal database system to see who is tied to an accession number, and then using the poorly de-identified data to get detailed records they couldn't otherwise get.


Privacy implications of IDFA/IDFV? (iPhone/iOS) Apparently, iOS 6 introduced IDFA, "identifier for advertisers", which identifies your device so that advertisers can track you and send you ads.  It appears they also introduced IDFV, "identifier for vendor".

How do IDFA and IDFV work?  What exactly do they identify?  Are they different for each app on your phone, or are they the same for all apps on your phone?

What are the privacy implications of IDFA and IDFV?  Can they be used to track you?  How do they compare to UDID and to cookies on the web, as far as the privacy impact?

Do users have any way to tell which apps are gathering this information?  Also, if you set "Limit Ad Tracking" to On in settings, what happens under the covers?  How does that change what information apps receive?

Background: Apple Has Quietly Started Tracking iPhone Users Again, And It's Tricky To Opt Out; Apsalar's Take on Apple's Recent Announcement; How To Get Advertisers To Stop Tracking Your iPhone.

The IDFA (advertisingIdentifier) identifies the device but is reset when the device is erased. The IDFA is intended for use by advertising networks which need to be able to identify users across apps.

As far as privacy is concerned, the IDFA is very similar to the UDID, but does the following to mitigiate the UDID privacy issues:

Unlike the UDID, the user
can prevent apps from accessing the IDFA, by turning on "Limit Ad Tracking" in the device settings.
The IDFA is reset when the device is erased.
Access to the IDFA is probably limited only to advertising networks and not available to most app developers. This is not known as fact, but is an assumption of the developers community.

The IDFV (identifierForVendors) is unique per app vendor so it doesn't present any real risk to privacy. I would guess that the IDFV is a one-way function of the UDID (which still exists - only the API was deprecated) and the vendor ID. Incidentally I suggested that Apple do this when they originally announced the deprecation of the UDID API.


Can ransomware affect hidden or "unmounted" drives? I have an understanding of how ransomware works to a certain extent.  But, I would like some input as to what it can do if the volumes/drives that are on a workstation are not visible or are not formatted according to a Windows workstation.

In my setup I have two situations.

I use TrueCrypt (old program but it works for me), in which a reserved drive letter appears as an unformatted drive unless you mount your personally secured/encrypted drive.  In this case, the Ransomware would only see an unformatted  drive (let's say drive X:).
I have a partition that I set to hidden using a partitioning tool.

In either of these scenarios, can a ransomware attack actually take out the data or not?

There is no practical answer to this. It all depends on how good the malware was designed.

Some are just as basic as encrypting basic documents, some go as deep as disabling any methods of back-up and restore and accessing the disk in a more advanced manner.

Currently, there is no anti-truecrypt malware (i.e. something specifically designed to take TC into account).

What danger can exist is the following: a keylogger could find the password that you type to access the encrypted files or volumes and that would give it access to them, but again, this must be specifically designed to do so. An average malware will not dig for TC volumes or container files.


Why do email that didn't pass SPF checks go to my mailbox? I tried a website that supposedly sends spoofed email. I sent myself an email impersonating another email address and the message showed up in my yahoo mailbox even though according to the headers it did not pass the spf check because the server used to send the message was not authorized to send messages as the domain it impersonated. Why do these email pass? Is there a legitimate use for spoofing email headers?

Here are part of the headers:

From "Bill Gates" Sun Feb 28 16:31:51 2016
X-Apparently-To: MyEmailAddress@yahoo.com; Sun, 28 Feb 2016 16:31:06    +0000
Return-Path: <bill@microsoft.com>
Received-SPF: fail (domain of microsoft.com does not designate 46.167.245.71 as permitted sender)

I'm also looking for some information about SPF and DMARK, DKIM as well as technology related to smtp, smtp security and email spoofing (apart from the smtp rfc). I thought this would be a great place to ask.

When a message fails the SPF check, it doesn't necessarily mean that the message is spam.  For example, it's possible that the sender of a legitimate message sent the message from his gmail address, but using an SMTP server other than Gmail's (e.g. his ISP's SMTP server, or a hosted SMTP service).  In that case, the message would fail the SPF check, but the message is legitimate.  So, the SPF check is just one of many checks that spam filters use to determine if a message is spam.

For this reason, some mail providers now publish DMARC records, which are used to tell spam filters how to handle a message based on the result of the SPF check (and/or DKIM check).

For info on SPF and DKIM, see https://www.ultrasmtp.com/kb/messageauthentication.php

For more info on DMARC, see https://dmarc.org/


How does one detect and deter golden SAML attacks? How does one defend, detect and deter golden SAML attacks?

Several methods could be used to detect'em:

Correlating service provider login events with corresponding authentication events in ADFS and Domain Controllers

Identifying certificate export events in Active Directory Federation Services

Customizing SAML response to identify irregular access

Detecting malicious Ative Directory Federation Services trust
modification

Those methods are well documented here
And for mitigation, the best you could do is following best practice guides and recommendations, Microsoft provides an excellent resource for doing this.
FireEye published a well-detailed paper on the attack and provides some extra guidance on ADFS attack mitigation: Remediation and Hardening Strategies for Microsoft 365 to Defend Against UNC2452
If not using ADFS this should help.


Is there a term for over-zealous security policies? I work for a company that deals with medical data, so we must comply with HIPAA as well as our desire for plain old corporate security.  However, our ops team is quite zealous about the extent to which things are locked down.  I don't need to give specific examples, I think, because that's not the point of the question, but the outcome is that it can be difficult to get things done without jumping through many hoops, and in a few rare cases, the security policies contradict each other in a way that some tasks are simply impossible. This is not "Security Theatre" because we actually do require some amount of security, which is in fact accomplished.  A friend of mine I posed this question to put it quite well:

  I know what you mean. Sometime security measures are so strict that
  they actively encourage people to subvert them to get what they need
  done and you end up with less visibility and control of what is being
  done.

Is there a term for this sort of over-zealous security that practically begs to be subverted?  I don't want to discuss merits or otherwise of such policies, and again, it's not "Security Theatre" for reasons outlined above.  I'm just curious if there is any generally accepted term for this because I'm coming up blank.

"Over-zealous security policies" works for me. ;)

An engineering term I have used to describe the situation where conflicting security policies prevent work from being accomplished is "overconstrained" (the equivalent mathematical term is overdetermined). The principle is that there are multiple conditions placed on a particular system, all of which it is mathematically or physically impossible to satisfy simultaneously.


Can you sniff traffic to ip address from outside of your network? I am not sure what it is called or even if it is possible but here is the scenario I am curious about:

I login to a site that does not use SSL/TLS to do some work (unfortunately I must use this site and have already told the owners to fix it).

My question is simply can someone (and if so, how) sniff traffic to that site from a network that is not my own.

For instance, I login from my work pc which is presumably in a secure network (IE no one is physically hanging around in the parking lot doing a MitM attack) but can someone not on my work's network simply sniff traffic to the http site itself and simply intercept the POST request there regardless of where I am?

To clarify, I am looking to know if it is just possible without using 'hacks' but instead something like tcpdump. so for instance, I know that if an attacker has compromised the webserver or my work pc they can easily sniff my traffic but at that point, they are no longer outside of my network anyway.

Here is a picture I make.

Any node at any point along the traffic can sniff the traffic, including all the ISPs along the way.

The question, then, is what threats you wish to mitigate? If you what to protect against "small-time" attackers, then any point within the ISP's network is safer and you only have to worry about the ingress and egress points (server, client, local network connections, etc that you eliminated from the threat scope).


Could IMAP authentication be adapted to support 2FA? Theoretically? (If no, why? And if yes, why hasn't it been done?)

Could IMAP authentication be adapted to support 2FA?

IMAP can support multiple authentication methods, i.e. the protocol is extensible.

  ...  why hasn't it been done

It has been done. Modern clients like Thunderbird support XOAUTH2 which basically uses a web client with OAuth2 which then can do all the normal things OAuth2 can do including 2FA.


Rate limiting in mobile application We have implemented in our mobile application a rate limiting access after 5 failed attempts though a web based services (API).
We lock down the account for 30 mins if the fives attempts have been performed.

My concern is about the customers who are using the app.. what if someone tried to run a script that will try to brute forcing and keep the lock the customers from using the application (30 mins).

Is there any solution than can be applied in this case.. as Captcha will not be because its an mobile application.

You can use Proof of Work to limit the speed at which brute force programs can try to login. This is a user-friendly alternative to CAPTCHA

Proof of Work requires the client calculate the prime factors of a very large number, and this takes time

Send the large number to the client. If they don't provide any answer, immediate NO. If they provide an answer, it's fast to check on the server. If they pass, let the login attempt proceed

You can also use a device cookie to bypass account lockouts. For example, if client C has previously successfully authenticated for user U, store an HMAC'd cookie on client C . Having this cookie lets that client bypass account lockouts for that username.


Is Telegram now secure enough to consider? Though there have been similar questions left stagnant over the years, this seems relevant with news of WhatsApp privacy policy changes.

Has Telegram made serious improvements to issues like dangerous defaults and rolling their own crypto to be worth seriously considering?

This has already been answered and recently updated (as of yesterday).

Is Telegram E2E Still Insecure?


What does a MCSE need to learn to be proficient regarding *nix security? I have a top notch Windows MCSE/MCSD (developer) who wants to broaden his skills with Linux security... but needs to update his skills from the Ultrix / Yellowpages days of 40 years ago.

What resources should I point him to?  I'm hoping to find things that will go at a decent pace for someone of his caliber.

To scope this a bit, I'm mostly interested in (1) reading and analyzing logfiles (2) host level security common to most distributions of Linux

He could cherry pick from the various security benchmark/checklists offered by:

  http://cisecurity.org/
  The Center for Internet Security (CIS) is a non-profit enterprise whose Benchmarking and Metrics Division helps organizations reduce the risk of business and e-commerce disruptions resulting from inadequate technical security controls. The Division provides enterprises with consensus best practice standards for security configurations, as well as resources for measuring information security status and for making rational decisions about security investments.

  http://iase.disa.mil/stigs/checklist/
  Defense Information Systems Agency (DISA)

  http://web.nvd.nist.gov/view/ncp/repository
  http://csrc.nist.gov/fdcc/faq-common_security_configurations.html
  The National Checklist Program (NCP), defined by the NIST SP 800-70 Rev. 1, is the U.S. government repository of publicly available security checklists (or benchmarks) that provide detailed low level guidance on setting the security configuration of operating systems and applications.

Next, spin up a couple Unix based systems on Amazon EC2 or Linode (lots of distributions to choose from).

Then setup & install OSSEC and gain experience reading and understanding the alerts generated by OSSEC (host intrusion detection system).

Bonus:  Install and/or fire up a few services & applications (ssh/ftp/mail/dns/pop/http/etc.) and expose them to the public Internet.  The more the merrier (i.e. more logs will be generated and more OSSEC alerts will be triggered).


What does my iPhone see/track when connected to my macbook PC? Recently hooked up my work iPhone to my personal MacBook to charge the phone.  I viewed some websites that would be questionable on the MacBook using the hotel WiFi.

What does the iPhone track when it is hooked up through USB to the MacBook; i.e., does it track the content viewed using the PC?

Your iPhone won't directly see what you did on your mac while you're charging it. But there's a catch: your browsing history might be synced via the cloud. If:

You were browsing using Safari
You were not browsing in "incognito"
You have iCloud sync activated
You're logged on your iPhone with the same Apple user as the one used on your mac

I'm pointing this out in case you used your personal Apple user on the iPhone e.g. to download apps without creating a new one.


ISO27001 and Linux/Ubuntu My company has an ISO 27001 certification. They provided me a new laptop with Windows 8 OS in it. I asked if I can have a Linux/Ubuntu OS installed, they said that it is not possible due to the ISO 27001 standards.

Is it true or do the technical people of the company not know how to install Linux/Ubuntu?

One of ISO 27001 requirements is management of access control to company's IT resources.

If you just install Ubuntu on your laptop, all the access control will be managed by you directly, instead of your company. So when, for example, your manager will want to fire you, then your IT department won't be able to block your local laptop account in a convenient moment.

Of course Linux can be connected to central authentication systems (AD, IPA, CAS etc.), but first your IT department needs to build required competences (a single employee knowing how to do that is not enough since all ISO standards require written, repeatable and verifiable processes).

On the other hand, knowledge on how to connect Windows to AD, and deploy a central authentication, is more or less common in IT, so probably your company already has ISO processes for it. Therefore, they allow you to use only Windows.


Network isolation for a single device I'm planning to set up a local server (Minecraft) accessible by only one other person connecting from a static IP. It's on a dedicated machine that I can easily wipe (Raspberry Pi).

I'm looking to expose only one port, keep the OS up to date, run everything via a limited user, etc... but for the purpose of discussion, let's assume that it's a given that it gets hacked.

I'm not a security expert, up until now my policy has been "it's easier to guard a house without doors." I basically don't open up my network at all -
 I even force friends to use guest wifi. So my ideal setup here would still allow me to shut down most access to my network.

Preferably, I'd like to have the server on a completely separate network (and maybe the answer is just "sign up for a Digital Ocean droplet"). DMZ is what I'm seeing people recommend, but there's just as much talk saying that consumer-grade routers rarely get it right, and that a bad implementation can be even more risky than port forwarding.

How can I tell if my router implements DMZ correctly?
If it is implemented correctly, is it something I can trust to keep
my home network completely isolated from a compromised device?
Am I over-rating the dangers of exposing a single port? Are there better ways of allowing remote access from a single remote IP?

Security is a function of alertness (also = paranoia at some level) - so it's nice that you practice security all the time even when it's your home network.

How can I tell if my router implements DMZ correctly?

Options:

Audit the router in question. It usually needs so much effort that might put this in "disproportionate effort (to benefit)" category. Works nicely if your day job involves auditing network devices, coz you're already half-way there on TTPs.
Setup an IDS with good exception analysis and hope to catch it if/when the router screws up; and then investigate to find out where/how it failed. Needs more resources (esp., time & patience) - but it'd be my choice coz it's more practical. We need the detection capabilities anyway.

If it is implemented correctly, is it something I can trust to keep my home network completely isolated from a compromised device?

Within reason - subject to your confidence in "if implemented correctly", yes. I'd still say trust but verify (healthy skepticism?) - so setup some level of detection capability if you can.

Am I over-rating the dangers of exposing a single port? Are there better ways of allowing remote access from a single remote IP?

Short answers - Yes (over-rating dangers) and May be Not (whitelisting an IP address is usually good enough).

Let's think like an adversary who might target you. When reasonable steps are taken at the network level, it is much simpler to try to compromise you / your server through other methods than try to hack through the infra.

So in this setup, I'd say your risks are more likely to be (than not):

human compromise (phishing + keylogger on whitelisted endpoint)
higher / app layer vulnerabilities (in the gaming stack) that your whitelisting should still protect against, unless the vector involves your whitelisted remote endpoint.
a zero-day on your router + higher layer vuln + ... It's not unusual that big hacks need multiple exploits chained together... so that's what you're looking at.

It's a good situation to be in - that an adversary needs multiple exploit chains and maybe burn a zero-day or two to get at you. Even better - when after all that, you detect the adversary quickly and react to thwart any impact. This is where your strong detection/response kung-fu serves well.


Usage of Android Keystore I'm using the Android Keystore to store an asymmetric cryptographic (to decrypt a file containing an asymmetric key). I did that because I want to encrypt a large set of data and an asymmetric isn't enough ans they keystore has symmetric keys since SDK 23.

In classic HSM you can't access to the cryptographic keys, you only send your data and the HSM does the cryptographic operations. But in Android you retrieve from the Keystore the key to do manually the operations (With Cipher etc..). Is it safe?
If it's not safe, is it possible to wipe the keys from the memory after using them? (At the end of my functions for example)
If it's safe, what are the risks? Having the RAM corrupted by a virus?

Let's take a look at the Android Developer docs "Android keystore system". We'll need to break this down depending on how you use the KeyStore object. If you're using the Android KeyStore KeyStore.getInstance("AndroidKeyStore"), then:

1) If the device the app is running on has hardware-backed secure storage, then

  Key material may be bound to the secure hardware (e.g., Trusted Execution Environment (TEE), Secure Element (SE)) of the Android device. When this feature is enabled for a key, its key material is never exposed outside of secure hardware.

The "Android keystore system" article gives more info on how to use this feature.

2) If the device does not have hardware-backed secure storage, then:

  Key material never enters the application process. When an application performs cryptographic operations using an Android Keystore key, behind the scenes plaintext, ciphertext, and messages to be signed or verified are fed to a system process which carries out the cryptographic operations.

Presumably this system process is written in C where they have more control over memory management and can zeroize the key properly when it goes out of scope in your application (which leads me to my rant about garbage collectors...)

3) If for some reason you use KeyStore.getInstance("JKS") as in the examples here - maybe you need access to the private keys for some reason, or you need to load / store the private keys in a .jks file - then No, you can not wipe it: because the Java garbage collector is famous for returning memory to the OS without clearing or zeroizing it. From the Android developer docs, I don't see any evidence that the Dalvik garbage collector works any differently.

Moreover, one of the mechanisms of the Java garbage collector is to make a copy of any heap variable that's currently referenced by your program and then free the old heap. This means that a copy of your private key may be freed back to the operating system even before it goes out of scope.

Bottom line: If the Android KeyStore object is used properly, your private keys will remain securely inside the Trusted Execution Environment (TEE), Secure Element (SE)) or System process.

If for some reason you do bring the private key into your app, then all bets are off because in Java / Dalvik / Android, once something is in your app's memory, it is nearly impossible to clear or zeroize it.


Whitelist ASV IP for PCI external scan I'm using an external WAF (Cloudflare). My server firewall is setup to only allow connections from the WAF.

Currently, I'm using McAfee Secure for the PCI compliance external vulnerability scan. Due to my firewall, the scan did not detect any open ports. McAfee Secure insists that I whitelist their IP so that they can bypass both my firewall and WAF.

Is it normal for a PCI compliance external vulnerability scan ASV to ask you to whitelist their ip and allow them to bypass both your firewall and WAF for an external scan? This seems odd to me.

Yes, it is very normal for compliance scanning software to require the scanner's IP to be whitelisted in the local firewall.

The concept of compliance scanning is to scan the entire system to ensure a fully adhered to baseline at the very least.  That's excellent that the firewall is doing its job, you now know that.  But you also need the compliance scanner to scan the system to ensure patching, account, local security, general settings, etc, compliance as well.  In order to allow that, you'll need to give the external scanner full network access to the target systems, which includes whitelisting the scanners IPs in the firewall.

Does this all makes sense?


Does mounting a LUKS partition authenticate it? Can I be sure that the (unencrypted) contents of my LUKS volume were not tampered with if it accepts my passhprase on an otherwise trusted system?

In other words, can an attacker with access to my encrypted LUKS partition create another encrypted partition with the same passphrase(s) as my original, but new data? I know they can't get the encryption key nor the passphrase, but can they create a new encryption key and encrypt it so that the original passphrases can decrypt it?

can they create a new encryption key and encrypt it so that the original passphrases can decrypt it?

I don't see how that would be possible.

As you already  know, Luks works by generating a random "master" key which is stored in the Luks header and used to encrypt the contents of the disk. Actually there are 8 key slots which reference encrypted copies of the master key. If you open a Luks partition, you provide a passphrase to decrypt one of the encrypted master copies, which will then be used to decrypt the contents of the container.

Encrypting and decrypting the master key is done using symmetric encryption. So if someone wanted to create his own Luks partition which accepted the same passphrase as yours, he'd need to know at least one of your passphrases so that when you entered your passphrase on the fake luks container, the passphrase would be able to correctly decrypt the master key with which the data in the container was encrypted.

The small print

  Can I be sure that the (unencrypted) contents of my LUKS volume were not tampered with if it accepts my passhprase on an otherwise trusted system?

No. Not knowing the passphrase does not protect the Luks container from tampering. An attacker can always overwrite any part of the container with any data he chooses; it's just that usually, when you open the container and decrypt whatever was changed, it will decrypt to random nonsense and possibly break the file system, which will then notify you that the file system got corrupted.  However, it might take a while before you access a section of the filesystem that was tampered with; until you access it or run a filesystem integrity check, you won't notice any tampering was done.

That's probably not what you're worried about, but how about this scenario:

You have a Luks partition. You're very diligent, so you back it up onto another hard drive using dd (e.g. making a byte-by-byte copy of the partition).

The attacker gets hold of your backup hard disk. What he can do now is compare the two disks, the new one and the old one, and figure out there are changes. When he finds a section that looks promising to him, he can take the old section from the backup drive and copy it to the exact same spot on the productive luks partition.

Sometimes, this will fail and also result in a corrupted filesystem. However, in some cases it will work, e.g. it will change some file or directory contents back to what they were when you took the backup, without giving you any warning that the Luks partition was modified by someone else. This attack is more likely to work on older, non-journaling filesystems and it will most likely always fail on copy-on-write filesystems such as btrfs.

So, to sum up, making exact byte-level backups of a Luks partition might enable an attacker to transparently revert any change made on the productive partition to the version in the backup.

If that's a problem, you can avoid it by creating a fresh luks partition on the backup medium and copying the plaintext filesystem data inside the container instead of cloning the Luks container itself.

Making your Luks container tamperproof

In order to make your Luks container tamperproof, you can build a hash sum over it whenever you're done using it and close it. You store this hash sum somewhere safe. Before you open the container the next time, you again build the hash sum and compare it to your stored one. If they match, nobody tampered with it.

The problem with this solution is that file systems are usually very large and building a hash over the whole filesystem data can take hours or days.


SPF and Articles from News Sites Suppose I activate SPF in my environment.  I am now strictly enforcing SPF records from sending domains.  There are many execs in the company who like to forward news stories from CNN and such to their co-workers.  When I send the article, CNN asks me for my email address and the email addres of the person I am sending it to.  So I fill out joe@somehwere.com in the sender addres an bob@somewhere.com in the to address.  Now my DNS records for somewhere.com only lists the two SMTP servers at my company (as it should).  The email comes in from CNN's SMTP server and is blocked since its IP is not registered in my SPF record?

This is one 'drawback' I see to SPF.  Is the practice of sending emails from web sites like this not a good idea from a security standpoint?  Are there any other potential issues with strictly implementing SPF?

To me, that's the primary benefit of SPF, not a drawback.   What's happening is that you've  prevented CNN (and spammers) from spoofing your email servers.   That's a terrible practice that they're engaged in, and I'm sure they're doing it primarily to harvest email addresses for their own uses, marketing or otherwise.   If your users are complaining that the links aren't getting through, I'd use it as an opportunity to teach them how to paste a URL into Outlook and send it properly.


Will removing the harddrive from a computer protect it from persistent malware? If I took a clean computer/laptop and removed the harddrive, lock the BIOS with a password, then did all my work from a live OS like Knoppix, will this help reduce the risk of persistent malware infection? Assuming the computer was free from malware to begin with and that the image used is clean.

Excluding physical access to the machine, what threats are possible for a use case like this?

Assuming that it's a CD/DVD Knoppix, and not a USB based one, you're basically running a computer with no writable storage at all, so yes, of course it will reduce the risk of persistent malware infection.

At the same time, you cannot update your system [permanently], so you would be somewhat easier to infect than using an up-to-date system.

To counter that, you could 'extend' your boot procedure to include securely updating everything on each bootup (and that would still miss kernel updates), which may take a while. Also, if you never rebooted your system, not having a hard disk would be irrelevant, since it would be enough to infect the current session.

Please note that this setup is not completely risk free. An attacker could place a malicious code providing the persistence in one the devices' firmware (the BIOS password is not helpful here, since that would only deter physical attacks).

Finally, remember that you might have a 'persistent infection' on a diskless machine by periodic reinfection. Suppose we have a setup with multiple diskless machines that boot from a clean state and within 5 minutes have all patches applied (since otherwise they would be vulnerable to eg. CVE-2008-4250). You may find out that you have all these computers infected, and that when you reboot one of them, their partners reinfect it before it manages to update itself.

Of course, if you are not building a kiosk, and expect to work with any kind of persistent data, an infection might be carried on usb sticks, mail attachments, etc. just as could happen to any machine with a hard disk.


Does VNC need hardening when inside LAN (home network)? This is a very newbie question, but I would just like to make sure that I'm not missing anything: If I connect via VNC protocol to my various servers etc. inside my own LAN (home network), then should I consider hardening my VNC in any way? (E.g. VNC through SSH etc.). Or is it really pointless? I mean when initiating VNC connection inside the LAN means no traffic should be ever routed via public Internet anyway when I have my all VNC server applications installed locally in my servers, right? I'm using Remmina client in my Linuxs and UltraVNC servers and clients in Windows'.
I also use RDP in Windows, but RDP is already natively encrypted (though it's debatable whether enough for enterprise use), so I guess I really don't even need to worry about hardening RDP connections any further when connecting inside my LAN (I've also changed RDP default ports in my desktops).

Even if the internal network seems to be under full control and the internal VNC or RDP services are not directly exposed to the internet, this does not mean that they cannot be accessed for sure by an attacker. Just by visiting a website controlled by an attacker the browser could be instrumented by this attacker to scan the local network, access internal services or even open arbitrary ports from the internet.
The latter was 2008 demonstrated with UPnP requests issued from a flash application and a few month ago with the most recent browsers at this time again, see NAT Slipstreaming. This way unsecured internal services could be made accessible from the internet.
Therefore internal services, including RDP and VNC should still be hardened, i.e. have latest patches and proper access control.


Stack Overflows - Defeating Canaries, ASLR, DEP, NX To prevent buffer overflows, there are several protections available such as using Canary values, ASLR, DEP, NX. But, where there is a will, there is a way. I am researching on the various methods an attacker could possibly bypass these protection schemes. It looks like there is no one place where clear information is provided.
These are some of my thoughts.

Canary - An attacker could figure out the canary value and use that in his buffer injection to fool the stack guard from detecting an exploit

DEP, NX - If there are calls to VirtualAlloc(), VirtualProtect(), the attacker could try to redirect code to these functions and disable DEP, NX on the pages that he wants to inject arbitrary code on.

ASLR - No clue . How do ASLR and DEP work?

Canary
Stack canaries work by modifying every function's prologue and epilogue regions to place and check a value on the stack respectively. As such, if a stack buffer is overwritten during a memory copy operation, the error is noticed before execution returns from the copy function. When this happens, an exception is raised, which is passed back up the exception handler hierarchy until it finally hits the OS's default exception handler. If you can overwrite an existing exception handler structure in the stack, you can make it point to your own code. This is a Structured Exception Handling (SEH) exploit, and it allows you to completely skip the canary check.

DEP / NX
DEP and NX essentially mark important structures in memory as non-executable, and force hardware-level exceptions if you try to execute those memory regions. This makes normal stack buffer overflows where you set eip to esp+offset and immediately run your shellcode impossible, because the stack is non-executable. Bypassing DEP and NX requires a cool trick called Return-Oriented Programming.

ROP essentially involves finding existing snippets of code from the program (called gadgets) and jumping to them, such that you produce a desired outcome. Since the code is part of legitimate executable memory, DEP and NX don't matter. These gadgets are chained together via the stack, which contains your exploit payload. Each entry in the stack corresponds to the address of the next ROP gadget. Each gadget is in the form of instr1; instr2; instr3; ... instrN; ret, so that the ret will jump to the next address on the stack after executing the instructions, thus chaining the gadgets together. Often additional values have to be placed on the stack in order to successfully complete a chain, due to instructions that would otherwise get in the way.

The trick is to chain these ROPs together in order to call a memory protection function such as VirtualProtect, which is then used to make the stack executable, so your shellcode can run, via an jmp esp or equivalent gadget. Tools like mona.py can be used to generate these ROP gadget chains, or find ROP gadgets in general.

ASLR
There are a few ways to bypass ASLR:

Direct RET overwrite - Often processes with ASLR will still load non-ASLR modules, allowing you to just run your shellcode via a jmp esp.
Partial EIP overwrite - Only overwrite part of EIP, or use a reliable information disclosure in the stack to find what the real EIP should be, then use it to calculate your target. We still need a non-ASLR module for this though.
NOP spray - Create a big block of NOPs to increase chance of jump landing on legit memory. Difficult, but possible even when all modules are ASLR-enabled. Won't work if DEP is switched on though.
Bruteforce - If you can try an exploit with a vulnerability that doesn't make the program crash, you can bruteforce 256 different target addresses until it works.

Recommended reading:

Corelan - Chaining DEP with ROP
Corelan - Bypassing Stack Cookies, SafeSeh, SEHOP, HW DEP and ASLR
ASLR/DEP bypass whitepaper (PDF)


What makes an Android application vulnerable to SQL Injection? Definition of SQL Injection

SQL injection is a code injection technique, used to attack data-driven applications, in which malicious SQL statements are inserted into an entry field for execution (e.g. to dump the database contents to the attacker).

How SQL Injection impacts the Android O.S

The SQLite used in android apps are fully functional databases, so just like SQL Server or MySQL box they can be susceptible to SQL injection. SQL injection typically works by adding data to the query string or adding data in a form field; to give hackers access to a database or unauthorized logins. SQL Injection is usually used to attack Web Views or a web service but it can also be used to attack Activities.

The root cause of the SQL Injection vulnerability is due to the use of dynamic or concatenated SQL queries. If SQL queries are constructed by concatenating user supplied inputs; The user can then supply SQL attack vectors instead of valid inputs and manipulate the backend SQL query.

The injection process works by prematurely terminating a text string and appending a new command. Because the inserted command may have additional strings appended to it before it is executed, the injected string is terminated with a comment mark “–”. Subsequent text is ignored at execution time.

My Question

Although I understand what SQL Injection is and how SQL Injection can take place. I don't know what factors makes a selection of Android code vulnerable to such an attack.

SQL injection attacks apply when an application uses SQL and carelessly assembles SQL requests with attacker-provided elements. Here, "carelessly" means "without using prepared statements". Prepared statements are the correct way to do SQL with externally provided data; many developers try to think of it in terms of "escaping quoting characters", which is a bad method and leads to disaster (even though some escaping ultimately happens, only prepared statements guarantee that it is done properly).

Android is not a factor in all this, except very indirectly: Android comes with SQLite, hence developers are very tempted to use it and thus fiddle with SQL, even in cases where it is not strictly necessary. When your only tool is a hammer, problems had better be nails, because there's going to be some serious hammering. Of course, when developers are given the power of SQL but are not careful enough to use it properly, then SQL injection attacks become a definite possibility.

Another effect is that Android applications are based on a Java-like language, which is inherently protected against buffer overflows (because all array accesses are systematically checked) and double-free and use-after-free situations (because of the GC-based memory management). Therefore, other kinds of attacks mechanically constitute a bigger proportion of all overall vulnerabilities. Having lots of SQL injection vulnerabilities in Android apps may be, in fact, the result of having comparatively much fewer of other kinds of attacks.


backdoor php trojan still dangerous on my local machine? I recently removed and fixed a lot of backdoor trojans in some files in one of my servers, and I copied those files to my local computer. But the issue is that now that I run the virus scanner on my computer, it says they are dangerous and need to be deleted.

So far as I know, you can't execute php files if they are not in a server, so why does it say this? Because of the regx and base64 functions calls? Or is it actually possible to get hacked from these files in a random place in another computer which is not a server?

If I understand your question correctly, anti-virus will report a file as malicious even if that file cannot be executed on the machine it is on. For instance, a Windows-only virus found on a Mac can still be identified by anti-virus as malicious.

This is a good thing because you might pass on those files to others. Malicious is malicious, even if there isn't an imminent threat to the local machine.


Which algorithm is safest if we exclude AES, Twofish, Serpent and Whirpool? TLDR: Which algorithm is safest if we exclude AES, Twofish, Serpent and Whirpool?

My threat model is archiving and backing up important and private files.

Files will be stored in many places including clouds, so count them as publicly accessible.

I plan to store them for the next upcoming 100+ years in the future. Of course, nobody can imagine what computers will look and work in 2100 - BUT at least I can try to mitigate security risks.

Super strong and random password is a sure thing.

So I encrypt those files with VeraCrypt using AES-Twofish-Serpent cascade, Whirpool as the hash.

But in case that someday a flaw will be found in any given algorithm or in its implementation (in VeraCrypt itself), I want to add an additional layer of protection - another software and another algorithm.

BCArchive seems like a great opinion. (Do you agree?)

They state:

"Compressed archive with strong encryption

BCArchive utilizes the following encryption algorithms, standards and specifications:

Symmetric algorithms: Rijndael (AES), Blowfish-256, Blowfish-448, IDEA, CAST5, GOST 28147-89, Triple DES
Secure Hash Algorithms: SHA-256, SHA-1, MD5 and RIPEMD-160
Asymmetric (public/secret key pair) algorithms: RSA, ElGamal / Diffie-Hellman
Specifications for public/secret key pair format: PKCS #12, X.509
PKCS #5 recommendations for the implementation of password-based cryptography
RFC 2440 specifications for session keys encrypted by symmetric or public key encryption algorithms"

When I open advanced settings to modify it, I am given these options:

Which algorithm/hash method mentioned above is best if we exclude AES, Twofish, Serpent and Whirpool?
I think that in case of VeraCrypt AES-Twofish-Serpent is better than Serpent-Twofish-AES because the outermost encryption is strongest (AES will be the first layer needed to break - do I understand that correctly?). Do you agree? Please give me your opinions and do not say that it doesn't matter.

(And please, PLEASE, do not say this is overkill.)

I won't say that it's overkill, but I will say that I think you need to get a better understanding of cryptography before attempting to secure your data for 100+ years.

Encrypting in a cascade is actually difficult to do correctly. You need each algorithm to be truly cascaded such that it's impossible to determine if one has been successfully broken without breaking all the others. If you use one encryption program and then another one on top of that, an attacker will be able to break each cipher one at a time. A true cascade (as VeraCrypt does) would make it such that an attacker would need to break every cipher at once to know whether or not they have succeeded. Unless you either modify the code of VeraCrypt yourself, or use an alternate utility that allows true cascading, what you're doing is a bad idea.

Let's go over the ciphers you have available. Blowfish, IDEA, CAST5, and 3DES have a 64-bit block size, making them insecure for encrypting large amounts of data. 3DES is further vulnerable to linear and differential cryptanalysis which becomes possible when encrypting very large amounts of data. This leaves only GOST and Camellia. The GOST algorithms have not been extensively analyzed, so I would not trust them for long-term use. This only leaves Camellia, a cipher with a high security margin. I would suggest Camellia.

Now let's go over the hashing algorithms you have. For PBKDF2, an algorithm that iterates a single hash multiple times to slow down brute force attacks, the choice of algorithm doesn't particularly matter. However, let's exclude MD5, SHA-1, and RIPEMD-160 anyway for being old. This leaves us with SHA-256, SHA-512, SHA3-512, and Skein-512. SHA-256 and SHA-512 are both quite secure. The former is, paradoxically, slower than the latter on 64-bit CPUs. They are both good choices. SHA3-512 is based on the Keccak permutation, which has a remarkably high security margin. However, it's designed to be fast in hardware, not software. This means that an attacker with a hardware-accelerated SHA-3 implementation has a significant advantage. Finally, there's Skein-512. It is an ARX hash which is quite fast in software and is a solid choice, though it does not have nearly as much analysis as many of the others. Overall, I would suggest SHA-512.


Are there any Security Concerns to using Python F Strings with User Input Background
A while ago I started using F strings in Python but remembered seeing some security concerns with using them with user input so I have made a point of not using them for those situations.
Question
Are there security concerns to using python f strings with user input. For example, is it possible for a user to gain access to information that they shouldn't have access to.
Example
$ ./hello.py mike
hi mike

#!/usr/bin/python3

import sys

secrete = 'my secrete'

print(F"hi {sys.argv[1]}")

This program is basically a basic hello world that takes user input.  Is it possible for an attacker to supply an input that would exfiltrate the secrete variable or any other valuable data?

Python's f-strings are actually safer. Use them!

String formatting may be dangerous when a format string depends on untrusted data. So, when using  str.format() or %-formatting, it's important to use static format strings, or to sanitize untrusted parts before applying the formatter function. In contrast, f-strings aren't actually plain strings, but more like syntactic sugar for concatenating strings and expressions. As such, an f-string's format is predetermined and doesn't allow dynamic (potentially untrusted) parts in the first place.
Old-style formatting with str.format()
>>> data_str = 'bob'
>>> format_str = 'hello {name}!'
>>> format_str.format(name=data_str)
'hello bob!'

Here, your Python interpreter doesn't know the difference between a data string and a format string. It just calls a function, str.format(), which runs a replacement algorithm on the format string value at the moment of execution. So, expectedly, the format is just a plain string with curly braces in it:
>>> import dis
>>> dis.dis("'hello {name}!'")
  1           0 LOAD_CONST               0 ('hello {name}!')
              2 RETURN_VALUE

New-style formatting with f-strings
>>> data_str = 'bob'
>>> f'hello {data_str}!'
'hello bob!'

Here, f'hello {data_str}!' may look like a string constant, but it's not. The interpreter doesn't parse the part between {...} as part of the string that may be expanded later, but as a separate expression:
>>> dis.dis("f'hello {name}!'")
  1           0 LOAD_CONST               0 ('hello ')
              2 LOAD_NAME                0 (name)
              4 FORMAT_VALUE             0
              6 LOAD_CONST               1 ('!')
              8 BUILD_STRING             3
             10 RETURN_VALUE

So, think of "hi {sys.argv[1]}" as (approximately) syntactical sugar for "hi " + sys.argv[1]. At run time, the interpreter doesn't even really know or care that you used an f-string. It just sees instructions to build a string from a the constant "hi " and the formatted value of sys.argv[1].
Vulnerable example
Here is a sample web app which uses str.format() in a vulnerable way:
from http.server import HTTPServer, BaseHTTPRequestHandler

secret = 'abc123'

class Handler(BaseHTTPRequestHandler):
    name = 'funtimes'
    msg = 'welcome to {site.name}'
    def do_GET(self):
        res = ('<title>' + self.path + '</title>\n' + self.msg).format(site=self)
        self.send_response(200)
        self.send_header('content-type', 'text/html')
        self.end_headers()
        self.wfile.write(res.encode())

HTTPServer(('localhost', 8888), Handler).serve_forever()

$ python3 example.py

$ curl 'http://localhost:8888/test'
<title>/test</title>
welcome to funtimes

Attack
When the res string is built, it usesself.path as part of the format string. Since self.path is user-controlled, we can use it to alter the format string and e.g. exfiltrate the global variable secret:
$ curl -g 'http://localhost:8888/XXX{site.do_GET.__globals__[secret]}'
<title>/XXXabc123</title>
welcome to funtimes


Difference between directory traversal and file inclusion I guess the title says it all. There seems to be no obvious difference between directory traversal and file inclusion vulnerabilities.

But I guess there must be some difference, since the www.cvedetails.com use the following categorizations:

 Bypass a restriction or similar
 Cross Site Scripting
 Denial of service
 Directory Traversal
 Execute arbitrary code on vulnerable system
 Gain Privileges
 Http Response Splitting
 Memory Corruption
 Obtain information
 Overflow vulnerability (includes stack and heap based overflows and other overflows)
 Cross site request forgery(CSRF)
 File Inclusion
 Sql Injection

Among these we can notice both directory traversal and file inclusion, so they must be different somehow.

Basically, the difference is that with a file inclusion vulnerability, the resource is loaded and executed in the context of the current application. A directory traversal vulnerability on the other hand, only gives you the ability to read the resource.


How can I make sure that my Python code cannot be accessed by the user of my web app? I have a Python Program whose code I would like to protect. For sake of example, let's say I coded a novel function called "add" which does the following:

def add(n1, n2):
    return n1 + n2

I'd like to release this functionality to users so that people can add numbers together quickly, but I don't want them to be able to see my "secret sauce" (the code) of how I add numbers together.

After looking at this question (and specifically this answer) on Stack Overflow, I've determined that the best way for me to do this is to host a website that allows a person to type in two numbers, and then displays the result.

How can I do this without revealing my Python code?

If you want to protect the program, then running it as a service, rather than distributing the code is a normal way to go about that.

Make sure you know how to properly secure the service though and that you properly secure the data in transit, and consider availability issues (performance due to load/distance from the user; what happens if it does).

There is a lot more to protecting a service than throwing it on a server somewhere and making it available very a a RESTfull/SOAP interface. If I had more background I could give you a better suggestion on what you would need.


Would a hard-coded public key or fingerprint protect against MITM? Say there's a server and a client. Normally to connect and establish an end-to-end encrypted session, they'd have to carry out key exchange, which potentially gives an attacker the opportunity to perform an MITM attack.

Say that the client has the server's public key fingerprint or public key hard coded. (Which is better?) Upon connection, the server sends over its public key and the client compares the fingerprints. If they match, the client then sends over its public key and a secure session is established.

Is this a better solution than a key exchange? Are there any potential drawbacks? Will it work? Is there a better way?

TLS key exchange does not allow undetected MITM

The existing protocols e.g. HTTPS/TLS do not really provide an opportunity for MITM, the key exchange is secure. The certificate signing authorities might be compromised, but existing techniques such as key pinning prevent that - you might think of HPKP standard as the recommended implementation of "a hard-coded public key or fingerprint".

The drawbacks are simple - first, if a particular public key is hardcoded in the client, then it becomes very hard for the legitimate owner to change their public key when needed, e.g. to periodically rotate it, or to revoke a compromised key; and second, you still need to get the initial key from every server to the client which brings you right back to all the key distribution / key exhange problems.


Full credit card photo (front and back) accidentally sent to a customer service, what to do now? The VPN customer service told me to edit the photo so they could only see the beginning and ending of the credit number and I accidentally sent the full photo of the front and back.

Am I screwed?

Immediately call your bank's Lost and Stolen credit card number, found on the back of your credit card.  Tell them what happened, and they will take the appropriate action.


What do these signatures of my PGP key mean? When I was viewing the key information of my PGP key on a key server, I couldn't understand the meaning of some of the signatures.

Here is the key information from the key server(https://pgp.mit.edu/pks/lookup?op=vindex&search=0x50268311C7AD3F62):

Type bits/keyID     cr. time   exp time   key expir

pub   256E/C7AD3F62 2017-09-02

uid DDoSolitary <DDoSolitary@gmail.com>
sig  sig3  C7AD3F62 2017-09-02 __________ __________ [selfsig]

sub   256E/3A2792F6 2017-09-06
sig sbind  C7AD3F62 2017-09-06 __________ __________ []

sub   256e/3BEE2AA5 2017-09-02
sig sbind  C7AD3F62 2017-09-02 __________ __________ []
sig  sig3  C7AD3F62 2017-09-02 __________ __________ []
sig sbind  C7AD3F62 2017-09-06 __________ __________ []

I created this key with an encryption subkey(256e/3BEE2AA5) on 2017-09-02, and then on 2017-09-06, I added an authentication subkey(256E/3A2792F6).

I do understand that the sig3 of the uid and the sbind signature of the authentication key(256E/3A2792F6) are used to binding the master key with the uid/subkey. However, I got confuesed after seeing the signatures of the encryption key(256e/3BEE2AA5). Why are there three signatures for it and what are they used for?

If I import the public key listed in your post, I get this message:

$ gpg --import pkey2.txt
gpg: key 50268311C7AD3F62: 11 duplicate signatures removed
gpg: key 50268311C7AD3F62: 5 signatures reordered
gpg: key 50268311C7AD3F62: public key "DDoSolitary <Dxxxx@xxxxxx.com>" imported
gpg: Total number processed: 1
gpg:               imported: 1

As you can see, the extra signatures listed on your public key are labeled duplicates upon import and do not affect operation or trust of the key.

The extra signatures are most likely from key manipulations.  Each modification of your key produces a signature.

All the signatures and dates of the signatures can be extracted from the public key using the --list-packets option of gpg.

    $ gpg --list-packets pkey.txt |grep -A1 ":signature"

:signature packet: algo 22, keyid 50268311C7AD3F62
    version 4, created 1504334453, md5len 0, sigclass 0x13
--
:signature packet: algo 22, keyid 50268311C7AD3F62
    version 4, created 1508055794, md5len 0, sigclass 0x13
--
:signature packet: algo 22, keyid 50268311C7AD3F62
    version 4, created 1508055418, md5len 0, sigclass 0x13
--
:signature packet: algo 22, keyid 50268311C7AD3F62
    version 4, created 1508056216, md5len 0, sigclass 0x13
--
:signature packet: algo 22, keyid 50268311C7AD3F62
    version 4, created 1504703268, md5len 0, sigclass 0x18
--
:signature packet: algo 22, keyid 50268311C7AD3F62
    version 4, created 1504334453, md5len 0, sigclass 0x18
--
:signature packet: algo 22, keyid 50268311C7AD3F62
    version 4, created 1504703268, md5len 0, sigclass 0x18
--
:signature packet: algo 22, keyid 50268311C7AD3F62
    version 4, created 1508055418, md5len 0, sigclass 0x13
--
:signature packet: algo 22, keyid 50268311C7AD3F62
    version 4, created 1504334453, md5len 0, sigclass 0x13
--
:signature packet: algo 22, keyid 50268311C7AD3F62
    version 4, created 1508056216, md5len 0, sigclass 0x13
--
:signature packet: algo 22, keyid 50268311C7AD3F62
    version 4, created 1508055794, md5len 0, sigclass 0x13
--
:signature packet: algo 22, keyid 50268311C7AD3F62
    version 4, created 1508553430, md5len 0, sigclass 0x18
--
:signature packet: algo 22, keyid 50268311C7AD3F62
    version 4, created 1504334453, md5len 0, sigclass 0x18
--
:signature packet: algo 22, keyid 50268311C7AD3F62
    version 4, created 1504703268, md5len 0, sigclass 0x18
--
:signature packet: algo 22, keyid 50268311C7AD3F62
    version 4, created 1508055418, md5len 0, sigclass 0x13
--
:signature packet: algo 22, keyid 50268311C7AD3F62
    version 4, created 1504334453, md5len 0, sigclass 0x13
--
:signature packet: algo 22, keyid 50268311C7AD3F62
    version 4, created 1508056216, md5len 0, sigclass 0x13
--
:signature packet: algo 22, keyid 50268311C7AD3F62
    version 4, created 1508055794, md5len 0, sigclass 0x13

The dates are in UNIX EPOCH time.  These are all the signatures dates sorted and in a more readable form:

2017-09-02 06:40:53-00
2017-09-02 06:40:53-00
2017-09-02 06:40:53-00
2017-09-02 06:40:53-00
2017-09-02 06:40:53-00
2017-09-06 13:07:48-00
2017-09-06 13:07:48-00
2017-09-06 13:07:48-00
2017-10-15 08:16:58-00
2017-10-15 08:16:58-00
2017-10-15 08:16:58-00
2017-10-15 08:23:14-00
2017-10-15 08:23:14-00
2017-10-15 08:23:14-00
2017-10-15 08:30:16-00
2017-10-15 08:30:16-00
2017-10-15 08:30:16-00
2017-10-21 02:37:10-00

It's fairly easy to see that the signature times occur during the key manipulations.

$ gpg --edit-key 688E1D093C3638F588890D4450268311C7AD3F62

pub  ed25519/50268311C7AD3F62
     created: 2017-09-02  expires: never       usage: SC
     trust: unknown       validity: unknown
sub  ed25519/E758605C3A2792F6
     created: 2017-09-06  expires: never       usage: A
sub  ed25519/6DC20782F6E9E2F3
     created: 2017-10-21  expires: 2018-10-21  usage: S
sub  cv25519/1224F2883BEE2AA5
     created: 2017-09-02  expires: never       usage: E
[ unknown] (1). DDoSolitary <Dxxxxxx@xxxxxx1.com>
[ unknown] (2)  DDoSolitary <Dxxxxxx@xxxxxx2.com>
[ unknown] (3)  [jpeg image of size 29903]

So, looking at the key, there's nothing that's stands out as incorrect on the key, either as posted on the public key server or on the imported key.

As as side note: the trust level on the public key as listed in my system will not be the same as in your system.  Trust is under local control.  The trust is set as unknown by default.  However, it is unwise to blindly trust public keys listed in a keyserver.


Is there any way to send data securely from multiple As to B in the presence of eavesdropper, without losing anonymity like in a public key exchange? Suppose I have n subordinates at work. Any subordinate should be able to submit his or her report anonymously to me via digital means.

Also suppose that I have no means of broadcasting any form of information securely to my subordinates. That is - any message I broadcast to my subordinates should be able to be sniffed by an eavesdropper. I am also not able to communicate directly (unicast) one-on-one with my subordinates.

Is there any way to develop a protocol for my subordinates to submit their report while preventing (or identify) attackers (that are not any of my subordinates) forging a report that could also be submitted to me?

There are no other assumptions other than those bolded and I should be free to make any other assumptions as needed.

What I've got so far:

Any public key exchange system - Each of my subordinates broadcast their public key which I can use to verify their signature of the message. The problem with this is that it is not anonymous. Each subordinate can be identified using the unique public key once published.

You can implement this scheme by doing the following:

1.1)  Create a key pair.

1.2)  Sign the key pair using your private key.

1.3)  For each subordinate, encrypt the key pair using the subordinate's public key, and send the encrypted key pair to the subordinate along with the signature that you created in step 1.2.  Note, you are sending the same key pair to all subordinates.

Then, each subordinate does the following:

2.1)  Subordinate decrypts the key pair that you sent in step 1.3 above using subordinate's private key, and verifies the signature to ensure that it was sent by you.  Now, the subordinate has the key pair that you created in step 1.1, and can verify that it was sent by you.

2.2)  Subordinate signs the report using the private key from the key pair created in step 1.1.  Subordinate encrypts the report using your public key, and sends the encrypted report along with the signature.

Upon the receipt of a report from a recipient, you do the following:

3.1)  Decrypt the report using your private key.

3.2)  Verify the signature using the public key of the key pair created in step 1.1.

Because only the group of subordinates has the keypair that you created in step 1.1, this ensures that it was one of the subordinates that signed the report.  However, because all of the subordinates in the group have the same keypair that you created in step 1.1., you have no way of determining which subordinate signed the report.


Will Intel's MPX extension make C/C++ completely safe to use? This is apparently an extension that will eliminate buffer overflow and format string vulnerabilities in C/C++ programs, I would guess by providing hardware support for, e.g. converting scanf to fgets automatically, or something along those lines.  Will this extension change C/C++'s reputation as a dangerous language?  Will C/C++ finally be completely safe to use?  Or will other vulnerabilities like integer overflows still be a concern?  Is there any reason why MPX wouldn't turn C/C++ into a completely safe language?  I'm not very familiar with MPX and I want to hear from people who are.

I apologize if this question is too general.  Suggestions for narrowing it down are welcome.

Firstly, C++ has enough degrees of freedom that a computer cannot make it completely safe. C++ literally gives you full access to anything the CPU can do.

Functions like fscanf are just routines that do looping and checking internally to give you higher-level functionality. However, fscanf has no knowledge of how far a buffer goes (I.e. how big it is). The only part of the code that does have that information is the malloc library, but that's also just a higher-level algorithm to make things easier that the hardware doesn't know about.

Theoretically, the compiler can store this information and pass it to the MPX extensions, but in many applications that will be nearly impossible to do because most things are stored as void* and passed around manually so a static analyzer cannot have the requisite information to set those registers. The only way to do this would be to store additional information at runtime, thereby changing the size of void* which would violate the rules of C++, so it would have to be a special type that very few developers will actually implement because it will cost too much.

A buffer overflow happens when the developer is lazy with their power, not when the hardware messes up.

This is just one of the possible bugs in software that make it insecure. There have been SEVERAL bugs which are integer overflows, invalid logic, etc.

So no, it will not make C++ completely safe to use - nothing will.


Tell browser my site has no scripts I have created a Tor hidden service site which has absolutely no JavaScript or other types of client side scripts. The page is HTML, CSS, images, and some JSP for handling user input.

I encourage users to use NoScript, however many times users do not listen. Putting a big message across the page forcing them to disable scripts is too annoying to be useful, and users ignore warnings.

Is there a way I could make my site tell the user's browser that my page has no scripts, and if it finds any on the page then to ignore them?

I am doing this as an extra precaution against XSS which could be from malicious hackers, or from investigators attempting to identify IPs of users on my site.

EDIT:
Just to make it clear I want the website to tell the browser to do this, I don't want to have to tell each visitor how to configure their browser. Users are dumb and lazy usually.

A good option is to harden your Content Security Policy. It allows you to fine-tune which resources the browser will load/run, and is supported by most browsers.

Consider the following header:

Content-Security-Policy: default-src 'none'; img-src 'self'; style-src 'self';

This tells the browser to disable scripts, frames, connections and any other objects/media. We then permit images and stylesheets to be loaded, but only from the same domain.


Why is Chrome saying that "TLS_RSA_WITH_AES_128_CBC_SHA (0x2f)" is an obsolete cipher suite? When I go to this site, Chrome Version 44.0.2403.89 is connecting to the server with TLS_RSA_WITH_AES_128_CBC_SHA (0x2f), and it states that this is an "obsolete cipher suite".

For what reason is it called obsolete?

Here's the definition they use for non-obsolete cryptography:

  In order for the message to indicate “modern cryptography”, the connection should use forward secrecy and either AES-GCM or CHACHA20_POLY1305. Other cipher suites are known to have weaknesses. Most servers will wish to negotiate TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256.

In this case the fact that there's no forward security is the main reason. CBC is also discouraged, due to the vulnerabilities caused by the dependence on proper padding and IV in some software.


Does MITM attack work across Remote Systems? I have question about if MITM works across remote systems?
Often, I'm doing internal penetration test, but I'm not sure about how to do MITM attack when I am outside from that network.
Does classic ARP+DNS spoofing work across remote systems?

It depends on what type of MitM attack you're working with.

ARP Poisoning - This only works when you have an Ethernet connection on the LAN, since it works by spoofing identities using OSI Layer 2 technologies, ARP MAC-to-IP bindings.  This seems to be the type of attack you are familiar with.
BGP Redirection - This works on the Internet since it involves affecting IP routes in the IP routing protocol, Border Gateway Protocol.  In this case, you can get other autonomous systems (groups of networks in the world) to think your router hosts the true path to a segment.  See this article with several historical examples.
Other attacks not exploiting weaknesses in a protocol - It is considered a "Man in the Middle" when traffic is intercepted while in transit.  This could involve application weaknesses, altered DNS settings, etc.  Some of these may work only on an intranet, others on a global scale.


Envelope Encryption with asymmetric keys vs KMS In Envelope encryption a symmetric secret key is used to sign the data and then another key is used to encrypt the secret to produce an encrypted secret key. The encrypted messages is packaged with the encrypted secret key and sent to the client/consumer which then decrypted the encrypted secret key to get the secret key, which in turn is used to decrypt the message

There are 2 ways to implement it:

Asymmetric encryption: The producer encrypts the secret key(s) with the consumers public key. The consumer uses a private key to decrypted the encrypted secret
KMS (such as AWS KMS): The secret key is encrypted by the KMS, and client that needs access to the secret key has to ask the KMS to decrypt it

The advantage of the KMS approach is that key management is centralized, and revoking permissions from a client can be done by removing the client from the KMS and rotating the key.

Are there any good reasons to use asymmetric keys instead of KMS?

It's all about where you store the secret and who has access to it.

First a clarification: You are confused. KMS does not use asymmetric encryption (also called Public-Key encryption).  It uses private key encryption to enable envelope encryption.  They are two different things.

In asymmetric encryption the producer of the encryption never has to access the secret, they just need the public key.  The producer uses the public key to encrypt, the consumer uses the corresponding private key to decrypt.  In order to facilitate key rotation the producer sometimes appends the public key that was used to encrypt so that the consumer knows what private key to use to decrypt.
No matter how much data is encrypted there are no hints at the private key.  The algorithm for decryption is usually more compute intensive than private key encryption.

In envelope encryption the producer and the consumer must be the same (or both have access to the master key). You use a master key to generate a secondary key called a data key.  You then encrypt the data key using the master key and the data itself using the data key, then you append the encrypted data key to the encrypted data.  When you decrypt you use the master key to decrypt the appended data key, then use the decrypted data key to decrypt the data.

The advantage of this is that you can cost effectively store your master key in purpose-built Hardware Security Module and never expose it to anything else without having to pass all the data you encrypt into the HSM.  You can even generate the key inside the HSM and not take it out so that there's no chance that it has ever been exposed to anything externally.  KMS provides you with a cloud based HSM and it's backed by physical HSMs at Amazon.

If you don't care about keeping your master key in an HSM, then you can do the same kind of encryption using your own key that you try to keep safe by putting in on a jump server or something like that.  Also as long as you aren't encrypting more than 250 million TB you can skip the envelope.

If you're looking for some example code you can snatch up to implement either simple AES encryption or envelope encryption you might want to check our open-source project.  It's got an implementation for each you can leverage...

https://github.com/kunai-consulting/KeyStor


How important is encrypting traffic that never leaves a data center? How important is encrypting traffic that never leaves a data center?

To me, it seems both important and (thanks to IPsec) easy to achieve.  However, it seems to rarely be done; Google does not do it, for example.

How important is encryption traffic within a data center, and why is it so rarely done, even when the needed infrastructure is already in place?

I think it depends upon your company's security goals and risk assessment. Are you happy to own the risk? In a worst case scenario where your data gets snooped upon or stolen, what will be the impact on your business? How important is your data?

Take these factors into consideration during planning.


Is information still being sent from a discarded tab in my browser? I was connected to my workplace wifi via my personal phone for 10 minutes.

I did not open anything strange that could get me into trouble. I was doing some work. However, when I finished looking up what I was looking for, I realised that one of the tabs I opened the night before was still there (because I forgot to close it). A tab I would rather my boss did not see.

As usual, I always browse with the "private" mode on. Therefore that tab was discarded because of inactivity (among my 18 other opened tabs). I did not reclick on the tab to reload it. I simply closed it as soon as I saw it.

Knowing of all this, was information still being sent to the router of my workplace about what I was browsing the night before?

It really depends on the code in the site you had previously loaded.  If that site had code to call back to it's servers every few seconds (not too uncommon these days), then yes, that traffic would pass through your corporate routers and your boss would have access to it in theory. Just because you didn't click on the tab and hit the "x" without opening it, doesn't mean that the page tab is not able to communicate with a server just as it is able to when you are viewing it.


Decoding TCP Packet in wireshark There is a small piece of code that is making request to Web server through socket. i am able to see that its a TCP over no SSL through wireshark.
My question is, Is it technically possible to see contents of TCP packets? All communication that is sent from mobile is through TCP (primarily by a C code)
Note: This is not duplicate, I have seen many questions here on SO like decoding or sniffing TCP packets but none help the scenario.

If you've sent the data over straight TCP with no application layer protocol on top, Wireshark itself won't know how to extract objects from that stream. The data is still there, though.
One approach you might take to quickly extract the data from the TCP connection is to right click a packet in that conversation, then go to Follow -> TCP Stream. In the window that pops up, change "Entire conversation" to just the direction in which the file was sent, then change the "Show data as" dropdown to C arrays. It'll create one char array per TCP packet. You can then write some code to save the bytes to a file, with whatever processing you need to include to remove packet headers or anything else that you added in your original sending program.
Another approach would be to use something like Scapy to capture packets (or open a pcap file), filter down to just the packets you're interested in, and extract their contents in a similar manner.


Google App Engine Security I am writing a master thesis concerning security of certain applications, and as a part of it I want to write a web app on Google App Engine and test how secure it is.

Does anyone know if there was any study done on the security of GAE in comparison to other servers for web apps?

What would you say are the most likely weak chains in creating a web app on GAE an handling users' valuable information? For example, is the web app only as secure as the web admin's password, or can there be some other security measures in place to prevent even the admins from accessing users' information stored with the app?

Those are very general questions, so I can only give a general answer. Security can be evaluated in the context of a concrete threat model.

  Does anyone know if there was any study done on the security of GAE in comparison to other servers for web apps?

http://scholar.google.com is a good source of scientific papers.

  What would you say are the most likely weak chains in creating a web app on GAE an handling users' valuable information?

The typical weak link of self written web applications are query injection, Cross Site Scripting and Cross Site Request Forgery.

Google does support a secure authentication service which can be used by app engine programs, which prevents many common mistakes.

  For example, is the web app only as secure as the web admin's password

Yes, like a chain, the weakest link defines the overall security.

  Or can there be some other security measures in place to prevent even the admins from accessing users' information stored with the app?

Since client side encryption is not feasible for web applications that are targeted at ordinary users, there is no way to protect against malicious manipulations of the web application done by the admin.

Furthermore it means that any information you store is accessible by Google, since they have both access to the data store and the application code (which might have hidden encryption keys).

Especially the last point is a huge issue, if European privacy laws apply to you. Google was forced to admit that they handover information stored in Europe about European citizens if asked by the US. The problem is that this illegal activity (see green box) by Google might cause legal trouble for the person or company using Google Services to host customer data. It is the responsibility of the company collecting data to ensure that contracted service providers comply with European law. (I am not a lawyer, so this paragraph is only as far as I understand it).


Bypassing Address Space Layout Randomization How effective is ASLR in preventing arbitrary code execution in a buffer overflow type exploit?  How hard is it for an attacker to bypass this without simply guessing where the addresses are?

ASLR is a defense-in-depth mechanism.  It is effective, but can be bypassed (the 2010 PWN2OWN contest break included an ASLR bypass).

ASLR's primary purpose is to defeat "ret-to-libc" attacks which are a mechanism of bypassing DEP.  IMHO ASLR is only really effective when bundled with other protection mechanisms like DEP (ASLR without DEP can typically be trivially bypassed).


How does GnuPG know the initialization vector for decryption? We can decrypt an encrypted file with correct passphrase. But how can it know the correct initialization vector during decryption? Isn't it generated randomly during encryption?

OpenPGP does not really use an initialization vector (it is defined to be all-zero). Instead, it uses a block of random data afterwards, which takes the role of the initialization vector in the OpenPGP-specific OpenPGP CFB mode.

From RFC 4880, OpenPGP, 13.9.  OpenPGP CFB Mode:

  OpenPGP CFB mode uses an initialization vector (IV) of all zeros, and
     prefixes the plaintext with BS+2 octets of random data, such that
     octets BS+1 and BS+2 match octets BS-1 and BS.  It does a CFB
     resynchronization after encrypting those BS+2 octets.

With other words: a construct similar to the initialization vector is included with each encrypted message, while the initialization vector is defined to be constant. So yes -- something like the initialization vector is generated during encryption, but it is stored in the encryption headers and used for decryption.

Side fact: the repetition of some octets allows early detection of wrong session keys, as it is used when trying to decrypt a message without denoted recipient (using this technique, implementations of OpenPGP can skip non-matching keys early before decrypting the whole message). On the other hand, it opens up for a rather esoteric chosen ciphertext attack as described by Mister an Zuccherato (An Attack on CFB Mode Encryption As Used By OpenPGP). One of the basic cryptographic principles is broken here: do not repeat yourself, it might open up unexpected attack vectors.


Do I need to save the IV generated to the database? I see plenty of answers for what and how to use IV.  But is it important to keep the IV saved for decryption?  I would think so, but I haven't seen anyone saying anything about this.

If you want a specific encryption for this to be about then AES-256-CBC

Yes, you do need to save the IV.   In CBC mode, the IV is XORed with the first block of data before encryption in order to prevent leakage of information about the plaintext, specifically whether the first block of two ciphertexts using the same key also start with the same plaintext.  You are correct in your belief that you will not be able to decrypt your data correctly without it.


Split Production and "public" Webspaces We're developing a Software, using Git and some web based organsiation software on one of our members webspace.
This webspace is as far isolated, thus none could access it without knowing the address.

Now, we anted to launch a Webiste for our Studio and Product and I wanted to rent another webspace of a different provider as this would be (in my opinion) safer.
For better understaning I use "Production" for our production server and "Website" vor the Webspace only containing our websites.

Imagine an attack on our Website. Either (D)Dos or something that bricks our files. In this case we could say goodbye to our files and have to use a older backup, losing important progress.

Using two seperated Spaces would IMHO just affect the Website, as there are no links to our "secret" Productionspace.

This is the best scenario I could think of, as it would be the most obvious thing for a malicious attacker that wants to troll us, to attack our "public" space and hope he will destroy/mess up our production files that are likely on the same space.

What do you think? Ist this the best method? Or am I conpletely wron here?

If you do not have the resources to be able to reasonably secure a deployed web application or web presence and segregate your internal network from that web presence then I would recommend outsourcing the hosting of the "public" presence. With that said you now have two resources that you must ensure are secured from threats. The hosting company will certainly take care of some of that for you, but the web application itself will be your responsibility to secure.

In my opinion, segregation is always important. The problem is that segregation can be difficult. Many people that think they have segregation of their network sorted out, do not in fact have segregation figured out and attackers can pivot through things like backup or development networks.

Now I will qualify that with the fact that just because you have segregated your "public" presence and your "private" presence does not leave you in the clear. Take HBGary for example - They had credentials stolen from their vulnerable web application that were used to log into someone's email (password replay attack) then they social engineered the SysAdmin posing as an exec who desperately needed SSH access while "travelling in Europe".

If your two networks can co-exist separately then I would definitely advise doing so, just keep in mind that this is not the silver bullet against compromise.

P.S.

  Imagine an attack on our Website. Either (D)Dos or something that bricks our files. In this case we could say goodbye to our files and have to use a older backup, losing important progress.

Please do yourself a favour and take frequent offline backups.


Browser hijacked - how to fix and prevent? For the second time in a month, my work PC has been infected with malware that is hijacking my Google search results in Firefox.  A search for the URL hijacked searches end up at turns up nothing on any sites I would deem reputable.

The first time it happened our IT vendor installed Malwarebytes Anti-malware and that seemed to remove it, but now it's back. I don't like reactionary fixes, I want to keep my system clean and secure.

Questions:

What are the security risks of this hijack?
How do I remove it completely?
How does it get on my computer? (drive-by download,embedded in email attachment, etc)
How can I prevent it from happening again?

Thanks.

Paul

update May 12, 2011:
1. PC has been scanned by Malwarebytes, Spybot and Ad-aware. Ad-aware found 5 tracking cookies, nothing more. The other two scanners reported a clean bill of health.

In addition to the 3 antimalware packages above, my PC runs Symantec Client Security/ Symantec AV.
A previous scan in April by Malwarebytes logged the presence of Heuristics.Shuriken, and noted it was successfully quarantined.
Only Firefox is showing any symptoms of infection at this point.

UPDATE May 20, 2011:

Since my original post, NoScript has been installed into Firefox.  When I do a Google search, NoScript displays its warning bar and in the list of script sources is a domain that a WHOIS lookup shows as registered in Hong Kong.
I have continued to scan daily with multiple antimalware packages and all report no suspicious files.
My system continues to degrade. Speed is suffering, programs crash, Outlook can't search my emails.  It's time for the "nuke from orbit" suggested earlier.

1. What are the security risks of this hijack?

If it is a simple browser redirect the risks maybe limited. Their business model may simply be to infect widely and make money from directing you to advertising sites. Not to unnecessarily alarm you but the danger is that the standard modus operandi these days is to compromise a machine and then download a cocktail of malware (Trojans, key-loggers etc) as well as using the machine in a bot-net

2. How do I remove it completely?

Only way to be absolutely sure is to do a complete format your drive and restore from backup (use the OS re-install media to format the drive). Update all patches and install updated AV from another computer prior to re-connecting to the Internet. Still may not save you if there is a hidden  root-kit that is making a part of the drive unwritable which may need a new hard drive or BIOS update at worst case. As @Rory-Alsop said contact the AV vendors for your particular strain to determine optimal removal procedures. I have found Hijack this particularly good in the past (http://free.antivirus.com/hijackthis/). It is not an automated program but lets you manually go through and examine things like browser hooks which is usually how redirect type malware works.

3. How does it get on my computer? (drive-by download,embedded in email attachment, etc)

No way to know for sure. Could have been a website even a legitimate one, email as you say, even infected USB drive.

4. How can I prevent it from happening again?

Take care. Key steps:

Use and keep an Anti-virus uptodate. Free ones are Clam AV, Microsoft security essentials
Patch everything regularly - use software that has auto update
Minimize software with big attack surfaces like Adobe Flash, Acrobat, MS Office, Java. There are good open source alternatives like Open Office, PDF Creator. Millions of people have iOS devices without Flash - you don't need it.
Use simple browser extensions like HTTPS Everywhere and No Script
Install and maintain a personal firewall. Windows has one and so do most AV packages
Do not use vendor-supplied or simple passwords. Use a password manager. Consider changing at least your important passwords
Most importantly: practice good Internet hygiene; not clicking on any links from
senders you do not recognize, not opening email from senders you do not recognize. Avoid sites that maybe bad for your computers health and your marriage!


How can website server recognize incoming Tor or VPN connection? I was trying to signup for a service provided by a website using Tor, the website prevented me and asked me to disable my proxy settings, he noticed me with the following:

Our checks indicate that you are connecting through a proxy at the moment. Please disable your proxy settings first and then try again. Thank you!

Then I tried a VPN connection with normal browser without any proxy settings, but the website still gives me the same notice.

My question is:

1- How can the website server detect my anonymity-based connection (Tor or VPN), what is the interpretation?

2- Is there a way to overcome this issue?

One of the ways I know is based on checking IP against a known list.

http://www.gohacking.com/detect-web-proxy/


Does Firefox implements SCSV? I need to know if Mozilla Firfox implements the SCSV which adds a specific ciphersuite in case if the client initial hello message is resent (either due to MITM or due to network erro).

I opened about:config and checked the supported ciphersuites. I can not find the SCSV cipher. Why Firefox does not implement this protection mechanism? Are you aware of any brosers that do so?

SCSV is not a real cipher but only a pseudo-cipher, i.e. a hack to notify that the client currently does a TLS fallback. And because it is not a real cipher there is no way to enable or disable it as cipher.


User Account Notification under Windows useful at all? IMHO the 'screen dimming'-and-displaying-of-warning-window feature (?) in Windows is extremely annoying, since I routinely run software that does require the permission to modify a lot of things. I must confess I'm not familiar with the underlying mechanisms of User Account Notification. Is there any benefit to leaving this notification enabled? Or can I just do away with it and still sleep well at night?

It depends on your environment. For a lot of users it's another layer of security which is basically telling the user to rethink what they are doing in hopes that if it is something bad, they won't do it. However a lot of users will instantly click yes and not even think about it. I personally have my UAC set to "Notify me only when programs try to make changes to my computer", which does not notify me when I make changes to Windows settings. Therefore it isn't as annoying when I make changes, but it could still alert me if a rogue program is trying to make a change that I wasn't aware of. When I see the box pop up I can rethink what is going on.

Yet again, in the end it depends on you and your environment. Many organizations think it's a good idea to have, but in the long run it's easier to just turn it off due to complaints from users and/or upper management. No matter what, user training and education is going to be the best defense.

Edit from comments:
I can definitely agree that this isn't the end all solution to stopping malicious software. While the user not having admin rights, antivirus/antispyware, local firewall, HIDS, etc will be your last layer of hopefully blocking anything malicious from getting to the computer. The UAC will just potentially warn the user of the final steps of it. It's a small layer, but still another layer defense


Detect port scans on Linux (centos) I have OSSEC installed on my hosts. I want to detect port scans and generate an alert in OSSEC. So, how can I detect these port scans?

Is it possible reading iptables logs?
Do you recommend some specific tool as PSAD?.

Thanks.

Log Monitoring

You could do it through log monitoring and trigger some alerts.
Check out a commercial solution like Splunk. This allows you to manage and read your logs by creating dashboards, thresholds, and alerts.

Whenever you are being probed, you could pop an alert through log monitoring.

Soon enough you'll find yourself creating dashboards and alerts for all kinds of things!

Also check out GrayLog and ELK (ElasticSearch, Logstash, Kibana) which I believe are open-source and free.


Crypt-analysis methods for breaking or finding weakness in an encryption algorithm? How cryptanalysts work on an algorithm related to diffusion/confusion factors in order to find a weaknesses in an algorithm, for example how cryptanalysts could find weakness on DES? is there methods or software for that?

Or if a person designs an symmetric encryption, how can he/she can test it from stand point of weaknesses and probability of obtaining information about main data?

For example after designing an encryption algorithm , he/she encrypts a text with that algorithm and now he/she has cipher-text, how can test it that it is enough disorganization?

For cryptanalysis, the usual three-point method applies:

Write down the problem.
Think real hard.
Write down the answer.

And that's about all that can be said generically.

The methodology of a cryptanalyst is about the same as that of researchers in any other science. The core of the daily work of a cryptographer is to read, read, read all the papers. Accumulate knowledge and ideas. Then, when the cryptographer sees the design of some cryptographic algorithm, his subconscious mind may recognize the pattern, manifesting itself in the cryptographer's brain as something like: "mmh, this looks like the kind of structure that Schrupkovski was breaking in his article presented at NoWhereCrypt'93, except that this one is in bitslice mode with an extra FFT". Ultimately, Research is all about putting together ideas and concepts originating from many distinct sources.

Security of a cryptographic algorithm cannot be tested, let alone proven (though one can have some nice reduction proofs, which unfortunately cover only part of the problem, by definition). What can be demonstrated is insecurity: if you find an attack, then the algorithm is broken. To ensure that an algorithm is probably secure, let some cryptographers try to break it; lots of cryptographers for a lot of time. If none could break it, then the algorithm might be fine. This is the whole idea of the AES competition, for instance.

The difficult trick is to attract cryptographers. You have to do several things:

You must do your homework. The algorithm must be described completely, in a readable mathematical way (not as code in any language).
You should also explain why some generic classes of attacks don't apply to your design (e.g. differential cryptanalysis).
The algorithm must be interesting, which basically means that it must be more efficient than the existing alternatives. For symmetric encryption, this means that the algorithm must be faster than the AES, or as fast as the AES but with constant-time implementations, or amenable to extremely compact implementations, or some other similar advantage. Nobody will invest time trying to break an algorithm which would not get used anyway since it is too slow or too big.
Patents. Do not apply for a patent. Most cryptographers run away when they see a patent, because they don't fully grasp the consequences of working on patented algorithms (they are specialists on cryptography, not on patent law). Patenting a cryptographic algorithm is, in practice, an extremely good way to ensure that the algorithm will not receive external scrutiny and won't be used.


How to bypass sanitization of < while exploiting an XSS vulnerability? Whatever is to the right of < is being deleted if I don't have a following >, else everything in between < and > is being deleted. Is there a way to bypass this sanitization?

The approach for evading a filter, is completely dependent upon the filter(s) that are being used and which type of XSS scripting attack is being performed.

According to OWASP, "Both reflected and stored XSS can be addressed by performing the appropriate validation and escaping on the server-side"

Input filtering is not be enough to prevent XSS, and here is a list of tests to run to see if filtering is broken.


Are there any cross platform firewall solutions with a central management platform? Currently I have a bunch of servers scattered across a few different providers e.g. EC2, rackspace.  Some boxes are Linux and some are Windows.  Currently I'm finding the administration of the firewall rules to be quite labor intensive.  Are there any solutions out there that provide a centralized management platform?

I believe you are looking for Security as a Service providers.

The idea is to route all the traffic through the service provider and the service provider will inspect the traffic and send a decision to the server.

I did a quick search and found the link below.
http://www.virtualizationpractice.com/security-as-a-service-is-it-safe-9929/

The link talks about 2 different providers(read the first part about cloudpassage which i believe is what you are looking for)

http://www.cloudpassage.com/features/

Cloudpassage runs a daemon on the servers and this daemon will contact the providers grid (over an encrypted channel) and all the security processes are run by the grid

The first link says that cloudpassage supports EC2 and rackspace