Can not use netcat reverse shell between pc and AWS kali - amazon-ec2

I installed kali linux free tier on AWS. And I tried nc reverse shell between my pc and AWS kali. But it doesn't work. I tried to change security settings and the result was same.
What should I do to fix this problem?
enter image description here
I am gonna use below one.
enter image description here

Related

Command Line to retreive CyberPanel/Snappymail admin dashboard password on Ubuntu Virtual Machine

I recently purchased a VPS with amazon lightsail and I installed cyberpanel. As I am setting up my websites and email server I realized that I was not able to send out emails but can receive them just fine. I later found out that amazon blocks the ports on EC2 instances. So in order to use a work around I have to attach my SMTP server from AWS SES into the SMTP settings in the admin dashboard of the SnappyMail webmail dashboard. But In order to log in as admin to access it I need a password that I dont have. Since I installed cyberpanel on this Ubuntu 20.04 instance I was hoping that it would be a command line that I can type in to see what the current password is or maybe even reset or change it. Please help me
I tried to look it up on youtube but I kept getting videos that referred to rainloop. And all though it looks the same they are different softwares and I cant access it the way that I was shown in the 2 videos that I found
Run nano /usr/local/lscp/cyberpanel/rainloop/data/_data_/_default_/admin_password.txt
you will find the Password of snappymail
then (Ctrl+X) to exit NANO edit

Viewing Docker Compose web app on server outside host machine (the host is OSX)

My computer is OSX. I'm logged into an ssh connection (Ubuntu), and from there I'm ssh'ed into an OpenStack instance of Ubuntu 14.04. From this OpenStack instance I've been following a Docker-Compose tutorial from the Docker docs : https://docs.docker.com/compose/gettingstarted/
I'm on Step 4, and I'm successfully running a server that is running on http://0.0.0.0:5000/
However, I don't know how to view a GUI Google Chrome browser from my Macbook. Because whenever I go to http://0.0.0.0:5000/ it says server not found, which makes sense because it's not on my computer.
I read something about port forwarding, but I'm not sure that's right here. I'm fairly new, so please help!
Also, is this the right way to use an OpenStack machine? That you use your computer's web browser to view the web app?
I solved it myself. Turns out on OpenStack, you need to create a security group and then add it to your instance. When you create a security group, you can add a port that you want to provide public access to. And then you can view the web app on any computer by typing in your floating IP on OpenStack, colon separated by the public port address.

Unable to access MongoDB within a container within a Docker Machine instance from Windows

I am running Windows 7 on my desktop at work and I am signed in to a regular user account on the VPN. To develop software, we are to normally open a Dev VM and work from in there however recently I've been assigned a task to research Docker and Mongo DB. I have very limited access to what I can install on the main machine.
Here lies my problem:
Is it possible for me to connect to a MongoDB instance inside a container inside the docker machine from Windows and make changes? I would ideally like to use a GUI tool such as Mongo Management Studio to make changes to a Mongo database within a container.
By inspecting the Mongo container, it has the ports listed as: 0.0.0.0:32768 -> 27017/tcp
and docker-machine ip (vm name) returns 192.168.99.111.
I have commented out the 127.0.0.1 binding host ip within the mongod.conf file also.
From what I have researched so far, most users resolve their problem by connecting to their docker-machine IP with the port they've set with -p or been given with -P. Unfortunately for me, trying to connect with 192.168.99.111:32768 does not work.
I am pretty stumped and quite new to this environment. I am able to get inside the container with bash and manipulate the database there however I'm wondering if I can do this within Windows.
Thank you if anyone can help.
After reading Smutje's advice to ping the VM IP and testing it out to no avail, I attempted to find a pingable IP which would hopefully move me closer to my goal.
By doing "ifconfig" within the Boot2Docker VM (but not inside the container), I was able to locate another IP listed under eth0. This IP looks something like 134.36.xxx.xxx to me and is pingable. With the Mongo container running I can now access the database from within Mongo Management Studio by connecting to 134.36.xxx.xxx:32768 and manipulate the data from there.
If you have the option of choosing the operating system for your dev VM, go with Ubuntu and setup docker with all of the the containers you want to test on that. Either way, you will need to have a VM for testing docker on windows since it uses VirtualBox if i'm not mistaken. Instead, setup an Ubuntu VM and do all of your testing on that.

Oneiric Ubuntu Server Cloud Guest 11.10 (Ocelot) how to remote desktop in amazon aws

i am complete noob when comes to Linux . how can i connect remotely desktop or Gui to a a Ubuntu Server Cloud Guest 11.10 (Oneiric Ocelot) server in amazon aws from a windows 7 machine ,
can some one give me a link to complete tutorial
I'm going to go ahead and assume your remote Ubuntu instance doesn't have an X server installed -- i.e. you're using the command line version.
Download and install Putty and you should be able to connect to your AWS instance using the SSH keys you initially set up.
Also, recently AWS has added a new feature,
You can now log in to an EC2 instance from the AWS Management Console using an integrated SSH client.
Just right on the ec2 instance from the aws management console and click on connect and
select the second option - Connect from your browser using the MindTerm SSH Client (Java Required).
Specify the private key path and click on "launch mindterm".. thats it.

how to use ftp on amazon aws

Today is my second day of trying to use amazon and i have started to pull my hairs. I want to set up ftp with amazon. I have signed up with them and and created an instance with amazon EC2. I have downloaded the key and I am able to login with ssh using the through Terminal in my mac. I can create files in the instance through terminal.
The instance is something like following:
Public DNS: ec2-xx-xx-xxx-xxx.compute-1.amazonaws.com
I have created a index.html file at this location via terminal. But I am not able to view it in the browser using following url:
ec2-xx-xx-xxx-xxx.compute-1.amazonaws.com/index.html
I just want to create web services here which I will be using in iPhone.
Also I am not sure how to go forward. How will I get to my local files and upload them to server. In other ftps I could do it using lcd, get, put etc but these commands are not working here. can some one please help me how should I go ahead because at this moment I am just banging my head to wall. Someone please help me.
Thanks
Pankaj
Use scp to copy files over ssh:
scp -i key-pair-file file-to-upload ec2-user#instance-public-DNS:
Notice the colon at the end!
With plain EC2 instances, you also need to install some sort of Web server software to power your Web service, and open the HTTP port in the firewall.
Just in case you plan to write your Web service in Java, I have put together a series of articles (Part I, Part II, Part III) guiding through the basics of installing Apache Tomcat on an Amazon Linux EC2 instance.
EDIT 2014/11/20
Dmitry Leskov is actually the better one. You should use his approach.
Answer from 2012
You first have to setup a LAMP (Linux, Apache, mySQL, PHP) stack on your EC2 instance to run any kind of web service.
This means you have to go trough the following steps:
Create an EC2 instance
Setup EBS Storage for mySQL data
Install mySQL
Configure mySQL
Install Apache
Configure Apache
Install PHP
Configure PHP
If you need a detailed instruction, I'd recommend you to take a look at this: Building EC2 with LAMP.
To transfer files to your EC2 instance you can use any FTP client, which supports SFTP and key pairs (you can also enable PasswordAuthentication for SSH to login with credentials). I'm using Transmit with no problems.
On a related note, I encountered a strange problem where I could not FTP from a PHP script running under apache - but I could if I ran the PHP script as root from the command line. After a day of googling, I found this, which solved the problem.
Disable SELinux. (Security Enhanced Linux)
The temporary solution is:
echo 0 >/selinux/enforce
..which will prove the concept, but will not survive a reboot. There are plenty of resources out there that describe how to permanently disable SELinux.

Resources