Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / tools / perl-5.8.0 / man / man1 / perlsec.1
CommitLineData
86530b38
AT
1.\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13
2.\"
3.\" Standard preamble:
4.\" ========================================================================
5.de Sh \" Subsection heading
6.br
7.if t .Sp
8.ne 5
9.PP
10\fB\\$1\fR
11.PP
12..
13.de Sp \" Vertical space (when we can't use .PP)
14.if t .sp .5v
15.if n .sp
16..
17.de Vb \" Begin verbatim text
18.ft CW
19.nf
20.ne \\$1
21..
22.de Ve \" End verbatim text
23.ft R
24.fi
25..
26.\" Set up some character translations and predefined strings. \*(-- will
27.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
28.\" double quote, and \*(R" will give a right double quote. | will give a
29.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
30.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
31.\" expand to `' in nroff, nothing in troff, for use with C<>.
32.tr \(*W-|\(bv\*(Tr
33.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
34.ie n \{\
35. ds -- \(*W-
36. ds PI pi
37. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
38. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
39. ds L" ""
40. ds R" ""
41. ds C` ""
42. ds C' ""
43'br\}
44.el\{\
45. ds -- \|\(em\|
46. ds PI \(*p
47. ds L" ``
48. ds R" ''
49'br\}
50.\"
51.\" If the F register is turned on, we'll generate index entries on stderr for
52.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
53.\" entries marked with X<> in POD. Of course, you'll have to process the
54.\" output yourself in some meaningful fashion.
55.if \nF \{\
56. de IX
57. tm Index:\\$1\t\\n%\t"\\$2"
58..
59. nr % 0
60. rr F
61.\}
62.\"
63.\" For nroff, turn off justification. Always turn off hyphenation; it makes
64.\" way too many mistakes in technical documents.
65.hy 0
66.if n .na
67.\"
68.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
69.\" Fear. Run. Save yourself. No user-serviceable parts.
70. \" fudge factors for nroff and troff
71.if n \{\
72. ds #H 0
73. ds #V .8m
74. ds #F .3m
75. ds #[ \f1
76. ds #] \fP
77.\}
78.if t \{\
79. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
80. ds #V .6m
81. ds #F 0
82. ds #[ \&
83. ds #] \&
84.\}
85. \" simple accents for nroff and troff
86.if n \{\
87. ds ' \&
88. ds ` \&
89. ds ^ \&
90. ds , \&
91. ds ~ ~
92. ds /
93.\}
94.if t \{\
95. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
96. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
97. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
98. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
99. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
100. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
101.\}
102. \" troff and (daisy-wheel) nroff accents
103.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
104.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
105.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
106.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
107.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
108.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
109.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
110.ds ae a\h'-(\w'a'u*4/10)'e
111.ds Ae A\h'-(\w'A'u*4/10)'E
112. \" corrections for vroff
113.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
114.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
115. \" for low resolution devices (crt and lpr)
116.if \n(.H>23 .if \n(.V>19 \
117\{\
118. ds : e
119. ds 8 ss
120. ds o a
121. ds d- d\h'-1'\(ga
122. ds D- D\h'-1'\(hy
123. ds th \o'bp'
124. ds Th \o'LP'
125. ds ae ae
126. ds Ae AE
127.\}
128.rm #[ #] #H #V #F C
129.\" ========================================================================
130.\"
131.IX Title "PERLSEC 1"
132.TH PERLSEC 1 "2002-06-08" "perl v5.8.0" "Perl Programmers Reference Guide"
133.SH "NAME"
134perlsec \- Perl security
135.SH "DESCRIPTION"
136.IX Header "DESCRIPTION"
137Perl is designed to make it easy to program securely even when running
138with extra privileges, like setuid or setgid programs. Unlike most
139command line shells, which are based on multiple substitution passes on
140each line of the script, Perl uses a more conventional evaluation scheme
141with fewer hidden snags. Additionally, because the language has more
142builtin functionality, it can rely less upon external (and possibly
143untrustworthy) programs to accomplish its purposes.
144.PP
145Perl automatically enables a set of special security checks, called \fItaint
146mode\fR, when it detects its program running with differing real and effective
147user or group IDs. The setuid bit in Unix permissions is mode 04000, the
148setgid bit mode 02000; either or both may be set. You can also enable taint
149mode explicitly by using the \fB\-T\fR command line flag. This flag is
150\&\fIstrongly\fR suggested for server programs and any program run on behalf of
151someone else, such as a \s-1CGI\s0 script. Once taint mode is on, it's on for
152the remainder of your script.
153.PP
154While in this mode, Perl takes special precautions called \fItaint
155checks\fR to prevent both obvious and subtle traps. Some of these checks
156are reasonably simple, such as verifying that path directories aren't
157writable by others; careful programmers have always used checks like
158these. Other checks, however, are best supported by the language itself,
159and it is these checks especially that contribute to making a set-id Perl
160program more secure than the corresponding C program.
161.PP
162You may not use data derived from outside your program to affect
163something else outside your program\*(--at least, not by accident. All
164command line arguments, environment variables, locale information (see
165perllocale), results of certain system calls (\fIreaddir()\fR,
166\&\fIreadlink()\fR, the variable of \fIshmread()\fR, the messages returned by
167\&\fImsgrcv()\fR, the password, gcos and shell fields returned by the
168\&\fIgetpwxxx()\fR calls), and all file input are marked as \*(L"tainted\*(R".
169Tainted data may not be used directly or indirectly in any command
170that invokes a sub\-shell, nor in any command that modifies files,
171directories, or processes, \fBwith the following exceptions\fR:
172.IP "\(bu" 4
173If you pass more than one argument to either \f(CW\*(C`system\*(C'\fR or \f(CW\*(C`exec\*(C'\fR,
174the arguments are checked for taintedness \fBbut\fR the operation will still
175be attempted, emitting an optional warning. This will be fatal in a
176future version of perl so do not rely on it to bypass the tainting
177mechanism.
178.IP "\(bu" 4
179Arguments to \f(CW\*(C`print\*(C'\fR and \f(CW\*(C`syswrite\*(C'\fR are \fBnot\fR checked for taintedness.
180.IP "\(bu" 4
181Symbolic methods
182.Sp
183.Vb 1
184\& $obj->$method(@args);
185.Ve
186.Sp
187and symbolic sub references
188.Sp
189.Vb 2
190\& &{$foo}(@args);
191\& $foo->(@args);
192.Ve
193.Sp
194are not checked for taintedness. This requires extra carefulness
195unless you want external data to affect your control flow. Unless
196you carefully limit what these symbolic values are, people are able
197to call functions \fBoutside\fR your Perl code, such as POSIX::system,
198in which case they are able to run arbitrary external code.
199.PP
200The value of an expression containing tainted data will itself be
201tainted, even if it is logically impossible for the tainted data to
202affect the value.
203.PP
204Because taintedness is associated with each scalar value, some
205elements of an array can be tainted and others not.
206.PP
207For example:
208.PP
209.Vb 8
210\& $arg = shift; # $arg is tainted
211\& $hid = $arg, 'bar'; # $hid is also tainted
212\& $line = <>; # Tainted
213\& $line = <STDIN>; # Also tainted
214\& open FOO, "/home/me/bar" or die $!;
215\& $line = <FOO>; # Still tainted
216\& $path = $ENV{'PATH'}; # Tainted, but see below
217\& $data = 'abc'; # Not tainted
218.Ve
219.PP
220.Vb 5
221\& system "echo $arg"; # Insecure
222\& system "/bin/echo", $arg; # Allowed but considered insecure
223\& # (Perl doesn't know about /bin/echo)
224\& system "echo $hid"; # Insecure
225\& system "echo $data"; # Insecure until PATH set
226.Ve
227.PP
228.Vb 1
229\& $path = $ENV{'PATH'}; # $path now tainted
230.Ve
231.PP
232.Vb 2
233\& $ENV{'PATH'} = '/bin:/usr/bin';
234\& delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'};
235.Ve
236.PP
237.Vb 2
238\& $path = $ENV{'PATH'}; # $path now NOT tainted
239\& system "echo $data"; # Is secure now!
240.Ve
241.PP
242.Vb 2
243\& open(FOO, "< $arg"); # OK - read-only file
244\& open(FOO, "> $arg"); # Not OK - trying to write
245.Ve
246.PP
247.Vb 3
248\& open(FOO,"echo $arg|"); # Not OK
249\& open(FOO,"-|")
250\& or exec 'echo', $arg; # Allowed but not really OK
251.Ve
252.PP
253.Vb 1
254\& $shout = `echo $arg`; # Insecure, $shout now tainted
255.Ve
256.PP
257.Vb 2
258\& unlink $data, $arg; # Insecure
259\& umask $arg; # Insecure
260.Ve
261.PP
262.Vb 3
263\& exec "echo $arg"; # Insecure
264\& exec "echo", $arg; # Allowed but considered insecure
265\& exec "sh", '-c', $arg; # Considered secure, alas!
266.Ve
267.PP
268.Vb 2
269\& @files = <*.c>; # insecure (uses readdir() or similar)
270\& @files = glob('*.c'); # insecure (uses readdir() or similar)
271.Ve
272.PP
273.Vb 4
274\& # In Perl releases older than 5.6.0 the <*.c> and glob('*.c') would
275\& # have used an external program to do the filename expansion; but in
276\& # either case the result is tainted since the list of filenames comes
277\& # from outside of the program.
278.Ve
279.PP
280.Vb 2
281\& $bad = ($arg, 23); # $bad will be tainted
282\& $arg, `true`; # Insecure (although it isn't really)
283.Ve
284.PP
285If you try to do something insecure, you will get a fatal error saying
286something like \*(L"Insecure dependency\*(R" or \*(L"Insecure \f(CW$ENV\fR{\s-1PATH\s0}\*(R". Note that you
287can still write an insecure \fBsystem\fR or \fBexec\fR, but only by explicitly
288doing something like the \*(L"considered secure\*(R" example above. This will not
289be possible in a future version of Perl.
290.Sh "Laundering and Detecting Tainted Data"
291.IX Subsection "Laundering and Detecting Tainted Data"
292To test whether a variable contains tainted data, and whose use would
293thus trigger an \*(L"Insecure dependency\*(R" message, you can use the
294\&\fItainted()\fR function of the Scalar::Util module, available in your
295nearby \s-1CPAN\s0 mirror, and included in Perl starting from the release 5.8.0.
296Or you may be able to use the following \fI\fIis_tainted()\fI\fR function.
297.PP
298.Vb 3
299\& sub is_tainted {
300\& return ! eval { eval("#" . substr(join("", @_), 0, 0)); 1 };
301\& }
302.Ve
303.PP
304This function makes use of the fact that the presence of tainted data
305anywhere within an expression renders the entire expression tainted. It
306would be inefficient for every operator to test every argument for
307taintedness. Instead, the slightly more efficient and conservative
308approach is used that if any tainted value has been accessed within the
309same expression, the whole expression is considered tainted.
310.PP
311But testing for taintedness gets you only so far. Sometimes you have just
312to clear your data's taintedness. The only way to bypass the tainting
313mechanism is by referencing subpatterns from a regular expression match.
314Perl presumes that if you reference a substring using \f(CW$1\fR, \f(CW$2\fR, etc., that
315you knew what you were doing when you wrote the pattern. That means using
316a bit of thought\*(--don't just blindly untaint anything, or you defeat the
317entire mechanism. It's better to verify that the variable has only good
318characters (for certain values of \*(L"good\*(R") rather than checking whether it
319has any bad characters. That's because it's far too easy to miss bad
320characters that you never thought of.
321.PP
322Here's a test to make sure that the data contains nothing but \*(L"word\*(R"
323characters (alphabetics, numerics, and underscores), a hyphen, an at sign,
324or a dot.
325.PP
326.Vb 5
327\& if ($data =~ /^([-\e@\ew.]+)$/) {
328\& $data = $1; # $data now untainted
329\& } else {
330\& die "Bad data in $data"; # log this somewhere
331\& }
332.Ve
333.PP
334This is fairly secure because \f(CW\*(C`/\ew+/\*(C'\fR doesn't normally match shell
335metacharacters, nor are dot, dash, or at going to mean something special
336to the shell. Use of \f(CW\*(C`/.+/\*(C'\fR would have been insecure in theory because
337it lets everything through, but Perl doesn't check for that. The lesson
338is that when untainting, you must be exceedingly careful with your patterns.
339Laundering data using regular expression is the \fIonly\fR mechanism for
340untainting dirty data, unless you use the strategy detailed below to fork
341a child of lesser privilege.
342.PP
343The example does not untaint \f(CW$data\fR if \f(CW\*(C`use locale\*(C'\fR is in effect,
344because the characters matched by \f(CW\*(C`\ew\*(C'\fR are determined by the locale.
345Perl considers that locale definitions are untrustworthy because they
346contain data from outside the program. If you are writing a
347locale-aware program, and want to launder data with a regular expression
348containing \f(CW\*(C`\ew\*(C'\fR, put \f(CW\*(C`no locale\*(C'\fR ahead of the expression in the same
349block. See \*(L"\s-1SECURITY\s0\*(R" in perllocale for further discussion and examples.
350.ie n .Sh "Switches On the ""#!"" Line"
351.el .Sh "Switches On the ``#!'' Line"
352.IX Subsection "Switches On the #! Line"
353When you make a script executable, in order to make it usable as a
354command, the system will pass switches to perl from the script's #!
355line. Perl checks that any command line switches given to a setuid
356(or setgid) script actually match the ones set on the #! line. Some
357Unix and Unix-like environments impose a one-switch limit on the #!
358line, so you may need to use something like \f(CW\*(C`\-wU\*(C'\fR instead of \f(CW\*(C`\-w \-U\*(C'\fR
359under such systems. (This issue should arise only in Unix or
360Unix-like environments that support #! and setuid or setgid scripts.)
361.Sh "Cleaning Up Your Path"
362.IX Subsection "Cleaning Up Your Path"
363For "Insecure \f(CW$ENV{PATH}\fR" messages, you need to set \f(CW$ENV{'PATH'}\fR to a
364known value, and each directory in the path must be non-writable by others
365than its owner and group. You may be surprised to get this message even
366if the pathname to your executable is fully qualified. This is \fInot\fR
367generated because you didn't supply a full path to the program; instead,
368it's generated because you never set your \s-1PATH\s0 environment variable, or
369you didn't set it to something that was safe. Because Perl can't
370guarantee that the executable in question isn't itself going to turn
371around and execute some other program that is dependent on your \s-1PATH\s0, it
372makes sure you set the \s-1PATH\s0.
373.PP
374The \s-1PATH\s0 isn't the only environment variable which can cause problems.
375Because some shells may use the variables \s-1IFS\s0, \s-1CDPATH\s0, \s-1ENV\s0, and
376\&\s-1BASH_ENV\s0, Perl checks that those are either empty or untainted when
377starting subprocesses. You may wish to add something like this to your
378setid and taint-checking scripts.
379.PP
380.Vb 1
381\& delete @ENV{qw(IFS CDPATH ENV BASH_ENV)}; # Make %ENV safer
382.Ve
383.PP
384It's also possible to get into trouble with other operations that don't
385care whether they use tainted values. Make judicious use of the file
386tests in dealing with any user-supplied filenames. When possible, do
387opens and such \fBafter\fR properly dropping any special user (or group!)
388privileges. Perl doesn't prevent you from opening tainted filenames for reading,
389so be careful what you print out. The tainting mechanism is intended to
390prevent stupid mistakes, not to remove the need for thought.
391.PP
392Perl does not call the shell to expand wild cards when you pass \fBsystem\fR
393and \fBexec\fR explicit parameter lists instead of strings with possible shell
394wildcards in them. Unfortunately, the \fBopen\fR, \fBglob\fR, and
395backtick functions provide no such alternate calling convention, so more
396subterfuge will be required.
397.PP
398Perl provides a reasonably safe way to open a file or pipe from a setuid
399or setgid program: just create a child process with reduced privilege who
400does the dirty work for you. First, fork a child using the special
401\&\fBopen\fR syntax that connects the parent and child by a pipe. Now the
402child resets its \s-1ID\s0 set and any other per-process attributes, like
403environment variables, umasks, current working directories, back to the
404originals or known safe values. Then the child process, which no longer
405has any special permissions, does the \fBopen\fR or other system call.
406Finally, the child passes the data it managed to access back to the
407parent. Because the file or pipe was opened in the child while running
408under less privilege than the parent, it's not apt to be tricked into
409doing something it shouldn't.
410.PP
411Here's a way to do backticks reasonably safely. Notice how the \fBexec\fR is
412not called with a string that the shell could expand. This is by far the
413best way to call something that might be subjected to shell escapes: just
414never call the shell at all.
415.PP
416.Vb 25
417\& use English '-no_match_vars';
418\& die "Can't fork: $!" unless defined($pid = open(KID, "-|"));
419\& if ($pid) { # parent
420\& while (<KID>) {
421\& # do something
422\& }
423\& close KID;
424\& } else {
425\& my @temp = ($EUID, $EGID);
426\& my $orig_uid = $UID;
427\& my $orig_gid = $GID;
428\& $EUID = $UID;
429\& $EGID = $GID;
430\& # Drop privileges
431\& $UID = $orig_uid;
432\& $GID = $orig_gid;
433\& # Make sure privs are really gone
434\& ($EUID, $EGID) = @temp;
435\& die "Can't drop privileges"
436\& unless $UID == $EUID && $GID eq $EGID;
437\& $ENV{PATH} = "/bin:/usr/bin"; # Minimal PATH.
438\& # Consider sanitizing the environment even more.
439\& exec 'myprog', 'arg1', 'arg2'
440\& or die "can't exec myprog: $!";
441\& }
442.Ve
443.PP
444A similar strategy would work for wildcard expansion via \f(CW\*(C`glob\*(C'\fR, although
445you can use \f(CW\*(C`readdir\*(C'\fR instead.
446.PP
447Taint checking is most useful when although you trust yourself not to have
448written a program to give away the farm, you don't necessarily trust those
449who end up using it not to try to trick it into doing something bad. This
450is the kind of security checking that's useful for set-id programs and
451programs launched on someone else's behalf, like \s-1CGI\s0 programs.
452.PP
453This is quite different, however, from not even trusting the writer of the
454code not to try to do something evil. That's the kind of trust needed
455when someone hands you a program you've never seen before and says, \*(L"Here,
456run this.\*(R" For that kind of safety, check out the Safe module,
457included standard in the Perl distribution. This module allows the
458programmer to set up special compartments in which all system operations
459are trapped and namespace access is carefully controlled.
460.Sh "Security Bugs"
461.IX Subsection "Security Bugs"
462Beyond the obvious problems that stem from giving special privileges to
463systems as flexible as scripts, on many versions of Unix, set-id scripts
464are inherently insecure right from the start. The problem is a race
465condition in the kernel. Between the time the kernel opens the file to
466see which interpreter to run and when the (now\-set\-id) interpreter turns
467around and reopens the file to interpret it, the file in question may have
468changed, especially if you have symbolic links on your system.
469.PP
470Fortunately, sometimes this kernel \*(L"feature\*(R" can be disabled.
471Unfortunately, there are two ways to disable it. The system can simply
472outlaw scripts with any set-id bit set, which doesn't help much.
473Alternately, it can simply ignore the set-id bits on scripts. If the
474latter is true, Perl can emulate the setuid and setgid mechanism when it
475notices the otherwise useless setuid/gid bits on Perl scripts. It does
476this via a special executable called \fBsuidperl\fR that is automatically
477invoked for you if it's needed.
478.PP
479However, if the kernel set-id script feature isn't disabled, Perl will
480complain loudly that your set-id script is insecure. You'll need to
481either disable the kernel set-id script feature, or put a C wrapper around
482the script. A C wrapper is just a compiled program that does nothing
483except call your Perl program. Compiled programs are not subject to the
484kernel bug that plagues set-id scripts. Here's a simple wrapper, written
485in C:
486.PP
487.Vb 6
488\& #define REAL_PATH "/path/to/script"
489\& main(ac, av)
490\& char **av;
491\& {
492\& execv(REAL_PATH, av);
493\& }
494.Ve
495.PP
496Compile this wrapper into a binary executable and then make \fIit\fR rather
497than your script setuid or setgid.
498.PP
499In recent years, vendors have begun to supply systems free of this
500inherent security bug. On such systems, when the kernel passes the name
501of the set-id script to open to the interpreter, rather than using a
502pathname subject to meddling, it instead passes \fI/dev/fd/3\fR. This is a
503special file already opened on the script, so that there can be no race
504condition for evil scripts to exploit. On these systems, Perl should be
505compiled with \f(CW\*(C`\-DSETUID_SCRIPTS_ARE_SECURE_NOW\*(C'\fR. The \fBConfigure\fR
506program that builds Perl tries to figure this out for itself, so you
507should never have to specify this yourself. Most modern releases of
508SysVr4 and \s-1BSD\s0 4.4 use this approach to avoid the kernel race condition.
509.PP
510Prior to release 5.6.1 of Perl, bugs in the code of \fBsuidperl\fR could
511introduce a security hole.
512.Sh "Protecting Your Programs"
513.IX Subsection "Protecting Your Programs"
514There are a number of ways to hide the source to your Perl programs,
515with varying levels of \*(L"security\*(R".
516.PP
517First of all, however, you \fIcan't\fR take away read permission, because
518the source code has to be readable in order to be compiled and
519interpreted. (That doesn't mean that a \s-1CGI\s0 script's source is
520readable by people on the web, though.) So you have to leave the
521permissions at the socially friendly 0755 level. This lets
522people on your local system only see your source.
523.PP
524Some people mistakenly regard this as a security problem. If your program does
525insecure things, and relies on people not knowing how to exploit those
526insecurities, it is not secure. It is often possible for someone to
527determine the insecure things and exploit them without viewing the
528source. Security through obscurity, the name for hiding your bugs
529instead of fixing them, is little security indeed.
530.PP
531You can try using encryption via source filters (Filter::* from \s-1CPAN\s0,
532or Filter::Util::Call and Filter::Simple since Perl 5.8).
533But crackers might be able to decrypt it. You can try using the byte
534code compiler and interpreter described below, but crackers might be
535able to de-compile it. You can try using the native-code compiler
536described below, but crackers might be able to disassemble it. These
537pose varying degrees of difficulty to people wanting to get at your
538code, but none can definitively conceal it (this is true of every
539language, not just Perl).
540.PP
541If you're concerned about people profiting from your code, then the
542bottom line is that nothing but a restrictive licence will give you
543legal security. License your software and pepper it with threatening
544statements like \*(L"This is unpublished proprietary software of \s-1XYZ\s0 Corp.
545Your access to it does not give you permission to use it blah blah
546blah.\*(R" You should see a lawyer to be sure your licence's wording will
547stand up in court.
548.Sh "Unicode"
549.IX Subsection "Unicode"
550Unicode is a new and complex technology and one may easily overlook
551certain security pitfalls. See perluniintro for an overview and
552perlunicode for details, and \*(L"Security Implications of Unicode\*(R" in perlunicode for security implications in particular.
553.SH "SEE ALSO"
554.IX Header "SEE ALSO"
555perlrun for its description of cleaning up environment variables.