Info Security Memo
  • Blog
  • Sitemap
    • Categories
  • Contact
  • About
  • Resources
  • Tools
  • 51sec.org

Build Confidence

Focusing on Information Security 

Info Security Notes

Get Root Access to Oketeto's Instance Using Githhub & Ngrok and Create New Image For This Purpose

7/25/2022

0 Comments

 
Get Root Access to Oketeto's Instance Using Githhub & Ngrok and Create New Image For This Purpose

This post shows an interesting way to use Okteto's container with the help from Ngrok and Github. By default, when you create a namespace and deploy a project to it, you will get a container running on four core CPU with 32GB memory machine. You wont be able to have console and root access to it, and it is even not opened to Internet. With the help of Ngrok and Github, all those become possible.


Note: This usage is violating Oketeo TOS and your Okteto account might be got suspended. 

Using Existing Github Project to Get Root Access to Okteto Instance


1 Got to github project majalaya/xssh:


2 Fork it into your own Repository



3 Go to https://ngrok.com/. Log in or sign up if you do not have an account

Click Your Authtoken link and copy your ngrok token.



4 Change your token value in config.sh file from your xssh repository


5 Log into Okteto.com with your Github account



6 Launch Dev Environment



7 Choose from Github, then select your xssh repository


8 Select main branch then launch




9 Your xssh project will be deployed in a minute.





10 You will be able to see a new agent shows in Ngrok's Tunnels menu page.



Create Your Own Image

 

docker run -d -it ubuntu bash

docker ps

docker exec -it xxxxxxxxxxxxxxxx  bash



apt install nano -y

apt install wget -y

apt install unzip -y

apt install ssh -y

nano /etc/ssh/sshd.config

PermitRootLogin Yes

PasswordAuthentication yes


service ssh restart


passwd root


wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip

unzip ngrok-stable-linux-amd64.zip

ls

rm ngrok*.zip

mv ./ngrok /usr/bin/ngrok
ngrok




ngrok authtoken 2C8vUaTWbwplW7bMlWggllXwY7V_2vJaHYXyYZUbiuxRrXuzc

ngrok

nohup ngrok tcp 22


apt install htop

htop



References

  • https://github.com/51sec/xssh
  • https://github.com/majalaya/xssh
  • https://github.com/MetaVPS/xssh
  • 永久免费4核32G的LinuxVPS







via Blogger http://blog.51sec.org/2022/07/get-root-access-to-oketetos-instance.html
July 25, 2022 at 09:03AM Cloud
0 Comments



Leave a Reply.

    Categories

    All
    Architecture
    Blog
    Checkpoint
    Cisco
    Cloud
    CyberArk
    F5
    Fortigate
    Guardium
    Juniper
    Linux
    Network
    Others
    Palo Alto
    Qualys
    Raspberry Pi
    Security
    SIEM
    Software
    Vmware
    VPN
    Wireless

    Archives

    March 2024
    February 2024
    January 2024
    December 2023
    November 2023
    October 2023
    September 2023
    August 2023
    July 2023
    June 2023
    May 2023
    April 2023
    March 2023
    February 2023
    January 2023
    December 2022
    November 2022
    October 2022
    September 2022
    August 2022
    July 2022
    June 2022
    May 2022
    April 2022
    March 2022
    February 2022
    January 2022
    December 2021
    November 2021
    October 2021
    September 2021
    August 2021
    July 2021
    June 2021
    May 2021
    April 2021
    March 2021
    February 2021
    January 2021
    December 2020
    November 2020
    October 2020
    September 2020
    August 2020
    July 2020
    October 2019
    September 2019
    June 2019
    July 2018
    May 2018
    December 2017
    August 2017
    April 2017
    March 2017
    January 2017
    December 2016
    November 2016
    October 2016
    September 2016
    August 2016
    July 2016
    June 2016
    May 2016
    April 2016
    March 2016
    February 2016
    January 2016
    December 2015
    November 2015
    October 2015
    September 2015
    August 2015
    July 2015
    June 2015
    May 2015
    April 2015
    March 2015

    Print Page:

    RSS Feed

    Email Subscribe
Powered by Create your own unique website with customizable templates.
  • Blog
  • Sitemap
    • Categories
  • Contact
  • About
  • Resources
  • Tools
  • 51sec.org