Force the browser to open an FTP Client on ftp:// link - browser

Is possible to force the browser to open a link of type
FTP
to the system default ftp client for examples cyberduck?

There is an option, but it's a permanent option. You can change the associated protocol for the type ftp; more information about that can be found here Register Windows program with the mailto protocol programmatically (although they're discussing the mailto protocol - but it's basically the same).

No, it's entirely up to client to decide, how exactly to handle ftp protocol.

Nope. While each browser handles non-HTTP protocols differently, most allow the user to choose the behavior - e.g. with Opera, you have the option of opening in browser, invoking the default application or setting a custom application.
The only way you could do this would be in IE with a trusted ActiveX control, but that's a rather horrible hack.

Related

Can I know the urls of insecure contents when IE prompt me “Only secure content is displayed”?

When there is mixed http/https content in the webpage. IE prompt me this message.
I know how to disable this message.By the way, can I somehow know what exactly the insecure contents are (the urls)?
Use Developer Tools (Settings menu > F12 Developer Tools) within Internet Explorer to view the resources being loaded using the Network tab, and look for any plain HTTP URLs as per the screenshot below.
Insecure content is content loaded over http (and not https).
It could be images, css, ...
The fix is to point to the secure (https) version of these contents.

Making pop-up window appear on clients that log into a Wi-Fi hotspot

I've set up a Raspberry Pi as a Wi-Fi access point. Everything works, including the captive portal. The web browser on each client is redirected to the login page, which functions correctly. I'm looking to modify the configuration of iptables and/or dnsmasq to make the client open a web browser on the captive portal automatically. Starbucks, McDonald's, etc. can all do it; I'm trying to figure out how to do it.
Here, here and here are partial explanations of how to achieve it, but I'm looking to understand it - not merely follow someone else's instructions - so that I can do it myself. I would like to write a HOWTO on the subject, partly because one doesn't exist yet (or if it does then I can't find it).
There are third-party apps such as Wifidog and Coovachilli, which seem to do the job, but I've failed to grasp how they do it. I believe it can be achieved by modifying the configuration of dnsmasq and iptables, but that's as far as I've gotten. it should do something like this:-
1) Regulate the data packets in such a way as to let the client's web browser realize that there's a captive portal; this will cause the client's web browser to open a window and direct it to the captive portal
2) Handle the captive portal; permit login; modify the settings of iptables to facilitate login; etc.
3) Redirect all traffic transparently after the login
Items 2 and 3 aren't a problem. I'm stuck on item 1. All advice is appreciated, including redirection to existing documentation. Thank you.
I do not know how WifiDog and CoovaChilli do their thing, but ChilliSpot (which CoovaChilli was originally based on) did something along these lines:
Open a raw socket bound to the internal interface
Capture all traffic bound to that interface
If it was authorized (eg. logged in), handle NAT and forward on out
If not authorized, block traffic
UNLESS
If it was not authorized AND HTTP, use some custom code to reply to the HTTP GET request with a 301 Redirect to point to the portal page itself, which would then allow for login.
That's the very simplified version of it, but I expect that most other captive portals will use very similar methods (especially the 301 Redirect). The absolute best way to find out would be to read a lot of code :)
Best of luck!

Internet Explorer - Registering an Application to a URL Protocol after Security Update

As noted in Registering an Application to a URL Protocol:
registered URL protocol vs. Security Update
It seems, that the Kumulatives Sicherheitsupdate für Internet Explorer (2744842) http://technet.microsoft.com/de-de/security/bulletin/ms12-052 supresses the using of the registered URL protocol.
Before Internet Explorer, Mozilla Firefox and Chrome handled such urls in the right way: calling the registered application.
Now Internet Explorer refuses the url, while Mozilla Firefox and Chrome are working properly!
Does anyone knows how to handle it, please?
The ways to avoid errors are...
add your URL protcol site as IE's trusted site (Internet option).
diable safe mode of Internet zone (Internet option).
edit registory.
Especially about 3, you need to change
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\ProtocolDefaults]
you need to add your own URI scheme information like
"newurl"=dword:00000001
the above means that the URL of "newurl" is treated as intranet.
If you want "newurl" is treated as trusted sites, like
"newurl"=dword:00000002

Firefox or Chrome plugin to block and filter all outgoing connections

