UNDERCODE COMMUNITY
2.67K subscribers
1.23K photos
31 videos
2.65K files
79.9K links
πŸ¦‘ Undercode Cyber World!
@UndercodeCommunity


1️⃣ World first platform which Collect & Analyzes every New hacking method.
+ AI Pratice
@Undercode_Testing

2️⃣ Cyber & Tech NEWS:
@Undercode_News

3️⃣ CVE @Daily_CVE

✨ Web & Services:
β†’ Undercode.help
Download Telegram
Full OSCP
▁ β–‚ β–„ Uπ•Ÿπ”»β’Ίπ«Δ†π”¬π““β“” β–„ β–‚ ▁

πŸ¦‘NGINUX TIPS :

1) Enable Nginx acquisition module

2) filebeat modules enable nginx

3) Edit Nginx collection configuration
vi modules.d/nginx.yml


- module: nginx
access:
enabled: true
var.paths: ["/data/access.log*"]
error:
enabled: true
var.paths: ["/data/error.log*"]
- module: nginx
access:
enabled: true
var.paths: ["/data/access.log*"]
error:
enabled: true
var.paths: ["/data/error.log*"]
Set Filebeat to create Index Pattern and Dashboard on Kibana
filebeat setup

4) Restart Filebeat to take effect
docker restart filebeat


πŸ¦‘1) Create a storage volume to facilitate the joint mounting of Nginx and Filebeat containers

> docker volume create nginx-log-volume

2) Start the Nginx container and map the storage volume to the log directory

docker run -d --name nginx -p 80:80 -v nginx-log-volume:/var/log/nginx nginx:latest

3) Enter the container to modify the configuration
docker exec -it nginx /bin/bash

4) In the container environment, the default log will be input to stdout, so cancel this setting and specify the file
unlink /var/log/nginx/access.log
unlink /var/log/nginx/error.log
touch /var/log/nginx/access.log /var/log/nginx/error.log
nginx -s reload

Your not allowed to copy our tutorials!
@UndercodeTesting
@UndercodeHacking
@UndercodeSecurity
▁ β–‚ β–„ Uπ•Ÿπ”»β’Ίπ«Δ†π”¬π““β“” β–„ β–‚ ▁
▁ β–‚ β–„ Uπ•Ÿπ”»β’Ίπ«Δ†π”¬π““β“” β–„ β–‚ ▁

πŸ¦‘ the server code, the server binds the local IP and port to monitor access:


package udp;

import java.io.IOException;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetSocketAddress;

/
* UDP
*/
public class UdpServerSocket {

private byte[] buffer = new byte[1024];
private static DatagramSocket ds = null;
private DatagramPacket packet = null;
private InetSocketAddress socketAddress = null;

/

*/
public static void main(String[] args) throws Exception {
String serverHost = "127.0.0.1";
int serverPort = 3344;
UdpServerSocket udpServerSocket = new UdpServerSocket(serverHost,
serverPort);
while (true) {
udpServerSocket.receive();
udpServerSocket.response;
}
}

/
*/
public UdpServerSocket(String host, int port) throws Exception );
}

socketAddress = new InetSocketAddress(host, port);
ds = new DatagramSocket(socketAddress);
System.out.println( */

public final String receive() throws IOException {
packet = new DatagramPacket(buffer, buffer.length);
ds.receive(packet);
String info = new String(packet.getData(), 0, packet.getLength());
System.out.println("xy:" + info);
return info;
}

/
*/
public final void response(String info) throws IOException {
System.out.println(xy : " + packet.getAddress().getHostAddress()
+ ",口:" + packet.getPort());
DatagramPacket dp = new DatagramPacket(buffer, buffer.length, packet
.getAddress(), packet.getPort());
dp.setData(info.getBytes());
ds.send(dp);
}
}

Your not allowed to copy our tutorials!
@UndercodeTesting
@UndercodeHacking
@UndercodeSecurity
▁ β–‚ β–„ Uπ•Ÿπ”»β’Ίπ«Δ†π”¬π““β“” β–„ β–‚ ▁
LIST OF SMARTPHONES VULNERABLES TO WANNCRY :

Galaxy Note 2
Galaxy Tab S2
Lg g4
Galaxy S7
Xiaomi Mi 4i
Galaxy S4
Galaxy Note 4
ZTE x500
Galaxy Note 3
Galaxy Tab 2
Oppo N3
Galaxy Note 5
Vivo X6 plus
Nexus 5
Nexus 5X
Galaxy Note Edge
Asus Zenfone 2
Galaxy A5
LenovoS90
OppoR7 plus
Xiaomi Redmi
Lenovo A8504
▁ β–‚ β–„ Uπ•Ÿπ”»β’Ίπ«Δ†π”¬π““β“” β–„ β–‚ ▁

πŸ¦‘Network security
#FastTips
is essentially the information security on the network. In a broad sense, all relevant technologies and theories related to the confidentiality, integrity, availability, authenticity and controllability of information on the network are the field of network security research. Ensuring the information security of the network system is the goal of network security. Information security includes two aspects: the security of information storage and the security of information transmission. Information storage security refers to the security of information in a static storage state, such as whether it will be used without authorization, etc. The transmission security of information refers to the safety of information in the dynamic transmission process. In order to ensure the security of network information transmission, there are the following issues:

