Black List Plugin

Utility to keep malicious users away from a public TWiki site

Description

This is a simple utility to keep black sheep away from a public TWiki site. The site can be protected against excessive page access (e.g. by bad robots), suspicious activities of users, such as multiple registrations or rapid topic updates indicating Wiki:WikiSpam, or saving text with wiki-spam.

The Plugin monitors activities by IP address and uses three IP address lists to protect the TWiki site:

  • WHITELIST: Manually maintained list of users who should never get on the BANLIST
  • BLACKLIST: Manually maintained list of malicious users
  • BANLIST: Automatically updated list of users with suspicious activities

On topic save, text is compared to a known list of spam patterns. If wiki-spam is identified, topic save is cancelled, an error message is shown, and the IP address is put on the BANLIST. Two wiki-spam lists are used:

  • Local SPAMLIST: Manually maintained list of spam patterns
  • Public wiki-spam list: Big list of wiki-spam patterns, retrieved from external web site

Users on the BLACKLIST and BANLIST will get an error message on every page access.

The registration form can also be protected from improper use.

To fight Wiki-spam, the Plugin can also add a rel="nofollow" parameter to external URLs. Search engines will not follow links that have this parameter, taking away the incentive to add spam to TWiki.

Plugin Settings

Plugin settings are stored as preferences variables. To reference a plugin setting write %<plugin>_<setting>%, i.e. %INTERWIKIPLUGIN_SHORTDESCRIPTION%

General settings

  • One line description, is shown in the TextFormattingRules topic:
    • Set SHORTDESCRIPTION = Utility to keep malicious users away from a public TWiki site

  • Debug plugin: (See output in data/debug.txt)
    • Set DEBUG = 0

  • Log access of blacklist and spam list activities: (0 or 1)
    • Set LOGACCESS = 1

