SECURITY 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. ********************
  2. NRPE SECURITY README
  3. ********************
  4. TCP WRAPPER SUPPORT
  5. ===================
  6. NRPE 2.1 includes native support for TCP wrappers. The older
  7. host access list directive was removed from the config file.
  8. Make sure your system supports TCP wrappers before running NRPE.
  9. Once you compile NRPE you can check to see if it has wrapper
  10. support built in by running the daemon from the command line
  11. without any arguments like this:
  12. ./nrpe --help
  13. COMMAND ARGUMENTS
  14. =================
  15. NRPE 2.0 includes the ability for clients to supply arguments to
  16. commands which should be run. Please note that this feature
  17. should be considered a security risk, and you should only use
  18. it if you know what you're doing!
  19. ENABLING ARGUMENTS
  20. ------------------
  21. To enable support for command argument in the daemon, you must
  22. do two things:
  23. 1. Run the configure script with the --enable-command-args
  24. option
  25. 2. Set the 'dont_blame_nrpe' directive in the NRPE config
  26. file to 1.
  27. ILLEGAL METACHARS
  28. -----------------
  29. To help prevent some nasty things from being done by evil
  30. clients, the following twelve metacharacters are not allowed
  31. in client command arguments:
  32. | ` & > < ' " \ [ ] { }
  33. Any client request which contains the abovementioned metachars
  34. is discarded. Also, the bang character (!) is not allowed, as
  35. it is used internally as a delimiter between command arguments.
  36. USER/GROUP RESTRICTIONS
  37. -----------------------
  38. The NRPE daemon cannot be run with (effective) root user/group
  39. privileges. You must run the daemon with an account that does
  40. not have superuser rights. Use the nrpe_user and nrpe_group
  41. directives in the config file to specify which user/group the
  42. daemon should run as.
  43. ENCRYPTION
  44. ----------
  45. If you do enable support for command arguments in the NRPE daemon,
  46. make sure that you encrypt communications either by using:
  47. 1. Stunnel (see http://www.stunnel.org for more info)
  48. 2. Native SSL support
  49. Do NOT assume that just because the daemon is behind a firewall
  50. that you are safe! Always encrypt NRPE traffic!
  51. USING ARGUMENTS
  52. ---------------
  53. How do you use command arguments? Well, lets say you define a
  54. command in the NRPE config file that looks like this:
  55. command[check_users]=/usr/local/nagios/libexec/check_users -w $ARG1$ -c $ARG2$
  56. You could then call the check_nrpe plugin like this:
  57. ./check_nrpe -H <host> -c check_users -a 5 10
  58. The arguments '5' and '10' get substituted into the appropriate
  59. $ARGx$ macros in the command ($ARG1$ and $ARG2$, respectively).
  60. The command that would be executed by the NRPE daemon would look
  61. like this:
  62. /usr/local/nagios/libexec/check_users -w 5 -c 10
  63. You can supply up to 16 arguments to be passed to the command
  64. for substitution in $ARG$ macros ($ARG1$ - $ARG16$).
  65. -- Ethan Galstad (nagios@nagios.org)