How insecure is FTP? Okay, we know the drill: don't use FTP, use SFTP or FTPS.

But what exactly is the risk being posed? The files themselves are sent unencrypted, and this may be fine, or disastrous, depending on what the code in them contains. But, if we're dealing with static HTML files (or similar), presumably this is fine?

What about a user's credentials, password, etc.? Are these guarded when using vanilla FTP? And if so, is it "adequate"?

I'm asking quite honestly as a quality of life measure. My alternative for updating basic files on a public server would otherwise be with a messy process of SSH keys, etc. using systems which, for the life of them, cannot remember my password when sent via SFTP.

Granted the particular network that one is on is also of importance. A secure office network is a bit different from an airport lounge.

With plain FTP the credentials are passed in plain and thus can be easily sniffed. Also, the files are not only send in plain but they are also not protected against modifications, i.e. an active man in the middle might change the files on the fly. Insofar the risks are similar to plain HTTP, i.e. it might be fine within a trusted network but is a bad idea if you cannot fully trust the network.


Man in the middle attack to a website which uses public key pinning As far as I know, an attacker can intercept an encrypted traffic by adding custom certificate and CA authority into a victim's browser. I wonder if it works if a website uses public key pinning?

I added Burp's certificate to Firefox and I can access Facebook without any certificate error. How is it possible?

I wonder if it works if a website uses public key pinning?

Yes it does. A certificate which is signed by a CA which was explicitly added to the trust store will not be affected by the pinning checks. This is deliberately done to allow useful and legal SSL interception. Such interception can be found in most enterprise firewalls but also lots of desktop AV and is needed to scan HTTPS traffic for malware etc. If this would not be done malware delivery would simply move to HTTPS (which is cheap enough).


Certificate pinning in android apps I have found a whitepaper on bypassing ssl pinning. If this is true, how can we securely implement certificate pinning in android apps? Is there any other workarounds possible other than certificate pinning?

The document you linked to details how the author bypassed pinned certificate validation in two different ways : by disassembling the application, removing the check and rebuilding the APK or by changing the certificate in the application keystore. Both method require a high degree of access to the application.

There are no way to fully protect your application against this. That is one of the reason why you should never trust the client.

However, these attacks requires the attacker to be able to replace your application with the modified version. If the attacker is the owner of the device, you simply cannot prevent it. Otherwise, the best you can do is rely on the OS security and warn your users not to root their devices.


when you are phished, what do they get? Lets say I was foolish enough to press on a YouTube video on Facebook that ended up being what I suspect is a phishing link.  What can they potentially get?

I had three tabs open: (1) my phpMyAdmin control panel, (2) another random site logged in, and (3) the Facebook session which I navigated away from when I clicked the link.

Should I be worried about the script having picked up cookie information from either of the first two tabs?
They can't get session data because that is stored on the server, not the client right?  If I understand correctly, the best they could do is get the session id that is stored in a cookie and then try to use my session id as an imposter.
Lets say like I had a gmail session on tab 3 before going to Facebook, is the gmail session compromised now?

Phishing is a way to collect your private information, usually site username/password, but also sometimes your CC info.

Did you type any of this on the page that you were send to from Facebook?

If not - it's not phishing.

It can be "click jacking"
or, most likely, they tried to install something on your computer.

From their site an attacker can't access SessionID/cookie of other sites (unless it has some vulnerability)


How is Chase Mobile Deposit Secure? Chase has this app that allows you to snap a picture of a check with your phone and deposit that check into your account.

How do they prevent:

Someone from depositing a check that's not written to them? (I can’t imagine this app is smart enough read the scribble “to” Filed) Are they leaving it up the check writer (who may not even be a Chase customer) to catch this and complain?
What's to stop someone from depositing the check to Chase by Phone,then 2 mins later walk into another non-Chase bank and deposit it there?
What's to stop someone from depositing the same 12 every other month?

The only thing I can think of I that they are simply hoping that these thing will happen in such small quantities that they can handle it on a case by case basis IF the check writer complains...

You can literally walk into you AR Dept when the clerk is out to lunch and snap a picture of a 100k check! Sure, it's stupid to be so bold with such a large check but what about small ones? In my mind there there is a good chance check will not be rejected when the clerk deposits it in the company's bank that afternoon.

This is precisely as secure as depositing a check at the ATM.

You could go up to an ATM, pop in your debit card and say you're depositing $3500, put a blank piece of paper in a deposit slip and deposit it.

Same rules apply with the tech you describe as an ATM: Try to fool it, and when time comes around to actually push the routing numbers and bank account on the check through for a debit on the other end, the debit fails and upon inspection they realize it's not a bounced check and it's your fault. The money is debitted back out of your account and you get penalized for being a wanker, they may even close your account for such behaviour altogether as it's against their TOS.


What is the purpose and meaning of the --sig-notation and --cert-notation options in GnuPG? What is the purpose of the --sig-notation and --cert-notation options in GnuPG? What are the intended use cases?

In the first part the a @ character is used, so I guess the options are for providing certain e-mail addresses. But which email address should be given?

Notations provide meanings to add information to a signature or certification (which also is a special kind of signature). From RFC 4880, 5.2.3.16. Notation Data:

  This subpacket describes a "notation" on the signature that the
     issuer wishes to make.  The notation has a name and a value, each of
     which are strings of octets.  There may be more than one notation in
     a signature.  Notations can be used for any extension the issuer of
     the signature cares to make. [...]