γ€€γ€€(1) The monitoring of information on the network
γ€€γ€€(2) The impersonation of the user's identity
γ€€γ€€(3) The tampering of information on the network
γ€€γ€€(4) The denial of the information sent
γ€€γ€€(5) The retransmission of the information

@UndercodeTesting
▁ β–‚ β–„ Uπ•Ÿπ”»β’Ίπ«Δ†π”¬π““β“” β–„ β–‚ ▁
▁ β–‚ β–„ Uπ•Ÿπ”»β’Ίπ«Δ†π”¬π““β“” β–„ β–‚ ▁

πŸ¦‘πŸ§ How to find all files with 777 permissions on Linux


Correct file permissions are the most important part of managing your Linux system.

1) The file with 777 resolution is open for everyone to read and write.

2) Any user logged in can write to this file.

3) This can be very dangerous for your system.

In some cases, you may need to use 777 permissions, for example for a log file, etc.

But in most cases we don't need this.


A) find /path/to/dir -perm 777
The -perm command line parameter is used with the find command to find files based on rights.

You can use any permissions instead of 777 to search for files with only these permissions.

For example, to search for all files with privileges 777 in the home directory of the logged in user, type:

find $HOME -perm 777
The above command will search all files and directories with privileges 777 in the specified directory.

B) But if you do not want to include directories in this list, specify the type using the -type command line parameter :


> The command will only search for files with privileges 777 in the / var / www directory.
find /var/www -perm 777 -type f
To search only directories, enter:

find /var/www -perm 777 -type d
Hopefully this guide will help you find permissions based files and secure your Linux / Unix system.

@UndercodeTesting
▁ β–‚ β–„ Uπ•Ÿπ”»β’Ίπ«Δ†π”¬π““β“” β–„ β–‚ ▁
▁ β–‚ β–„ Uπ•Ÿπ”»β’Ίπ«Δ†π”¬π““β“” β–„ β–‚ ▁

πŸ¦‘Installing adblocker list for dnscrypt proxy
Here is a small bash script to download and update the list.

The code:

#! / bin / bash
DEST = "/ etc / dnscrypt-proxy / blacklist.txt"
#
# Blocks both adware + malware
# See for other lists https://github.com/StevenBlack/hosts
SRC = "https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts"
TMP_B_FILE = "$ (mktemp)"
TMP_B_FILE_SORTED = "$ (mktemp)"
wget --timeout = 10 --tries = 5 -qO- "$ {SRC}" | grep -Ev "(localhost)" | grep -Ev "#" | sed -E "s / (0.0.0.0 | 127.0.0.1 | 255.255.255.255) //" >> "$ {TMP_B_FILE}"
awk '/ ^ [^ #] / {print $ 1}' "$ {TMP_B_FILE}" | sort -u> "$ {TMP_B_FILE_SORTED}"
cp -f "$ {TMP_B_FILE_SORTED}" "$ DEST"
rm -f "$ {TMP_B_FILE}" "$ {TMP_B_FILE_SORTED}"
Running the script:
# ./update-adblocker.sh
Checking the list:
# more /etc/dnscrypt-proxy/blacklist.txt
Be sure to run the update-adblocker.sh script daily to get an updated list of hosts.
Add a new cron job like this:
@daily /path/to/update-adblocker.sh
Besides ads and malware , you can block fake news , gambling, porn, and social media !
How to enable dnscrypt proxy service
Use the systemctl command to enable the dnscrypt-proxy service on Linux:

$ sudo systemctl enable dnscrypt-proxy
Service start:
$ sudo systemctl start dnscrypt-proxy
Service check:
$ sudo systemctl status dnscrypt-proxy

@UndercodeTesting
▁ β–‚ β–„ Uπ•Ÿπ”»β’Ίπ«Δ†π”¬π““β“” β–„ β–‚ ▁
πŸ¦‘How to fix and prevent DNS leaks?

There are several easy methods to fix DNS leaks. Again, the most efficient option is to choose a reliable VPN provider that does not keep logs of DNS server usage. The VPN should force all traffic to pass through its own servers instead of outsiders, including your ISP's. This prevents data leakage.

1) Use custom VPN apps whenever possible. Manually configuring your VPN connection and DNS settings increases the risk of DNS leaks if you don't fully understand what you are doing.

> Sometimes you need to enable DNS leak protection in your VPN app settings. This forces DNS queries to go through the VPN provider's DNS servers.

2) As usual, you need to use the VPN switch to prevent traffic from reaching your ISP if the VPN connection is lost.

If DNS leaks continue, notify your VPN provider. This will allow technicians to find the cause and fix it. If this doesn't work, choose another VPN service.

▁ β–‚ β–„ Uπ•Ÿπ”»β’Ίπ«Δ†π”¬π““β“” β–„ β–‚ ▁