WHITELIST, BLACKLIST and BANLIST settings

  • WHITELIST: Comma delimited list of IP addresses; possible to use partial addresses ending in a dot
    • Set WHITELIST = 127.0.0.1

  • BLACKLIST: Comma delimited list of IP addresses; possible to use partial addresses ending in a dot
    • Set BLACKLIST = 203.88.152., 203.88.155., 219.65.75., 5.255.231.205, 5.45.207.118, 95.108.213.29, 5.45.207.88, 5.45.207.100, 5.255.253.116, 213.180.203.66

  • BANLIST: Automatically updated list of IP addresses based on BANLIST configuration
    • Action: IP address(es)
    • Current list: 65.108.78.33, 65.108.124.153, 192.151.157.210, 100.27.42.242, 65.21.203.10, 192.99.36.59, 100.27.42.244, 64.124.8.41, 192.99.4.63, 100.27.42.243, 142.4.219.64, 94.154.239.69, 65.108.46.72, 5.9.151.57, 100.27.42.241, 65.21.204.102, 157.90.181.152, 135.181.79.106, 164.68.111.45, 192.99.7.70, 144.217.66.17, 192.99.5.48, 209.209.11.236, 65.108.0.71, 91.219.254.101, 167.114.157.181, 167.114.158.241, 167.114.116.38, 69.30.226.234, 167.114.116.25, 167.114.159.183, 192.95.30.71, 65.108.128.54, 161.97.136.234, 95.217.109.26, 66.152.190.5, 192.99.7.188, 135.181.180.59, 192.99.15.185, 95.91.15.95, 135.181.213.220, 192.99.15.17, 135.181.212.177, 144.217.64.134, 37.187.140.83, 176.31.125.95, 135.181.213.219, 65.108.110.26, 95.91.109.15, 185.181.63.72, 100.27.42.246, 158.69.246.54, 173.212.229.76, 158.69.124.236, 192.99.8.110, 65.108.143.153, 167.114.159.99, 65.108.133.119, 192.99.10.170, 207.180.221.167, 158.69.54.182, 141.98.9.24, 95.217.195.123, 65.21.233.213, 94.23.7.187, 188.165.217.198, 65.108.40.60, 167.114.101.143, 149.202.82.11, 135.181.115.29, 135.181.113.236, 192.99.36.166, 192.99.14.117, 95.91.74.156, 37.57.218.243, 173.249.2.13, 62.138.2.243, 65.108.2.171, 192.99.14.19, 65.108.101.157, 100.27.42.245, 65.108.14.102, 173.249.63.71, 147.78.47.32, 64.124.8.39, 64.124.8.38, 192.95.29.186, 94.23.203.52, 65.108.64.210, 204.12.197.234, 45.227.254.11, 167.114.173.115, 64.124.8.30, 64.124.8.22, 65.21.232.254, 173.212.241.58, 178.150.14.250, 192.99.100.210, 64.124.8.51, 192.99.101.79, 161.97.92.73, 65.21.207.162, 65.109.26.43, 65.108.203.133, 95.91.74.136, 109.175.214.129, 161.97.157.176, 65.108.227.178, 167.114.100.201, 65.108.125.120, 185.194.216.150, 173.249.7.244, 161.97.135.248, 192.95.29.138, 95.91.15.71, 65.108.100.146, 65.108.142.49, 65.109.26.102, 192.99.9.170, 91.219.254.100, 172.104.28.114, 65.109.24.4, 192.99.35.94, 192.99.13.75, 173.212.194.14, 192.99.37.167, 173.208.130.202, 192.99.37.124, 192.99.0.24, 65.109.26.44, 192.99.4.56, 95.91.15.170, 178.151.245.174, 62.171.159.200, 92.220.10.100, 192.99.160.200, 192.99.37.133, 154.6.13.153, 95.216.45.152, 172.104.17.213, 135.181.73.59, 65.108.231.155, 130.185.119.78, 192.99.14.159, 192.99.4.163, 164.68.117.152, 91.137.17.170, 65.108.203.159, 65.108.232.38, 158.69.246.14, 94.23.203.86, 37.187.27.125, 94.23.209.55, 192.99.9.25, 135.181.74.243, 192.99.3.137, 65.109.26.42, 192.99.15.34, 173.212.202.122, 192.99.36.126, 192.95.30.128, 5.189.141.124, 173.208.206.50, 94.23.207.193, 167.114.103.160, 91.219.254.102, 158.69.243.138, 188.165.215.206, 65.108.206.155, 65.108.142.143, 65.108.231.158, 192.99.0.62, 195.201.199.99, 158.69.246.176, 192.95.30.21, 167.114.211.237, 192.99.13.69, 192.99.37.132, 65.109.63.254, 185.217.125.68, 144.91.83.189, 192.99.0.47, 202.61.253.63, 65.109.67.80, 192.99.33.141, 65.109.67.81, 192.99.36.61, 192.99.37.138, 65.108.41.34, 188.165.225.40, 38.242.151.181, 75.119.141.84, 94.23.203.180, 149.56.241.193, 192.99.7.191, 188.165.241.181, 207.180.201.192, 192.99.15.199, 71.13.87.122, 95.111.247.252, 104.165.101.223, 95.91.15.30, 65.109.63.252, 192.95.30.177, 192.99.9.92, 167.114.209.104, 192.99.14.135, 95.91.111.111, 173.212.247.190, 192.99.36.181, 167.114.101.80, 192.99.14.223, 135.181.128.56, 192.99.5.225, 65.109.63.253, 178.18.251.169, 65.108.73.117, 192.99.4.140, 65.109.26.29, 188.165.237.120, 188.165.212.137, 5.9.158.195, 65.108.40.25, 37.187.89.104, 104.151.113.18, 95.91.74.17, 185.16.60.130, 195.191.219.132, 65.109.67.82, 174.250.22.3, 135.181.61.178, 149.202.86.61, 42.200.228.33, 195.191.219.130, 185.138.241.85, 135.181.75.58, 95.91.76.32, 173.239.232.23, 38.126.157.45, 185.190.24.40, 91.212.166.70, 192.99.15.33, 81.19.136.15, 95.91.75.104, 38.242.147.182, 70.95.90.222, 95.91.74.216, 207.180.226.173, 147.78.47.33, 173.249.24.3, 192.95.30.12, 135.181.74.195, 91.191.209.2, 37.187.94.3, 154.26.131.103, 192.3.134.216, 161.97.149.89, 179.60.150.123, 69.197.140.196, 192.99.15.29, 173.249.30.147, 218.188.41.122, 198.46.190.109, 94.23.203.107, 173.212.246.178, 37.187.73.123, 38.126.157.48, 95.91.110.174, 167.86.79.150, 84.46.255.144, 93.197.170.139, 38.126.157.40, 195.191.219.131, 98.142.215.37, 91.240.118.252, 194.165.17.19, 65.108.99.43, 77.88.5.133, 91.137.17.190, 95.181.238.89, 23.239.14.52, 158.69.123.143, 207.180.245.134, 95.91.15.85, 95.91.85.50, 164.132.203.193, 164.132.201.57, 188.165.232.135, 93.158.161.53, 149.202.87.182, 149.202.87.164, 107.174.235.110, 71.235.188.210, 158.69.23.160, 141.98.83.238, 149.202.87.178, 91.219.254.103, 69.197.140.63, 149.202.87.175, 164.132.201.78, 149.202.87.139, 149.202.87.169, 164.132.201.179, 149.202.86.231, 164.132.201.165, 65.21.35.240, 179.60.147.216, 167.114.158.215, 164.132.201.56, 149.202.87.166, 149.202.87.176, 95.91.81.28, 91.219.255.103, 88.214.25.64, 149.202.87.168, 158.69.22.90, 193.70.80.150, 217.76.60.60, 216.146.107.190, 149.202.87.137, 188.165.211.159, 5.189.152.91, 37.187.73.121, 161.97.145.138, 173.212.245.225, 174.232.140.3, 54.38.85.17, 217.182.175.187, 54.38.85.37, 217.182.175.163, 149.202.87.160, 172.104.28.113, 95.91.15.41, 95.181.237.22, 54.38.85.21, 217.182.175.146, 217.182.175.222, 149.202.86.86, 149.202.86.56, 194.247.173.99, 167.86.71.242, 193.70.81.110, 193.70.81.116, 217.182.175.125, 217.182.134.134, 95.91.81.7, 130.185.118.200, 185.162.250.169, 158.69.22.93, 65.108.99.45, 94.23.7.188, 84.46.255.139, 158.69.22.94, 149.202.87.37, 164.132.201.51, 217.182.134.101, 38.242.211.11, 207.180.218.247, 217.76.60.61, 164.132.201.7, 65.109.146.167, 149.202.65.189, 34.69.197.46, 24.3.238.212, 54.38.85.36, 158.69.22.96, 95.91.41.36, 34.134.8.53, 217.182.175.120, 158.69.22.87, 51.38.181.206, 149.202.86.139, 54.38.85.38, 217.182.175.38, 149.202.65.183, 65.21.202.117, 38.242.249.151, 185.234.69.220, 193.70.81.106, 172.104.17.70, 154.6.12.141, 5.253.19.58, 193.70.81.126, 178.25.242.92, 95.91.109.50, 136.243.220.211, 81.17.57.144, 216.240.128.214, 38.242.210.185, 88.88.133.81, 1.174.213.78, 23.239.14.70, 185.73.240.251, 178.25.242.237, 194.13.80.41, 193.70.81.103, 85.143.210.21, 65.21.205.62, 95.91.59.92, 167.114.101.65, 136.243.220.213, 178.25.244.164, 135.181.177.220, 217.182.134.106, 95.91.111.87, 149.57.16.144, 95.91.111.217, 51.174.65.41, 172.104.17.146, 158.220.124.25, 31.220.87.212, 47.76.35.19, 91.137.27.194, 193.70.81.99, 95.91.42.78, 18.237.172.242, 54.212.73.189, 154.16.95.37, 154.16.95.36, 154.16.95.35, 54.202.131.245, 34.212.76.175, 54.245.165.27, 65.108.2.73, 178.25.242.198, 3.145.46.172, 158.220.123.109, 107.173.63.235, 35.222.80.112, 31.25.10.176, 195.74.86.174, 81.181.62.93, 84.189.5.45, 178.25.242.225, 149.202.86.190, 146.19.215.244, 65.108.99.108, 158.220.119.236, 200.189.251.138, 95.91.111.25, 38.242.197.173, 158.220.124.128, 94.23.203.202, 185.177.116.248, 142.132.196.106, 158.220.119.234, 194.163.133.138, 154.6.12.147, 136.243.228.193, 95.96.41.171, 89.58.11.50, 158.220.119.94, 135.181.140.34, 47.242.224.53, 107.173.224.3, 107.173.212.54, 47.76.99.127, 47.76.209.138, 154.38.173.99, 158.220.122.11, 158.220.122.14, 123.244.128.37, 95.91.104.243, 182.204.140.129, 179.60.147.74, 110.154.102.231, 120.228.237.32, 139.211.30.82, 42.200.112.138, 42.202.21.225, 185.209.228.229, 39.163.156.117, 213.199.41.116, 45.13.226.95, 31.220.87.210, 52.230.152.42, 120.228.237.138, 135.181.137.62, 81.167.26.57, 42.202.21.140, 213.109.202.67, 42.202.17.120, 88.90.246.89, 182.204.143.13, 52.230.152.127, 182.204.140.30, 51.91.253.126, 120.227.159.36, 158.220.123.227, 31.220.87.217, 110.154.101.68, 39.165.157.243, 88.90.247.216, 158.220.124.133, 110.154.98.13, 158.220.124.129, 217.76.60.63, 18.117.74.44, 18.218.157.51, 18.217.7.193, 18.220.137.93, 18.117.184.189, 3.22.77.149, 3.136.234.163, 18.216.60.13, 3.141.19.168, 13.59.154.190, 18.219.157.15, 52.14.44.39, 3.145.81.232, 3.12.108.18, 3.145.42.64, 3.129.39.252, 3.12.73.64, 18.189.188.111, 13.59.53.153, 52.15.160.43, 18.222.86.149, 3.146.255.249, 3.145.37.92, 3.15.22.163, 3.145.64.235, 18.221.106.169, 3.133.126.39, 18.117.227.194, 18.189.32.162, 3.21.244.137, 18.216.11.146, 3.129.63.114, 18.216.8.40, 13.59.51.169, 3.139.239.67, 3.144.10.130, 95.91.42.113, 18.118.126.11, 13.58.185.199, 161.97.165.195, 3.133.92.6, 3.16.203.149, 3.144.237.77, 3.149.26.169, 3.145.17.230, 18.219.33.254, 18.119.253.2, 3.142.53.216, 52.15.210.12, 3.22.169.223, 3.144.39.16, 3.145.101.192, 13.58.201.235, 18.222.184.126, 3.131.82.202, 18.219.213.27, 18.217.249.77, 52.14.45.36, 18.118.252.87, 18.222.21.160, 3.138.117.25, 18.221.66.31, 18.188.38.142, 3.138.69.172, 3.12.41.87, 3.148.115.202, 3.149.254.110, 18.226.159.74, 3.145.81.198, 3.138.123.238, 3.140.198.12, 3.147.48.212, 3.14.79.63, 3.22.71.64, 3.15.227.4, 18.222.83.185, 18.218.118.23, 18.118.211.193, 18.118.205.165, 18.191.33.207, 18.117.186.92, 3.15.143.207, 18.116.20.52, 3.145.166.167, 18.191.160.110, 3.147.80.3, 18.117.183.252, 3.147.79.20, 18.227.102.0, 18.189.170.206, 52.15.231.106, 18.224.71.72, 3.147.76.135, 3.141.47.163, 18.224.58.24, 18.225.55.198, 18.217.248.255, 18.221.89.183, 3.137.181.66, 13.59.248.108, 3.129.5.38, 3.136.233.222, 3.139.105.83, 3.133.112.82, 3.129.23.214, 3.16.218.208, 3.149.249.127, 3.147.103.15, 3.141.20.122, 18.224.38.43, 3.17.155.88, 3.145.184.117, 3.142.12.170, 3.147.85.183, 3.23.87.113, 18.190.207.49, 3.12.153.110, 52.15.57.52, 18.191.201.95, 18.222.178.240, 3.142.42.33, 18.117.118.239, 3.133.159.198, 18.224.62.105, 18.223.99.24, 3.21.43.192, 3.14.247.5, 3.145.139.67, 18.191.223.123, 3.135.217.207, 18.116.87.196, 3.15.149.45, 3.147.67.48, 18.219.205.202, 18.189.188.36, 3.144.127.94, 3.140.198.29, 18.218.143.170, 3.135.219.78, 3.145.71.159, 3.21.128.173, 3.137.217.134, 13.58.6.202, 18.118.7.224, 18.222.122.185, 18.227.111.58, 3.142.156.202, 3.147.56.45, 3.144.193.231, 3.14.11.50, 18.188.146.77, 3.142.12.183, 18.189.185.251, 3.15.150.59, 3.137.160.137, 18.226.181.89, 3.135.62.42, 13.59.124.249, 3.137.151.220, 3.21.154.139, 13.58.182.39, 13.58.182.29, 18.189.178.65, 3.146.255.113, 110.154.133.147, 3.144.38.24, 18.190.25.193, 3.144.5.217, 3.19.208.189, 3.14.253.106, 18.117.171.8, 3.137.170.14, 18.222.4.44, 18.118.254.28, 3.128.202.221, 3.149.233.62, 18.117.188.5, 3.145.88.227, 18.224.228.71, 18.222.204.247, 3.144.242.238, 3.137.161.193, 13.58.25.75, 123.186.77.73, 3.14.253.131, 3.14.10.113, 18.118.193.108, 18.191.72.164, 18.226.222.89, 18.221.85.100, 3.22.187.239, 3.145.141.118, 3.142.248.104, 3.144.18.4, 3.145.180.71, 3.129.208.25, 3.142.196.223, 18.216.1.97, 3.14.73.193, 3.128.197.164, 3.147.13.229, 3.149.23.12, 18.119.162.204, 3.136.97.53, 18.191.162.178, 18.191.16.233, 3.135.249.178, 18.221.58.143, 18.216.115.44, 18.221.198.132, 3.14.71.154, 18.119.116.43, 3.147.44.89, 3.145.9.12, 3.16.41.142, 3.140.249.104, 3.149.236.69, 3.15.187.15, 18.226.180.133, 18.220.157.151, 18.191.28.247, 88.89.67.198, 172.245.111.253, 84.247.135.134, 3.128.199.130, 3.147.47.144, 13.58.228.178, 13.58.40.4, 3.145.16.23, 3.144.254.138, 18.119.167.196, 3.145.169.78, 3.145.172.159, 3.16.81.127, 18.188.91.44, 3.134.79.121, 18.221.154.18, 3.135.201.209, 3.17.141.105, 18.224.136.125, 18.227.46.229, 3.19.55.8, 18.220.253.4, 13.59.38.41, 18.118.119.196, 18.117.103.219, 3.21.246.218, 18.217.209.62, 3.143.4.181, 3.134.76.72, 95.91.41.34, 18.118.120.206, 18.216.43.163, 18.119.157.247, 3.20.224.107, 18.118.160.55, 52.230.152.185, 52.230.152.14, 52.230.152.195, 52.230.152.255, 52.230.152.56, 52.230.152.87, 52.230.152.204, 3.135.214.6, 3.144.242.197, 3.145.41.72, 218.31.65.99, 13.59.96.247, 3.129.247.11, 3.142.134.99, 123.245.129.119, 3.133.132.205, 18.118.167.22, 18.119.97.172, 3.144.144.4, 52.230.152.176, 3.142.45.123, 110.154.133.208, 18.117.145.176, 52.230.152.110, 52.230.152.43, 52.230.152.40, 52.230.152.136, 3.142.201.175, 3.147.63.205, 3.142.185.211, 18.219.117.108, 185.216.178.59, 3.22.99.101, 3.15.200.245, 18.116.14.118, 3.17.10.21, 52.230.152.96, 52.230.152.30, 52.230.152.248, 52.230.152.1, 3.144.254.241, 18.117.232.55, 110.154.98.117, 18.227.161.225, 18.188.87.124, 52.230.152.72, 93.158.213.25, 3.144.15.61, 3.141.10.72, 18.116.69.244, 18.117.248.255, 3.145.21.205, 18.117.103.5, 89.58.38.9, 31.220.87.207, 18.220.175.189, 18.216.178.162, 3.17.162.26, 3.15.149.81, 3.143.9.223, 223.84.25.121, 3.129.39.229, 18.222.25.112, 3.12.84.150, 3.17.167.114, 110.154.103.134, 18.217.5.86, 52.15.43.107, 3.143.3.208, 95.91.111.190, 3.135.212.67, 18.191.253.62, 18.223.33.157, 3.16.137.108, 3.142.251.53, 13.59.237.58, 49.114.246.72, 110.154.100.140, 135.181.76.42, 84.239.45.20, 175.16.69.100, 52.230.152.59, 52.230.152.77, 52.230.152.35, 52.230.152.238, 52.230.152.54, 52.230.152.61, 36.107.216.98, 110.154.132.9, 195.191.219.133, 110.154.98.243, 147.78.47.55, 110.154.132.175, 54.201.35.115, 119.49.104.57, 88.88.133.174, 52.230.152.79, 52.230.152.232, 52.230.152.229, 52.230.152.253, 52.230.152.97, 52.230.152.209, 139.213.45.255, 52.230.152.36, 52.230.152.67, 52.230.152.29, 119.49.25.159, 141.98.83.239, 37.60.237.76, 110.154.99.136, 141.98.9.152, 52.230.152.2, 158.220.119.96, 10.155.57.14, 175.16.64.240, 173.212.206.93, 65.108.99.40, 195.7.4.143, 147.78.47.102, 128.163.8.100, 209.9.200.71, 141.98.255.143, 175.22.86.38, 76.66.162.38, 194.242.57.234, 176.9.2.28, 119.49.143.164, 119.49.113.196, 175.16.254.234, 141.98.83.80, 52.230.152.81, 185.214.10.153, 191.96.150.239, 95.91.111.33, 178.151.245.162, 20.171.206.252, 20.171.206.103, 20.171.206.157, 20.171.206.133, 20.171.206.11, 20.171.206.140, 20.171.206.217, 20.171.206.148, 20.171.206.168, 20.171.206.211, 20.171.206.88, 20.171.206.131, 20.171.206.38, 20.171.206.25, 20.171.206.45, 20.171.206.219, 20.171.206.34, 20.171.206.191, 20.171.206.27, 20.171.206.39, 20.171.206.231, 20.171.206.70, 20.171.206.204, 20.171.206.100, 20.171.206.215, 95.91.111.106, 175.16.65.42, 38.242.248.163, 91.137.16.0, 95.217.139.6, 141.98.81.44, 20.171.206.237, 20.171.206.109, 20.171.206.239, 20.171.206.50, 20.171.206.73, 20.171.206.20, 20.171.206.235, 20.171.206.189, 20.171.206.42, 178.18.252.24, 45.90.97.238, 84.239.41.19, 65.108.99.52, 49.140.190.199, 3.137.183.210, 18.118.200.154, 18.222.167.183, 13.59.173.242, 34.215.160.160, 109.199.100.202, 185.197.250.2, 168.119.69.229, 37.60.235.244, 175.20.17.187, 95.91.41.167, 139.211.28.114, 98.142.215.63, 95.91.109.229, 175.20.194.25, 175.22.147.252, 95.91.109.107, 139.215.114.204, 10.155.41.111, 175.20.18.60, 91.137.27.140, 88.90.248.233, 185.139.7.87, 45.130.145.14, 65.108.103.110, 45.85.147.140, 194.163.153.157, 84.239.43.167, 85.117.241.163, 158.220.111.43, 194.163.185.138, 95.91.104.62, 4.227.36.89, 31.220.94.75, 34.133.169.105, 45.151.156.210, 4.227.36.76

  • BANLIST configuration, comma delimited list of:
    1. Points for registration
    2. Points for each save and upload
    3. Points for view and other actions
    4. Points for view raw
    5. Threshold to add to BANLIST
    6. Measured over time (in seconds)
    • Set BANLISTCONFIG = 10, 5, 1, 5, 120, 300
    • Your current score: 1 for IP address 3.141.29.162

  • Message for users on BLACKLIST and BANLIST:
    • Set BLACKLISTMESSAGE = Your IP address 3.141.29.162 is black listed at the TWiki web site due to excessive access or suspicious activities. Please contact site administrator admin@barricklab.org if you got on the list by mistake.

