如何编写自动输入代理密码的Firefox插件?

时间:2022-10-30 07:23:33

Suppose someone worked for a company that put up an HTTP proxy preventing internet access without password authentication (NTLM, I think). Also suppose that this password rotated on a daily basis, which added very little security, but mostly served to annoy the employees. How would one get started writing a Firefox add-on that automatically entered these rotating passwords?

假设有人为一家公司工作,该公司建立了一个HTTP代理,阻止了无需密码验证的互联网访问(NTLM,我认为)。还假设这个密码每天轮换,这增加了很少的安全性,但主要是用来惹恼员工。如何开始编写自动输入这些旋转密码的Firefox插件?

To clarify: This add-on would not just submit the password; the add-on would programmatically generate it with some knowledge of the password rotation scheme.

澄清一下:这个附加组件不仅仅是提交密码;加载项将以编程方式生成它,并具有密码轮换方案的一些知识。

2 个解决方案

#1


6  

This is built into Firefox. Open up about:config, search for 'ntlm'

这是内置于Firefox中的。打开about:config,搜索'ntlm'

The setting you're looking for is called network.automatic-ntlm-auth.trusted-uris and accepts a comma-space delimited list of your proxy server uris.

您正在寻找的设置称为network.automatic-ntlm-auth.trusted-uris,并接受代理服务器uris的逗号空间分隔列表。

This will make FireFox automatically send hashed copies of your windows password to the proxy, which is disabled by default for obvious reasons. IE can do this automatically because it can use security zones to figure out whether a proxy server is trusted or not.

这将使FireFox自动将您的Windows密码的哈希副本发送到代理,默认情况下由于显而易见的原因而被禁用。 IE可以自动执行此操作,因为它可以使用安全区域来确定代理服务器是否可信。

Blog post discussing this

博客文章讨论这个

#2


3  

It's your lucky day - no need for an add-on!

这是你的幸运日 - 不需要附加组件!

How to configure Firefox for automatic NTLM authentication

  1. In Firefox, type about:config into the address bar and hit enter. You should see a huge list of configuration properties.
  2. 在Firefox中,在地址栏中输入about:config并按Enter键。您应该看到一个庞大的配置属性列表。

  3. Find the setting named network.negotiate-auth.delegation-uris (the easiest way to do this is to type that into the filter box at top).
  4. 找到名为network.negotiate-auth.delegation-uris的设置(最简单的方法是将其输入到顶部的过滤器框中)。

  5. Double-click this line, and enter the names of all servers for which network authentication is desired, separated by commas. Then press ‘OK’ to confirm.
  6. 双击此行,然后输入所需网络身份验证的所有服务器的名称,以逗号分隔。然后按“确定”确认。

  7. Find the setting network.negotiate-auth.trusted-uris, and set it to the same value used in #3.
  8. 找到设置network.negotiate-auth.trusted-uris,并将其设置为#3中使用的相同值。

  9. Find the setting network.ntlm.send-lm-response, and set it to true.
  10. 找到network.ntlm.send-lm-response设置,并将其设置为true。

  11. Skip steps 7 and 8 if you aren't using a proxy.
  12. 如果您不使用代理,请跳过步骤7和8。

  13. Open the options dialog (Tools->Options menu), and on the Advanced page, Network tab, press the Connection Settings button to get the proxy configuration dialog:
  14. 打开选项对话框(工具 - >选项菜单),在高级页面的网络选项卡上,按连接设置按钮以获取代理配置对话框:

  15. Make sure the correct proxy server is configured, and that the same list of servers is listed in the No Proxy for: entryfield as were set in step #3.
  16. 确保配置了正确的代理服务器,并且在步骤#3中设置的No Proxy for:entryfield中列出了相同的服务器列表。

  17. Done.

#1


6  

This is built into Firefox. Open up about:config, search for 'ntlm'

这是内置于Firefox中的。打开about:config,搜索'ntlm'

The setting you're looking for is called network.automatic-ntlm-auth.trusted-uris and accepts a comma-space delimited list of your proxy server uris.

您正在寻找的设置称为network.automatic-ntlm-auth.trusted-uris,并接受代理服务器uris的逗号空间分隔列表。

This will make FireFox automatically send hashed copies of your windows password to the proxy, which is disabled by default for obvious reasons. IE can do this automatically because it can use security zones to figure out whether a proxy server is trusted or not.

这将使FireFox自动将您的Windows密码的哈希副本发送到代理,默认情况下由于显而易见的原因而被禁用。 IE可以自动执行此操作,因为它可以使用安全区域来确定代理服务器是否可信。

Blog post discussing this

博客文章讨论这个

#2


3  

It's your lucky day - no need for an add-on!

这是你的幸运日 - 不需要附加组件!

How to configure Firefox for automatic NTLM authentication

  1. In Firefox, type about:config into the address bar and hit enter. You should see a huge list of configuration properties.
  2. 在Firefox中,在地址栏中输入about:config并按Enter键。您应该看到一个庞大的配置属性列表。

  3. Find the setting named network.negotiate-auth.delegation-uris (the easiest way to do this is to type that into the filter box at top).
  4. 找到名为network.negotiate-auth.delegation-uris的设置(最简单的方法是将其输入到顶部的过滤器框中)。

  5. Double-click this line, and enter the names of all servers for which network authentication is desired, separated by commas. Then press ‘OK’ to confirm.
  6. 双击此行,然后输入所需网络身份验证的所有服务器的名称,以逗号分隔。然后按“确定”确认。

  7. Find the setting network.negotiate-auth.trusted-uris, and set it to the same value used in #3.
  8. 找到设置network.negotiate-auth.trusted-uris,并将其设置为#3中使用的相同值。

  9. Find the setting network.ntlm.send-lm-response, and set it to true.
  10. 找到network.ntlm.send-lm-response设置,并将其设置为true。

  11. Skip steps 7 and 8 if you aren't using a proxy.
  12. 如果您不使用代理,请跳过步骤7和8。

  13. Open the options dialog (Tools->Options menu), and on the Advanced page, Network tab, press the Connection Settings button to get the proxy configuration dialog:
  14. 打开选项对话框(工具 - >选项菜单),在高级页面的网络选项卡上,按连接设置按钮以获取代理配置对话框:

  15. Make sure the correct proxy server is configured, and that the same list of servers is listed in the No Proxy for: entryfield as were set in step #3.
  16. 确保配置了正确的代理服务器,并且在步骤#3中设置的No Proxy for:entryfield中列出了相同的服务器列表。

  17. Done.