前言: 虚拟化场景下,测试的时候,经常为了省事,经常想跳过安装操作系统。因为作者使用的是iscsi的分布式存储方案,所以可以用iscsiadm把iscsi挂载到host上,虚拟化出来/dev/sdx设备。 qemu-img convert -f qcow2 -O raw CentOS-7-x86_64-GenericCloud.qcow2 /dev/sdx 实际效果还不错,省去了安装操作系统的复杂过程。转换完成后,从/dev/sdx直接启动,guest os就带着操作系统了。 但是,还会看到转化速度比较慢
在Android中系统通过脚本build/tools/releasetools/build_super_image.py内部去调用lpmake工具生成super.img镜像
本文为joshua317原创文章,转载请注明:转载自joshua317博客 https://www.joshua317.com/article/169
KVM 全称是 基于内核的虚拟机(Kernel-based Virtual Machine),它是一个 Linux 的一个内核模块,该内核模块使得 Linux 变成了一个 Hypervisor,KVM 是基于虚拟化扩展(Intel VT 或者 AMD-V)的 X86 硬件的开源的 Linux 原生的全虚拟化解决方案。KVM 中,虚拟机被实现为常规的 Linux 进程,由标准 Linux 调度程序进行调度;虚机的每个虚拟 CPU 被实现为一个常规的 Linux 进程。这使得 KMV 能够使用 Linux 内核的已有功能。但是,KVM 本身不执行任何硬件模拟,需要客户空间程序通过 /dev/kvm 接口设置一个客户机虚拟服务器的地址空间,向它提供模拟的 I/O,并将它的视频显示映射回宿主的显示屏。
MemProcFS是一款功能强大且方便实用的物理内存数据查看工具,该工具可以帮助广大研究人员在一个虚拟文件系统中中以文件形式查看物理内存数据。
前面 3 条 amixer 命令是打开板载咪头的开关,第 4 条命令是设置耳机的播放声音。 最后一条命令是录音命令,参数讲解如下:
1.sudo modprobe vcan 加载虚拟can模块 2.sudo ip link add dev vcan0 type vcan 添加vcan0网卡 3.ifconfig -a 可以查到当前can网络 can0 can1,包括收发包数量、是否有错误等等 4.ip link set can0 up type can bitrate 800000 //ip link set can0 type can –help 设置can0的波特率为800kbps,CAN网络波特率最大值为1Mbps 5.ip link set can0 up type can bitrate 800000 loopback on 设置回环模式,自发自收,用于测试是硬件是否正常,loopback不一定支持 6. ip link set can0 down 关闭can0 网络 7.cansend can0 0x11 0x22 0x33 0x44 0x55 0x66 0x77 0x88 发送默认ID为0x1的can标准帧,数据为0x11 22 33 44 55 66 77 88 每次最大8个byte 8.cansend can0 -i 0x800 0x11 0x22 0x33 0x44 0x55 0x66 0x77 0x88 -e -e 表示扩展帧,CAN_ID最大29bit,标准帧CAN_ID最大11bit -i表示CAN_ID 9. cansend can0 -i 0x02 0x11 0x12 –loop=20 –loop 表示发送20个包 10.candump can0 接收CAN0数据
Linux是一种安全操作系统,它给普通用户尽可能低的权限,而把全部的系统权限赋予一个单一的帐户–root。root帐户用来管理系统、安装软件、管理帐户、运行某些服务、安装/卸载文件系统、管理用户、安装软件等。另外,普通用户的很多操作也需要root权限,这通过setuid实现。
此节演示使用三段式耳机在 100ask_stm32mp157_pro 开发板上录制声音、播放音频。 注意: 需要准备一个带麦克风的三段式耳机,如下图所示:
存储的配置总结下只有2步:持久化配置 和 权限配置 。一般来说这两步是可以合在一起的,只是使用多路径软件时需要分开来讲(多路径软件多了一个多路径聚合的步骤)。
操作系统中,用来管理和存储文件信息的软件机构称为文件管理系统,简称文件系统。具体来说,这部分系统就是负责为用户建立、读取、修改和转储文件,控制文件的存取,当用户不再使用时撤销文件等。
在上一篇中,我们介绍了如何在 CentOS7上安装并配置KVM,以及通过KVM安装CentOS系统。本篇则是介绍在KVM里安装完虚拟机后,如何使用KVM来管理虚拟机。
近日,绿盟科技监测发现Linux kernel 存在一个权限提升漏洞(CVE-2020-14386),由于net/packet/af_packet.c在处理AF_PACKET时存在整数溢出,导致可进行越界写从而实现权限提升,攻击者可以利用此漏洞从非特权进程获得系统root权限。使用了Linux Kernel的openshift/docker/kubernetes等虚拟化产品可能会受到该漏洞影响,导致虚拟化逃逸,请相关用户采取措施进行防护。
对于网络通讯,耳熟能详的莫过于TCP、UDP,二者皆需要ip和port。对于一般开发人员,找到一个“能用”的库就可以了,因为流式通讯,会有粘包问题,那就需要再加一个库,解决粘包问题,这样一个基本的通讯框架就OK了。很多情况下,我们并没有了解网络通讯内部的结构,对于网络7层模型也是一知半解,这些都很值得探索。考虑一种情况:当我们的linux上位机需要和嵌入式设备进行网络通讯,选择哪种网络协议比较好呢?它是位于哪种通讯层次呢?如果上位机要与多台嵌入式设备通讯,又该如何处理呢?接下来了解今天的的主角——raw socket。
跟我一起来到故事开始的地方,深入 Linux 系统的启动流程,自己编译内核并制作根文件系统,并使用 QEMU 模拟启动。
qemu-img创建磁盘文件 通过文件管理可以直接查看、修改、复制虚拟机的内部文件。例如,当系统因为配置文件无法启动 时,可以直接修改虚拟机的文件。虚拟机磁盘文件主要有raw和qcow2格式。raw格式性能最好,速度最 快,它的缺点就是不支持一些新的功能,如支持镜像,zlib磁盘压缩,AES加密等。要使用镜像功能,磁 盘格式必须为qcow2。 raw格式的话,速度稍微快点,在高版本的qemu-kvm中,几乎不比qcow2的格式快,而qcow2格式节 省空间,可动态增长,在
由于近期比较折腾,另外也找不到好的虚拟化方案,于是就把目光留在了Ubuntu+KVM上。
裸设备,是没有经过格式化的分区或磁盘,也叫裸分区(原始分区),不被Unix通过文件系统来读取的特殊字符设备。它由应用程序负责对 它进行读写操作。不经过文件系统的缓冲,是不被操作系统直接管理的设备。由于跨过操作系统管理,使得I/O效率更高。在基于SUSE Linux 10上安装Oracle 10g RAC的话,由于Oracle 10g 不支持将ocr与votingdisk 存放在ASM 磁盘中,因此,依然需要为其使用裸设备方式。SUSE Linux裸设备的配置与其他的Linux稍有差异,下面将具体描述。
利用 ethtool 可以根据需要更改以太网卡的参数,包括自动协商、速度、双工和局域网唤醒等参数。
此项目只不过是之前大三刚学python就想做点好玩的项目试试看(因此技术含量不高),后来这个成为毕业设计的一部分,长期看博客上访问量也不错,就发布出来,希望有想入门python 的朋友可以参考写来玩玩,用项目练技术,用成果获取编码的乐趣。
买了一个录音笔,效果比使用笔记本话筒录音好多了还省电。当然啦,我也曾试过使用手机录音,结果是,没能录多久就中断了(Android 就是这么不靠谱)。
在本文中,我们将介绍在基于Linux的设备上进行初始访问后,可用于后渗透阶段漏洞利用和枚举的一些自动化脚本研究。
最近在搞IoT的时候,因为没有设备,模拟跑固件经常会缺/dev/xxx,所以我就开始想,我能不能自己写一个驱动,让固件能跑起来?因此,又给自己挖了一个很大坑,不管最后能不能达到我的初衷,能学到怎么开发Linux驱动,也算是有很大的收获了。
Linux 主机权限提升问题是普遍存在的。在Web 服务器、数据库、防火墙、IOT等基础设施中,大部分都运行着Linux 操作系统,鉴于Linux 设备在大量基础设施中的数量,组织加强和保护这些设备至关重要。在内网中,渗透测试人员也将遇到大量的Linux系统。
Linux命令行佷有用、很高效,也很有趣,但有时候也很危险,尤其是在你不确定你自己在正在做什么时候。
*linux启动流程 *linu相关的指令 *软件管理相关指令 *文件系统 *Linux里的文件系统 *目录操作的常见指令 *文件和目录的创建删除 *查看文件
豌豆贴心提醒,本文阅读时间10分钟 Linux命令行佷有用、很高效,也很有趣,但有时候也很危险,尤其是在你不确定你自己在正在做什么时候。 这篇文章将会向你介绍十条命令,但你最好不要尝试着去使用。 当然,以下命令通常都是在root权限下才能将愚蠢发挥到无可救药;在普通用户身份下,破坏的只是自己的一亩三分地。 1. rm -rf 命令 rm -rf命令是删除文件夹及其内容最快的方式之一。 仅仅一丁点的敲错或无知都可能导致不可恢复的系统崩坏。 下列是一些rm 命令的选项: rm 命令在Linux下通常用来
1. 虚拟机镜像挂载及w2k8虚拟机启动自检慢问题解决办法 2. KVM虚拟化与guestfish套件 3. guestfish安装与注意事项 4. 使用guestfish查看虚拟机信息 5. 使用guestfish查看虚拟机分区及文件系统 6. 去掉磁盘空洞--KVM虚拟镜像的稀疏问题 7. 用guestfish操作虚拟机内部文件 8. guestfish修改镜像格式和大小 9. guestfish挂载、修改、运行救援方式
运维工程师(Operations)是负责维护并确保整个服务的高可用性,同时不断优化系统架构提升部署效率、优化资源利用率提高整体的ROI的专业人员。他们的基本职责是负责服务的稳定性,确保服务可以7*24H不间断地为用户提供服务。
经历了网盘的各种关闭、数据迁移和限速,国内基本只有百度网盘一家独大了。然而百度网盘推出会员、进而超级会员一波骚操作后,实在让人累觉不爱。
在VMware下的Oracle RAC 环境中,对于共享存储不够或者需要增加新的共享磁盘来配置ocr或votingdisk的多路镜像,我们可以通过vmware下的命令行来增加共享存储,然后将这些新磁盘逐一追加到虚拟机即可。下面给出具体描述。
----------管理命令---------- ps命令:查看进程 要对系统中进程进行监测控制,查看状态,内存,CPU的使用情况,使用命令:/bin/ps (1) ps :是显示瞬间进程的状态,并不动态连续; (2) top:如果想对进程运行时间监控,应该用 top 命令; (3) kill 用于杀死进程或者给进程发送信号; (4) 查看文章最后的man手册,可以查看ps的每项输出的含义,to find: STANDARD FORMAT SPE
关于DataSurgeon DataSurgeon是一款多功能的数据提取工具,该工具专为网络安全事件应急响应、渗透测试和CTF挑战而设计。在该工具的帮助下,广大研究人员可以快速从文本内容中提取出各种类型的敏感数据,其中包括电子邮件、电话号码、哈希、信用卡、URL、IP地址、MAC地址、SRV DNS记录等等! 该工具基于Rust语言开发,当前版本的DataSurgeon支持在Windows、Linux和macOS操作系统上使用。 提取功能 1、电子邮件; 2、文件; 3、电话号码;
本文最始出自http://www.360doc.com/content/12/0318/16/532901_195392228.shtml
打开 cmd 命令窗口,输入 netstat -aon(可以指定要查询的端口:netstat -aon|findstr 要查的端口号)
最近在给客户基于Suse 11 sp3安装Oracle 10g RAC,在安装完clusterware执行/u01/app/crs/root.sh时收到错误提示,Failed to upgrade Oracle Cluster Registry configuration由于当前的环境使用了多路径,从Oracle的描述来看,这是一个Oracle Bug(4679769),如果你有相同的问题,请接着往下看。 一、故障现象 suse11a:/u01/app/crs # /u01/app/crs/root.sh WARNING: directory '/u01/app' is not owned by root Checking to see if Oracle CRS stack is already configured /etc/oracle does not exist. Creating it now. Setting the permissions on OCR backup directory Setting up NS directories Failed to upgrade Oracle Cluster Registry configuration #此处为错误提示 #下面使用clsfmt命令时提示Received unexpected error,注,/u01/app/crs 为ORA_CRS_HOME。 suse11a:/ # /u01/app/crs/bin/clsfmt ocr /dev/raw/raw1 clsfmt: Received unexpected error 4 from skgfifi skgfifi: Additional information: -2 Additional information: 1073741824 #下面是具体的错误日志 suse11a:/u01/app/crs/log/suse11a/client # pwd /u01/app/crs/log/suse11a/client suse11a:/u01/app/crs/log/suse11a/client # more ocrconfig_24066.log Oracle Database 10g CRS Release 10.2.0.1.0 Production Copyright 1996, 2005 Oracle. All rights reserved. 2014-08-11 11:52:14.993: [ OCRCONF][2176517888]ocrconfig starts... 2014-08-11 11:52:14.994: [ OCRCONF][2176517888]Upgrading OCR data 2014-08-11 11:52:15.100: [ OCRRAW][2176517888]propriogid:1: INVALID FORMAT 2014-08-11 11:52:15.101: [ OCRRAW][2176517888]ibctx:1:ERROR: INVALID FORMAT 2014-08-11 11:52:15.101: [ OCRRAW][2176517888]proprinit:problem reading the bootblock or superbloc 22 2014-08-11 11:52:15.102: [ default][2176517888]a_init:7!: Backend init unsuccessful : [22] 2014-08-11 11:52:15.102: [ OCRCONF][2176517888]Exporting OCR data to [OCRUPGRADEFILE] 2014-08-11 11:52:15.102: [ OCRAPI][2176517888]a_init:7!: Backend init unsuccessful : [33] 2014-08-11 11:52:15.102: [ OCRCONF][2176517888]There was no previous version of OCR. error:[PROC-33: Oracle Cluster Registry is not configured] 2014-08-11 11:52:15.108: [ OCRRAW][2176517888]propriogid:1: INVALID FORMAT 2014-08-11 11:52:15.108: [ OCRRAW][2176517888]ibctx:1:ERROR: INVALID FORMAT 2014-08-11 11:52:15.108:
关于ninja_shell ninja_shell是一款使用了端口碰撞和AES256-GCM加密的安全Shell,该工具还支持使用指定的TCP标记、FIN、URG和PSH。 该工具使用的是原始套接字,原始模式可以绕过计算机处理TCP/IP的某些方式。与内核上的TCP/IP堆栈所做的典型封装/解封装层不同,因为我们需要手动将数据包传递给需要的应用程序。由于没有TCP/IP处理,因此它不是一个已处理的数据包。这是一个原始数据包。使用数据包的应用程序现在负责解析Header、分析数据包以及内核中TCP/IP堆
Linux进程管理和作业管理的另外几种管理命令:vmstat,dstat,pmap,glances,kill
今天继续来讲面试,已经出了将近十个美团java一面真题系列文章了,今天来讲一讲Linux命令相关内容,在全球超级计算机TOP500强操作系统排行榜中,Linux的占比最近十几年长期保持在85%以上,且一直呈现快速上升趋势。根据2016年的排行榜,Linux的占比已经高达98.80%。其实在各种大、中小型企业的服务器应用领域,Linux系统的市场份额也越来越接近这个比例,这足以说明Linux的表现是多么出色。所以面试的时候却经常会被问到,我们根据面经来进行补短板,查漏补缺。下面开始今天的干货内容吧,走起,记得点赞,点击在看哦。
qemu-kvm 该软件包主要包含KVM内核模块和基于KVM重构后的QEMU模拟器。KVM模块作为整个虚拟化环境的核心工作在系统空间,负责CPU和内存的调度。QEMU作为模拟器工作在用户空间,负责虚拟机I/O模拟。 依赖包qemu-img 主要用来QEMU磁盘镜像的管理,如新建一块磁盘镜像给虚拟机。
本文由腾讯云+社区自动同步,原文地址 https://stackoverflow.club/article/tricks_on_shell/
· Linux Kali系统镜像 https://www.offensive-security.com/kali-linux-arm-images/#1493408272250-e17e9049-9ce8
你可能听说过 TTY 和 PTY 这些缩写,也在 /dev 目录下看到过 /dev/tty[n] 设备,大概知道它们和 Linux 终端的概念有关。可是你清楚 TTY、PTY 具体指的是什么,它们有什么区别,以及它们和 shell 又是什么关系呢?为了理解这些,我们需要先回顾一下历史。
1. /proc目录 Linux 内核提供了一种通过 /proc 文件系统,在运行时访问内核内部数据结构、改变内核设置的机制。proc文件系统是一个伪文件系统,它只存在内存当中,而不占用外存空间。它以文件系统的方式为访问系统内核数据的操作提供接口。
实际上这是配置对应的容器的 Capabilities,在我们使用 docker run 的时候可以通过 --cap-add 和 --cap-drop 命令来给容器添加 LinuxCapabilities。对于大部分同学可能又要疑问 LinuxCapabilities 是什么呢?
领取专属 10元无门槛券
手把手带您无忧上云