Wiki-spam filtering settings

  • Filter wiki-spam on topic save and HTML file uploads based on SPAMLIST: (0 or 1)
    • Set FILTERWIKISPAM = 0

  • Comma separated list of Web.Topics to exclude from wiki-spam filtering on topic save:
    • Set SPAMEXCLUDETOPICS =

  • Local SPAMLIST: Manually maintained list of spam patterns (NOTE: Must be RegularExpression patterns)
    • Action: wiki-spam regex pattern(s) http://.*?
    • Current list:

  • EXCLUDELIST: Manually maintained list of exceptions to public wiki-spam patterns, useful to exclude patterns listed incorrectly as spam (NOTE: Must be RegularExpression patterns)
    • Action: exclude spam regex pattern(s) http://.*?
    • Current list:

  • Cache refresh time (in minutes) for public wiki-merge pattern list:
    • Set SPAMLISTREFRESH = 60

  • Cache refresh time (in minutes) for internal wiki-spam regular expression cache:
    • Set SPAMREGEXREFRESH = 10

  • Message for users trying to save text with wiki-spam:
    • Set WIKISPAMMESSAGE = Wiki-spam detected: "%WIKISPAMWORD%" is a banned word and cannot be saved. Your IP address 3.141.29.162 is black listed at the TWiki web site due to suspicious activities. Please contact site administrator admin@barricklab.org if you got on the list by mistake.