Notations are rarely used in practice (actually I've never seen real usage, although there are few notation subpackets to be found in key server dumps). Example usage might be to add the location of an identity check during key signing, or the document types presented.

Each notation consists of a notation name and a value, while the value is an arbitrary UTF-8 encoded string.

Regarding the @, this is part of the notation namespaces. Namespaces help to distinguish notations if they use the same name, but are defined by different people. Again from the same section of the RFC:

  Notation names are arbitrary strings encoded in UTF-8.  They reside
     in two namespaces: The IETF namespace and the user namespace.

  The IETF namespace is registered with IANA.  These names MUST NOT
     contain the "@" character (0x40).  This is a tag for the user
     namespace.

  Names in the user namespace consist of a UTF-8 string tag followed by
     "@" followed by a DNS domain name.  Note that the tag MUST NOT
     contain an "@" character.  For example, the "sample" tag used by
     Example Corporation could be "sample@example.com".

  Names in a user space are owned and controlled by the owners of that
     domain.  Obviously, it's bad form to create a new name in a DNS space
     that you don't own.

  Since the user namespace is in the form of an email address,
     implementers MAY wish to arrange for that address to reach a person
     who can be consulted about the use of the named tag.  Note that due
     to UTF-8 encoding, not all valid user space name tags are valid email
     addresses.

With other words, there can be official notations in the form of some-notation-name defined by a standard and  registered with the IANA. On the other hand, everybody can declare his own notations, which should have the form my-notation-name@example.com. For example, if I would use some-notation-name@jenserat.de, it would not collide with the (assumed) official notation some-notation-name in the IANA namespace.


Difference Between MAC and DAC Are the only difference between DAC and MAC:

the fact that MAC can also dictate DAC-type permissions to processes, not just users and name space objects? (files,etc)
And there's no concept of resource owner in MAC just access rights?

No, the intended difference is that MAC says the security officer has given me access to, for example, the SDE compartment. Within it, there are files I can set (DAC) acls on, but no matter what access I assign you, the MAC will stop you from reading those files unless you also have been cleared for access to SDE.

Discretionary access is under my control
Mandatory access is under senior management control
MAC always trumps DAC


Does OpenBSD's security protect against identical vulns in other OSs? I have been reading about OpenBSD and its more secure design. I was wondering therefore about the difference this makes to applications which can run on any number of OS.

Lets take the example of a web browser, which are known to have many vulnerabilities. The browsers code is likely to be similar across all OSs, with some differences, but for the most part the design will be comparable. What I want to know is, does the apparent extra security of OpenBSD mean that the present vulnerabilities (which are likely to be similar across each OS) are less of a worry in OpenBSD? Or is the extra security limited to a more general set of use cases?

As OpenBSD documentation clearly states it in bold red characters in their introduction about ports:

  The packages and ports collection does NOT go through the same
  thorough security audit that is performed on the OpenBSD base system.
  Although we strive to keep the quality of the packages collection
  high, we just do not have enough human resources to ensure the same
  level of robustness and security. Of course security updates for
  various applications are committed to the ports tree as soon as
  possible, and corresponding package security updates are made
  available as snapshots for -current.

This means a few things:

OpenBSD security claims is only valid as long as the base system is concerned.
Security updates for the third-party packages will only be applied on the package source code from the ports tree and the -current branch. They will not be available for binary packages, even-though binary packages is the officially recommended way to go to install third-party software.
It also mentions a lack of resources which also explains why the software version available for OpenBSD may be outdated, which can have security impact for the end-user.

With all this in mind, the security posture of the OpenBSD OS regarding third-party software is quite bad. Hopefully, a third-party commercial company (M:Tier) provide its own update channel for OpenBSD users to make things a bit better.

OpenBSD goal is to promote clean and sane coding measure and a "Secure by default" OS. While installing third-party package remains possible, this may affect this goal and should be done with a clear understanding of the consequences on the overall system security.


Should user input be validated for it's length? Is it bad not to validate length of user input to text field at server side. May it lead to such vulnerabilities as buffer overflows and other?

I think it depends on programming language of application. So, please describe it for PHP, Java, .NET, Ruby etc.

It does depend on the programming language being used.  Keep in mind that if there is a buffer overflow for a language that manages strings, that overflow will generally occur at levels that you cannot reach.  I think you might be more concerned about situations where you are going to pass the string into another domain (such as a database, a C-based module, etc.)  At this point, it would be prudent to ensure the length and other data type characteristics are appropriate for the destination.

I remember reading in the original spec for HTTP (I think it was there) that a good server should be flexible in what it accepts, but be strict in what it returns.  The same thing can apply here: be as flexible as you can about the user input you receive, but ensure that it is as safe and secure as possible before moving it to another domain.


Safely use old windows XP machine in business network I have a client that has a couple of machines that are build to cut kitchen tables. These machines still run on Windows XP and are connected to the internet.

Now I need to find a way that these people can run these machines as safely as possible without updating from OS (not possible, I asked the manufacturer from the machines).

The problem is that these machines need to be connected to the internet so that the manufacturer can push updates to them.

What is a best practice to keep these machines working and connected to the internet as safe as possible?

It is not that uncommon to have these out-of-support and vulnerable machines in an organisation. It's important to perform a risk assessment to determine the impact of any vulnerabilities.
High-Level Risk Assessment
Threats:

Internet connections mean that remote threats are a problem
Local network connections mean that threats within the network (or remote threats that have gained access to the network) are a problem
Local physical access to the machine means that anyone who can interact with the machine can be a problem

Impact:

Network connections mean that the machine can be used to attack the rest of the network.
Any access means that any sensitive data on the machine is at risk (if there is sensitive data on it, like manufacturing designs)
Any access means that configurations or machine settings can be maliciously (and dangerously) changed

Mitigations:

reduce or eliminate network connections
reduce or eliminate physical access to the machines by unauthorised people

Your Specific Case
Without knowing more specific requirements for the machine in your company:
If you need Internet access (and it truly cannot be replaced by some other measure) then you need to cut it off from the rest of your network as much as possible and only allow it to receive connections only from the manufacturer and blocked from making connections out. Your perimeter and internal firewalls come into play here to design a new network. You also want to be able to monitor and recover from any anomalies that occur on the machine.
What I have done in similar situations is to turn the machine into a Virtual Machine (VM), and use VM tools to snapshot, revert, etc. and use the hypervisor to control access, networking, and monitoring. Virtualising the machine is not always possible, however.


Secure Windows 10 Home admin's data behind a password, even when user apps are running Windows 10 Home's default account lock system for the admin account is not completely secure because there are multiple free password recovery tools & ways available that can be used by a non-admin to reset/bypass the admin password.

How to secure Windows 10 Home admin's data & installed programs behind a password, even when programs like Office, Chrome, etc. are opened and running in the background with some documents/pages opened in it?

Securing data with multiple solution/software is acceptable
& if all the non-windows hard drive partitions can't be secured, it's also acceptable.

Edit: Securing data when anyone can have physical access to the locked device(running but password protected).
Edit 2: & when the system is used by only one user, through the admin account.

Nothing can be used by a non-admin to reset the admin password without rebooting the system and modifying the disk offline. Doing so requires physical access to the machine (which I'm guessing you must allow) and is usually mitigated with full-volume encryption (FVE). The standard Windows FVE feature, Bitlocker, is not available on Home editions; you can pay MS for a license upgrade if you want to enable it. Alternatively, you can use third-party system encryption tools, such as Veracrypt. Since your machine probably doesn't have a Trusted Platform Module (hardware security chip, not common on home systems), the FVE would need to use a password (or key on a flashdrive), and anybody with the password/key will be able to unlock the disk (and potentially tamper with it, such as resetting passwords or stealing data directly). Note that a really sophisticated attacker might still be able to get past this even if you have a TPM, but I'm guessing that's a level of security you don't need.

If you just want to restrict access to the admin's data, you could also create an encrypted volume (Veracrypt supports this; other software might too) that only you can unlock (requires a password, and the password can't be reset without making the data permanently unrecoverable). You'd need to ensure it's locked whenever it's not in use, though. A better option might be to just store everything sensitive on a flashdrive or other external storage, and take it with you when you go.

Alternatively, Windows has an option for easy-to-use data encryption (Encrypting File System, or EFS), but I think it's not available on Home editions either. Home is really not intended for use in an environment sensitive data that needs protection from hostile local users.


Exploiting stored XSS on Android app? I'm testing Android app which is vulnerable to HTML injection, but I'm having problem escalating it to a stored XSS vulnerability.

I have tried these, and many more:

foo | linking to https://foo.com does not work also

None of these work - they don't render or links/tags are not clickable.
I have also tried using Android event handlers like ontouchstart and so on, but none of them seem to work either.

However I have noticed that I can load any image like this:

I tried adding event handlers there too, but it did not work.

I'm out of ideas. I have tried googling for this but I can't seem to find answer why it does not work. I was thinking can it be because I'm running on Android 5.1.1, which does have some built-in XSS protection?

After decompiling the app and going through the source code I found out that it cannot be escalated to XSS because it's using Html.fromHtml TextView


Is passwords with combination of different encodings super safe? I was thinking about generating passwords with combination of English, Arabic, Chinese charac.  Is this pass secure enough against brute force attacks?

If the length of the password is not reduced, then I'd say it will be harder to crack, though I wouldn't call it "super safe". Take for instance a 16 character ASCII password: there are (2^7)^16 = 2^112 possibilities for such a password (also called 112 bits of entropy, assuming all 128 chars are equally probable in a "random" password). A 7 character Unicode password encoded in UTF-16 for example (cover the whole set) would have about (2^16)^7 = 2^112 possibilities - the same strength as before.

For that reason, just increasing the length of the password will offer the same protection against brute force attacks. With the advantage that the password will be easier to type, and won't cause problems if entered in systems with different default encodings and input methods.

I'd like to add, though, that for that math to hold the passwords must be truly random. There are other types of attacks (like dictionary attacks, rainbow tables etc) that take advantage of different probabilities in the distribution of characters in a password. Since, by your question, you seem to be generating those passwords, I think you can do fine without using different charsets.


Could I delete .csr files once the key was signed by CA I'm creating my own openvpn server.

The Certificate authority is located on a separated host.

There is two kind of clients: which that just send a .csr and to which i send the .crt as an answer and the other which I build myself.

In the second case, I create the .key and .csr by using:

openssl req -days 3652 -nodes -new -keyout NewClient007.key -out NewClient007.csr

than the signed certificate by:

openssl ca -days 3652 -out NewClient007.crt -in NewClient007.csr

So, from there, I will install both .key and .crt to the new client and delete .key from the CA.

If I rightly understand, the .crt may be useful if I want to revoke the key, in future (but is copied to Id.pem, where Id is the index number).

Current status, where ssl files are located:

server:
   ca.crt           CA's public certificate
   server.crt       server public certificate
   server.key       server private key
   crl.pem          CA signed certificates revocation list
   dh1024.pem       Diffie-Hellman parameters file

certificate authority:
   ca.key           CA's private key
   ca.crt           CA's public certificate
   index.txt        Index of signed keys
   serial           number of next entry in index.txt
   index.txt.attr   attributes for index file
   ClientXXXX.crt   All clients certificates
   ClientXXXX.csr   All clients signing requests
   YY.pem           Copy of clients certificates according to index nr.

clients:
   ca.crt           CA's public certificate
   ClientXXXX.crt   The client certificate
   ClientXXXX.key   The client key

When I build the client key myself, they are immediately shred and deleted once installed in client.

So I think (but not sure) I could quietly delete all ClientXXXX.csr and ClientXXXX.crt from CA...
... So there is my question:

could I ever need to access .csr file again or could I definitively delete them?

The Certificate Signing Request (CSR) is of no use once you've obtained your certificate. It's merely one of the vehicles that can be used to give the CA your public key as part of the application process, so that they can issue a certificate.

You'll now be able to get the public key again from the certificate itself anyway.

In fact, in this particular format, you'll be able to get the public key from the .key file:

openssl rsa -in NewClient007.key -pubout

In fact, you'll also be able to re-generate the CSR using this:

openssl req -new -key NewClient007.key -out NewClient007.csr

(Note that you don't need the -days 3652 option when generating the CSR, since a CSR doesn't have not-before/not-after dates, unlike X.509 certificates. This is only useful if you want to generate a certificate during this step.)

I would, however, suggest using -newkey rsa:2048 or -newkey rsa:4096 instead of relying on the default key size, which is often 1024 bits.


Are local firewalls necessary Is having local firewalls enabled on machines actually necessary if you run hardware based firewalls like pfsense or a netgear fvs338 and use that to control in/out bound connections?

I personally do not see how a firewall locally adds any type of protection (assuming no infections happen) other then just another layer of ACL.

Host based firewalls aren't necessary if you have a dedicated network firewall.

However, defence in depth is always a good thing to practice. Host based firewalls allows you a more fine grained control on a machine to machine basis as well as allowing you to filter traffic coming from internal networks. This can be a great asset in preventing a single compromised machine on your network from compromising the rest of your network.


Does ARP spoofing works in case the target ARP cache has the gateway I am trying to create a script that will do a basic ARP spoofing attack (I choose this StackExchange website because the question is more about the theoretical side), and I see no reference to the attack in case the computer already has the gateway IP in its cache (and the same for the target's IP in the gateway cache).

As I see it, the computer most of the time should have the gateway in its cache, and therefore an attack will be possible only if one can predict when the ARP table gets reset automatically or can answer before the gateway.

I would like to understand which ARP replay should he save and which he should discard; and whether there is a way to use the attack even if the gateway IP is in the target's cache.

The assumption, "ARP poisoning attacks only work when the gateway's MAC address is not in the victim's ARP cache", is false.
A type of ARP request or reply exists known as a "gratuitous ARP"; from the Wireshark Wiki:

Gratuitous in this case means a request/reply that is not normally
needed according to the ARP specification (RFC 826)
A gratuitous ARP reply is a reply to which no request has been made.

The wiki page also has some information about legitimate use of gratuitous ARP replies. However, they can also be used maliciously, and they are the driving force behind most ARP poisoning attacks.
Let's look at an example network setup:
Gateway:
IP address: 192.168.1.1
MAC address: 11:11:11:11:11:11

Victim:
IP address: 192.168.1.100
MAC address: 22:22:22:22:22:22

Victim's ARP cache:
192.168.1.1 is at 11:11:11:11:11:11

Attacker:
IP address: 192.168.1.200
MAC address: 33:33:33:33:33:33

In this case, the gateway's MAC address is already cached by the victim, and the attacker wants to convince the victim that they are the gateway. The attacker can send a gratuitous ARP reply to the victim:
192.168.1.1 is at 33:33:33:33:33:33

Even though the victim did not request this information, it will happily update its ARP table:
Victim's ARP cache:
192.168.1.1 is at 33:33:33:33:33:33

Now the victim's traffic will go to the attacker instead of the gateway.
So, the takeaway is that gratuitous ARP replies can be used to update existing, legitimate entries in favor of malicious ones. The victim doesn't have a way of knowing whether or not the gratuitous ARP is malicious; what if the machine was just reconfigured or had a NIC swap? There is not really a way to tell.

I would like to understand which ARP reply should he save and which he should discard

As somewhat indicated above, the most recently received ARP reply is used to update the cache, regardless of whether is was gratuitous or not.


How would you prevent someone from selling his persistent cookie to someone who is not an institution member and wants to gain access? Most of our publishers sell subscriptions to institutions and people get access by being identified as part of the institution.
This institution authentication happens with IP ranges or Shibboleth, but not all institutions support Shibboleth or other SAML, and IP ranges do not help without VPN or proxy server. So, publishers want us to devise a scheme by which a user will gain short term access to his institutional holding (that is, to the content subscribed by his institution) while he is outside the IP range of the institution (e.g. at home or traveling.) The solution needs to be as simple as possible for the user, it should not require that they download anything and it should work well for users coming from mobile phones or from their laptops. The process could require that the users initiate this access while inside the IP range, but ideally, they should be able to initiate their 30 day access even if they are away from the institution and forgot to set it up.

In particular, please state how the user will assert that he is a member (faculty, student, employee, whatever) of the institution that he claims. Remember, that the institution has no authentication server and will not install one. Also, the user will not install an application on his computer.
The complete solution will invariably involve a persistent cookie at some point. How would you prevent someone from selling his persistent cookie to someone who is not an institution member and wants to gain access?

Can you prevent someone from selling their password to get similar access?  Do you think you need to?  It's pretty much equivalent.

Do you need to do this?

From my experience being inside/outside academic institutions with journal access, there's always some amount of sharing resources as a favour (e.g. "hey, could you send me a PDF of this paper?").  You'll never be able to stop that, because it is actually being manually accessed by a legitimate user on a correct machine.  However, I have personally never witnessed student/staff trying to make money from this.

Monitoring

Even if they wanted to make money like this, then I don't think sharing cookies is the best way - it's certainly not how I'd do it!  Protections you could add to the cookie system (e.g. fingerprinting the user's browser and checking it stays the same, etc.) won't apply to other methods.

Instead (if this is actually a problem), a reasonable and robust solution is to monitor user's usage patterns.  If they are downloading 100x the resources of anyone else, or if they fetch resources consistently for 250 hours straight (the longest humans can survive without sleep), then there's probably multiple users or an automated system at work.

However, this monitoring solution doesn't have to be included from the beginning, it can be added in later - and until you have evidence that it's actually a problem, I think it should be quite far down your list of things to do.


Using the Tor network with a Proxy I have just implemented a new web-filtering proxy system for my organisation, and I was wondering what the recommendations would be to test the use of Tor through this web-proxy.

We are doing SSL inspection, but I was wondering if I would see any material difference in the traffic that was going through, and even if I could tell if it was Tor or not ?

Thoughts?

From Detecting TOR Communication in Network Traffic:

  A successful method for detecting Tor traffic is to instead utilize statistical analysis of the communication protocol in order to tell different SSL implementations apart. One of the very few tools that has support for protocol identification via statistical analysis is CapLoader.

Clearly, this is a difficult task and probably not altogether reliable.

There is, however, a public list of Tor Exit Nodes. Which may help! Others have also noted that many exit nodes identify themselves with a Tor related name. More information is available in a previous answer "Detecting Tor proxy by reading request headers".


Is my system infected with Operation Windigo in Kali Linux? I did my research and the first things that I did to test my system was to run some commands based on my research. The problem is trying to determine if I am truly infected. Any, confirmation will be helpful based on the results of the commands given.

Ebury version 1.5
On Linux-based systems, an additional shared library file 'libns2.so' is installed and the existing libkeyutils file is patched to link against this library instead of libc6. The malicious 'libns2.so' file can be located by running the following command, which should not return any results on clean systems. Based on this information above I have ran the command down below to see if I am infected nothing shows up.

# find /lib* -type f -name libns2.so /lib64/libns2.so
#

Ran this command that I found on ubuntufourms to see if I am infected.Command says I am infected.

ssh -G 2>&1 | grep -e illegal -e unknown > /dev/null && echo "System clean" || echo "System infected"

   System infected

Ebury now uses Unix domain sockets instead of shared memory segments for interprocess communication. The malicious socket can be located using 'netstat' as follows. Again, this command should not return any results on clean systems.

 # -nap | grep "@/proc/udevd"
 #

Nothing showed up probably because of the iptables rules that blocks all incoming ssh connections.

Why, has the grep commands that I found on ubuntufourms say I am infected when the others say I am not. Can the backdoor be dormant if iptables is blocking any ssh connection if there is a backdoor?

It would be nice to know why you assume being infected. You usually should get warnings from your ISP that your system has outgoing connections to a dropzone server, alternatively if you run Snort it should be able to detect it. You can disable your internet connection and deactivate iptables so you can see the connection attempts.

If your system is infected on root level you have to wipe it, also all SSH keys are compromised. Also check all systems in your network.


using truecrypt keyfiles with weak passwords I'm using Truecrypt and I have multiple volumes on multiple computers. Keeping each of the 20+ character passwords straight is getting complicated, so I want to use keyfiles. Since the password is being combined with 1024 bytes from the keyfile, does it matter if my password is "dog"? Does a keyfile (say, a compressed file with lots of crazy characters) with a short password have the same brute force protection as a complex 20+ character password? I'm assuming no one has access to my keyfiles.

If you think the keyfiles are secure, then no password is needed, if you can not have the risk of the keyfiles leaking, then you need to password protect them with a strong password. No password or a weak password is practically the same.

You can store your keyfiles within another truecrypt volume with a strong password, this way you only need to remember one password and your keyfiles are secure.


How long til a 4-way handshake is captured with Aireplay-ng I've got a TP-Link TL-WN722N wifi adapter which I believe allows monitoring/injection to a network (was reassured by the comments of other users).
When I follow a guide by Vulnerableuser I can get to the stage where I am sending deauth packets to the target MAC Address via the AP, but I don't seem to see a a WPA Handshake.

My question is, How long should this deauth approach take to successfully receive the handshake?
I understand that there isn't a fixed amount of time for this to occur, but what would this time be on average - a few hours, days, weeks!?

I can confirm that there are devices connected to the network being two desktops, one mobile, and one tablet (mobile and tablet being the ones connected via wifi). Since they are all using the same AP and WPA2 Key, this shouldn't have any effect on when a handshake should take place (can someone please confirm this?).

Any insight to this would be a great help.

Usually it takes only few seconds.however, if you're using the card on a virtual machine you might face problems.

I can confirm that the card works (i tried it myself).
first time was with Backtrack-5 live boot CD and it worked perfectly, next time was on virtual Kali 2.0 and it didn't work.
Just as you described it, the deauth packet goes and nothing happens.


What is a good method to authenticate users and make sure they don't give their credentials to someone else? I'm new here I hope this is the right place to ask this question, I work at a call center and I've been asked to create a TimeClock system however we have the problem that agents share their credentials and then one user will clock someone else in to help them report more hours, so I need a way to identify each user and make sure they don't do this.

Constraints
 - Tights budget, meaning there's no money to buy face recognition systems nor fingerprint authentication SDK that are a little expensive.
 - Users don't have separate Windows Accounts, they use the same account to log in on all the computers.

Do you have any idea what kind of authentication method I could use?

You are looking for a technical solution for a social problem. That usually doesn't work. If you have a dishonest workforce who is collaborating against the company, they will always find a way to cheat the system. The only real solution is to fix the trust issues between your company and your employees.

But if you really want a technical solution, you might want to invest in a physical punch clock system and place it in some easily observable location where anyone with two punch cards will have a high risk of being caught.


Is my hashing method secure? I use bcrypt (32 rounds) and once the hash is produced, I get the sha512 of that hash and I then hash that with blow fish and once that is done, I hash it again with sha512 with a salt that has been hashed with bcrypt (94 rounds) that is 33 characters long to each user password.

So is that secure or not?

Yes but everything after the first bcrypt is completely unnecessary. bcrypt automatically generates and appends a salt as well (in the ruby implementation anyway), and changing the number of rounds is sufficient to ensure that the hashing scheme is slow enough to deter offline brute forcing.


Is it possible to recognise and prevent MitM attacks on devices which use self-signed SSL certs? I use both Linux and Windows at work on a large enterprise LAN. The majority of the network configuration is out of my reach.

Certain SaaS applications that are hosted locally on the enterprise LAN, use self-signed SSL certificates. I am required to log into these on a regular basis.

Is there any sure way of knowing that the servers I'm logging into are the legitimate ones other than the obvious change of identity, supposing that it's possible a fellow employee might attempt a MitM attack?

The point of the server certificate is so that the client can make sure that it knows the correct, genuine public key for the server. Certificates signed by a CA are one way to achieve that (with the unspoken assumption that we trust the CA for signing only certificates with correct information in it, and not goofing it up). A self-signed certificate cannot convey such a guarantee.

However, in some cases, you can replace the certificate model with direct trust. Namely, you inform your Web browser that for a given, specific certificate can be trusted. Firefox describes that as a "security exception". This does not completely solves the issue, but at least it reduces it to the problem of making sure once that you are seeing the correct server certificate. Afterwards, your browser will remember that "exception" and won't bug you with scary warnings -- but it will glower like a drunk christmas tree if somebody tries to feed you another, distinct self-signed certificate.

For the initial registration, when you connect the first time to the server, have your browser display the "SHA-1 fingerprint" or "thumbprint". How it is named changes with the browser, but this is a SHA-1 hash value computed over the complete certificate, and expressed as 40 hexadecimal characters. Then, phone the sysadmin of the intended server and have him spell out the thumbprint of his certificate: if they match, then you know that your browser is seeing the right certificate, and can register it as a locally known security exception.

(The process described above is exactly what is done for SSH, and it works for SSL too.)

How to install a "security exception" depends on the browser and the operating system, and I am way too lazy to lookup and describe all the possible combinations. But, at least, you have the concept.


Downsides of showing email address on Android lock screen My stock Android 9.0 gives me the option of showing some short text message on the lock screen. I want to add my email address here, so people know how to contact me if they find my phone.

Are there any downsides to this? The address is linked to the Google account that's used on this phone.

I know there are other options for getting my phone back, like find my phone, but I want a method that allows the finder to find me instead of the other way around.

Your email address is generally public knowledge, so disclosing it is often not a big security risk.

But it gets complicated when it's your phone. Because your email address is often used as your username to log into services, and you (should) use your phone as a second factor when logging in, tying those two pieces of data might have unintended consequences. Yes, you (should have already) encrypt your phone and you (should) have a strong password to log into your phone, but there are risks depending on how you implemented everything.

The better option to do what you want is to display a secondary address that you do not use as a username anywhere. This is easy to do and to simply forward all emails from there to your primary address.


Can there be a way to exploit PHP include_once() when the input is filtered? Let's assume there is this code for including other php files from user input (yes, I know it's a bad choice):

