403Webshell
Server IP : 81.2.241.106  /  Your IP : 216.73.216.165
Web Server : Apache/2.4.67 (Debian)
System : Linux tranq-f.bakta.org 5.10.0-45-amd64 #1 SMP Debian 5.10.259-1 (2026-07-02) x86_64
User : lisky ( 1002)
PHP Version : 7.4.33
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /usr/src/openssh-chroot/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/src/openssh-chroot/sftp-shell_d.c
#include <stdio.h>
#include <string.h>
#include <unistd.h>

#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>

void dumpInfo(char *text, int ret){
	int fd;
	char msg[512];
	msg[511] = 0;
	fd = open("/tmp/debug_sftp", O_CREAT|O_APPEND, 0600);
	if(fd != -1){
		snprintf(msg, 511, "%d: %s", ret, text);
		write(fd, msg, strlen(msg));
		close(fd);
	}
}

int main(int argc, char **argv){
//	char c;
	int ret;
	if(argc == 3 && strcmp(argv[1], "-c")==0 && (strcmp(argv[2], "/usr/lib/sftp-server")==0 || strcmp(argv[2], "/usr/lib/openssh/sftp-server") == 0)){
		//execute sftp
		ret = execl(argv[2], argv[2], NULL);
		dumpInfo("exec Failed", ret);
		dumpInfo("Errno", errno);
		return 0;
	}
/*
	{
		int fd;
		fd = open("/tmp/wantrun", O_CREAT|O_WRONLY);
		write(fd, argv[2], strlen(argv[2]));
		close(fd);
	}
*/	
	printf("This is not a shell - you just don't have permision to use shell on this machine\n");
	return 0;
}

Youez - 2016 - github.com/yon3zu
LinuXploit