Registration protection settings

  • Protect registration: (number of minutes to expire, 15 minutes is recommended, 0 to disable)
    • Set REGEXPIRE = 0
    • If enabled, a magic number is protecting the registration process. TWiki expects a form field with a magic number. An error message is shown if not valid or if expired. This makes it harder to register a user by a script. A hidden field needs to be added to the registration form:
      <input type="hidden" name="rx" value="%BLACKLISTPLUGIN{ action="magic" }%" />

  • Regular expression list of WikiWords that are banned from registering:
    • Set REGWIKINAMEBANLIST = [A-Z]+[a-z]*[0-9]+[A-Z][A-Za-z]*, [A-Z]+[a-z0-9]+[A-Z]+[A-Za-z]*[0-9]+

  • Regular expression list of e-mails that are banned from registering:
    • Set REGEMAILBANLIST = \@binkmail.com, \@guerrillamail\.(biz|com), \@hidemyass\.com, \@mailinator\.com, \@safetymail.info, \@snkmail.com, \@[\w\.-]*trash[\w\.-]*\.

  • Message shown when registering with outdated magic number or with banned content: (this message is deliberately vague)
    • Set REGMESSAGE = Registration not possible, please try again.

Nofollow link setting

  • Add a rel="nofollow" parameter to external URLs. Use this is to fight Wiki-spam. Search engines will not follow the link if a URL has a nofollow parameter, such as <a href="http://spammer.com/" rel="nofollow">. Specify topic age in hours for which the nofollow parameter should appear (set it to a value that gives you enough time to remove spam); set it to -1 to add the nofollow parameter unconditionally to external URLs; or 0 to disable: (-1, 0, 1...N)
    • Set NOFOLLOWAGE = -1