$input = addslashes($_GET["input"]);

if (strpos($input, '../') === false) {
    include_once('/path/to/php/files/'.$input);
} else { echo('Invalid parameter!'); }

This code adds slashes to single and double quotes, and then check for ../ in the string, and if it does not find it, includes the file.

Assuming that the hacker has written some code to include to other folder, and the hacker needs to access that file with ?input=../../folder/extcode, can there be a vulnerabillity here?

This code is vulnerable to LFI when running on Windows systems, because those systems will accept a path containing a directory traversal which uses backslashes (like \..\..\).


PCI service provider and separation This is connection to my previous question: Shared Database and PCI Compliance

However, this question relates to the requirement "Appendix A: Additional PCI DSS Requirements for Shared Hosting Providers".

If we are a service provider, is there any requirement (or recommendation) to:

Keep the Shared Database separate per client? i.e. a separate instance of the DB service running on a different port.
Have separate processes on our service where we decrypt data that may contain CHD? e.g. for our first client we use port 443, for our second client we use port 444, etc.

We do not store or process card data, we only decrypt it, analyse it and then re encrypt it for transmission. The Shared Database contains configuration information for certain parameters for our service, but it is not possible for a client to configure it in such a way that it will affect other clients.

Also, the processes for our service do not run client code. It is our own application. I mention this as the A.1.1 states:

  A.1.1 Ensure that each entity only runs processes that have access to that entity’s cardholder data environment.

