403Webshell
Server IP : 103.4.122.14  /  Your IP : 216.73.216.103
Web Server : Apache/2.4.62 (Unix) OpenSSL/1.0.2k-fips
System : Linux cwp2.slnet.com.au 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User : statewid ( 1251)
PHP Version : 8.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/systemtap/tapset/linux/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/systemtap/tapset/linux/sysc_setsid.stp
# setsid _____________________________________________________
#
# long sys_setsid(void)
#

@define _SYSCALL_SETSID_NAME
%(
	name = "setsid"
%)

@define _SYSCALL_SETSID_ARGSTR
%(
	argstr = ""
%)

@define _SYSCALL_SETSID_REGARGS
%(
%)

probe syscall.setsid = dw_syscall.setsid !, nd_syscall.setsid {}
probe syscall.setsid.return = dw_syscall.setsid.return !,
                              nd_syscall.setsid.return {}

# dw_setsid _____________________________________________________

probe dw_syscall.setsid = kernel.function("sys_setsid").call
{
	@_SYSCALL_SETSID_NAME
	@_SYSCALL_SETSID_ARGSTR
}
probe dw_syscall.setsid.return = kernel.function("sys_setsid").return
{
	@_SYSCALL_SETSID_NAME
	@SYSC_RETVALSTR($return)
}

# nd_setsid _____________________________________________________

probe nd_syscall.setsid = nd1_syscall.setsid!, nd2_syscall.setsid!, tp_syscall.setsid
  { }

probe nd1_syscall.setsid = kprobe.function("sys_setsid")
{
	@_SYSCALL_SETSID_NAME
	@_SYSCALL_SETSID_ARGSTR
}

/* kernel 4.17+ */
probe nd2_syscall.setsid = kprobe.function(@arch_syscall0_prefix "sys_setsid") ?
{
	@_SYSCALL_SETSID_NAME
	@_SYSCALL_SETSID_ARGSTR
}

/* kernel 3.5+, but undesirable because it affects all syscalls */
probe tp_syscall.setsid = kernel.trace("sys_enter") ?
{
	@__syscall_compat_gate(@const("__NR_setsid"), @const("__NR_compat_setsid"))
	@_SYSCALL_SETSID_NAME
	@_SYSCALL_SETSID_ARGSTR
}

probe nd_syscall.setsid.return = nd1_syscall.setsid.return!, nd2_syscall.setsid.return!, tp_syscall.setsid.return
  { }
  
probe nd1_syscall.setsid.return = kprobe.function("sys_setsid").return
{
	@_SYSCALL_SETSID_NAME
	@SYSC_RETVALSTR(returnval())
}

/* kernel 4.17+ */
probe nd2_syscall.setsid.return = kprobe.function(@arch_syscall0_prefix "sys_setsid").return ?
{
	@_SYSCALL_SETSID_NAME
	@SYSC_RETVALSTR(returnval())
}

/* kernel 3.5+, but undesirable because it affects all syscalls */
probe tp_syscall.setsid.return = kernel.trace("sys_exit")
{
	__set_syscall_pt_regs($regs)
	@__syscall_compat_gate(@const("__NR_setsid"), @const("__NR_compat_setsid"))
	@_SYSCALL_SETSID_NAME
	@SYSC_RETVALSTR($ret)
}

Youez - 2016 - github.com/yon3zu
LinuXploit