Don't Invite Spammers

  • Spammers search for sites with known spam signatures. Don't use this page as an invitation for spammers by telling search engines NOT to index this page:
    • Set HTTP_EQUIV_ON_VIEW =

Plugin Installation Instructions

Note: You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the plugin on the server where TWiki is running.

  • Download the ZIP file from the Plugin web (see below)
  • Unzip BlackListPlugin.zip in your twiki installation directory. Content:
File: Description:
data/TWiki/BlackListPlugin.txt Plugin topic
data/TWiki/BlackListPlugin.txt,v Plugin topic repository
lib/TWiki/Plugins/BlackListPlugin.pm Plugin Perl module
pub/TWiki/BlackListPlugin/.htaccess Apache access control to protect pub dir
templates/oopsblacklist.tmpl Generic oops message
  • Make sure pub/TWiki/BlackListPlugin/ is writable by the CGI user (typically nobody)
  • Run the configure utility in your browser to enable the Plugin
  • Make sure that non-administrators cannot edit this plugin topic. By default, this topic is write protected with an ALLOWTOPICCHANGE = TWikiAdminGroup setting.
  • Test if the installation was successful:
    1. Using above form, add the IP address of one of your workstations to the BANLIST
    2. Access TWiki from that workstation
      • if you look at a TWiki topic (with the view script) you should see the BLACKLISTMESSAGE (defined above) after a one minute timeout
      • else, you should get an 500 Internal Server Error for other scripts
    3. On a different workstation, remove the IP address of the test workstation from the BANLIST