Although the guidance states:

  If a merchant or service provider is allowed to run their own applications on the shared server, these should run with the user ID of the merchant or service provider, rather than as a privileged user

As our applications run only our code (not any code by our clients), how does this affect the interpretation of A.1.1? The definition in the Testing Procedure is:

  If a shared hosting provider allows entities (for example, merchants or service providers) to run their own applications, verify these application processes run using the unique ID of the entity.

and my interpretation was that the running code was not a merchant's "own application", however our QSA believes that this requirement applies.

My question comprises of the two closely related questions above (in bold) relating to how much separation is required.

I'm agreeing with AndyMac that you are in fact not a shared hosting provider, you are just offering a platform, so I think your QSA is wrong. So what do you do if you are not sure about his opinion? Then you get a second opinion where you explain your concerns! Ensure that you challenge your QSA first to explain why he believes you are a shared hosting provider even though you aren't running code of your clients but your own.

But remember that PCI-DSS is about implementing a security baseline. Now you can make it yourself really complex and start building complex network segragation and implementing seperate processes etc... In my opionion, what you should do is use a system where you template an OS with your application + seperate database and just deploy one per client in an isolated trust zone. Then you can forward from a dedicated IP on a per port basis or if you run it through a VPN only provide 1-to-1 connectivity for a certain IP address based on the login credentials.


Is a SHA-256 signature required on a CSR in order to generate a certificate with SHA-256 signature? I've heard conflicting statements about this from certificate authorities and security groups and would like to confirm: Is a SHA-256 signature required on a CSR in order to generate a signed certificate with SHA-256 signature?

I thought it wasn't a requirement but can't find anything to definitively confirm one way or the other.

There is no technical reason that would prevent a CA from issuing a certificate with a SHA-256 signature, even if the CSR was signed by the requestor using some weaker signature algorithm.

The purpose of the signature in the CSR by the requestor is to prevent someone from requesting a bogus certificate containing someone else's public key.  It is the responsibility of the CA to verify the signature in the CSR (signed by the requestor using the private key corresponding to the public key contained in the CSR), using the public key contained in the CSR.  Assuming that the signature is verified, the CA then goes ahead and produces a certificate containing the relevant information from the CSR (e.g. the common name, public key, etc), and then signs the certificate using their own private key, using whatever signature algorithm that they choose (usually SHA-256 nowadays).  Of course, the CA could reject the request if they feel that the signature algorithm used by the requestor to sign the CSR was not strong enough, but that would be at their discretion.  But as you can see, there is nothing that would prevent the CA from issuing a certificate and signing it with a SHA-256 signature, so long as they were satisfied with the signature by the requestor in the CSR.


Is it possible too exploit CORS with double Origin value? I found a website that has a well implemented CORS configuration, but for some reason I am able to insert two Origin headers in a POST request, and both of these values are reflected in the reponse.

So if I try:

Host: example.com
Connection: close
Origin: https://evil.com
Origin: https://example.com

The response will be:

HTTP/1.1 200 OK

access-control-allow-origin: https://evil.com,https://example.com
access-control-allow-credentials: true

Is there any way to set this in a payload to be able to exploit this? How could I set the origin value for both of this to exploit it?

First of all, to be clear: A site that returns ACAO: {your origin} for arbitrary origins, and also returns ACAC: true, is completely insecure. That site has, for the most part, turned off the same-origin policy's protections for itself; any other site on the Internet is able to view the content of, and take control of, any user's session on the vulnerable site. If you're content with client-side attacks (the category that contains XSS, CSRF, clickjacking, etc.), a site configured the way you describe is wide open. You don't need double origins or anything like that.

Now, as for whether you can do anything interesting with the bizarre behavior the server displays when you send two Origin headers: I don't know. Assuming you can control the Origin header somehow - which isn't supposed to be possible from within a browser, and is easy from something like curl but non-browser clients don't have same-origin policy and thus don't require CORS anyhow - you can try to break the server's processing of the headers. Standard attacks include newlines in the header (using %09/%0D or other encodings) to see if you can inject additional headers or entire body responses, null bytes to try confusing string-parsing code, large numbers of keys that all hash to the same value (using the platform's hashCode implementation) to try overloading a hashtable and causing a DoS attack, and more. Most of those aren't in any way particular to either the Origin header or the behavior you're observing, though.


What are some attacks I can perform if I break into victims lan router? I am new to Linux / Kali, but I am trying to learn as much as I can.

For the past five days I have been using Google and learning on my own. I have been learning about breaking into routers and have had some success. I was able to gain access to the admin panel. What attacks or exploits can I perform at this point and how would I execute them?

Once you have admin access to a router, you have complete access to the WAN and LAN of that network. This is one reason that enterprise networks are (should be) segregated into multiple networks separated by firewalls. In that situation, all you would have gained access to is probably the "DMZ" or outer zone network.

With such a foothold, you can open up inbound and outbound ports, install monitoring on the router itself and use the router as a platform for attacking other systems further into the network.

Any enterprise router should have monitoring already installed to help identify this kind of attack, reporting it upwards to admins and the SIEM. A common scenario is for the SIEM to aggregate logs from routers to monitor for anomalies.


How can I get more spam for my honeypot? Spam is everywhere and everyone gets it (especially professors), but I noticed that my personal email does not get much spam. How can I get more?
What are the most common ways of getting spam? Not just by forgetting to unsubscribe from a mailing list, but also how do hackers get access to email addresses?

