Linux server1.dn-server.com 4.18.0-553.89.1.lve.el8.x86_64 #1 SMP Wed Dec 10 13:58:50 UTC 2025 x86_64
LiteSpeed
Server IP : 195.201.204.189 & Your IP : 216.73.216.222
Domains :
Cant Read [ /etc/named.conf ]
User : beriska1
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
opt /
alt /
ruby23 /
share /
ri /
2.3.0 /
system /
Delete
Unzip
Name
Size
Permission
Date
Action
ACL
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Abbrev
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Addrinfo
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
ArgumentError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Array
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Base64
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
BasicObject
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
BasicSocket
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Benchmark
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
BigDecimal
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
BigMath
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Bignum
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Binding
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
CGI
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
CMath
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
CSV
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Class
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
ClosedQueueError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Comparable
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Complex
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
ConditionVariable
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Continuation
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Coverage
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
DBM
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
DBMError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
DEBUGGER__
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
DRb
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Data
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Date
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
DateTime
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Delegator
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Digest
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Dir
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
ENV
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
EOFError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
ERB
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
EXCEPTION_TYPE
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Encoding
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
EncodingError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
English
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Enumerable
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Enumerator
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Errno
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Etc
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Exception
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Exception2MessageMapper
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
FalseClass
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Fcntl
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Fiber
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
FiberError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Fiddle
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
File
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
FileTest
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
FileUtils
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Find
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Fixnum
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Float
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
FloatDomainError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Forwardable
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
GC
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
GDBM
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
GDBMError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
GDBMFatalError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Gem
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
GetoptLong
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
HTTPMovedTemporarily
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
HTTPMultipleChoice
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
HTTPRequestURITooLarge
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Hash
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
IO
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
IOError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
IPAddr
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
IPSocket
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
IRB
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
IndexError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Integer
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Interrupt
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
JSON
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Jacobian
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Kconv
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Kernel
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
KeyError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
LUSolve
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
LoadError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
LocalJumpError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Logger
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
MakeMakefile
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Marshal
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
MatchData
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Math
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Matrix
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Method
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Module
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Monitor
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
MonitorMixin
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Mutex_m
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
NKF
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
NQXML
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
NameError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Net
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Newton
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
NilClass
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
NoMemoryError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
NoMethodError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
NotImplementedError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Numeric
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
OLEProperty
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Object
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
ObjectSpace
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Observable
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Open3
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
OpenSSL
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
OpenStruct
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
OpenURI
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
OptParse
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
OptionParser
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
PP
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
PStore
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
PTY
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Pathname
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
PrettyPrint
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Prime
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Proc
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Process
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Profiler__
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Psych
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Queue
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
RDoc
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
RDocTask
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
REXML
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
RSS
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Racc
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Rake
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Random
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Range
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
RangeError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Rational
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Readline
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Regexp
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
RegexpError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Resolv
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Rinda
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Ripper
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
RubyLex
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
RubyToken
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
RubyVM
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
RuntimeError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
SDBM
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
SDBMError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
SOCKSSocket
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Scanf
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
ScriptError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
SecureRandom
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
SecurityError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Set
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Shell
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Shellwords
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Signal
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
SignalException
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
SimpleDelegator
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Singleton
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
SizedQueue
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Socket
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
SocketError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
SortedSet
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
StandardError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
StopIteration
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
String
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
StringIO
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
StringScanner
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Struct
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Symbol
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Sync
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Sync_m
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Synchronizer
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Synchronizer_m
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
SyntaxError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Syslog
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
SystemCallError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
SystemExit
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
SystemStackError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
TCPServer
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
TCPSocket
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
TSort
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
TempIO
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Tempfile
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Test
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
ThWait
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Thread
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
ThreadError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
ThreadGroup
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
ThreadsWait
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Time
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Timeout
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
TracePoint
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Tracer
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
TrueClass
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
TypeError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
UDPSocket
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
UNIXServer
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
UNIXSocket
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
URI
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
UnboundMethod
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
UncaughtThrowError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
UnicodeNormalize
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Vector
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
WEBrick
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
WIN32OLE
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
WIN32OLERuntimeError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
WIN32OLE_EVENT
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
WIN32OLE_METHOD
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
WIN32OLE_PARAM
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
WIN32OLE_RECORD
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
WIN32OLE_TYPE
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
WIN32OLE_TYPELIB
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
WIN32OLE_VARIABLE
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
WIN32OLE_VARIANT
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
WeakRef
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
XML
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
XMLEncoding_ja
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
XMLRPC
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
XMP
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
YAML
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
ZeroDivisionError
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Zlib
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
fatal
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
lib
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
syntax
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
unknown
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
cache.ri
376.97
KB
-rw-r--r--
2023-07-26 18:09
created.rid
55.53
KB
-rw-r--r--
2023-07-26 18:09
page-ChangeLog-0_60_to_1_1.ri
181.6
KB
-rw-r--r--
2023-07-26 18:09
page-ChangeLog-1_8_0.ri
1.01
MB
-rw-r--r--
2023-07-26 18:09
page-ChangeLog-1_9_3.ri
3.89
MB
-rw-r--r--
2023-07-26 18:09
page-ChangeLog-2_0_0.ri
1.05
MB
-rw-r--r--
2023-07-26 18:09
page-ChangeLog-2_1_0.ri
791.27
KB
-rw-r--r--
2023-07-26 18:09
page-ChangeLog-2_2_0.ri
531.92
KB
-rw-r--r--
2023-07-26 18:09
page-ChangeLog-YARV.ri
226.2
KB
-rw-r--r--
2023-07-26 18:09
page-ChangeLog.ri
654.77
KB
-rw-r--r--
2023-07-26 18:09
page-NEWS-1_8_7.ri
22.04
KB
-rw-r--r--
2023-07-26 18:09
page-NEWS-1_9_1.ri
17.56
KB
-rw-r--r--
2023-07-26 18:09
page-NEWS-1_9_2.ri
20.67
KB
-rw-r--r--
2023-07-26 18:09
page-NEWS-1_9_3.ri
14.91
KB
-rw-r--r--
2023-07-26 18:09
page-NEWS-2_0_0.ri
26.06
KB
-rw-r--r--
2023-07-26 18:09
page-NEWS-2_1_0.ri
18.2
KB
-rw-r--r--
2023-07-26 18:09
page-NEWS-2_2_0.ri
13.69
KB
-rw-r--r--
2023-07-26 18:09
page-NEWS.ri
18.45
KB
-rw-r--r--
2023-07-26 18:09
page-README_md.ri
7.11
KB
-rw-r--r--
2023-07-26 18:09
page-contributing_rdoc.ri
23.04
KB
-rw-r--r--
2023-07-26 18:09
page-contributors_rdoc.ri
24.97
KB
-rw-r--r--
2023-07-26 18:09
page-dtrace_probes_rdoc.ri
8.65
KB
-rw-r--r--
2023-07-26 18:09
page-extension_ja_rdoc.ri
82.82
KB
-rw-r--r--
2023-07-26 18:09
page-extension_rdoc.ri
70.58
KB
-rw-r--r--
2023-07-26 18:09
page-globals_rdoc.ri
5.29
KB
-rw-r--r--
2023-07-26 18:09
page-keywords_rdoc.ri
6.07
KB
-rw-r--r--
2023-07-26 18:09
page-maintainers_rdoc.ri
11.97
KB
-rw-r--r--
2023-07-26 18:09
page-marshal_rdoc.ri
14.16
KB
-rw-r--r--
2023-07-26 18:09
page-regexp_rdoc.ri
33.88
KB
-rw-r--r--
2023-07-26 18:09
page-security_rdoc.ri
7.66
KB
-rw-r--r--
2023-07-26 18:09
page-standard_library_rdoc.ri
9.9
KB
-rw-r--r--
2023-07-26 18:09
page-syntax_rdoc.ri
1.63
KB
-rw-r--r--
2023-07-26 18:09
Save
Rename
U:RDoc::TopLevel[ i I"security.rdoc:EFcRDoc::Parser::Simpleo:RDoc::Markup::Document:@parts[[S:RDoc::Markup::Heading: leveli: textI"Ruby Security;To:RDoc::Markup::BlankLine o:RDoc::Markup::Paragraph;[I"TThe Ruby programming language is large and complex and there are many security ;TI"Lpitfalls often encountered by newcomers and experienced Rubyists alike.;T@ o; ;[I"RThis document aims to discuss many of these pitfalls and provide more secure ;TI"#alternatives where applicable.;T@ o; ;[I"UPlease check the full list of publicly known CVEs and how to correctly report a ;TI"Gsecurity vulnerability, at: http://www.ruby-lang.org/en/security/ ;TI"DJapanese version is here: http://www.ruby-lang.org/ja/security/;T@ o; ;[ I"ASecurity vulnerabilities should be reported via an email to ;TI"4mailto:security@ruby-lang.org ({the PGP public ;TI"Tkey}[http://www.ruby-lang.org/security.asc]), which is a private mailing list. ;TI"5Reported problems will be published after fixes.;T@ S; ; i;I"<code>$SAFE</code>;T@ o; ;[I"TRuby provides a mechanism to restrict what operations can be performed by Ruby ;TI"9code in the form of the <code>$SAFE</code> variable.;T@ o; ;[I"UHowever, <code>$SAFE</code> does not provide a secure environment for executing ;TI"untrusted code.;T@ o; ;[ I"UIf you need to execute untrusted code, you should use an operating system level ;TI"Jsandboxing mechanism. On Linux, ptrace or LXC can be used to sandbox ;TI"Opotentially malicious code. Other similar mechanisms exist on every major ;TI"operating system.;T@ S; ; i;I"+Marshal.load+;T@ o; ;[I"URuby's +Marshal+ module provides methods for serializing and deserializing Ruby ;TI"3object trees to and from a binary data format.;T@ o; ;[ I"NNever use +Marshal.load+ to deserialize untrusted or user supplied data. ;TI"NBecause +Marshal+ can deserialize to almost any Ruby object and has full ;TI"Rcontrol over instance variables, it is possible to craft a malicious payload ;TI"6that executes code shortly after deserialization.;T@ o; ;[ I"RIf you need to deserialize untrusted data, you should use JSON as it is only ;TI"Ucapable of returning 'primitive' types such as strings, arrays, hashes, numbers ;TI"Oand nil. If you need to deserialize other classes, you should handle this ;TI";manually. Never deserialize to a user specified class.;T@ S; ; i;I" YAML;T@ o; ;[I"RYAML is a popular human readable data serialization format used by many Ruby ;TI"Nprograms for configuration and database persistence of Ruby object trees.;T@ o; ;[I"RSimilar to +Marshal+, it is able to deserialize into arbitrary Ruby classes. ;TI"KFor example, the following YAML data will create an +ERB+ object when ;TI"deserialized:;T@ o:RDoc::Markup::Verbatim;[I"!ruby/object:ERB ;TI"src: puts `uname` ;T:@format0o; ;[I"RBecause of this, many of the security considerations applying to Marshal are ;TI"Lalso applicable to YAML. Do not use YAML to deserialize untrusted data.;T@ S; ; i;I"Symbols;T@ o; ;[ I"USymbols are often seen as syntax sugar for simple strings, but they play a much ;TI"Pmore crucial role. The MRI Ruby implementation uses Symbols internally for ;TI"Rmethod, variable and constant names. The reason for this is that symbols are ;TI"Ssimply integers with names attached to them, so they are faster to look up in ;TI"hashtables.;T@ o; ;[I"OStarting in version 2.2, most symbols can be garbage collected; these are ;TI"Lcalled <i>mortal</i> symbols. Most symbols you create (e.g. by calling ;TI"+to_sym+) are mortal.;T@ o; ;[I"P<i>Immortal</i> symbols on the other hand will never be garbage collected. ;TI"*They are created when modifying code:;To:RDoc::Markup::List: @type:BULLET:@items[o:RDoc::Markup::ListItem:@label0;[o; ;[I"3defining a method (e.g. with +define_method+),;To;;0;[o; ;[I"Fsetting an instance variable (e.g. with +instance_variable_set+),;To;;0;[o; ;[I"<creating a variable or constant (e.g. with +const_set+);To; ;[ I"LC extensions that have not been updated and are still calling `SYM2ID` ;TI"#will create immortal symbols. ;TI"IBugs in 2.2.0: +send+ and +__send__+ also created immortal symbols, ;TI"Gand calling methods with keyword arguments could also create some.;T@ o; ;[ I"KDon't create immortal symbols from user inputs. Otherwise, this would ;TI"Rallow a user to mount a denial of service attack against your application by ;TI"Sflooding it with unique strings, which will cause memory to grow indefinitely ;TI"Muntil the Ruby process is killed or causes the system to slow to a halt.;T@ o; ;[I"TWhile it might not be a good idea to call these with user inputs, methods that ;TI"<used to be vulnerable such as +to_sym+, +respond_to?+, ;TI"Q+method+, +instance_variable_get+, +const_get+, etc. are no longer a threat.;T@ S; ; i;I"Regular expressions;T@ o; ;[ I"RRuby's regular expression syntax has some minor differences when compared to ;TI"Tother languages. In Ruby, the <code>^</code> and <code>$</code> anchors do not ;TI"Urefer to the beginning and end of the string, rather the beginning and end of a ;TI"*line*.;T@ o; ;[ I"?This means that if you're using a regular expression like ;TI"S<code>/^[a-z]+$/</code> to restrict a string to only letters, an attacker can ;TI"Ubypass this check by passing a string containing a letter, then a newline, then ;TI""any string of their choosing.;T@ o; ;[I"RIf you want to match the beginning and end of the entire string in Ruby, use ;TI"the anchors +\A+ and +\z+.;T@ S; ; i;I"+eval+;T@ o; ;[I"=Never pass untrusted or user controlled input to +eval+.;T@ o; ;[ I"NUnless you are implementing a REPL like +irb+ or +pry+, +eval+ is almost ;TI"Ucertainly not what you want. Do not attempt to filter user input before passing ;TI"Sit to +eval+ - this approach is fraught with danger and will most likely open ;TI"Jyour application up to a serious remote code execution vulnerability.;T@ S; ; i;I"+send+;T@ o; ;[I"U'Global functions' in Ruby (+puts+, +exit+, etc.) are actually private instance ;TI"Qmethods on +Object+. This means it is possible to invoke these methods with ;TI"A+send+, even if the call to +send+ has an explicit receiver.;T@ o; ;[I"RFor example, the following code snippet writes "Hello world" to the terminal:;T@ o;;[I""1.send(:puts, "Hello world") ;T;0o; ;[I"SYou should never call +send+ with user supplied input as the first parameter. ;TI">Doing so can introduce a denial of service vulnerability:;T@ o;;[I"6foo.send(params[:bar]) # params[:bar] is "exit!" ;T;0o; ;[I"OIf an attacker can control the first two arguments to +send+, remote code ;TI"execution is possible:;T@ o;;[I"J# params is { :a => "eval", :b => "...ruby code to be executed..." } ;TI"&foo.send(params[:a], params[:b]) ;T;0o; ;[I"SWhen dispatching a method call based on user input, carefully verify that the ;TI"Qmethod name. If possible, check it against a whitelist of safe method names.;T@ o; ;[I"ONote that the use of +public_send+ is also dangerous, as +send+ itself is ;TI"public:;T@ o;;[I"E1.public_send("send", "eval", "...ruby code to be executed...") ;T;0S; ; i;I"DRb;T@ o; ;[I"UAs DRb allows remote clients to invoke arbitrary methods, it is not suitable to ;TI"!expose to untrusted clients.;T@ o; ;[I"TWhen using DRb, try to avoid exposing it over the network if possible. If this ;TI"Uisn't possible and you need to expose DRb to the world, you *must* configure an ;TI"<appropriate security policy with <code>DRb::ACL</code>.;T: @file@:0@omit_headings_from_table_of_contents_below0