Known Issues and Limitations

  • Scan for script eval() and escape() is currently hard-coded

Plugin Info

Plugin Author: TWiki:Main.PeterThoeny
Copyright: © 2004-2013 Peter Thoeny, TWiki.org
© 2008-2013 TWiki:TWiki.TWikiContributor
Plugin Version: 2013-03-22
Change History:
2013-03-22: TWikibug:Item7151: Add new throwaway e-mail addresses
2013-03-08: TWikibug:Item7151: Add new throwaway e-mail addresses
2013-02-28: TWikibug:Item7154: Add REGWIKINAMEBANLIST and REGEMAILBANLIST to protect TWiki from bogus registrations; remove 60 min sleep time on ban
2013-02-17: TWikibug:Item7154: Use noindex meta tag on this plugin page because we do not want to invite spammers who search for known spam signatures
2011-07-10: TWikibug:Item6725: Change global package variables from "use vars" to "our"
2010-07-10: TWikibug:Item6519 - fix for empty oops messages in TWiki-4.x; fix for redirect to oops not working in TWiki-5.0
29 Mar 2007: Doc fixes; change view=raw penalty from 20 to 5
18 Mar 2007: Scan for evil script eval() and escape() in topic text and attachments; support for TWiki 4.2 (using new TWiki::Func::getExternalResource)
28 Dec 2006: Fixed bug where EXCLUDELIST pattern was removing only part of a wiki-spam pattern
27 Dec 2006: Support for TWiki 4.1
01 Jul 2006: Added EXCLUDELIST; scan for evil script eval in attachments; scan also .js and .css attachments; fixed writeLog error on Cairo
02 Jun 2006: Added wiki-spam filtering for HTML attachments to combat TWiki:Codev.HtmlAttachmentSpam
29 Apr 2006: Added %BLACKLISTPLUGIN{ action="spam_show_n" }% that shows the local spam list in a shareable format with newline separator
07 Feb 2006: TWiki Release 4.0 fix to allow registration with e-mail verification, reset password and approve
03 Jan 2006: Filter lines with space from spam list; fixed bug that inproperly filtered HTML from spam list; Dakar Release fix (end/postRenderingHandler issue)
08 Nov 2005: Doc fixes; code warning fixes; allow empty local SPAMLIST and public spam list
04 Nov 2005: Added registration protection with magic number
30 Oct 2005: Dakar Release compatibility: Work around Dakar preferencs bug
29 Oct 2005: Added wiki-spam filtering to prevent topic save with wiki-spam
27 Oct 2005: For BANLIST, add/remove multiple IP addresses at once, contributed by TWiki:Main.MichaelDaum
22 Jan 2005: Added NOFOLLOWAGE handling
19 Jan 2005: Added score for "view raw" to address e-mail harvester issue
05 Apr 2004: Fixed bug in event log (requiring update of earlier Plugin versions); doc updates
04 Apr 2004: Added WHITELIST and BANLIST
21 Mar 2004: Initial version
CPAN Dependencies: none
Other Dependencies: none
Perl Version: 5.005
License: GPL ( GNU General Public License)
TWiki:Plugins/Benchmark: GoodStyle 99%, FormattedSearch 99%, BlackListPlugin 97%
Plugin Home: http://TWiki.org/cgi-bin/view/Plugins/BlackListPlugin
Feedback: http://TWiki.org/cgi-bin/view/Plugins/BlackListPluginDev
Appraisal: http://TWiki.org/cgi-bin/view/Plugins/BlackListPluginAppraisal
Related Topics: TWikiPreferences, TWikiPlugins, TWiki:Codev.WikiSpam
Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2022-05-15 - JeffreyBarrick
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.BlackListPlugin.