Spammers will "scrape" the internet for email addresses and use programs to collect millions of addresses. Or just download them.
If you want your email address to be picked up by spammers, you need to expose your email in multiple different places. The common targets for spammers are social media sites and places like pastebin.


CVSS Score Remote or Local Scenario I have to deal with a lot of CVSSv2 and CVSSv3 scores for many, many years. What troubles me like forever is what default attack scenario shall be defined for a vulnerability. Let's take a malicious Office document as an example. As soon as it is opened it is able to run code within the context of the user. There are two possible scenarios which lead to two different CVSSv3 vectors:

CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L -> 6.3

This is the traditional scenario applied by malware which spreads via email over the Internet (AV:N). An user (victim) has to open the file willingly (UI:R) to initiate the code execution.

CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L -> 5.3

This is the other scneario where a local attacker (AV:L) abuses the vulnerability to gain elevated privileges. No unwanted user interaction (UI:N) is required by the "victim" (because the attacker and the victim are not the same person in this scenario).

Which one is right or better? We tend to use the one with the higher score if it is a realistic scenario. This discussion applies to every vulnerability that might also be used willingly within a local attack scenario (e.g. most browser-based attacks).

If you go by the spec and examples from first, neither is correct.
Let's start with examples:

CVE-2015-1098 - which is about DoS in iWork via a specifically crafted file - is scored as AV:L and UI:R.

CVE-2009-0658 - which is about a buffer overflow in adobe acrobat via a specifically crafted file - is also scored as AV:L and UI:R.

The reason in both cases is that the vulnerability is in the local parser and the victim has to open the file.
Looking at the CVSSv3 spec , we can see why:

Network: A vulnerability exploitable with network access means the vulnerable component is bound to the network stack and the attacker's path is through OSI layer 3 (the network layer).
Local: A vulnerability exploitable with Local access means that the vulnerable component is not bound to the network stack, and the attacker's path is via read/write/execute capabilities. [...] she may rely on User Interaction to execute a malicious file.