In Firefox or Chrome I'd like to prevent a private web page from making outgoing connections, i.e. if the URL starts with http://myprivatewebpage/ or https://myprivatewebpage/ in a browser tab, then that browser tab must be restricted so that it is allowed to load images, CSS, fonts, JavaScript, XmlHttpRequest, Java applets, flash animations and all other resources only from http://myprivatewebpage/ or https://myprivatewebpage/, i.e. an <img src="http://www.google.com/images/logos/ps_logo.png"> (or the corresponding <script>new Image(...) must not be able to load that image, because it's not on myprivatewebpage. I need a 100% and foolproof solution: not even a single resource outside myprivatewebpage can be accessible, not even at low probability. There must be no resource loading restrictions on Web pages other than myprivatewebpage, e.g. http://otherwebpage/ must be able to load images from google.com.
Please note that I assume that the users of myprivatewebpage are willing to cooperate to keep the web page private unless it's too much work for them. For example, they would be happy to install a Chrome or Firefox extension once, and they wouldn't be offended if they see an error message stating that access is denied to myprivatewebpage until they install the extension in a supported browser.
The reason why I need this restriction is to keep myprivatewebpage really private, without exposing any information about its use to webmasters of other web pages. If http://www.google.com/images/logos/ps_logo.png was allowed, then the use of myprivatewebpage would be logged in the access.log of Google's ps_logo.png, so Google's webmasters would have some information how myprivatewebpage is used, and I don't want that. (In this question I'm not interested in whether the restriction is reasonable, but I'm only interested in the technical solutions and its strengths and weaknesses.)
My ideas how to implement the restriction:
Don't impose any restrictions, just rely on the same origin policy. (This doesn't provide the necessary protection, the same origin policy lets all images pass through.)
Change the web application on the server so it generates HTML, JavaScript, Java applets, flash animations etc. which never attempt to load anything outside myprivatewebpage. (This is almost impossibly hard to foolproof everywhere on a complicated web application, especially with user-generated content.)
Over-sanitize the web page using a HTML output filter on the server, i.e. remove all <script>, <embed> and <object> tags, restrict the target of <img src=, <link rel=, <form action= etc. and also restrict the links in the CSS files. (This can prevent all unwanted resources if I can remember all HTML tags properly, e.g. I mustn't forget about <video>. But this is too restrictive: it removes all dyntamic web page functionality like JavaScript, Java applets and flash animations; without these most web applications are useless.)
Sanitize the web page, i.e. add an HTML output filter into the webserver which removes all offending URLs from the generated HTML. (This is not foolproof, because there can be a tricky JavaScript which generates a disallowed URL. It also doesn't protect against URLs loaded by Java applets and flash animations.)
Install a HTTP proxy which blocks requests based on the URL and the HTTP Referer, and force all browser traffic (including myprivatewebpage, otherwebpage, google.com) through that HTTP proxy. (This would slow down traffic to other than myprivatewebpage, and maybe it doesn't protect properly if XmlHttpRequest()s, Java applets or flash animations can forge the HTTP Referer.)
Find or write a Firefox or Chrome extension which intercepts all outgoing connections, and blocks them based on the URL of the tab and the target URL of the connection. I've found https://developer.mozilla.org/en/Setting_HTTP_request_headers and thinkahead.js in https://addons.mozilla.org/en-US/firefox/addon/thinkahead/ and http://thinkahead.mozdev.org/ . Am I correct that it's possible to write a Firefox extension using that? Is there such a Firefox extension already?
Some links I've found for the Chrome extension:
http://www.chromium.org/developers/design-documents/extensions/notifications-of-web-request-and-navigation
https://groups.google.com/a/chromium.org/group/chromium-extensions/browse_thread/thread/90645ce11e1b3d86?pli=1
http://code.google.com/chrome/extensions/trunk/experimental.webRequest.html
As far as I can see, only the Firefox or Chrome extension is feasible from the list above. Do you have any other suggestions? Do you have some pointers how to write or where to find such an extension?
I've found https://developer.mozilla.org/en/Setting_HTTP_request_headers and thinkahead.js in https://addons.mozilla.org/en-US/firefox/addon/thinkahead/ and http://thinkahead.mozdev.org/ . Am I correct that it's possible to write a Firefox extension using that? Is there such a Firefox extension already?
I am the author of the latter extension, though I have yet to update it to support newer versions of Firefox. My initial guess is that, yes, it will do what you want:
User visits your web page without plugin. Web page contains ThinkAhead block that would send a simple version header to the server, but this is ignored as plugin is not installed.
Since the server does not see that header, it redirects the client to a page to install the plugin.
User installs plugin.
User visits web page with plugin. Page sends version header to server, so server allows access.
The ThinkAhead block matches all pages that are not myprivatewebpage, and does something like set the HTTP status to 403 Forbidden. Thus:
When the user visits any webpage that is in myprivatewebpage, there is normal behaviour.
When the user visits any webpage outside of myprivatewebpage, access is denied.
If you want to catch bad requests earlier, instead of modifying incoming headers, you could modify outgoing headers, perhaps screwing up "If-Match" or "Accept" so that the request is never honoured.
This solution is extremely lightweight, but might not be strong enough for your concerns. This depends on what you want to protect: given the above, the client would not be able to see blocked content, but external "blocked" hosts might still notice that a request has been sent, and might be able to gather information from the request URL.

"chrome" in the protocol section of a URL

What does the following mean? I assume chrome refers to Google's webbrowser Chrome, but does it have its own special protocol (like http:// and ftp://)?
<iframe src="chrome://extension/content/web/web.htm" />"
It has several meanings - Documentation
This is probably what you're looking for:
A chrome:// URL
An URL using the chrome:// protocol. Code loaded from a chrome URL has extended, or chrome,privileges. XUL-based applications load the code for their interface from chrome:// URLs.
Chrome privileges
The code running with chrome privileges is allowed to do everything, unlike the web content, which is restricted in several ways.
It doesn't; chrome:// is a cue to what's known as a protocol handler. Basically, protocol handlers register a protocol scheme, and the browser will then pass off URLs matching that scheme to the handler.
One example of this functionality that you're probably familiar with is mailto:, which is not a protocol, but merely informs the browser to hand off the subsequent URI to a mail program.
It's a special scheme used to refer to something inside the browser itself, or an add-on. There's probably no protocol per se, it just causes Chrome to access an internal resource in some way.
Also, "chrome" probably refers to "the stuff around the page" (i.e. the browser UI) rather than Google Chrome, although it is also what Google Chrome is named after. Firefox uses the same scheme for its internal things.

Resources