Neither of the attacks work on the OSI layer 3, so they are not "Network", but they do rely on a user executing a malicious file, so user interaction is required.
Note that this is in contrast to CVSSv2, where the CVSSv3 examples list the issues as access vector network (which doesn't really match the CVSSv2 guide). The CVSSv3 user guide offers some explanation for this:

In CVSS v2.0, Scoring Tip 5 stated: "[...]" This guidance sometimes led to confusion in cases where an attacker would trick a user into downloading a malformed document from a remote web server, exploiting a file parsing vulnerability. In such case, analysts using CVSS v2.0 would treat these vulnerabilities as "network," [...]
This guidance has been improved in CVSS v3.0 by clarifying the definitions of the Network and Adjacent values of the Attack Vector metric. Specifically, analysts should only score for Network or Adjacent when a vulnerability is bound to the network stack. Vulnerabilities which require user interaction to download or receive malicious content (which could also be delivered locally, e.g. via USB drives) should be scored as Local.
For example, a document parsing vulnerability, which does not rely on the network in order to be exploited, should typically be scored with the Local value, regardless of the method used to distribute such a malicious document (e.g. it could be a link to a web site, or via a USB stick).

So basically, the CVSSv2 network scoring resulted from confusion and is not seen as correct.
Note that browser-based attacks are seen as completely different than file-based attacks, as the network stack is involved (the link contains a rather lengthy explanation).
From a technical perspective, this scoring makes a lot of sense to me, as it actually looks what the attack vector is. Practically, it may seem a bit odd that two issues which result in the same damage and which may be exploited in very similar scenarios receive so different scores.
You did not ask about it, but your CIA ratings as L seem too low to me. I think a good argument could be made for H, which would give you CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H -> 7.8


Upload a file into directory with public write access I know it is not right to set a permission for the folder as 777, but if it is done so will it be possible to upload a file into that directory without ftp access ?
Here is what I mean

Lets say the directory listing is not disabled from apache config, and I can access the folder by ip from the browser, like (im trying from my Win PC connecting to linux in vmware)

http://192.168.252.138/test/public

and lets assume this public folder has 777 permission. Can I somehow(using php or anything else) create file test.php in that folder. I tried smth like (running this from localhost of the Windows)

file_put_contents('http://192.168.252.138/test/public/test.php', 'test file')

but I get warning

failed to open stream: HTTP wrapper does not support writeable connections in

I do not know if this is even possible. And if these is not, then what harm possible attacker can do if I have a directory like that with public write access. considering that there is no ftp access.

Thanks

So there are three scenarios I've seen this pitfall in real life:

Insecure WebDAV configuration. WebDAV allows your server to respond to HTTP requests like "PUT /foo/bar/public" by receiving files. If WebDAV uploads are world accessible, you're hosed.
Insecure file upload capabilities. If they can redirect the folder it places files in, you're pwned. Or, alternately if you just let people upload random files, you're... special. Very special.
Command injection. If attackers can get access to a command line, you've just given them a handy place to put all their malware in your webroot without needing root or fiddling with permissions.

777 is an AWFUL idea. It's like leaving the door to your house open. chmod 605 (-rw----r-x) is an okay default permission for web stuff. Just be careful about the +x; use it sparingly. While 777 itself doesn't create exploits, it makes existing ones very, very deadly. Don't give your attackers any opportunities.


Login with AD credentials on behalf of a user We have a web solution (running in IIS) where AD users and non-AD users need to log into. We sell this to companies and will run this on-prem only.
non-AD-FS and only AD question (so no federation)
I asked on stackoverflow if it is valid to pass the username and password to the web application and have the application logon in their behalf versus using Windows authentication enabled sites. Where of course the credentials are never stored or logged etc. here: https://stackoverflow.com/questions/63047112/is-it-wrong-to-send-active-directory-credentials-of-a-user-to-a-backend-system/63055942#63055942
At first this seemed a very bad idea which was my initial reaction. But it seems it is an acceptable pattern.
Will security officers (CSO) in companies, in general, accept this or not for a 3rd party solution installed on prem? Because the risk is that it is implemented in this way and CSO or static security code analyses will later on whistle.

Will security officers (CSO) in companies in general accept this or not for a 3rd party solution installed on prem?

Nobody CSO can tell you how another CSO will answer that question. Personally, as an Active Directory admin I successfully advised against implementing dozens of applications already, that provide LDAP or local authentication already.

At first this seemed a very bad idea which was my initial reaction. But it seems it is an acceptable pattern.

Yes, it's common that applications provide only LDAP authentication. That does not negate the drawbacks.

Your application is asking your company's employees for their credentials to your company's internal Active Directory. There is trust there. (From the Stackoverflow answer)

Trust has nothing to do with security. Hundreds of thousands of companies trust in Cisco, yet they implemented backdoors in some of their switches. Trust can be betrayed.
As an Active Directory sysadmin I generally advise against implementing any software that asks my users for their password for several reasons:

It opens up a new attack surface, for no good reason.
Code audits are cost and time expensive, if possible at all. And they still don't provide 100% security.

If the application asks for credentials, an attacker (which may even be the developer itself) is able to collect users Active Directory credentials. Regardless of whether they're never logged or stored in the app. With the credentials, the attacker is able to access everything outside the app the user has access to.
Many companies provide passwordless authentication mechanisms like Kerberos/AD, SAML/ADFS/AzureAD, oAuth/ADFS/AzureAD. And for good reason. They work passwordless and if any attacker targets the third-party system, they will not be able to gain access with credentials outside the application they compromised.


Is there a way to bypass Django's XSS escaping with "unicode"? Django (the Python web framework) escapes output to prevent XSS (Cross Site Scripting) attacks. It replaces ', ", <, >, & with their HTML safe versions.

However this presentation on slide share, (specifically slide № 13), says:

  Problems

  Any other Unicode will bypass this check

I can't understand this complaint. Is there some unicode character that will not be replaced by Django's escape function that will allow an XSS? I know a bit about unicode, and I can't think how.

It is not clear what exactly the slide is referring to. Django's auto-escaping should be fine against HTML-injection in text content and properly-quoted attribute values.

There are not other Unicode characters that can evade HTML escaping, but in principle there are byte sequences that could be misinterpreted as being in the wrong Unicode encoding:

If the browser decides to interpret a document as UTF-7, +ADw- becomes a synonym for < (and similar sequences for &"'>), allowing HTML metacharacters to avoid being escaped.
Some East Asian multibyte encodings allow trailing bytes in a multibyte sequence to be in the 0x00-0x7F range where they could be interpreted as ASCII characters, and mis-escaped if handled in that way. Usually that would just lead to broken text rather than a security issue, though.
Invalid 'overlong' UTF-8 byte sequences may be interpreted as ASCII by some very old browsers (the original IE6 pre-SP1, and Opera at around the same time). This could allow HTML metacharacters to avoid being escaped, such the byte sequence 0xC0 0xBC representing <.

To avoid these problems you would (a) make sure to serve your documents with a UTF-8 Content-Type charset, and (b) keep all your text strings as native Unicode strings internally so that they can never encode to invalid UTF-8 sequences.

Since Django apps tend to do this by default already, it is not a likely scenario that Django templates' auto-escaping would be defeated by Unicode problems.

That's not to say XSS is solved in general of course - you still have to avoid misuse of |safe, unquoted attributes, non-HTML injection problems (like JavaScript strings, CSS properties, URL parameters), HTML content-sniffing, dangerous URL schemes (javascript: et al), and so on. But as a defence against HTML-injection in templates it should be sound.


Use DANE to authentify mail sender I have my own virtual DNS infrastructure, from the root to the mail server mail.example.com. Everything is signed using DNSSEC.

client1@example.com can send email to client2@example.com, digitally signed with his certificate. As both the clients trust the same CA, client2 can validate this message.

What if the CA is compromised? Discussing the likelihood of such an event is not the point. Thus I want to add an extra layer of security. I want to add DANE record for client1's certificate.

How can I add a DANE record for email sender's certificate?

Something like:

client1@example.com   IN TLSA ...   AwAeKhf...

That is not what DANE is invented for.  The TLSA records are to give extra security mainly to connect to transport endpoints (say, TCP ports) on named hosts, so that the certificates for host names can be independent of Certificate Authorities.  With DNSSEC, this can be achieved in a cryptographically secure way.

Some people consider it a disadvantage, that someone controlling one level of domain names can control all names AND certificates present on those names.  Actually the owners of the root domain (.) can securely fake any host name and with DANE, a secure certificate as well.

RFC6698 explains it this way:

DNS-Based Authentication of Named Entities (DANE) offers the option
to use the DNSSEC infrastructure to store and sign keys and
certificates that are used by TLS.  DANE is envisioned as a
preferable basis for binding public keys to DNS names...

There is (at least one) related proposal of storing the location of user PGP keys in the DNS of their mail domains in TXT records, but it's main purpose is to make it easier to find such a key, not to actually verify it.

There IS a proposed standard RFC4398 to actually store the certificates, but as it was created before DNSSEC was widespread, it does recommend against storing whole certificates if they would cause the UDP response to be bigger than 512 bytes.  It doesn't seem to me it's in wide use either.

Since all user verification occurs in server software requiring additional configuration, there's usually little need to expect official CA issued client certificates, and/or a standardized way of storing additional copies of the said certificates.  You're actually free to implement any such verification in your program/site.

If you think the CA compromise may make the user certificates invalid, you it may be easier add each user certificate individually as a trusted certificate instead, for example.


iOS application pentest without jailbreak Is it possible to run a security assessment on an iOS application using a non-jailbroken device?

My device was recently restored (recovered - no SHSH blobs) to iOS 8.4.1 (as Apple doesn't like people using less than latest firmware versions) and as there is no public jailbreak method available to fix this (probably for the next few weeks), the required tools can't be installed (as far as i know).

So, has anyone done anything like this?

Recently, I was able to downgrade my iOS 8.4.1 to 8.4 and jailbreak. However, as you alluded to, this is no longer possible especially without the SHSH blobs.

There are ways to perform a security assessment on a jailed iOS device. The method was first detailed here -- http://forum.unity3d.com/threads/urgent-mac-app-review-team-rejected-because-gamekit-framework-linked.261354/

but further elaboration to modern mobile app penetration testing needs was discussed by Carl Livitt on the Bishop Fox blog in a two-part series:

http://www.bishopfox.com/blog/2015/02/rethinking-repackaging-ios-apps-part-1/
http://www.bishopfox.com/blog/2015/05/rethinking-repackaging-ios-apps-part-2/

You will find that some services, such as IBM's BlueMix AppScan Mobile Analyzer for iOS, will perform similar (but perhaps not the same) assessments using jailed iOS devices.

Once you have enabled use of Cydia Substrate (or cycript), it shouldn't be much of a challenge to get the standard Theos, Logos, idb, and Frida tools working. You can read more about Theos and Logos (and associated infrastructure) in the "Tweak Development Using Theos and Logos" subsection of the Mobile Application Hacker's Handbook, as well as Frida and Cydia Substrate in its section on "Attacking the iOS Runtime". More information on idb can be found in the book, "Learning iOS Forensics". Hooking some functions that accept a variety of arguments can be an additional challenge, but there is some concept code capable of hooking variadic functions.


Are there any security risks in replying to an SMS message? I routinely receive seemingly harmless SMS messages from unknown people. They're usually simple, like "Hi" or "Hello" or "Are you there?". This happens several times a week, and certainly often enough that it seems to be some sort of organized, ongoing effort to get me to reply. I'm trying to understand why someone (or several someones) would bother sending such messages.

Is this a known hacking/phishing technique? If so, is there useful information that someone can obtain just by sending an SMS message, and what can be determined if the recipient replies (assuming they don't include any personal or security information in the reply)?

Some telephone or SMS numbers allow for an additional charge that is automatically recovered by your phone provider and reversed to the owner of the number. This is mainly used (legally) for some TV games where each participant pays a little money when calling a special number or sending a SMS. At the end, either one of the players earns something, or the answers of participants were used for an election (a miss election for example).

So a not so good company could set up a system like that and send tons of SMSs asking for a reply to such an overcharged number - and optionally omit to say that it is overcharged... The cost of mass sending SMS is low, so if they get an acceptable return rate, they will earn some money with it.

When you are aware of that, and willingly send an overcharged SMS to participate in the election of the song of the year, all is fine. But when you receive a SMS just pretending to come from a friend and end in paying more than the simple SMS it is robbery.

But as this kind of company hides themselves abroad or vanish as soon as you reclaim to have your money back, it is much better to never send them any overcharged SMS.


Protecting data on a remote device Background

I have am developing a service which consists in a small headless client device (e.g. OLinuXino) which will contain sensitive data.

The device will be plugged to a remote network (maybe behind a firewall) and its goal is to open a reverse ssh tunnel to a server automatically (i.e. unattended).

The device will contain a key to connect to the ssh server, and that key should not be used in another device.

The device will be distributed to customers so anybody could have a physical access to it.

I do not want that anyone could get the data from a given device and my goal is to slow down the retrievial of sensitive data.

At least, if it happens, I would like the server to detect it and block any further access using the key from that given device. Actually, if someone just tries to do something nasty with the device, I could definitely block its access (and blacklist that person or company).

The device is a small Linux machine (running Debian Wheezy). I do not plan to use a damper-resistant chip for now (as described here)

Notice

I already heard of Mandos, but it seems to work only on local network, although my device and server will be on remote sites.

I also read this question: For remotely unlocking LUKS volumes via SSH, how can I verify integrity before sending passphrase? and I am aware that what I want to achieve may be impossible. But my goal here is to add the most possible security to that device.

My current solution :
My first thought is to encrypt the device's rootfs volume to protect the data on it (based upon this solution). When the device is switched on, it connects unattendly to the server (with initramfs) and opens a first reverse ssh tunnel (with a key that is less important for me to loose).

I plan to remove keyboard or screen connectors and/or drivers on the device.

The server then (unattendedly) :

uses the reverse tunnel to connect to the device;
uploads to the device a program that checks that no files were modified;
uploads to the device a small program that checks the hardware of the device (cpuid and mac address) and runs it to get this information;
if one of the above did not work or returned incorrect information, blocks the device access and the customer's account (i.e. the server will never accept them to connect anymore), eventually erase all data on the device;
if the steps 2 and 3 were successful, it then decrypts the rootfs volume and allow the real system service to be launched;

All filesystems on the device are mounted read-only using union filesystem (aufs).

After that, the first reverse tunnel is closed and the device boots.

After boot a new tunnel is opened with the "real" key. At that time, sensitive data is decrypted in the device's RAM.

My goal :
My goal is to secure the device's rootfs or a part of the data that is inside it, blocking or slowing down anyone who wants to read it.

My questions

Question 1: what are the harms of my solution ? what are the possible exploits for each step ?

Question 2: are there other possible solutions that would be better to achieve my goal ?

To answer your first question: I think the big risk with your set-up would be that you cannot prevent access to your initramfs. This would allow an attacker to gain knowledge on your set-up, which then allows for a full MITM kind of attack, accessing your software (with the private key built-in). From that moment possibilities are endless as you could reverse engineer that package you want to send to your device, gaining access to that ssh keys you do want to keep at highest security. Or maybe modifying some code so you think all is alright, but actually isn't.

Removing some connectors ain't going to help you to a determined attacker which might just re-solder those connectors. And a very determined attacker with time and money might just do a full dump of the flash memories and start working that way.

The fact is, physical security opens a wide range of possibilities to attack a device, which can almost never be prevented from happening (unless booby-trapped or so).

Another risk I see is that your set-up is relative complex, so things could break. For instance, when a simple SSH tunnel cannot be opened because of a firewall rule. Or, what about if the dropbear software you want to use has a critical externally exploitable vulnerability. How would you fix that?

Question 2: Without giving more details on what you actually want to achieve with these headless devices, it is hard to give some advise on what might be a better solution in your case. It sounds like you have absolutely no trust in the places or people you install that device. What makes you still want to do it in the first place if there is no trust at all?


How to find out if content on my XAMPP server has been altered During the development of a site, me and the team decided to develop the site with my computer as a server, with me making my localhost available from outside. I have been using several settings to try protecting the site while in development, for example by adding password to XAMPP, phpMyAdmin, but recently one of the team members said to me that when he visited the site a day ago, some content on a .php page on the site (images and text sections) has been altered.

When I took a look at the site everything was like it was before, not a single character in the source code had been altered as far as I could tell. Also, the DB is intact and nothing else has happened since.

My question now is: what can I do to assure myself that the server has not been hacked into, and what can I do to secure myself from threats of this kind in the future?

It's very hard to be have assurance there is no malware present on your server. There are indicators of compromise, but considering you probably didn't log anything remotely and did not have controls in place to prevent unauthorized alteration, it's very hard to rely on your system.

Some recommendations (from the perspective that you are on a very limited budget):

Use external version control like git (keep it seperate from your test server)
Don't host your development environment on the internet, there's no reason to expose it to the internet, use VPN or SSH tunneling to access the server
Log all access remotely, log file alterations on the file systems where you believe you are hosting critical data
Use HIDS to detect violations


Is chaining multiple VPNs a good way to reach anonymity on the internet? I would like to chain a couple, say 6 or 7, VPNs together to create a sort of "super" encrypted lane on the internet. I'm not too concerned about speeds, all I want is privacy and anonymity.

I've read online about adding a Tor exit node to the equation for an even better level of privacy. Is this a safe option to increase my VPN chain?

I'm going to use this "super" VPN Chain mostly on public WiFi so does this rule out any attacker might get ahold of my data? Some sites I use on a daily basis don't have an SSL layer and there are also some sites that have me worried about their level of security.

It depends on what you're trying to defend against.

If you're trying to prevent a site operator from identifying who you as a user are, multiple VPNs won't gain you anything.  The operator will see the traffic as coming from the endpoint of the final VPN regardless of how many there are in the chain.  You're still vulnerable to being identified through other means (eg. if you sign up with a username you use elsewhere).  This is essentially the same level of anonymity you'd get through TOR, but it costs more (and presumably has better performance).

If you're trying to keep a government from tracking you down, multiple VPNs again won't gain you anything.  The government just needs to identify the last one in the chain, and then ask who's paying for it.  Here, TOR is better, since there's no financial link to you.

If you're dealing with an adversary who can monitor packet movements on the Internet, but can't monitor financial transactions or serve subpoenas (I can't think of any), chained VPNs will increase your anonymity by increasing the number of traffic flows they need to monitor.  But this is a very rare case, if it exists at all.


Can a SIM card propagate malware? Is it possible that malware can infect a SIM card? What will happen when I insert the SIM card in another phone?

Theoretically: yes.

Practically: The use case for this is too small to be worth the effort.

Lets do a very theoretical excursus on how this could be possible:

In theory, every computer communicating with other devices is vulnerable. This is simply due to the fact that interpreting communicated signals always leaves room for error.
If such an error is exploitable a virus could infect a SIM card.

Lets assume the SIM card has been infected; the virus took full control of it. When the SIM card is inserted in another phone the same principle applies: simply because the phone is communicating with the SIM card the phone exposes its vulnerabilities. Thus the SIM card could re-infect other phones.

Back to the real world again:

A virus with the capabilities to infect a wide variety of phones would by far exceed the storage space of any SIM card ever manufactured with good intentions. SIM card manufacturers do (to my best knowledge) not publish documentation on their SIM cards internals. I am very sure that exploitable bugs exist in SIM card software. However, finding those is close to impossible imho (due to the concealment of documentation).


Force all user processes to be ptraced I'm implementing a ptrace based tool for logging system call use. It is much more simple than strace, but I'm doing this so I can learn how these tools work. I'd like to trace all user processes since they're created. Can it be achieved with ptrace?

New processes are created with system calls, namely fork(), vfork() and clone(). These days, the C functions corresponding to these calls are implemented with an underlying call to clone() (the actual system call, as seen from the kernel), but the two other system calls are still there and could be invoked by any process with a simple bit of assembly.

To trace all user processes, you just have to use ptrace(), and intercept these calls, so that you can attach to new processes immediately after their creation. That's how strace works.


Are these two ways safe? I have two scenarios and want to know if each is secure or which risk there are.

Number One:

If the User has the edit Link (edit/[md5hash]) he can edit a post. The editkey (the hash) is in an form hidden field to tell the Controller Action which post is going to be edited.

The user could edit the value of that field, but would need other keys, to change other posts, wouldn't he?

Number Two:

When the user creates a post. A cookie with the name "post[id]" and the md5-edit-hash as value is set.

When a post is requested the controller checks if the edit-hash in that cookie (if it exists) is the same as in the post data.

It is unsafe if many people would share the browser and the cookies are not reseted, isn't it? Are there any other issues or any solutions to make it safer and better?

Thank You

Edit:

I'm using Laravel 3 - a PHP Framwork
Yes, I'm avoiding authentication for special reasons ;)

I could use any other hash method like SHA, if this would be a problem

The hash is generated from a timestamp + salt + postid + salt + authorname

I don't see any resemblance of access control in either scenario.  If you haven't been told this already:  stop using md5! it is old, broken, and inefficient,  use SHA-256 or just a simple cryptographic nonce.

In the first scenario if the attacker knows this magical "md5hash" then they will be able to always use this edit feature.  How do you keep the user from obtaining this hash?  How is this hash generated?

Scenario two seems even less secure,  it is trivial to send an arbitrary post and cookie variable:

curl http://some_vulnerable_site.com/edit  --data "post[id]=1&hash=somevalue" --cookie "hash=somevalue"

All GET,  POST,  COOKIE, and HTTP header values are under the attackers control.  A cookie should hold a session id,  which references state about that user (a user id), which can be used to enforce access control to data.

If you want to know more about security,  make sure you read the OWASP top 10.  In terms of this post, you should read: OWASP A3- Broken Authentication and Session Management.


What is the relation between ANSI and ISO regarding ISO 27000? So in one answer I was told that ANSI is a governing body (the only one in the world) for ISO 27000? I think I got something wrong, because I don't see ANSI mentioned anywhere when I read about standards (not that I'm looking for that intentionaly). It's ISO everywhere! Can someone please try to explain me the difference between the two? Does ANSI actually have anything to do with ISO 27000?

ANSI stands for American National Standards Institute

ISO stands for International Organization for Standardization

ANSI is the American representative of the ISO body.

So, yes, ISO is the umbrella, but in the US, ANSI is the representative.


CSRF on inter-app communication iOS How can I make a request from one app to another on iOS and verify the origin of the app request?

Apple used to have an applicationSource sent along with deeplinks, but it's now being deprecated. Does anyone have any techniques to mitigate against this CSRF?

You should not allow for state to be changed in a meaningful/dangerous way using either URL schemes or deeplinks. Apple gives the following warning:

  Warning

  URL schemes offer a potential attack vector into your app, so make sure to validate all URL parameters and discard any malformed URLs. In addition, limit the available actions to those that do not risk the user’s data. For example, do not allow other apps to directly delete content or access sensitive information about the user. When testing your URL-handling code, make sure your test cases include improperly formatted URLs.

https://developer.apple.com/documentation/uikit/inter-process_communication/allowing_apps_and_websites_to_link_to_your_content/defining_a_custom_url_scheme_for_your_app

While this is aimed at URL schemes, Apple still does not guarantee the authenticity of any incoming URL based launches (as shown by the deprecation of the source attribute). If you need to communicate securely between processes, you should use an App Group entitlement to direct the system to create a secure, shared sandboxed environment for a specific set of applications your developer team has created. If you need to communicate something between processes, you can write a message file and then launch the other application by its URL scheme and direct it to try and parse the stored message. This is secure as no false messages can be injected without compromising the iOS sandbox.


Need help in creating a .PFX file for SSL Certificate Installation I am trying to install an SSL Certificate in IIS on Windows Server. It only accepts the .pfx file format for importing & installing an SSL certificate for hosted applications.

I downloaded and installed OpenSSL for Windows from here.
I placed the .crt file & .key file into C:\Program Files\OpenSSL-Win64\bin.
Then I ran this command to generate a random file:

set RANDFILE=C:\Program Files\OpenSSL-Win64\bin\<RANDOMFILENAME>.rnd

Then I ran this command to give a path of config file:

set OPENSSL_CONF=C:\OpenSSL-Win64\bin\openssl.cfg

Finally, I ran this command

openssl pkcs12 -export -out certificate.pfx -inkey privateKey.key -in certificate.crt

The result of this was:

unable to load private key
140406554043456:error:0909006C:PEM routines:
get_name:no start line:../crypto/pem/pem_lib.c:745:Expecting: ANY PRIVATE KEY

I want to know if I'm making any mistake in the steps that I followed. I also want to know the reason of this error.

Let me explain what all of these files are and what they mean. Then the solution will become more obvious:

What is a public and private key?

Public and private keys are two parts of a key, used for asymmetric encryption. They are mathematically related, and are generated together. The public key, as the name suggests, can be made public without any loss of security. In fact, it's necessary so others can send messages.

When sending a message, the sender uses the recipients public key to encrypt a message. The recipient then uses their corresponding private key to decrypt the message.

While there are no standardized extensions for public and private key files, commonly chosen names are myname.pub.pem and myname.priv.pem. Some people use myname.pub.key and myname.key (or myname.priv.key), but on Linux systems, extensions are not important.

What is a certificate?

A certificate is a public key, which was signed by another certificate. The way this works is that someone creates a certificate signing request, which contains their public key and is signed by their private key. The request also contains other identification information, such as domain name, e-mail address, etc., depending on the intended purpose of the certificate. The request is then sent to a certificate authority, which validates this information somehow and then signs the request (or not).

The result of this signature is a certificate, which is basically this:

  Hello, my name is Alice and my public key is

11:22:33:44:55:66:77:88
99:00:AA:BB:CC:DD:EE:FF

  Bob has signed that I am Alice. Bob's certificate is below:

  Hello, my name is Bob and my public key is

AB:CD:EF:01:02:03:04:05
06:07:08:09:10:12:13:14

  Claus has signed that I am Bob. Claus' certificate is below:

  ...

This would keep going until someone eventually signs their own certificate. This means they claim to be who they are, and you should just trust them. These certificates are called "root certificates" and are shipped together with your operating system.

Since a certificate is, in it's most basic sense, a public key with "stuff added to it", you still need the corresponding private key to use it. You can download certificates from other websites too, but without the corresponding private key, you cannot use them in any way.

What is a PKCS #12 file?

In the broadest terms, a PKCS #12 file is a bundle of cryptographic things. As stated above, in order to use a certificate, you need the corresponding private key. To make things "simple" for deployment, the certificate and the private key are often bundled together in one PKCS #12 file (e.g. myname.pfx).

Of course, PKCS #12 offers much more, and Wikipedia gives a good overview over its features.

So, what is the problem?

The problem is in the following line:

openssl pkcs12 -export -out certificate.pfx -inkey privateKey.key -in certificate.crt

What this does is take a certificate (certificate.crt) and a private key (privateKey.key) and bundles them into one PKCS #12 file (certificate.pfx).

The error "unable to load private key" and "Expecting: ANY PRIVATE KEY" indicate that what you provided is no private key. What exactly the reason for this is can't be deducted from the information you provided, but here are some wild guesses:

You didn't see that privateKey.key was a placeholder and your file is named differently.
You didn't change into the correct working directory where the certificate and private key were.
You used your public key instead of your private key.
You don't have correct permissions for your private key.
Your private key is not in a recognized format (e.g. newline shenanigans)

I hope this explains the situation well enough and gives you enough pointers to go by to find a solution.


How to configure more than one same Hardware Security Module (HSM) ---Updated---
I had a mis-understanding to HSMs, I thought that they were similar to huge USB tokens!
(>﹏<)′ ~

Let's encrypt claim that their private keys are stored in HSMs, but how can they have many HSMs with the same key?
I think that they must have more than one server to issue so many certificates, then how can each of these servers have a HSM with the same private key?

I don't know the HSM Let's Encrypt is using. But all major vendors have different mechanisms for doing backup and recovery to an encrypted medium.

One vendor-specific example:

If you setup nCipher/Thales HSMs from scratch a so-called "world key" is generated which is stored encrypted on normal disk and with which all keys used for crypto operations within the HSM are encrypted.

The world key itself is encrypted with a key stored distributed on a so-called "admin card set" (Shamir's Secret Sharing). So with the files and a configurable k-of-n subset of the admin card set you can restore the world key to a new blank HSM and thus let the HSM decrypt all the key stores also restored to the HSM. They call it "add HSM to security world".

Of course you have to implement your own organizational and technical security controls around that to implement a really secure backup and recovery process.

Having said this you still have to trust the HSM vendor that there is no back-door in the firmware to extract the keys in an undocumented way.


Is there a security risk in hosting an app's HTML/JavaScript payment system on a CDN? We have a mobile app (React and Expo) in which the user is able to provide payment via Stripe. Our implementation uses a WebView which renders HTML and JavaScript content, which in turn pulls in the Stripe JavaScript client and implements the payment process.

We've recently made some modifications to the app architecture and build which has caused an issue on Android in which the WebView is no longer able to access files embedded in the app package. As a temporary workaround we're considering hosting the files on a CDN (probably CloudFront) and loading them in from there.

Would this arrangement be any less secure than accessing the same pages in a browser? It occurs to me that if something caused the app to load the pages from another location (maybe some kind of DNS exploit?) then the affected user could end up with a compromised payment system within what they see as a trusted app.

Is this a risk that should be taken seriously, and if so what measures could/should we take to protect against it?

Your CDN will likely use HTTPS to serve the assets, so if the app is configured correctly (requiring HTTPS with trusted certificate), DNS hijacking/spoofing and other similar malice should at most result in a DoS.

You can use subresource integrity to check the hash of JavaScript files on the client to make sure they match a known good, so any modifications will prevent it from being loaded:

<script src="https://example.com/example-framework.js" integrity="sha384-oqVuAfXRKap7fdgcCY5uykM6+R9GqQ8K/uxy9rx7HNQlGYl1kPzQho1wx4JwY8wC"
crossorigin="anonymous"></script>


Suspicious GET request parameter list? Is there a public list of common suspicious GET request parameter ?
I mean - SQLi, Command Injection, Admin access   etc.
I am interested in such list, to be used to detect suspicious GET request in SIEM(arcsight)

Any idea, reference -  will be welcome.

Thanks a lot

To start with, if you can whitelist instead of blacklisting you can save a lot of efforts.

You can get a list from ModSecurity,  it is not simple to parse on your own but this is probably the most comprehensive you will get publicly.


nmap ssl script with sni support I am trying to query all the https sites on various server VLANs within my network. I can get a list of servers listening on tcp/443 with nmap, and get even more information about the certs using some of the nmap scripts (e.g., ssl-cert.nse). However, some servers are utilizing SNI, so just scanning by IP address only shows the "default" server that answers at a particular address (i.e., no HOST specified in the HTTP header).

openssl s_client has the parameter -servername that overcomes this limitation. I suppose one solution would be to get a list of hosts listening on tcp/443 from nmap, and pass that information to openssl rather than an nmap ssl script. I haven't looked, but cURL may also have this ability. It would be nice to do the whole thing in nmap if possible though.

For the sake of argument, let's say that I have a list of hostnames. Can anyone think of a "pure-nmap" solution to identifying certification information (e.g., expiration date, hash algorithm, etc)?

The easiest way is to pass in just the hostnames and let Nmap do the name resolution. In this case, all the ssl-* NSE scripts will use SNI to pass the server name you passed on the command line. That's not always possible, of course. Some times you have to specify IP address and you still want to provide or detect the hostname.

Over on Nmap's Github repo there is a pull request to add a script argument that will do just that. It can only handle one name at a time, but it's worth trying out. I'll probably be adding it to the next Nmap release, now that you've brought it back to my attention.

A more complete solution might be to allow users to provide a reverse mapping of IP address to name. We already have that present in the reverse-DNS (PTR) records, but these are not always the names that TLS services actually use. You are more than welcome to chime in on Github or via the nmap-dev mailing list.


How many hashes do I need to compute to get x collisions? I know that you need to hash about 2^(N/2) to find a collision taking into account the birthday problem.

But I'm not really sure about more than one collision, I mean, collisions with different values (H(A)=H(B); H(C)=H(D)).

I don't know if is correct if I say that for X number of collisions, I should hash sqrt(x*2^N) values to find X number of different collisions.

Can you tell me if this is a correct assumption or not? and why?

As an approximation, your estimate is close: if X is the number of collisions, you need to hash SQRT(X*2N+1) values.

For a mathematical explanation you can look up this answer on Mathematics; and specifically, ShreevatsaR's approximation (his N is your 2N, with N   your number of bits).

(sorry - I had misunderstood your request in a previous version of this answer. My bad)


Unambiguous terminology for different kinds of malware? I noticed in the literatures that there are no exact boundaries for numerous information security terms such as malware, virus, etc. Some people say malware i the umbrella under which viruses, worms, rootkits, and every harmful software lies. Others categorize them as totally different concepts.

First, is there a standard defining these terms in an unambiguous way?

Second, if malware is the umbrella for all harmful software, I am thinking of categorizing it into a dichotomy of exploits and executables. The former needs vulnerabilities to work and does not require the user to execute it, and the latter are self-contained which require the user to execute them. Would this would be a good taxonomy or is it flawed?

Malware terminology

First, is there a standard defining these terms in an unambiguous way?

Malware is a broad term that includes any software which performs malicious actions. There are several common names for various classes of malware. The specific definitions often change over time, as is the case with the term "virus". Common definitions for various forms of malware are:

Viruses modify existing programs, "infecting" them so their execution also triggers the spread of the virus, until the computer is entirely filled up with maliciously modified software. True viruses are fairly rare now days, but the term continues to be used synonymously with malware.
Trojans disguise themselves as harmless programs, such as video games or screen savers. They require user interaction to execute. These are common in torrents.
Worms spread by themselves through the network, often by exploiting software vulnerabilities in networking services. A worm that exploits popular software can spread extremely rapidly. One of the early worms, SQL Slammer, a 376 byte program, infected 75,000 computers within the first 10 minutes. It slowed down the entire internet just as a result of the aggressive replication.
Rootkits are self-hiding privilege escalation toolkits. They are designed to embed themselves in a system with a high privilege level, ensuring that nothing that runs on the computer can detect it. Rootkits are often able to completely evade antivirus software. Rootkits that infect the boot process to hijack the system early during system start are often called bootkits.
Ransomware is old, but has gained popularity recently. Simple ransomware simply locks the victim's computer until a ransom is paid. More modern and sophisticated ransomware actually encrypts files and refuses to decrypt until a ransom is paid. These programs often make little effort to avoid removal, as their job is done as soon as they execute for the first time.
Spyware is any class of malicious software that monitors a user's private activities and reports it back to the owner of the spyware. It can be used by anyone from stalkers to identity thieves.
Adware is among the least harmful forms of malware. Adware includes any software that displays or injects advertisements on a computer. It is considered malicious when it is installed without consent, or makes attempts to avoid removal. It is commonly implemented as browser toolbars.

Malware can belong to multiple classes. A program that spreads over the network and embeds itself in the kernel for persistence would be both a worm and a rootkit, for example.
Exploits vs executables

Second, in case malware is the umbrella for all harmful softwares, I am thinking of categorizing it into a dichotomy of exploits and executables.

Exploits are not malicious. An exploit is anything that attempts to utilize a security vulnerability to violate the confidentiality, integrity, or availability of a service or task. Sophisticated malware, especially worms, may contain exploits to break security barriers to spread. However, all malware would fall under the classification of executables, as they are all software (or at least executable code, as in the case of shellcode which is not an executable file by itself, but rather is injected into a running process).
What you appear to be describing is the difference between a worm or browser exploit (able to spread with no or little interaction), and a trojan (requires user interaction to trigger infection). This taxonomy doesn't add anything to the existing situation. Improving the terminology is not particularly necessary, as these terms tend to be casual descriptions of generally malicious behavior.